HostedAgentDefinition Class

public final class HostedAgentDefinition
extends AgentDefinition

The hosted agent definition.

Constructor Summary

Constructor Description
HostedAgentDefinition(String cpu, String memory)

Creates an instance of HostedAgentDefinition class.

Method Summary

Modifier and Type Method and Description
static HostedAgentDefinition fromJson(JsonReader jsonReader)

Reads an instance of HostedAgentDefinition from the JsonReader.

CodeConfiguration getCodeConfiguration()

Get the codeConfiguration property: Code-based deployment configuration.

ContainerConfiguration getContainerConfiguration()

Get the containerConfiguration property: Container-based deployment configuration.

String getCpu()

Get the cpu property: The CPU configuration for the hosted agent.

Map<String,String> getEnvironmentVariables()

Get the environmentVariables property: Environment variables to set in the hosted agent container.

AgentKind getKind()

Get the kind property: The kind property.

String getMemory()

Get the memory property: The memory configuration for the hosted agent.

List<ProtocolVersionRecord> getProtocolVersions()

Get the protocolVersions property: The protocols that the agent supports for ingress communication.

SessionConfiguration getSessionConfiguration()

Get the sessionConfiguration property: Optional session defaults (for example, the idle timeout) applied to sessions created for this agent version.

TelemetryConfig getTelemetryConfig()

Get the telemetryConfig property: Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics.

Boolean isMemorySnapshotEnabled()

Get the memorySnapshotEnabled property: Whether this agent version uses memory snapshots.

HostedAgentDefinition setCodeConfiguration(CodeConfiguration codeConfiguration)

Set the codeConfiguration property: Code-based deployment configuration.

HostedAgentDefinition setContainerConfiguration(ContainerConfiguration containerConfiguration)

Set the containerConfiguration property: Container-based deployment configuration.

HostedAgentDefinition setEnvironmentVariables(Map<String,String> environmentVariables)

Set the environmentVariables property: Environment variables to set in the hosted agent container.

HostedAgentDefinition setMemorySnapshotEnabled(Boolean memorySnapshotEnabled)

Set the memorySnapshotEnabled property: Whether this agent version uses memory snapshots.

HostedAgentDefinition setProtocolVersions(List<ProtocolVersionRecord> protocolVersions)

Set the protocolVersions property: The protocols that the agent supports for ingress communication.

HostedAgentDefinition setRaiConfig(RaiConfig raiConfig)

Set the raiConfig property: Configuration for Responsible AI (RAI) content filtering and safety features.

HostedAgentDefinition setSessionConfiguration(SessionConfiguration sessionConfiguration)

Set the sessionConfiguration property: Optional session defaults (for example, the idle timeout) applied to sessions created for this agent version.

HostedAgentDefinition setTelemetryConfig(TelemetryConfig telemetryConfig)

Set the telemetryConfig property: Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from AgentDefinition

Methods inherited from java.lang.Object

Constructor Details

HostedAgentDefinition

public HostedAgentDefinition(String cpu, String memory)

Creates an instance of HostedAgentDefinition class.

Parameters:

cpu - the cpu value to set.
memory - the memory value to set.

Method Details

fromJson

public static HostedAgentDefinition fromJson(JsonReader jsonReader)

Reads an instance of HostedAgentDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of HostedAgentDefinition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getCodeConfiguration

public CodeConfiguration getCodeConfiguration()

Get the codeConfiguration property: Code-based deployment configuration. Provide this for code-based deployments. Mutually exclusive with container_configuration — the service validates that exactly one is set.

Returns:

the codeConfiguration value.

getContainerConfiguration

public ContainerConfiguration getContainerConfiguration()

Get the containerConfiguration property: Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.

Returns:

the containerConfiguration value.

getCpu

public String getCpu()

Get the cpu property: The CPU configuration for the hosted agent.

Returns:

the cpu value.

getEnvironmentVariables

public Map<String,String> getEnvironmentVariables()

Get the environmentVariables property: Environment variables to set in the hosted agent container.

Returns:

the environmentVariables value.

getKind

public AgentKind getKind()

Get the kind property: The kind property.

Overrides:

HostedAgentDefinition.getKind()

Returns:

the kind value.

getMemory

public String getMemory()

Get the memory property: The memory configuration for the hosted agent.

Returns:

the memory value.

getProtocolVersions

public List<ProtocolVersionRecord> getProtocolVersions()

Get the protocolVersions property: The protocols that the agent supports for ingress communication.

Returns:

the protocolVersions value.

getSessionConfiguration

public SessionConfiguration getSessionConfiguration()

Get the sessionConfiguration property: Optional session defaults (for example, the idle timeout) applied to sessions created for this agent version.

Returns:

the sessionConfiguration value.

getTelemetryConfig

public TelemetryConfig getTelemetryConfig()

Get the telemetryConfig property: Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics.

Returns:

the telemetryConfig value.

isMemorySnapshotEnabled

public Boolean isMemorySnapshotEnabled()

Get the memorySnapshotEnabled property: Whether this agent version uses memory snapshots. Sessions for a snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the process from its image. Defaults to false.

Returns:

the memorySnapshotEnabled value.

setCodeConfiguration

public HostedAgentDefinition setCodeConfiguration(CodeConfiguration codeConfiguration)

Set the codeConfiguration property: Code-based deployment configuration. Provide this for code-based deployments. Mutually exclusive with container_configuration — the service validates that exactly one is set.

Parameters:

codeConfiguration - the codeConfiguration value to set.

Returns:

the HostedAgentDefinition object itself.

setContainerConfiguration

public HostedAgentDefinition setContainerConfiguration(ContainerConfiguration containerConfiguration)

Set the containerConfiguration property: Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.

Parameters:

containerConfiguration - the containerConfiguration value to set.

Returns:

the HostedAgentDefinition object itself.

setEnvironmentVariables

public HostedAgentDefinition setEnvironmentVariables(Map<String,String> environmentVariables)

Set the environmentVariables property: Environment variables to set in the hosted agent container.

Parameters:

environmentVariables - the environmentVariables value to set.

Returns:

the HostedAgentDefinition object itself.

setMemorySnapshotEnabled

public HostedAgentDefinition setMemorySnapshotEnabled(Boolean memorySnapshotEnabled)

Set the memorySnapshotEnabled property: Whether this agent version uses memory snapshots. Sessions for a snapshot-enabled version start from a snapshot of the agent's initialized process rather than starting the process from its image. Defaults to false.

Parameters:

memorySnapshotEnabled - the memorySnapshotEnabled value to set.

Returns:

the HostedAgentDefinition object itself.

setProtocolVersions

public HostedAgentDefinition setProtocolVersions(List<ProtocolVersionRecord> protocolVersions)

Set the protocolVersions property: The protocols that the agent supports for ingress communication.

Parameters:

protocolVersions - the protocolVersions value to set.

Returns:

the HostedAgentDefinition object itself.

setRaiConfig

public HostedAgentDefinition setRaiConfig(RaiConfig raiConfig)

Set the raiConfig property: Configuration for Responsible AI (RAI) content filtering and safety features.

Overrides:

HostedAgentDefinition.setRaiConfig(RaiConfig raiConfig)

Parameters:

raiConfig

setSessionConfiguration

public HostedAgentDefinition setSessionConfiguration(SessionConfiguration sessionConfiguration)

Set the sessionConfiguration property: Optional session defaults (for example, the idle timeout) applied to sessions created for this agent version.

Parameters:

sessionConfiguration - the sessionConfiguration value to set.

Returns:

the HostedAgentDefinition object itself.

setTelemetryConfig

public HostedAgentDefinition setTelemetryConfig(TelemetryConfig telemetryConfig)

Set the telemetryConfig property: Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics.

Parameters:

telemetryConfig - the telemetryConfig value to set.

Returns:

the HostedAgentDefinition object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

HostedAgentDefinition.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to