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

commonMain.aws.sdk.kotlin.services.pinpointemail.model.ReputationOptions.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pinpointemail.model

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

/**
 * Enable or disable collection of reputation metrics for emails that you send using this configuration set in the current AWS Region.
 */
public class ReputationOptions private constructor(builder: Builder) {
    /**
     * The date and time (in Unix time) when the reputation metrics were last given a fresh start. When your account is given a fresh start, your reputation metrics are calculated starting from the date of the fresh start.
     */
    public val lastFreshStart: aws.smithy.kotlin.runtime.time.Instant? = builder.lastFreshStart
    /**
     * If `true`, tracking of reputation metrics is enabled for the configuration set. If `false`, tracking of reputation metrics is disabled for the configuration set.
     */
    public val reputationMetricsEnabled: kotlin.Boolean = builder.reputationMetricsEnabled

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

    override fun toString(): kotlin.String = buildString {
        append("ReputationOptions(")
        append("lastFreshStart=$lastFreshStart,")
        append("reputationMetricsEnabled=$reputationMetricsEnabled")
        append(")")
    }

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

        if (lastFreshStart != other.lastFreshStart) return false
        if (reputationMetricsEnabled != other.reputationMetricsEnabled) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time (in Unix time) when the reputation metrics were last given a fresh start. When your account is given a fresh start, your reputation metrics are calculated starting from the date of the fresh start.
         */
        public var lastFreshStart: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * If `true`, tracking of reputation metrics is enabled for the configuration set. If `false`, tracking of reputation metrics is disabled for the configuration set.
         */
        public var reputationMetricsEnabled: kotlin.Boolean = false

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointemail.model.ReputationOptions) : this() {
            this.lastFreshStart = x.lastFreshStart
            this.reputationMetricsEnabled = x.reputationMetricsEnabled
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy