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

commonMain.aws.sdk.kotlin.services.gamelift.model.VpcPeeringAuthorization.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.gamelift.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Represents an authorization for a VPC peering connection between the VPC for an Amazon GameLift fleet and another VPC on an account you have access to. This authorization must exist and be valid for the peering connection to be established. Authorizations are valid for 24 hours after they are issued.
 *
 * **Related actions**
 *
 * [All APIs by task](https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets)
 */
public class VpcPeeringAuthorization private constructor(builder: Builder) {
    /**
     * Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as milliseconds (for example `"1469498468.057"`).
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in Unix time as milliseconds (for example `"1469498468.057"`).
     */
    public val expirationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.expirationTime
    /**
     * A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the Amazon Web Services Management Console under account settings.
     */
    public val gameLiftAwsAccountId: kotlin.String? = builder.gameLiftAwsAccountId
    /**
     * The authorization's peer VPC Amazon Web Services account ID.
     */
    public val peerVpcAwsAccountId: kotlin.String? = builder.peerVpcAwsAccountId
    /**
     * A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the [VPC Dashboard](https://console.aws.amazon.com/vpc/) in the Amazon Web Services Management Console. Learn more about VPC peering in [VPC Peering with Amazon GameLift Fleets](https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html).
     */
    public val peerVpcId: kotlin.String? = builder.peerVpcId

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

    override fun toString(): kotlin.String = buildString {
        append("VpcPeeringAuthorization(")
        append("creationTime=$creationTime,")
        append("expirationTime=$expirationTime,")
        append("gameLiftAwsAccountId=$gameLiftAwsAccountId,")
        append("peerVpcAwsAccountId=$peerVpcAwsAccountId,")
        append("peerVpcId=$peerVpcId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationTime?.hashCode() ?: 0
        result = 31 * result + (expirationTime?.hashCode() ?: 0)
        result = 31 * result + (gameLiftAwsAccountId?.hashCode() ?: 0)
        result = 31 * result + (peerVpcAwsAccountId?.hashCode() ?: 0)
        result = 31 * result + (peerVpcId?.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 VpcPeeringAuthorization

        if (creationTime != other.creationTime) return false
        if (expirationTime != other.expirationTime) return false
        if (gameLiftAwsAccountId != other.gameLiftAwsAccountId) return false
        if (peerVpcAwsAccountId != other.peerVpcAwsAccountId) return false
        if (peerVpcId != other.peerVpcId) return false

        return true
    }

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

    public class Builder {
        /**
         * Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as milliseconds (for example `"1469498468.057"`).
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in Unix time as milliseconds (for example `"1469498468.057"`).
         */
        public var expirationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the Amazon Web Services Management Console under account settings.
         */
        public var gameLiftAwsAccountId: kotlin.String? = null
        /**
         * The authorization's peer VPC Amazon Web Services account ID.
         */
        public var peerVpcAwsAccountId: kotlin.String? = null
        /**
         * A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the [VPC Dashboard](https://console.aws.amazon.com/vpc/) in the Amazon Web Services Management Console. Learn more about VPC peering in [VPC Peering with Amazon GameLift Fleets](https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html).
         */
        public var peerVpcId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.gamelift.model.VpcPeeringAuthorization) : this() {
            this.creationTime = x.creationTime
            this.expirationTime = x.expirationTime
            this.gameLiftAwsAccountId = x.gameLiftAwsAccountId
            this.peerVpcAwsAccountId = x.peerVpcAwsAccountId
            this.peerVpcId = x.peerVpcId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy