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

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

The 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 CreateServiceTemplateRequest private constructor(builder: Builder) {
    /**
     * A description of the service template.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The name of the service template as displayed in the developer interface.
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * A customer provided encryption key that's used to encrypt data.
     */
    public val encryptionKey: kotlin.String? = builder.encryptionKey
    /**
     * The name of the service template.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates that an Proton service pipeline *isn't* provided for your service. After it's included, it *can't* be changed. For more information, see [Template bundles](https://docs.aws.amazon.com/proton/latest/userguide/ag-template-authoring.html#ag-template-bundles) in the *Proton User Guide*.
     */
    public val pipelineProvisioning: aws.sdk.kotlin.services.proton.model.Provisioning? = builder.pipelineProvisioning
    /**
     * An optional list of metadata items that you can associate with the Proton service template. 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

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

    override fun toString(): kotlin.String = buildString {
        append("CreateServiceTemplateRequest(")
        append("description=*** Sensitive Data Redacted ***,")
        append("displayName=*** Sensitive Data Redacted ***,")
        append("encryptionKey=$encryptionKey,")
        append("name=$name,")
        append("pipelineProvisioning=$pipelineProvisioning,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (encryptionKey?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (pipelineProvisioning?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateServiceTemplateRequest

        if (description != other.description) return false
        if (displayName != other.displayName) return false
        if (encryptionKey != other.encryptionKey) return false
        if (name != other.name) return false
        if (pipelineProvisioning != other.pipelineProvisioning) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A description of the service template.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the service template as displayed in the developer interface.
         */
        public var displayName: kotlin.String? = null
        /**
         * A customer provided encryption key that's used to encrypt data.
         */
        public var encryptionKey: kotlin.String? = null
        /**
         * The name of the service template.
         */
        public var name: kotlin.String? = null
        /**
         * By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates that an Proton service pipeline *isn't* provided for your service. After it's included, it *can't* be changed. For more information, see [Template bundles](https://docs.aws.amazon.com/proton/latest/userguide/ag-template-authoring.html#ag-template-bundles) in the *Proton User Guide*.
         */
        public var pipelineProvisioning: aws.sdk.kotlin.services.proton.model.Provisioning? = null
        /**
         * An optional list of metadata items that you can associate with the Proton service template. 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

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.proton.model.CreateServiceTemplateRequest) : this() {
            this.description = x.description
            this.displayName = x.displayName
            this.encryptionKey = x.encryptionKey
            this.name = x.name
            this.pipelineProvisioning = x.pipelineProvisioning
            this.tags = x.tags
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy