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

commonMain.aws.sdk.kotlin.services.sns.model.PhoneNumberInformation.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sns.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * A list of phone numbers and their metadata.
 */
public class PhoneNumberInformation private constructor(builder: Builder) {
    /**
     * The date and time when the phone number was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The two-character code for the country or region, in ISO 3166-1 alpha-2 format.
     */
    public val iso2CountryCode: kotlin.String? = builder.iso2CountryCode
    /**
     * The capabilities of each phone number.
     */
    public val numberCapabilities: List? = builder.numberCapabilities
    /**
     * The phone number.
     */
    public val phoneNumber: kotlin.String? = builder.phoneNumber
    /**
     * The list of supported routes.
     */
    public val routeType: aws.sdk.kotlin.services.sns.model.RouteType? = builder.routeType
    /**
     * The status of the phone number.
     */
    public val status: kotlin.String? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("PhoneNumberInformation(")
        append("createdAt=$createdAt,")
        append("iso2CountryCode=$iso2CountryCode,")
        append("numberCapabilities=$numberCapabilities,")
        append("phoneNumber=*** Sensitive Data Redacted ***,")
        append("routeType=$routeType,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (iso2CountryCode?.hashCode() ?: 0)
        result = 31 * result + (numberCapabilities?.hashCode() ?: 0)
        result = 31 * result + (phoneNumber?.hashCode() ?: 0)
        result = 31 * result + (routeType?.hashCode() ?: 0)
        result = 31 * result + (status?.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 PhoneNumberInformation

        if (createdAt != other.createdAt) return false
        if (iso2CountryCode != other.iso2CountryCode) return false
        if (numberCapabilities != other.numberCapabilities) return false
        if (phoneNumber != other.phoneNumber) return false
        if (routeType != other.routeType) return false
        if (status != other.status) return false

        return true
    }

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

    public class Builder {
        /**
         * The date and time when the phone number was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The two-character code for the country or region, in ISO 3166-1 alpha-2 format.
         */
        public var iso2CountryCode: kotlin.String? = null
        /**
         * The capabilities of each phone number.
         */
        public var numberCapabilities: List? = null
        /**
         * The phone number.
         */
        public var phoneNumber: kotlin.String? = null
        /**
         * The list of supported routes.
         */
        public var routeType: aws.sdk.kotlin.services.sns.model.RouteType? = null
        /**
         * The status of the phone number.
         */
        public var status: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sns.model.PhoneNumberInformation) : this() {
            this.createdAt = x.createdAt
            this.iso2CountryCode = x.iso2CountryCode
            this.numberCapabilities = x.numberCapabilities
            this.phoneNumber = x.phoneNumber
            this.routeType = x.routeType
            this.status = x.status
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy