ModelRouterAttemptResult Class

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

Implements

public final class ModelRouterAttemptResult
implements JsonSerializable<ModelRouterAttemptResult>

The HTTP-style result returned by a model routing attempt.

Method Summary

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

Reads an instance of ModelRouterAttemptResult from the JsonReader.

ModelRouterAttemptError getError()

Get the error property: Error details returned when the attempt did not succeed.

Map<String,BinaryData> getHeaders()

Get the headers property: Response headers returned by the model.

int getStatus()

Get the status property: The HTTP status code returned by the model.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ModelRouterAttemptResult fromJson(JsonReader jsonReader)

Reads an instance of ModelRouterAttemptResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getError

public ModelRouterAttemptError getError()

Get the error property: Error details returned when the attempt did not succeed.

Returns:

the error value.

getHeaders

public Map<String,BinaryData> getHeaders()

Get the headers property: Response headers returned by the model.

Returns:

the headers value.

getStatus

public int getStatus()

Get the status property: The HTTP status code returned by the model.

Returns:

the status value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to