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

commonMain.aws.sdk.kotlin.services.glue.model.GluePolicy.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.model

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

/**
 * A structure for returning a resource policy.
 */
public class GluePolicy private constructor(builder: Builder) {
    /**
     * The date and time at which the policy was created.
     */
    public val createTime: aws.smithy.kotlin.runtime.time.Instant? = builder.createTime
    /**
     * Contains the hash value associated with this policy.
     */
    public val policyHash: kotlin.String? = builder.policyHash
    /**
     * Contains the requested policy document, in JSON format.
     */
    public val policyInJson: kotlin.String? = builder.policyInJson
    /**
     * The date and time at which the policy was last updated.
     */
    public val updateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.updateTime

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

    override fun toString(): kotlin.String = buildString {
        append("GluePolicy(")
        append("createTime=$createTime,")
        append("policyHash=$policyHash,")
        append("policyInJson=$policyInJson,")
        append("updateTime=$updateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createTime?.hashCode() ?: 0
        result = 31 * result + (policyHash?.hashCode() ?: 0)
        result = 31 * result + (policyInJson?.hashCode() ?: 0)
        result = 31 * result + (updateTime?.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 GluePolicy

        if (createTime != other.createTime) return false
        if (policyHash != other.policyHash) return false
        if (policyInJson != other.policyInJson) return false
        if (updateTime != other.updateTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time at which the policy was created.
         */
        public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Contains the hash value associated with this policy.
         */
        public var policyHash: kotlin.String? = null
        /**
         * Contains the requested policy document, in JSON format.
         */
        public var policyInJson: kotlin.String? = null
        /**
         * The date and time at which the policy was last updated.
         */
        public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.GluePolicy) : this() {
            this.createTime = x.createTime
            this.policyHash = x.policyHash
            this.policyInJson = x.policyInJson
            this.updateTime = x.updateTime
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy