All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.bedrockagent.model.AgentAliasSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockagent.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Contains details about an alias of an agent.
 */
public class AgentAliasSummary private constructor(builder: Builder) {
    /**
     * Contains details about
     */
    public val agentAliasId: kotlin.String = requireNotNull(builder.agentAliasId) { "A non-null value must be provided for agentAliasId" }
    /**
     * The name of the alias.
     */
    public val agentAliasName: kotlin.String = requireNotNull(builder.agentAliasName) { "A non-null value must be provided for agentAliasName" }
    /**
     * The status of the alias.
     */
    public val agentAliasStatus: aws.sdk.kotlin.services.bedrockagent.model.AgentAliasStatus = requireNotNull(builder.agentAliasStatus) { "A non-null value must be provided for agentAliasStatus" }
    /**
     * The time at which the alias of the agent was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * The description of the alias.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Contains details about the version of the agent with which the alias is associated.
     */
    public val routingConfiguration: List? = builder.routingConfiguration
    /**
     * The time at which the alias was last updated.
     */
    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.AgentAliasSummary = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AgentAliasSummary(")
        append("agentAliasId=$agentAliasId,")
        append("agentAliasName=$agentAliasName,")
        append("agentAliasStatus=$agentAliasStatus,")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("routingConfiguration=$routingConfiguration,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = agentAliasId.hashCode()
        result = 31 * result + (agentAliasName.hashCode())
        result = 31 * result + (agentAliasStatus.hashCode())
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (routingConfiguration?.hashCode() ?: 0)
        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 AgentAliasSummary

        if (agentAliasId != other.agentAliasId) return false
        if (agentAliasName != other.agentAliasName) return false
        if (agentAliasStatus != other.agentAliasStatus) 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.AgentAliasSummary = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Contains details about
         */
        public var agentAliasId: kotlin.String? = null
        /**
         * The name of the alias.
         */
        public var agentAliasName: kotlin.String? = null
        /**
         * The status of the alias.
         */
        public var agentAliasStatus: aws.sdk.kotlin.services.bedrockagent.model.AgentAliasStatus? = null
        /**
         * The time at which the alias of the agent was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The description of the alias.
         */
        public var description: kotlin.String? = null
        /**
         * Contains details about the version of the agent with which the alias is associated.
         */
        public var routingConfiguration: List? = null
        /**
         * The time at which the alias was last updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.AgentAliasSummary) : this() {
            this.agentAliasId = x.agentAliasId
            this.agentAliasName = x.agentAliasName
            this.agentAliasStatus = x.agentAliasStatus
            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.AgentAliasSummary = AgentAliasSummary(this)

        internal fun correctErrors(): Builder {
            if (agentAliasId == null) agentAliasId = ""
            if (agentAliasName == null) agentAliasName = ""
            if (agentAliasStatus == null) agentAliasStatus = AgentAliasStatus.SdkUnknown("no value provided")
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy