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

commonMain.aws.sdk.kotlin.services.partnercentralselling.model.SenderContact.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.partnercentralselling.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An object that contains the details of the sender-provided contact person for the `EngagementInvitation`.
 */
public class SenderContact private constructor(builder: Builder) {
    /**
     * The sender-provided contact's title (job title or role) associated with the `EngagementInvitation`.
     */
    public val businessTitle: kotlin.String? = builder.businessTitle
    /**
     * The sender-provided contact's email address associated with the `EngagementInvitation`.
     */
    public val email: kotlin.String = requireNotNull(builder.email) { "A non-null value must be provided for email" }
    /**
     * The sender-provided contact's last name associated with the `EngagementInvitation`.
     */
    public val firstName: kotlin.String? = builder.firstName
    /**
     * The sender-provided contact's first name associated with the `EngagementInvitation`.
     */
    public val lastName: kotlin.String? = builder.lastName
    /**
     * The sender-provided contact's phone number associated with the `EngagementInvitation`.
     */
    public val phone: kotlin.String? = builder.phone

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

    override fun toString(): kotlin.String = buildString {
        append("SenderContact(")
        append("businessTitle=*** Sensitive Data Redacted ***,")
        append("email=*** Sensitive Data Redacted ***,")
        append("firstName=*** Sensitive Data Redacted ***,")
        append("lastName=*** Sensitive Data Redacted ***,")
        append("phone=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = businessTitle?.hashCode() ?: 0
        result = 31 * result + (email.hashCode())
        result = 31 * result + (firstName?.hashCode() ?: 0)
        result = 31 * result + (lastName?.hashCode() ?: 0)
        result = 31 * result + (phone?.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 SenderContact

        if (businessTitle != other.businessTitle) return false
        if (email != other.email) return false
        if (firstName != other.firstName) return false
        if (lastName != other.lastName) return false
        if (phone != other.phone) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The sender-provided contact's title (job title or role) associated with the `EngagementInvitation`.
         */
        public var businessTitle: kotlin.String? = null
        /**
         * The sender-provided contact's email address associated with the `EngagementInvitation`.
         */
        public var email: kotlin.String? = null
        /**
         * The sender-provided contact's last name associated with the `EngagementInvitation`.
         */
        public var firstName: kotlin.String? = null
        /**
         * The sender-provided contact's first name associated with the `EngagementInvitation`.
         */
        public var lastName: kotlin.String? = null
        /**
         * The sender-provided contact's phone number associated with the `EngagementInvitation`.
         */
        public var phone: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.partnercentralselling.model.SenderContact) : this() {
            this.businessTitle = x.businessTitle
            this.email = x.email
            this.firstName = x.firstName
            this.lastName = x.lastName
            this.phone = x.phone
        }

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

        internal fun correctErrors(): Builder {
            if (email == null) email = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy