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

commonMain.aws.sdk.kotlin.services.datazone.model.UpdateSubscriptionGrantStatusRequest.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



public class UpdateSubscriptionGrantStatusRequest private constructor(builder: Builder) {
    /**
     * The identifier of the asset the subscription grant status of which is to be updated.
     */
    public val assetIdentifier: kotlin.String? = builder.assetIdentifier
    /**
     * The identifier of the Amazon DataZone domain in which a subscription grant status is to be updated.
     */
    public val domainIdentifier: kotlin.String? = builder.domainIdentifier
    /**
     * Specifies the error message that is returned if the operation cannot be successfully completed.
     */
    public val failureCause: aws.sdk.kotlin.services.datazone.model.FailureCause? = builder.failureCause
    /**
     * The identifier of the subscription grant the status of which is to be updated.
     */
    public val identifier: kotlin.String? = builder.identifier
    /**
     * The status to be updated as part of the `UpdateSubscriptionGrantStatus` action.
     */
    public val status: aws.sdk.kotlin.services.datazone.model.SubscriptionGrantStatus? = builder.status
    /**
     * The target name to be updated as part of the `UpdateSubscriptionGrantStatus` action.
     */
    public val targetName: kotlin.String? = builder.targetName

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateSubscriptionGrantStatusRequest(")
        append("assetIdentifier=$assetIdentifier,")
        append("domainIdentifier=$domainIdentifier,")
        append("failureCause=$failureCause,")
        append("identifier=$identifier,")
        append("status=$status,")
        append("targetName=$targetName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetIdentifier?.hashCode() ?: 0
        result = 31 * result + (domainIdentifier?.hashCode() ?: 0)
        result = 31 * result + (failureCause?.hashCode() ?: 0)
        result = 31 * result + (identifier?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (targetName?.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 UpdateSubscriptionGrantStatusRequest

        if (assetIdentifier != other.assetIdentifier) return false
        if (domainIdentifier != other.domainIdentifier) return false
        if (failureCause != other.failureCause) return false
        if (identifier != other.identifier) return false
        if (status != other.status) return false
        if (targetName != other.targetName) return false

        return true
    }

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

    public class Builder {
        /**
         * The identifier of the asset the subscription grant status of which is to be updated.
         */
        public var assetIdentifier: kotlin.String? = null
        /**
         * The identifier of the Amazon DataZone domain in which a subscription grant status is to be updated.
         */
        public var domainIdentifier: kotlin.String? = null
        /**
         * Specifies the error message that is returned if the operation cannot be successfully completed.
         */
        public var failureCause: aws.sdk.kotlin.services.datazone.model.FailureCause? = null
        /**
         * The identifier of the subscription grant the status of which is to be updated.
         */
        public var identifier: kotlin.String? = null
        /**
         * The status to be updated as part of the `UpdateSubscriptionGrantStatus` action.
         */
        public var status: aws.sdk.kotlin.services.datazone.model.SubscriptionGrantStatus? = null
        /**
         * The target name to be updated as part of the `UpdateSubscriptionGrantStatus` action.
         */
        public var targetName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.UpdateSubscriptionGrantStatusRequest) : this() {
            this.assetIdentifier = x.assetIdentifier
            this.domainIdentifier = x.domainIdentifier
            this.failureCause = x.failureCause
            this.identifier = x.identifier
            this.status = x.status
            this.targetName = x.targetName
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.datazone.model.FailureCause] inside the given [block]
         */
        public fun failureCause(block: aws.sdk.kotlin.services.datazone.model.FailureCause.Builder.() -> kotlin.Unit) {
            this.failureCause = aws.sdk.kotlin.services.datazone.model.FailureCause.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy