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

commonMain.aws.sdk.kotlin.services.redshift.model.IpRange.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.redshift.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes an IP range used in a security group.
 */
public class IpRange private constructor(builder: Builder) {
    /**
     * The IP range in Classless Inter-Domain Routing (CIDR) notation.
     */
    public val cidrip: kotlin.String? = builder.cidrip
    /**
     * The status of the IP range, for example, "authorized".
     */
    public val status: kotlin.String? = builder.status
    /**
     * The list of tags for the IP range.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("IpRange(")
        append("cidrip=$cidrip,")
        append("status=$status,")
        append("tags=$tags")
        append(")")
    }

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

        if (cidrip != other.cidrip) return false
        if (status != other.status) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The IP range in Classless Inter-Domain Routing (CIDR) notation.
         */
        public var cidrip: kotlin.String? = null
        /**
         * The status of the IP range, for example, "authorized".
         */
        public var status: kotlin.String? = null
        /**
         * The list of tags for the IP range.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.IpRange) : this() {
            this.cidrip = x.cidrip
            this.status = x.status
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy