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

commonMain.aws.sdk.kotlin.services.ssmcontacts.model.UpdateContactRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssmcontacts.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateContactRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.
     */
    public val contactId: kotlin.String? = builder.contactId
    /**
     * The full name of the contact or escalation plan.
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.
     */
    public val plan: aws.sdk.kotlin.services.ssmcontacts.model.Plan? = builder.plan

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateContactRequest(")
        append("contactId=$contactId,")
        append("displayName=$displayName,")
        append("plan=$plan")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contactId?.hashCode() ?: 0
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (plan?.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 UpdateContactRequest

        if (contactId != other.contactId) return false
        if (displayName != other.displayName) return false
        if (plan != other.plan) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.
         */
        public var contactId: kotlin.String? = null
        /**
         * The full name of the contact or escalation plan.
         */
        public var displayName: kotlin.String? = null
        /**
         * A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.
         */
        public var plan: aws.sdk.kotlin.services.ssmcontacts.model.Plan? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.UpdateContactRequest) : this() {
            this.contactId = x.contactId
            this.displayName = x.displayName
            this.plan = x.plan
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.ssmcontacts.model.Plan] inside the given [block]
         */
        public fun plan(block: aws.sdk.kotlin.services.ssmcontacts.model.Plan.Builder.() -> kotlin.Unit) {
            this.plan = aws.sdk.kotlin.services.ssmcontacts.model.Plan.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy