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

commonMain.aws.sdk.kotlin.services.bedrock.model.ProvisionedModelSummary.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.time.Instant

/**
 * Set of fields associated with a provisioned throughput.
 */
public class ProvisionedModelSummary private constructor(builder: Builder) {
    /**
     * Commitment duration for the provisioned throughput.
     */
    public val commitmentDuration: aws.sdk.kotlin.services.bedrock.model.CommitmentDuration? = builder.commitmentDuration
    /**
     * Commitment expiration time for the provisioned throughput.
     */
    public val commitmentExpirationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.commitmentExpirationTime
    /**
     * The time that this provisioned throughput was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
    /**
     * Desired model ARN.
     */
    public val desiredModelArn: kotlin.String = requireNotNull(builder.desiredModelArn) { "A non-null value must be provided for desiredModelArn" }
    /**
     * Desired model units.
     */
    public val desiredModelUnits: kotlin.Int = requireNotNull(builder.desiredModelUnits) { "A non-null value must be provided for desiredModelUnits" }
    /**
     * Foundation model ARN.
     */
    public val foundationModelArn: kotlin.String = requireNotNull(builder.foundationModelArn) { "A non-null value must be provided for foundationModelArn" }
    /**
     * The time that this provisioned throughput was last modified.
     */
    public val lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModifiedTime) { "A non-null value must be provided for lastModifiedTime" }
    /**
     * The ARN of the model associated with this provisioned throughput.
     */
    public val modelArn: kotlin.String = requireNotNull(builder.modelArn) { "A non-null value must be provided for modelArn" }
    /**
     * The number of model units allocated.
     */
    public val modelUnits: kotlin.Int = requireNotNull(builder.modelUnits) { "A non-null value must be provided for modelUnits" }
    /**
     * The ARN of the provisioned throughput.
     */
    public val provisionedModelArn: kotlin.String = requireNotNull(builder.provisionedModelArn) { "A non-null value must be provided for provisionedModelArn" }
    /**
     * The name of the provisioned throughput.
     */
    public val provisionedModelName: kotlin.String = requireNotNull(builder.provisionedModelName) { "A non-null value must be provided for provisionedModelName" }
    /**
     * Status of the provisioned throughput.
     */
    public val status: aws.sdk.kotlin.services.bedrock.model.ProvisionedModelStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }

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

    override fun toString(): kotlin.String = buildString {
        append("ProvisionedModelSummary(")
        append("commitmentDuration=$commitmentDuration,")
        append("commitmentExpirationTime=$commitmentExpirationTime,")
        append("creationTime=$creationTime,")
        append("desiredModelArn=$desiredModelArn,")
        append("desiredModelUnits=$desiredModelUnits,")
        append("foundationModelArn=$foundationModelArn,")
        append("lastModifiedTime=$lastModifiedTime,")
        append("modelArn=$modelArn,")
        append("modelUnits=$modelUnits,")
        append("provisionedModelArn=$provisionedModelArn,")
        append("provisionedModelName=$provisionedModelName,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = commitmentDuration?.hashCode() ?: 0
        result = 31 * result + (commitmentExpirationTime?.hashCode() ?: 0)
        result = 31 * result + (creationTime.hashCode())
        result = 31 * result + (desiredModelArn.hashCode())
        result = 31 * result + (desiredModelUnits)
        result = 31 * result + (foundationModelArn.hashCode())
        result = 31 * result + (lastModifiedTime.hashCode())
        result = 31 * result + (modelArn.hashCode())
        result = 31 * result + (modelUnits)
        result = 31 * result + (provisionedModelArn.hashCode())
        result = 31 * result + (provisionedModelName.hashCode())
        result = 31 * result + (status.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 ProvisionedModelSummary

        if (commitmentDuration != other.commitmentDuration) return false
        if (commitmentExpirationTime != other.commitmentExpirationTime) return false
        if (creationTime != other.creationTime) return false
        if (desiredModelArn != other.desiredModelArn) return false
        if (desiredModelUnits != other.desiredModelUnits) return false
        if (foundationModelArn != other.foundationModelArn) return false
        if (lastModifiedTime != other.lastModifiedTime) return false
        if (modelArn != other.modelArn) return false
        if (modelUnits != other.modelUnits) return false
        if (provisionedModelArn != other.provisionedModelArn) return false
        if (provisionedModelName != other.provisionedModelName) return false
        if (status != other.status) return false

        return true
    }

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

    public class Builder {
        /**
         * Commitment duration for the provisioned throughput.
         */
        public var commitmentDuration: aws.sdk.kotlin.services.bedrock.model.CommitmentDuration? = null
        /**
         * Commitment expiration time for the provisioned throughput.
         */
        public var commitmentExpirationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time that this provisioned throughput was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Desired model ARN.
         */
        public var desiredModelArn: kotlin.String? = null
        /**
         * Desired model units.
         */
        public var desiredModelUnits: kotlin.Int? = null
        /**
         * Foundation model ARN.
         */
        public var foundationModelArn: kotlin.String? = null
        /**
         * The time that this provisioned throughput was last modified.
         */
        public var lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN of the model associated with this provisioned throughput.
         */
        public var modelArn: kotlin.String? = null
        /**
         * The number of model units allocated.
         */
        public var modelUnits: kotlin.Int? = null
        /**
         * The ARN of the provisioned throughput.
         */
        public var provisionedModelArn: kotlin.String? = null
        /**
         * The name of the provisioned throughput.
         */
        public var provisionedModelName: kotlin.String? = null
        /**
         * Status of the provisioned throughput.
         */
        public var status: aws.sdk.kotlin.services.bedrock.model.ProvisionedModelStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrock.model.ProvisionedModelSummary) : this() {
            this.commitmentDuration = x.commitmentDuration
            this.commitmentExpirationTime = x.commitmentExpirationTime
            this.creationTime = x.creationTime
            this.desiredModelArn = x.desiredModelArn
            this.desiredModelUnits = x.desiredModelUnits
            this.foundationModelArn = x.foundationModelArn
            this.lastModifiedTime = x.lastModifiedTime
            this.modelArn = x.modelArn
            this.modelUnits = x.modelUnits
            this.provisionedModelArn = x.provisionedModelArn
            this.provisionedModelName = x.provisionedModelName
            this.status = x.status
        }

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

        internal fun correctErrors(): Builder {
            if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
            if (desiredModelArn == null) desiredModelArn = ""
            if (desiredModelUnits == null) desiredModelUnits = 0
            if (foundationModelArn == null) foundationModelArn = ""
            if (lastModifiedTime == null) lastModifiedTime = Instant.fromEpochSeconds(0)
            if (modelArn == null) modelArn = ""
            if (modelUnits == null) modelUnits = 0
            if (provisionedModelArn == null) provisionedModelArn = ""
            if (provisionedModelName == null) provisionedModelName = ""
            if (status == null) status = ProvisionedModelStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy