
commonMain.aws.sdk.kotlin.services.bedrockagent.model.AgentAlias.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* Contains the information of an agent alias
*/
public class AgentAlias private constructor(builder: Builder) {
/**
* Arn representation of the Agent Alias.
*/
public val agentAliasArn: kotlin.String = requireNotNull(builder.agentAliasArn) { "A non-null value must be provided for agentAliasArn" }
/**
* The list of history events for an alias for an Agent.
*/
public val agentAliasHistoryEvents: List? = builder.agentAliasHistoryEvents
/**
* Id for an Agent Alias generated at the server side.
*/
public val agentAliasId: kotlin.String = requireNotNull(builder.agentAliasId) { "A non-null value must be provided for agentAliasId" }
/**
* Name for a resource.
*/
public val agentAliasName: kotlin.String = requireNotNull(builder.agentAliasName) { "A non-null value must be provided for agentAliasName" }
/**
* The statuses an Agent Alias can be in.
*/
public val agentAliasStatus: aws.sdk.kotlin.services.bedrockagent.model.AgentAliasStatus = requireNotNull(builder.agentAliasStatus) { "A non-null value must be provided for agentAliasStatus" }
/**
* Identifier for a resource.
*/
public val agentId: kotlin.String = requireNotNull(builder.agentId) { "A non-null value must be provided for agentId" }
/**
* Client specified token used for idempotency checks
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* Time Stamp.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
/**
* Description of the Resource.
*/
public val description: kotlin.String? = builder.description
/**
* Routing configuration for an Agent alias.
*/
public val routingConfiguration: List = requireNotNull(builder.routingConfiguration) { "A non-null value must be provided for routingConfiguration" }
/**
* Time Stamp.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedAt) { "A non-null value must be provided for updatedAt" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.AgentAlias = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AgentAlias(")
append("agentAliasArn=$agentAliasArn,")
append("agentAliasHistoryEvents=$agentAliasHistoryEvents,")
append("agentAliasId=$agentAliasId,")
append("agentAliasName=$agentAliasName,")
append("agentAliasStatus=$agentAliasStatus,")
append("agentId=$agentId,")
append("clientToken=$clientToken,")
append("createdAt=$createdAt,")
append("description=$description,")
append("routingConfiguration=$routingConfiguration,")
append("updatedAt=$updatedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = agentAliasArn.hashCode()
result = 31 * result + (agentAliasHistoryEvents?.hashCode() ?: 0)
result = 31 * result + (agentAliasId.hashCode())
result = 31 * result + (agentAliasName.hashCode())
result = 31 * result + (agentAliasStatus.hashCode())
result = 31 * result + (agentId.hashCode())
result = 31 * result + (clientToken?.hashCode() ?: 0)
result = 31 * result + (createdAt.hashCode())
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (routingConfiguration.hashCode())
result = 31 * result + (updatedAt.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as AgentAlias
if (agentAliasArn != other.agentAliasArn) return false
if (agentAliasHistoryEvents != other.agentAliasHistoryEvents) return false
if (agentAliasId != other.agentAliasId) return false
if (agentAliasName != other.agentAliasName) return false
if (agentAliasStatus != other.agentAliasStatus) return false
if (agentId != other.agentId) return false
if (clientToken != other.clientToken) return false
if (createdAt != other.createdAt) return false
if (description != other.description) return false
if (routingConfiguration != other.routingConfiguration) return false
if (updatedAt != other.updatedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.AgentAlias = Builder(this).apply(block).build()
public class Builder {
/**
* Arn representation of the Agent Alias.
*/
public var agentAliasArn: kotlin.String? = null
/**
* The list of history events for an alias for an Agent.
*/
public var agentAliasHistoryEvents: List? = null
/**
* Id for an Agent Alias generated at the server side.
*/
public var agentAliasId: kotlin.String? = null
/**
* Name for a resource.
*/
public var agentAliasName: kotlin.String? = null
/**
* The statuses an Agent Alias can be in.
*/
public var agentAliasStatus: aws.sdk.kotlin.services.bedrockagent.model.AgentAliasStatus? = null
/**
* Identifier for a resource.
*/
public var agentId: kotlin.String? = null
/**
* Client specified token used for idempotency checks
*/
public var clientToken: kotlin.String? = null
/**
* Time Stamp.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Description of the Resource.
*/
public var description: kotlin.String? = null
/**
* Routing configuration for an Agent alias.
*/
public var routingConfiguration: List? = null
/**
* Time Stamp.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.AgentAlias) : this() {
this.agentAliasArn = x.agentAliasArn
this.agentAliasHistoryEvents = x.agentAliasHistoryEvents
this.agentAliasId = x.agentAliasId
this.agentAliasName = x.agentAliasName
this.agentAliasStatus = x.agentAliasStatus
this.agentId = x.agentId
this.clientToken = x.clientToken
this.createdAt = x.createdAt
this.description = x.description
this.routingConfiguration = x.routingConfiguration
this.updatedAt = x.updatedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.AgentAlias = AgentAlias(this)
internal fun correctErrors(): Builder {
if (agentAliasArn == null) agentAliasArn = ""
if (agentAliasId == null) agentAliasId = ""
if (agentAliasName == null) agentAliasName = ""
if (agentAliasStatus == null) agentAliasStatus = AgentAliasStatus.SdkUnknown("no value provided")
if (agentId == null) agentId = ""
if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
if (routingConfiguration == null) routingConfiguration = emptyList()
if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy