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

commonMain.aws.sdk.kotlin.services.gamelift.model.CreateAliasRequest.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.gamelift.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateAliasRequest private constructor(builder: Builder) {
    /**
     * A human-readable description of the alias.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A descriptive label that is associated with an alias. Alias names do not need to be unique.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The routing configuration, including routing type and fleet target, for the alias.
     */
    public val routingStrategy: aws.sdk.kotlin.services.gamelift.model.RoutingStrategy? = builder.routingStrategy
    /**
     * A list of labels to assign to the new alias resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see [ Tagging Amazon Web Services Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *Amazon Web Services General Reference*.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateAliasRequest(")
        append("description=$description,")
        append("name=$name,")
        append("routingStrategy=$routingStrategy,")
        append("tags=$tags")
        append(")")
    }

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

        if (description != other.description) return false
        if (name != other.name) return false
        if (routingStrategy != other.routingStrategy) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A human-readable description of the alias.
         */
        public var description: kotlin.String? = null
        /**
         * A descriptive label that is associated with an alias. Alias names do not need to be unique.
         */
        public var name: kotlin.String? = null
        /**
         * The routing configuration, including routing type and fleet target, for the alias.
         */
        public var routingStrategy: aws.sdk.kotlin.services.gamelift.model.RoutingStrategy? = null
        /**
         * A list of labels to assign to the new alias resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see [ Tagging Amazon Web Services Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *Amazon Web Services General Reference*.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.gamelift.model.CreateAliasRequest) : this() {
            this.description = x.description
            this.name = x.name
            this.routingStrategy = x.routingStrategy
            this.tags = x.tags
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy