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

commonMain.aws.sdk.kotlin.services.codedeploy.model.CreateApplicationRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codedeploy.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents the input of a `CreateApplication` operation.
 */
public class CreateApplicationRequest private constructor(builder: Builder) {
    /**
     * The name of the application. This name must be unique with the applicable user or Amazon Web Services account.
     */
    public val applicationName: kotlin.String? = builder.applicationName
    /**
     * The destination platform type for the deployment (`Lambda`, `Server`, or `ECS`).
     */
    public val computePlatform: aws.sdk.kotlin.services.codedeploy.model.ComputePlatform? = builder.computePlatform
    /**
     * The metadata that you apply to CodeDeploy applications to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateApplicationRequest(")
        append("applicationName=$applicationName,")
        append("computePlatform=$computePlatform,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = applicationName?.hashCode() ?: 0
        result = 31 * result + (computePlatform?.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 CreateApplicationRequest

        if (applicationName != other.applicationName) return false
        if (computePlatform != other.computePlatform) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the application. This name must be unique with the applicable user or Amazon Web Services account.
         */
        public var applicationName: kotlin.String? = null
        /**
         * The destination platform type for the deployment (`Lambda`, `Server`, or `ECS`).
         */
        public var computePlatform: aws.sdk.kotlin.services.codedeploy.model.ComputePlatform? = null
        /**
         * The metadata that you apply to CodeDeploy applications to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.CreateApplicationRequest) : this() {
            this.applicationName = x.applicationName
            this.computePlatform = x.computePlatform
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy