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

commonMain.aws.sdk.kotlin.services.bedrock.model.UpdateGuardrailResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrock.model

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

public class UpdateGuardrailResponse private constructor(builder: Builder) {
    /**
     * The ARN of the guardrail.
     */
    public val guardrailArn: kotlin.String = requireNotNull(builder.guardrailArn) { "A non-null value must be provided for guardrailArn" }
    /**
     * The unique identifier of the guardrail
     */
    public val guardrailId: kotlin.String = requireNotNull(builder.guardrailId) { "A non-null value must be provided for guardrailId" }
    /**
     * The date and time at which the guardrail was updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedAt) { "A non-null value must be provided for updatedAt" }
    /**
     * The version of the guardrail.
     */
    public val version: kotlin.String = requireNotNull(builder.version) { "A non-null value must be provided for version" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateGuardrailResponse(")
        append("guardrailArn=$guardrailArn,")
        append("guardrailId=$guardrailId,")
        append("updatedAt=$updatedAt,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = guardrailArn.hashCode()
        result = 31 * result + (guardrailId.hashCode())
        result = 31 * result + (updatedAt.hashCode())
        result = 31 * result + (version.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 UpdateGuardrailResponse

        if (guardrailArn != other.guardrailArn) return false
        if (guardrailId != other.guardrailId) return false
        if (updatedAt != other.updatedAt) return false
        if (version != other.version) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the guardrail.
         */
        public var guardrailArn: kotlin.String? = null
        /**
         * The unique identifier of the guardrail
         */
        public var guardrailId: kotlin.String? = null
        /**
         * The date and time at which the guardrail was updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The version of the guardrail.
         */
        public var version: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrock.model.UpdateGuardrailResponse) : this() {
            this.guardrailArn = x.guardrailArn
            this.guardrailId = x.guardrailId
            this.updatedAt = x.updatedAt
            this.version = x.version
        }

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

        internal fun correctErrors(): Builder {
            if (guardrailArn == null) guardrailArn = ""
            if (guardrailId == null) guardrailId = ""
            if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
            if (version == null) version = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy