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

commonMain.aws.sdk.kotlin.services.gamelift.model.CreateFleetResponse.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 CreateFleetResponse private constructor(builder: Builder) {
    /**
     * The properties for the new fleet, including the current status. All fleets are placed in `NEW` status on creation.
     */
    public val fleetAttributes: aws.sdk.kotlin.services.gamelift.model.FleetAttributes? = builder.fleetAttributes
    /**
     * The fleet's locations and life-cycle status of each location. For new fleets, the status of all locations is set to `NEW`. During fleet creation, Amazon GameLift updates each location status as instances are deployed there and prepared for game hosting. This list includes an entry for the fleet's home Region. For fleets with no remote locations, only one entry, representing the home Region, is returned.
     */
    public val locationStates: List? = builder.locationStates

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

    override fun toString(): kotlin.String = buildString {
        append("CreateFleetResponse(")
        append("fleetAttributes=$fleetAttributes,")
        append("locationStates=$locationStates")
        append(")")
    }

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

        if (fleetAttributes != other.fleetAttributes) return false
        if (locationStates != other.locationStates) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The properties for the new fleet, including the current status. All fleets are placed in `NEW` status on creation.
         */
        public var fleetAttributes: aws.sdk.kotlin.services.gamelift.model.FleetAttributes? = null
        /**
         * The fleet's locations and life-cycle status of each location. For new fleets, the status of all locations is set to `NEW`. During fleet creation, Amazon GameLift updates each location status as instances are deployed there and prepared for game hosting. This list includes an entry for the fleet's home Region. For fleets with no remote locations, only one entry, representing the home Region, is returned.
         */
        public var locationStates: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.gamelift.model.CreateFleetResponse) : this() {
            this.fleetAttributes = x.fleetAttributes
            this.locationStates = x.locationStates
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy