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

commonMain.aws.sdk.kotlin.services.datazone.model.CreateSubscriptionRequestRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.datazone.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateSubscriptionRequestRequest private constructor(builder: Builder) {
    /**
     * A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The ID of the Amazon DataZone domain in which the subscription request is created.
     */
    public val domainIdentifier: kotlin.String? = builder.domainIdentifier
    /**
     * The reason for the subscription request.
     */
    public val requestReason: kotlin.String? = builder.requestReason
    /**
     * The published asset for which the subscription grant is to be created.
     */
    public val subscribedListings: List? = builder.subscribedListings
    /**
     * The Amazon DataZone principals for whom the subscription request is created.
     */
    public val subscribedPrincipals: List? = builder.subscribedPrincipals

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

    override fun toString(): kotlin.String = buildString {
        append("CreateSubscriptionRequestRequest(")
        append("clientToken=$clientToken,")
        append("domainIdentifier=$domainIdentifier,")
        append("requestReason=*** Sensitive Data Redacted ***,")
        append("subscribedListings=$subscribedListings,")
        append("subscribedPrincipals=$subscribedPrincipals")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (domainIdentifier?.hashCode() ?: 0)
        result = 31 * result + (requestReason?.hashCode() ?: 0)
        result = 31 * result + (subscribedListings?.hashCode() ?: 0)
        result = 31 * result + (subscribedPrincipals?.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 CreateSubscriptionRequestRequest

        if (clientToken != other.clientToken) return false
        if (domainIdentifier != other.domainIdentifier) return false
        if (requestReason != other.requestReason) return false
        if (subscribedListings != other.subscribedListings) return false
        if (subscribedPrincipals != other.subscribedPrincipals) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The ID of the Amazon DataZone domain in which the subscription request is created.
         */
        public var domainIdentifier: kotlin.String? = null
        /**
         * The reason for the subscription request.
         */
        public var requestReason: kotlin.String? = null
        /**
         * The published asset for which the subscription grant is to be created.
         */
        public var subscribedListings: List? = null
        /**
         * The Amazon DataZone principals for whom the subscription request is created.
         */
        public var subscribedPrincipals: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.CreateSubscriptionRequestRequest) : this() {
            this.clientToken = x.clientToken
            this.domainIdentifier = x.domainIdentifier
            this.requestReason = x.requestReason
            this.subscribedListings = x.subscribedListings
            this.subscribedPrincipals = x.subscribedPrincipals
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy