AgentOptimizationJob Class

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

Implements

public final class AgentOptimizationJob
implements JsonSerializable<AgentOptimizationJob>

Agent optimization job resource — a long-running job that produces candidate changes to a Foundry agent configuration.

Constructor Summary

Constructor Description
AgentOptimizationJob(AgentOptimizationModelConfiguration optimizationModelConfiguration, AgentOptimizationConfigurationBase optimizationConfiguration)

Creates an instance of AgentOptimizationJob class.

Method Summary

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

Reads an instance of AgentOptimizationJob from the JsonReader.

OffsetDateTime getCreatedAt()

Get the createdAt property: The timestamp when the job was created, represented in Unix time.

String getDisplayName()

Get the displayName property: Human-readable label.

ApiError getError()

Get the error property: Error details — populated only on failure.

String getId()

Get the id property: Server-assigned unique identifier.

AgentOptimizationConfigurationBase getOptimizationConfiguration()

Get the optimizationConfiguration property: Type-specific optimization configuration.

AgentOptimizationModelConfiguration getOptimizationModelConfiguration()

Get the optimizationModelConfiguration property: Model used to generate candidate changes.

AgentOptimizationJobResult getResult()

Get the result property: Result produced on success.

Duration getRunDuration()

Get the runDuration property: Duration for which the job has been running, in milliseconds.

JobStatus getStatus()

Get the status property: Current lifecycle status.

AgentOptimizationTargetConfiguration getTargetConfiguration()

Get the targetConfiguration property: Foundry agent whose configuration is optimized.

OffsetDateTime getUpdatedAt()

Get the updatedAt property: The timestamp when the job was last updated, represented in Unix time.

List<String> getWarnings()

Get the warnings property: Non-fatal warnings emitted during optimization.

AgentOptimizationJob setDisplayName(String displayName)

Set the displayName property: Human-readable label.

AgentOptimizationJob setTargetConfiguration(AgentOptimizationTargetConfiguration targetConfiguration)

Set the targetConfiguration property: Foundry agent whose configuration is optimized.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

AgentOptimizationJob

public AgentOptimizationJob(AgentOptimizationModelConfiguration optimizationModelConfiguration, AgentOptimizationConfigurationBase optimizationConfiguration)

Creates an instance of AgentOptimizationJob class.

Parameters:

optimizationModelConfiguration - the optimizationModelConfiguration value to set.
optimizationConfiguration - the optimizationConfiguration value to set.

Method Details

fromJson

public static AgentOptimizationJob fromJson(JsonReader jsonReader)

Reads an instance of AgentOptimizationJob from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getCreatedAt

public OffsetDateTime getCreatedAt()

Get the createdAt property: The timestamp when the job was created, represented in Unix time.

Returns:

the createdAt value.

getDisplayName

public String getDisplayName()

Get the displayName property: Human-readable label. Omitted when no label is needed; it has no uniqueness, routing, or idempotency semantics.

Returns:

the displayName value.

getError

public ApiError getError()

Get the error property: Error details — populated only on failure.

Returns:

the error value.

getId

public String getId()

Get the id property: Server-assigned unique identifier.

Returns:

the id value.

getOptimizationConfiguration

public AgentOptimizationConfigurationBase getOptimizationConfiguration()

Get the optimizationConfiguration property: Type-specific optimization configuration.

Returns:

the optimizationConfiguration value.

getOptimizationModelConfiguration

public AgentOptimizationModelConfiguration getOptimizationModelConfiguration()

Get the optimizationModelConfiguration property: Model used to generate candidate changes. An existing deployment name is also accepted.

Returns:

the optimizationModelConfiguration value.

getResult

public AgentOptimizationJobResult getResult()

Get the result property: Result produced on success.

Returns:

the result value.

getRunDuration

public Duration getRunDuration()

Get the runDuration property: Duration for which the job has been running, in milliseconds.

Returns:

the runDuration value.

getStatus

public JobStatus getStatus()

Get the status property: Current lifecycle status.

Returns:

the status value.

getTargetConfiguration

public AgentOptimizationTargetConfiguration getTargetConfiguration()

Get the targetConfiguration property: Foundry agent whose configuration is optimized. Omitted when the workflow does not target a registered Foundry agent.

Returns:

the targetConfiguration value.

getUpdatedAt

public OffsetDateTime getUpdatedAt()

Get the updatedAt property: The timestamp when the job was last updated, represented in Unix time.

Returns:

the updatedAt value.

getWarnings

public List<String> getWarnings()

Get the warnings property: Non-fatal warnings emitted during optimization. Omitted when no warnings were produced.

Returns:

the warnings value.

setDisplayName

public AgentOptimizationJob setDisplayName(String displayName)

Set the displayName property: Human-readable label. Omitted when no label is needed; it has no uniqueness, routing, or idempotency semantics.

Parameters:

displayName - the displayName value to set.

Returns:

the AgentOptimizationJob object itself.

setTargetConfiguration

public AgentOptimizationJob setTargetConfiguration(AgentOptimizationTargetConfiguration targetConfiguration)

Set the targetConfiguration property: Foundry agent whose configuration is optimized. Omitted when the workflow does not target a registered Foundry agent.

Parameters:

targetConfiguration - the targetConfiguration value to set.

Returns:

the AgentOptimizationJob object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to