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

commonMain.aws.sdk.kotlin.services.cleanrooms.model.PrivacyBudgetSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.3.31
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cleanrooms.model

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

/**
 * An array that summaries the specified privacy budget. This summary includes collaboration information, creation information, membership information, and privacy budget information.
 */
public class PrivacyBudgetSummary private constructor(builder: Builder) {
    /**
     * The provided privacy budget.
     */
    public val budget: aws.sdk.kotlin.services.cleanrooms.model.PrivacyBudget? = builder.budget
    /**
     * The ARN of the collaboration that contains this privacy budget.
     */
    public val collaborationArn: kotlin.String = requireNotNull(builder.collaborationArn) { "A non-null value must be provided for collaborationArn" }
    /**
     * The unique identifier of the collaboration that contains this privacy budget.
     */
    public val collaborationId: kotlin.String = requireNotNull(builder.collaborationId) { "A non-null value must be provided for collaborationId" }
    /**
     * The time at which the privacy budget was created.
     */
    public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
    /**
     * The unique identifier of the privacy budget.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The Amazon Resource Name (ARN) of the member who created the privacy budget summary.
     */
    public val membershipArn: kotlin.String = requireNotNull(builder.membershipArn) { "A non-null value must be provided for membershipArn" }
    /**
     * The identifier for a membership resource.
     */
    public val membershipId: kotlin.String = requireNotNull(builder.membershipId) { "A non-null value must be provided for membershipId" }
    /**
     * The ARN of the privacy budget template.
     */
    public val privacyBudgetTemplateArn: kotlin.String = requireNotNull(builder.privacyBudgetTemplateArn) { "A non-null value must be provided for privacyBudgetTemplateArn" }
    /**
     * The unique identifier of the privacy budget template.
     */
    public val privacyBudgetTemplateId: kotlin.String = requireNotNull(builder.privacyBudgetTemplateId) { "A non-null value must be provided for privacyBudgetTemplateId" }
    /**
     * Specifies the type of the privacy budget.
     */
    public val type: aws.sdk.kotlin.services.cleanrooms.model.PrivacyBudgetType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
    /**
     * The most recent time at which the privacy budget was updated.
     */
    public val updateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateTime) { "A non-null value must be provided for updateTime" }

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

    override fun toString(): kotlin.String = buildString {
        append("PrivacyBudgetSummary(")
        append("budget=$budget,")
        append("collaborationArn=$collaborationArn,")
        append("collaborationId=$collaborationId,")
        append("createTime=$createTime,")
        append("id=$id,")
        append("membershipArn=$membershipArn,")
        append("membershipId=$membershipId,")
        append("privacyBudgetTemplateArn=$privacyBudgetTemplateArn,")
        append("privacyBudgetTemplateId=$privacyBudgetTemplateId,")
        append("type=$type,")
        append("updateTime=$updateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = budget?.hashCode() ?: 0
        result = 31 * result + (collaborationArn.hashCode())
        result = 31 * result + (collaborationId.hashCode())
        result = 31 * result + (createTime.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (membershipArn.hashCode())
        result = 31 * result + (membershipId.hashCode())
        result = 31 * result + (privacyBudgetTemplateArn.hashCode())
        result = 31 * result + (privacyBudgetTemplateId.hashCode())
        result = 31 * result + (type.hashCode())
        result = 31 * result + (updateTime.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 PrivacyBudgetSummary

        if (budget != other.budget) return false
        if (collaborationArn != other.collaborationArn) return false
        if (collaborationId != other.collaborationId) return false
        if (createTime != other.createTime) return false
        if (id != other.id) return false
        if (membershipArn != other.membershipArn) return false
        if (membershipId != other.membershipId) return false
        if (privacyBudgetTemplateArn != other.privacyBudgetTemplateArn) return false
        if (privacyBudgetTemplateId != other.privacyBudgetTemplateId) return false
        if (type != other.type) return false
        if (updateTime != other.updateTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The provided privacy budget.
         */
        public var budget: aws.sdk.kotlin.services.cleanrooms.model.PrivacyBudget? = null
        /**
         * The ARN of the collaboration that contains this privacy budget.
         */
        public var collaborationArn: kotlin.String? = null
        /**
         * The unique identifier of the collaboration that contains this privacy budget.
         */
        public var collaborationId: kotlin.String? = null
        /**
         * The time at which the privacy budget was created.
         */
        public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The unique identifier of the privacy budget.
         */
        public var id: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the member who created the privacy budget summary.
         */
        public var membershipArn: kotlin.String? = null
        /**
         * The identifier for a membership resource.
         */
        public var membershipId: kotlin.String? = null
        /**
         * The ARN of the privacy budget template.
         */
        public var privacyBudgetTemplateArn: kotlin.String? = null
        /**
         * The unique identifier of the privacy budget template.
         */
        public var privacyBudgetTemplateId: kotlin.String? = null
        /**
         * Specifies the type of the privacy budget.
         */
        public var type: aws.sdk.kotlin.services.cleanrooms.model.PrivacyBudgetType? = null
        /**
         * The most recent time at which the privacy budget was updated.
         */
        public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.PrivacyBudgetSummary) : this() {
            this.budget = x.budget
            this.collaborationArn = x.collaborationArn
            this.collaborationId = x.collaborationId
            this.createTime = x.createTime
            this.id = x.id
            this.membershipArn = x.membershipArn
            this.membershipId = x.membershipId
            this.privacyBudgetTemplateArn = x.privacyBudgetTemplateArn
            this.privacyBudgetTemplateId = x.privacyBudgetTemplateId
            this.type = x.type
            this.updateTime = x.updateTime
        }

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

        internal fun correctErrors(): Builder {
            if (collaborationArn == null) collaborationArn = ""
            if (collaborationId == null) collaborationId = ""
            if (createTime == null) createTime = Instant.fromEpochSeconds(0)
            if (id == null) id = ""
            if (membershipArn == null) membershipArn = ""
            if (membershipId == null) membershipId = ""
            if (privacyBudgetTemplateArn == null) privacyBudgetTemplateArn = ""
            if (privacyBudgetTemplateId == null) privacyBudgetTemplateId = ""
            if (type == null) type = PrivacyBudgetType.SdkUnknown("no value provided")
            if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy