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

commonMain.aws.sdk.kotlin.services.s3control.model.DeleteAccessGrantRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.s3control.model



public class DeleteAccessGrantRequest private constructor(builder: Builder) {
    /**
     * The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.
     */
    public val accessGrantId: kotlin.String? = builder.accessGrantId
    /**
     * The ID of the Amazon Web Services account that is making this request.
     */
    public val accountId: kotlin.String? = builder.accountId

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

    override fun toString(): kotlin.String = buildString {
        append("DeleteAccessGrantRequest(")
        append("accessGrantId=$accessGrantId,")
        append("accountId=$accountId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accessGrantId?.hashCode() ?: 0
        result = 31 * result + (accountId?.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 DeleteAccessGrantRequest

        if (accessGrantId != other.accessGrantId) return false
        if (accountId != other.accountId) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.
         */
        public var accessGrantId: kotlin.String? = null
        /**
         * The ID of the Amazon Web Services account that is making this request.
         */
        public var accountId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3control.model.DeleteAccessGrantRequest) : this() {
            this.accessGrantId = x.accessGrantId
            this.accountId = x.accountId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy