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

commonMain.aws.sdk.kotlin.services.account.model.PutAlternateContactRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.account.model

import aws.smithy.kotlin.runtime.SdkDsl

public class PutAlternateContactRequest private constructor(builder: Builder) {
    /**
     * Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.
     *
     * If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.
     *
     * To use this parameter, the caller must be an identity in the [organization's management account](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account) or a delegated administrator account, and the specified account ID must be a member account in the same organization. The organization must have [all features enabled](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html), and the organization must have [trusted access](https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html) enabled for the Account Management service, and optionally a [delegated admin](https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html) account assigned.
     *
     * The management account can't specify its own `AccountId`; it must call the operation in standalone context by not including the `AccountId` parameter.
     *
     * To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.
     */
    public val accountId: kotlin.String? = builder.accountId
    /**
     * Specifies which alternate contact you want to create or update.
     */
    public val alternateContactType: aws.sdk.kotlin.services.account.model.AlternateContactType? = builder.alternateContactType
    /**
     * Specifies an email address for the alternate contact.
     */
    public val emailAddress: kotlin.String? = builder.emailAddress
    /**
     * Specifies a name for the alternate contact.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Specifies a phone number for the alternate contact.
     */
    public val phoneNumber: kotlin.String? = builder.phoneNumber
    /**
     * Specifies a title for the alternate contact.
     */
    public val title: kotlin.String? = builder.title

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

    override fun toString(): kotlin.String = buildString {
        append("PutAlternateContactRequest(")
        append("accountId=$accountId,")
        append("alternateContactType=$alternateContactType,")
        append("emailAddress=*** Sensitive Data Redacted ***,")
        append("name=*** Sensitive Data Redacted ***,")
        append("phoneNumber=*** Sensitive Data Redacted ***,")
        append("title=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (alternateContactType?.hashCode() ?: 0)
        result = 31 * result + (emailAddress?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (phoneNumber?.hashCode() ?: 0)
        result = 31 * result + (title?.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 PutAlternateContactRequest

        if (accountId != other.accountId) return false
        if (alternateContactType != other.alternateContactType) return false
        if (emailAddress != other.emailAddress) return false
        if (name != other.name) return false
        if (phoneNumber != other.phoneNumber) return false
        if (title != other.title) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.
         *
         * If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.
         *
         * To use this parameter, the caller must be an identity in the [organization's management account](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account) or a delegated administrator account, and the specified account ID must be a member account in the same organization. The organization must have [all features enabled](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html), and the organization must have [trusted access](https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html) enabled for the Account Management service, and optionally a [delegated admin](https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html) account assigned.
         *
         * The management account can't specify its own `AccountId`; it must call the operation in standalone context by not including the `AccountId` parameter.
         *
         * To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.
         */
        public var accountId: kotlin.String? = null
        /**
         * Specifies which alternate contact you want to create or update.
         */
        public var alternateContactType: aws.sdk.kotlin.services.account.model.AlternateContactType? = null
        /**
         * Specifies an email address for the alternate contact.
         */
        public var emailAddress: kotlin.String? = null
        /**
         * Specifies a name for the alternate contact.
         */
        public var name: kotlin.String? = null
        /**
         * Specifies a phone number for the alternate contact.
         */
        public var phoneNumber: kotlin.String? = null
        /**
         * Specifies a title for the alternate contact.
         */
        public var title: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.account.model.PutAlternateContactRequest) : this() {
            this.accountId = x.accountId
            this.alternateContactType = x.alternateContactType
            this.emailAddress = x.emailAddress
            this.name = x.name
            this.phoneNumber = x.phoneNumber
            this.title = x.title
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy