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

commonMain.aws.sdk.kotlin.services.eks.model.CreateEksAnywhereSubscriptionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.eks.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateEksAnywhereSubscriptionRequest private constructor(builder: Builder) {
    /**
     * A boolean indicating whether the subscription auto renews at the end of the term.
     */
    public val autoRenew: kotlin.Boolean? = builder.autoRenew
    /**
     * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
     */
    public val clientRequestToken: kotlin.String? = builder.clientRequestToken
    /**
     * The number of licenses to purchase with the subscription. Valid values are between 1 and 100. This value can't be changed after creating the subscription.
     */
    public val licenseQuantity: kotlin.Int? = builder.licenseQuantity
    /**
     * The license type for all licenses in the subscription. Valid value is CLUSTER. With the CLUSTER license type, each license covers support for a single EKS Anywhere cluster.
     */
    public val licenseType: aws.sdk.kotlin.services.eks.model.EksAnywhereSubscriptionLicenseType? = builder.licenseType
    /**
     * The unique name for your subscription. It must be unique in your Amazon Web Services account in the Amazon Web Services Region you're creating the subscription in. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphabetic character and can't be longer than 100 characters.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The metadata for a subscription to assist with categorization and organization. Each tag consists of a key and an optional value. Subscription tags don't propagate to any other resources associated with the subscription.
     */
    public val tags: Map? = builder.tags
    /**
     * An object representing the term duration and term unit type of your subscription. This determines the term length of your subscription. Valid values are MONTHS for term unit and 12 or 36 for term duration, indicating a 12 month or 36 month subscription. This value cannot be changed after creating the subscription.
     */
    public val term: aws.sdk.kotlin.services.eks.model.EksAnywhereSubscriptionTerm? = builder.term

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

    override fun toString(): kotlin.String = buildString {
        append("CreateEksAnywhereSubscriptionRequest(")
        append("autoRenew=$autoRenew,")
        append("clientRequestToken=$clientRequestToken,")
        append("licenseQuantity=$licenseQuantity,")
        append("licenseType=$licenseType,")
        append("name=$name,")
        append("tags=$tags,")
        append("term=$term")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoRenew?.hashCode() ?: 0
        result = 31 * result + (clientRequestToken?.hashCode() ?: 0)
        result = 31 * result + (licenseQuantity ?: 0)
        result = 31 * result + (licenseType?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (term?.hashCode() ?: 0)
        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 CreateEksAnywhereSubscriptionRequest

        if (autoRenew != other.autoRenew) return false
        if (clientRequestToken != other.clientRequestToken) return false
        if (licenseQuantity != other.licenseQuantity) return false
        if (licenseType != other.licenseType) return false
        if (name != other.name) return false
        if (tags != other.tags) return false
        if (term != other.term) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A boolean indicating whether the subscription auto renews at the end of the term.
         */
        public var autoRenew: kotlin.Boolean? = null
        /**
         * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
         */
        public var clientRequestToken: kotlin.String? = null
        /**
         * The number of licenses to purchase with the subscription. Valid values are between 1 and 100. This value can't be changed after creating the subscription.
         */
        public var licenseQuantity: kotlin.Int? = null
        /**
         * The license type for all licenses in the subscription. Valid value is CLUSTER. With the CLUSTER license type, each license covers support for a single EKS Anywhere cluster.
         */
        public var licenseType: aws.sdk.kotlin.services.eks.model.EksAnywhereSubscriptionLicenseType? = null
        /**
         * The unique name for your subscription. It must be unique in your Amazon Web Services account in the Amazon Web Services Region you're creating the subscription in. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphabetic character and can't be longer than 100 characters.
         */
        public var name: kotlin.String? = null
        /**
         * The metadata for a subscription to assist with categorization and organization. Each tag consists of a key and an optional value. Subscription tags don't propagate to any other resources associated with the subscription.
         */
        public var tags: Map? = null
        /**
         * An object representing the term duration and term unit type of your subscription. This determines the term length of your subscription. Valid values are MONTHS for term unit and 12 or 36 for term duration, indicating a 12 month or 36 month subscription. This value cannot be changed after creating the subscription.
         */
        public var term: aws.sdk.kotlin.services.eks.model.EksAnywhereSubscriptionTerm? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.CreateEksAnywhereSubscriptionRequest) : this() {
            this.autoRenew = x.autoRenew
            this.clientRequestToken = x.clientRequestToken
            this.licenseQuantity = x.licenseQuantity
            this.licenseType = x.licenseType
            this.name = x.name
            this.tags = x.tags
            this.term = x.term
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.eks.model.EksAnywhereSubscriptionTerm] inside the given [block]
         */
        public fun term(block: aws.sdk.kotlin.services.eks.model.EksAnywhereSubscriptionTerm.Builder.() -> kotlin.Unit) {
            this.term = aws.sdk.kotlin.services.eks.model.EksAnywhereSubscriptionTerm.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy