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

commonMain.aws.sdk.kotlin.services.verifiedpermissions.model.UpdatePolicyTemplateResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.verifiedpermissions.model

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

public class UpdatePolicyTemplateResponse private constructor(builder: Builder) {
    /**
     * The date and time that the policy template was originally created.
     */
    public val createdDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdDate) { "A non-null value must be provided for createdDate" }
    /**
     * The date and time that the policy template was most recently updated.
     */
    public val lastUpdatedDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastUpdatedDate) { "A non-null value must be provided for lastUpdatedDate" }
    /**
     * The ID of the policy store that contains the updated policy template.
     */
    public val policyStoreId: kotlin.String = requireNotNull(builder.policyStoreId) { "A non-null value must be provided for policyStoreId" }
    /**
     * The ID of the updated policy template.
     */
    public val policyTemplateId: kotlin.String = requireNotNull(builder.policyTemplateId) { "A non-null value must be provided for policyTemplateId" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpdatePolicyTemplateResponse(")
        append("createdDate=$createdDate,")
        append("lastUpdatedDate=$lastUpdatedDate,")
        append("policyStoreId=$policyStoreId,")
        append("policyTemplateId=$policyTemplateId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdDate.hashCode()
        result = 31 * result + (lastUpdatedDate.hashCode())
        result = 31 * result + (policyStoreId.hashCode())
        result = 31 * result + (policyTemplateId.hashCode())
        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 UpdatePolicyTemplateResponse

        if (createdDate != other.createdDate) return false
        if (lastUpdatedDate != other.lastUpdatedDate) return false
        if (policyStoreId != other.policyStoreId) return false
        if (policyTemplateId != other.policyTemplateId) return false

        return true
    }

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

    public class Builder {
        /**
         * The date and time that the policy template was originally created.
         */
        public var createdDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The date and time that the policy template was most recently updated.
         */
        public var lastUpdatedDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the policy store that contains the updated policy template.
         */
        public var policyStoreId: kotlin.String? = null
        /**
         * The ID of the updated policy template.
         */
        public var policyTemplateId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.verifiedpermissions.model.UpdatePolicyTemplateResponse) : this() {
            this.createdDate = x.createdDate
            this.lastUpdatedDate = x.lastUpdatedDate
            this.policyStoreId = x.policyStoreId
            this.policyTemplateId = x.policyTemplateId
        }

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

        internal fun correctErrors(): Builder {
            if (createdDate == null) createdDate = Instant.fromEpochSeconds(0)
            if (lastUpdatedDate == null) lastUpdatedDate = Instant.fromEpochSeconds(0)
            if (policyStoreId == null) policyStoreId = ""
            if (policyTemplateId == null) policyTemplateId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy