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

commonMain.aws.sdk.kotlin.services.pinpointemail.model.OverallVolume.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

/**
 * An object that contains information about email that was sent from the selected domain.
 */
public class OverallVolume private constructor(builder: Builder) {
    /**
     * An object that contains inbox and junk mail placement metrics for individual email providers.
     */
    public val domainIspPlacements: List? = builder.domainIspPlacements
    /**
     * The percentage of emails that were sent from the domain that were read by their recipients.
     */
    public val readRatePercent: kotlin.Double? = builder.readRatePercent
    /**
     * An object that contains information about the numbers of messages that arrived in recipients' inboxes and junk mail folders.
     */
    public val volumeStatistics: aws.sdk.kotlin.services.pinpointemail.model.VolumeStatistics? = builder.volumeStatistics

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

    override fun toString(): kotlin.String = buildString {
        append("OverallVolume(")
        append("domainIspPlacements=$domainIspPlacements,")
        append("readRatePercent=$readRatePercent,")
        append("volumeStatistics=$volumeStatistics")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = domainIspPlacements?.hashCode() ?: 0
        result = 31 * result + (readRatePercent?.hashCode() ?: 0)
        result = 31 * result + (volumeStatistics?.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 OverallVolume

        if (domainIspPlacements != other.domainIspPlacements) return false
        if (!(readRatePercent?.equals(other.readRatePercent) ?: (other.readRatePercent == null))) return false
        if (volumeStatistics != other.volumeStatistics) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An object that contains inbox and junk mail placement metrics for individual email providers.
         */
        public var domainIspPlacements: List? = null
        /**
         * The percentage of emails that were sent from the domain that were read by their recipients.
         */
        public var readRatePercent: kotlin.Double? = null
        /**
         * An object that contains information about the numbers of messages that arrived in recipients' inboxes and junk mail folders.
         */
        public var volumeStatistics: aws.sdk.kotlin.services.pinpointemail.model.VolumeStatistics? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointemail.model.OverallVolume) : this() {
            this.domainIspPlacements = x.domainIspPlacements
            this.readRatePercent = x.readRatePercent
            this.volumeStatistics = x.volumeStatistics
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.pinpointemail.model.VolumeStatistics] inside the given [block]
         */
        public fun volumeStatistics(block: aws.sdk.kotlin.services.pinpointemail.model.VolumeStatistics.Builder.() -> kotlin.Unit) {
            this.volumeStatistics = aws.sdk.kotlin.services.pinpointemail.model.VolumeStatistics.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy