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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.PrepareAgentResponse.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

public class PrepareAgentResponse private constructor(builder: Builder) {
    /**
     * The unique identifier of the agent for which the `DRAFT` version was created.
     */
    public val agentId: kotlin.String = requireNotNull(builder.agentId) { "A non-null value must be provided for agentId" }
    /**
     * The status of the `DRAFT` version and whether it is ready for use.
     */
    public val agentStatus: aws.sdk.kotlin.services.bedrockagent.model.AgentStatus = requireNotNull(builder.agentStatus) { "A non-null value must be provided for agentStatus" }
    /**
     * The version of the agent.
     */
    public val agentVersion: kotlin.String = requireNotNull(builder.agentVersion) { "A non-null value must be provided for agentVersion" }
    /**
     * The time at which the `DRAFT` version of the agent was last prepared.
     */
    public val preparedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.preparedAt) { "A non-null value must be provided for preparedAt" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.PrepareAgentResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PrepareAgentResponse(")
        append("agentId=$agentId,")
        append("agentStatus=$agentStatus,")
        append("agentVersion=$agentVersion,")
        append("preparedAt=$preparedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = agentId.hashCode()
        result = 31 * result + (agentStatus.hashCode())
        result = 31 * result + (agentVersion.hashCode())
        result = 31 * result + (preparedAt.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 PrepareAgentResponse

        if (agentId != other.agentId) return false
        if (agentStatus != other.agentStatus) return false
        if (agentVersion != other.agentVersion) return false
        if (preparedAt != other.preparedAt) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.PrepareAgentResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The unique identifier of the agent for which the `DRAFT` version was created.
         */
        public var agentId: kotlin.String? = null
        /**
         * The status of the `DRAFT` version and whether it is ready for use.
         */
        public var agentStatus: aws.sdk.kotlin.services.bedrockagent.model.AgentStatus? = null
        /**
         * The version of the agent.
         */
        public var agentVersion: kotlin.String? = null
        /**
         * The time at which the `DRAFT` version of the agent was last prepared.
         */
        public var preparedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.PrepareAgentResponse) : this() {
            this.agentId = x.agentId
            this.agentStatus = x.agentStatus
            this.agentVersion = x.agentVersion
            this.preparedAt = x.preparedAt
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.PrepareAgentResponse = PrepareAgentResponse(this)

        internal fun correctErrors(): Builder {
            if (agentId == null) agentId = ""
            if (agentStatus == null) agentStatus = AgentStatus.SdkUnknown("no value provided")
            if (agentVersion == null) agentVersion = ""
            if (preparedAt == null) preparedAt = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy