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

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

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

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

import aws.smithy.kotlin.runtime.time.Instant

public class GetAccessGrantsInstanceResourcePolicyResponse private constructor(builder: Builder) {
    /**
     * The date and time when you created the S3 Access Grants instance resource policy.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The Organization of the resource policy of the S3 Access Grants instance.
     */
    public val organization: kotlin.String? = builder.organization
    /**
     * The resource policy of the S3 Access Grants instance.
     */
    public val policy: kotlin.String? = builder.policy

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

    override fun toString(): kotlin.String = buildString {
        append("GetAccessGrantsInstanceResourcePolicyResponse(")
        append("createdAt=$createdAt,")
        append("organization=$organization,")
        append("policy=$policy")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (organization?.hashCode() ?: 0)
        result = 31 * result + (policy?.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 GetAccessGrantsInstanceResourcePolicyResponse

        if (createdAt != other.createdAt) return false
        if (organization != other.organization) return false
        if (policy != other.policy) return false

        return true
    }

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

    public class Builder {
        /**
         * The date and time when you created the S3 Access Grants instance resource policy.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Organization of the resource policy of the S3 Access Grants instance.
         */
        public var organization: kotlin.String? = null
        /**
         * The resource policy of the S3 Access Grants instance.
         */
        public var policy: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3control.model.GetAccessGrantsInstanceResourcePolicyResponse) : this() {
            this.createdAt = x.createdAt
            this.organization = x.organization
            this.policy = x.policy
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy