ProtocolVersionRecord Class

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

Implements

public final class ProtocolVersionRecord
implements JsonSerializable<ProtocolVersionRecord>

A record mapping for a single protocol and its version.

Constructor Summary

Constructor Description
ProtocolVersionRecord(AgentEndpointProtocol protocol, String version)

Creates an instance of ProtocolVersionRecord class.

Method Summary

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

Reads an instance of ProtocolVersionRecord from the JsonReader.

AgentEndpointProtocol getProtocol()

Get the protocol property: The protocol type.

String getVersion()

Get the version property: The version string for the protocol, e.g.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ProtocolVersionRecord

public ProtocolVersionRecord(AgentEndpointProtocol protocol, String version)

Creates an instance of ProtocolVersionRecord class.

Parameters:

protocol - the protocol value to set.
version - the version value to set.

Method Details

fromJson

public static ProtocolVersionRecord fromJson(JsonReader jsonReader)

Reads an instance of ProtocolVersionRecord from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getProtocol

public AgentEndpointProtocol getProtocol()

Get the protocol property: The protocol type.

Returns:

the protocol value.

getVersion

public String getVersion()

Get the version property: The version string for the protocol, e.g. 'v0.1.1'.

Returns:

the version value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to