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

commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.OptionRestrictionRegex.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elasticbeanstalk.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A regular expression representing a restriction on a string configuration option value.
 */
public class OptionRestrictionRegex private constructor(builder: Builder) {
    /**
     * A unique name representing this regular expression.
     */
    public val label: kotlin.String? = builder.label
    /**
     * The regular expression pattern that a string configuration option value with this restriction must match.
     */
    public val pattern: kotlin.String? = builder.pattern

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

    override fun toString(): kotlin.String = buildString {
        append("OptionRestrictionRegex(")
        append("label=$label,")
        append("pattern=$pattern")
        append(")")
    }

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

        if (label != other.label) return false
        if (pattern != other.pattern) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique name representing this regular expression.
         */
        public var label: kotlin.String? = null
        /**
         * The regular expression pattern that a string configuration option value with this restriction must match.
         */
        public var pattern: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.OptionRestrictionRegex) : this() {
            this.label = x.label
            this.pattern = x.pattern
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy