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

commonMain.aws.sdk.kotlin.services.lightsail.model.DeleteContactMethodRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DeleteContactMethodRequest private constructor(builder: Builder) {
    /**
     * The protocol that will be deleted, such as `Email` or `SMS` (text messaging).
     *
     * To delete an `Email` and an `SMS` contact method if you added both, you must run separate `DeleteContactMethod` actions to delete each protocol.
     */
    public val protocol: aws.sdk.kotlin.services.lightsail.model.ContactProtocol? = builder.protocol

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

    override fun toString(): kotlin.String = buildString {
        append("DeleteContactMethodRequest(")
        append("protocol=$protocol")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = protocol?.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 DeleteContactMethodRequest

        if (protocol != other.protocol) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The protocol that will be deleted, such as `Email` or `SMS` (text messaging).
         *
         * To delete an `Email` and an `SMS` contact method if you added both, you must run separate `DeleteContactMethod` actions to delete each protocol.
         */
        public var protocol: aws.sdk.kotlin.services.lightsail.model.ContactProtocol? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.DeleteContactMethodRequest) : this() {
            this.protocol = x.protocol
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy