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

commonMain.aws.sdk.kotlin.services.proton.model.CreateServiceInstanceRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.proton.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateServiceInstanceRequest private constructor(builder: Builder) {
    /**
     * The client token of the service instance to create.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The name of the service instance to create.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The name of the service the service instance is added to.
     */
    public val serviceName: kotlin.String = requireNotNull(builder.serviceName) { "A non-null value must be provided for serviceName" }
    /**
     * The spec for the service instance you want to create.
     */
    public val spec: kotlin.String = requireNotNull(builder.spec) { "A non-null value must be provided for spec" }
    /**
     * An optional list of metadata items that you can associate with the Proton service instance. A tag is a key-value pair.
     *
     * For more information, see [Proton resources and tagging](https://docs.aws.amazon.com/proton/latest/userguide/resources.html) in the *Proton User Guide*.
     */
    public val tags: List? = builder.tags
    /**
     * To create a new major and minor version of the service template, *exclude*`major Version`.
     */
    public val templateMajorVersion: kotlin.String? = builder.templateMajorVersion
    /**
     * To create a new minor version of the service template, include a `major Version`.
     */
    public val templateMinorVersion: kotlin.String? = builder.templateMinorVersion

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

    override fun toString(): kotlin.String = buildString {
        append("CreateServiceInstanceRequest(")
        append("clientToken=$clientToken,")
        append("name=$name,")
        append("serviceName=$serviceName,")
        append("spec=*** Sensitive Data Redacted ***,")
        append("tags=$tags,")
        append("templateMajorVersion=$templateMajorVersion,")
        append("templateMinorVersion=$templateMinorVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (name.hashCode())
        result = 31 * result + (serviceName.hashCode())
        result = 31 * result + (spec.hashCode())
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (templateMajorVersion?.hashCode() ?: 0)
        result = 31 * result + (templateMinorVersion?.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 CreateServiceInstanceRequest

        if (clientToken != other.clientToken) return false
        if (name != other.name) return false
        if (serviceName != other.serviceName) return false
        if (spec != other.spec) return false
        if (tags != other.tags) return false
        if (templateMajorVersion != other.templateMajorVersion) return false
        if (templateMinorVersion != other.templateMinorVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The client token of the service instance to create.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The name of the service instance to create.
         */
        public var name: kotlin.String? = null
        /**
         * The name of the service the service instance is added to.
         */
        public var serviceName: kotlin.String? = null
        /**
         * The spec for the service instance you want to create.
         */
        public var spec: kotlin.String? = null
        /**
         * An optional list of metadata items that you can associate with the Proton service instance. A tag is a key-value pair.
         *
         * For more information, see [Proton resources and tagging](https://docs.aws.amazon.com/proton/latest/userguide/resources.html) in the *Proton User Guide*.
         */
        public var tags: List? = null
        /**
         * To create a new major and minor version of the service template, *exclude*`major Version`.
         */
        public var templateMajorVersion: kotlin.String? = null
        /**
         * To create a new minor version of the service template, include a `major Version`.
         */
        public var templateMinorVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.proton.model.CreateServiceInstanceRequest) : this() {
            this.clientToken = x.clientToken
            this.name = x.name
            this.serviceName = x.serviceName
            this.spec = x.spec
            this.tags = x.tags
            this.templateMajorVersion = x.templateMajorVersion
            this.templateMinorVersion = x.templateMinorVersion
        }

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

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            if (serviceName == null) serviceName = ""
            if (spec == null) spec = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy