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

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

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

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



/**
 * Input for CreatePlatformApplication action.
 */
public class CreatePlatformApplicationRequest private constructor(builder: Builder) {
    /**
     * For a list of attributes, see `SetPlatformApplicationAttributes`[](https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html).
     */
    public val attributes: Map? = builder.attributes
    /**
     * Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).
     */
    public val platform: kotlin.String? = builder.platform

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

    override fun toString(): kotlin.String = buildString {
        append("CreatePlatformApplicationRequest(")
        append("attributes=$attributes,")
        append("name=$name,")
        append("platform=$platform")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attributes?.hashCode() ?: 0
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (platform?.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 CreatePlatformApplicationRequest

        if (attributes != other.attributes) return false
        if (name != other.name) return false
        if (platform != other.platform) return false

        return true
    }

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

    public class Builder {
        /**
         * For a list of attributes, see `SetPlatformApplicationAttributes`[](https://docs.aws.amazon.com/sns/latest/api/API_SetPlatformApplicationAttributes.html).
         */
        public var attributes: Map? = null
        /**
         * Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.
         */
        public var name: kotlin.String? = null
        /**
         * The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and GCM (Firebase Cloud Messaging).
         */
        public var platform: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sns.model.CreatePlatformApplicationRequest) : this() {
            this.attributes = x.attributes
            this.name = x.name
            this.platform = x.platform
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy