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

commonMain.aws.sdk.kotlin.services.datazone.model.RemovePolicyGrantRequest.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 RemovePolicyGrantRequest 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 domain where you want to remove a policy grant.
     */
    public val domainIdentifier: kotlin.String? = builder.domainIdentifier
    /**
     * The ID of the entity from which you want to remove a policy grant.
     */
    public val entityIdentifier: kotlin.String? = builder.entityIdentifier
    /**
     * The type of the entity from which you want to remove a policy grant.
     */
    public val entityType: aws.sdk.kotlin.services.datazone.model.TargetEntityType? = builder.entityType
    /**
     * The type of the policy that you want to remove.
     */
    public val policyType: aws.sdk.kotlin.services.datazone.model.ManagedPolicyType? = builder.policyType
    /**
     * The principal from which you want to remove a policy grant.
     */
    public val principal: aws.sdk.kotlin.services.datazone.model.PolicyGrantPrincipal? = builder.principal

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

    override fun toString(): kotlin.String = buildString {
        append("RemovePolicyGrantRequest(")
        append("clientToken=$clientToken,")
        append("domainIdentifier=$domainIdentifier,")
        append("entityIdentifier=$entityIdentifier,")
        append("entityType=$entityType,")
        append("policyType=$policyType,")
        append("principal=$principal")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (domainIdentifier?.hashCode() ?: 0)
        result = 31 * result + (entityIdentifier?.hashCode() ?: 0)
        result = 31 * result + (entityType?.hashCode() ?: 0)
        result = 31 * result + (policyType?.hashCode() ?: 0)
        result = 31 * result + (principal?.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 RemovePolicyGrantRequest

        if (clientToken != other.clientToken) return false
        if (domainIdentifier != other.domainIdentifier) return false
        if (entityIdentifier != other.entityIdentifier) return false
        if (entityType != other.entityType) return false
        if (policyType != other.policyType) return false
        if (principal != other.principal) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datazone.model.RemovePolicyGrantRequest = 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 domain where you want to remove a policy grant.
         */
        public var domainIdentifier: kotlin.String? = null
        /**
         * The ID of the entity from which you want to remove a policy grant.
         */
        public var entityIdentifier: kotlin.String? = null
        /**
         * The type of the entity from which you want to remove a policy grant.
         */
        public var entityType: aws.sdk.kotlin.services.datazone.model.TargetEntityType? = null
        /**
         * The type of the policy that you want to remove.
         */
        public var policyType: aws.sdk.kotlin.services.datazone.model.ManagedPolicyType? = null
        /**
         * The principal from which you want to remove a policy grant.
         */
        public var principal: aws.sdk.kotlin.services.datazone.model.PolicyGrantPrincipal? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.RemovePolicyGrantRequest) : this() {
            this.clientToken = x.clientToken
            this.domainIdentifier = x.domainIdentifier
            this.entityIdentifier = x.entityIdentifier
            this.entityType = x.entityType
            this.policyType = x.policyType
            this.principal = x.principal
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy