CreateAgentVersionFromCodeMetadata Class

  • java.lang.Object
    • com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata

Implements

public final class CreateAgentVersionFromCodeMetadata
implements JsonSerializable<CreateAgentVersionFromCodeMetadata>

JSON metadata for code-based agent operations (create, update, create version). The agent name comes from the URL path parameter or the `x-ms-agent-name` header, so it is not included in this model. The content hash (SHA-256 of the zip) is carried in the `x-ms-code-zip-sha256` header.

Constructor Summary

Constructor Description
CreateAgentVersionFromCodeMetadata(HostedAgentDefinition definition)

Creates an instance of CreateAgentVersionFromCodeMetadata class.

Method Summary

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

Reads an instance of CreateAgentVersionFromCodeMetadata from the JsonReader.

HostedAgentDefinition getDefinition()

Get the definition property: The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions.

String getDescription()

Get the description property: A human-readable description of the agent.

Map<String,String> getMetadata()

Get the metadata property: Set of 16 key-value pairs that can be attached to an object.

CreateAgentVersionFromCodeMetadata setDescription(String description)

Set the description property: A human-readable description of the agent.

CreateAgentVersionFromCodeMetadata setMetadata(Map<String,String> metadata)

Set the metadata property: Set of 16 key-value pairs that can be attached to an object.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

CreateAgentVersionFromCodeMetadata

public CreateAgentVersionFromCodeMetadata(HostedAgentDefinition definition)

Creates an instance of CreateAgentVersionFromCodeMetadata class.

Parameters:

definition - the definition value to set.

Method Details

fromJson

public static CreateAgentVersionFromCodeMetadata fromJson(JsonReader jsonReader)

Reads an instance of CreateAgentVersionFromCodeMetadata from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CreateAgentVersionFromCodeMetadata 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.

getDefinition

public HostedAgentDefinition getDefinition()

Get the definition property: The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions.

Returns:

the definition value.

getDescription

public String getDescription()

Get the description property: A human-readable description of the agent.

Returns:

the description value.

getMetadata

public Map<String,String> getMetadata()

Get the metadata property: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Returns:

the metadata value.

setDescription

public CreateAgentVersionFromCodeMetadata setDescription(String description)

Set the description property: A human-readable description of the agent.

Parameters:

description - the description value to set.

Returns:

the CreateAgentVersionFromCodeMetadata object itself.

setMetadata

public CreateAgentVersionFromCodeMetadata setMetadata(Map<String,String> metadata)

Set the metadata property: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Parameters:

metadata - the metadata value to set.

Returns:

the CreateAgentVersionFromCodeMetadata object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to