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

commonMain.aws.sdk.kotlin.services.elasticache.model.Ec2SecurityGroup.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elasticache.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Provides ownership and status information for an Amazon EC2 security group.
 */
public class Ec2SecurityGroup private constructor(builder: Builder) {
    /**
     * The name of the Amazon EC2 security group.
     */
    public val ec2SecurityGroupName: kotlin.String? = builder.ec2SecurityGroupName
    /**
     * The Amazon account ID of the Amazon EC2 security group owner.
     */
    public val ec2SecurityGroupOwnerId: kotlin.String? = builder.ec2SecurityGroupOwnerId
    /**
     * The status of the Amazon EC2 security group.
     */
    public val status: kotlin.String? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("Ec2SecurityGroup(")
        append("ec2SecurityGroupName=$ec2SecurityGroupName,")
        append("ec2SecurityGroupOwnerId=$ec2SecurityGroupOwnerId,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ec2SecurityGroupName?.hashCode() ?: 0
        result = 31 * result + (ec2SecurityGroupOwnerId?.hashCode() ?: 0)
        result = 31 * result + (status?.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 Ec2SecurityGroup

        if (ec2SecurityGroupName != other.ec2SecurityGroupName) return false
        if (ec2SecurityGroupOwnerId != other.ec2SecurityGroupOwnerId) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the Amazon EC2 security group.
         */
        public var ec2SecurityGroupName: kotlin.String? = null
        /**
         * The Amazon account ID of the Amazon EC2 security group owner.
         */
        public var ec2SecurityGroupOwnerId: kotlin.String? = null
        /**
         * The status of the Amazon EC2 security group.
         */
        public var status: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticache.model.Ec2SecurityGroup) : this() {
            this.ec2SecurityGroupName = x.ec2SecurityGroupName
            this.ec2SecurityGroupOwnerId = x.ec2SecurityGroupOwnerId
            this.status = x.status
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy