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

commonMain.aws.sdk.kotlin.services.pinpointemail.model.TrackingOptions.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 defines the tracking options for a configuration set. When you use Amazon Pinpoint to send an email, it contains an invisible image that's used to track when recipients open your email. If your email contains links, those links are changed slightly in order to track when recipients click them.
 *
 * These images and links include references to a domain operated by AWS. You can optionally configure Amazon Pinpoint to use a domain that you operate for these images and links.
 */
public class TrackingOptions private constructor(builder: Builder) {
    /**
     * The domain that you want to use for tracking open and click events.
     */
    public val customRedirectDomain: kotlin.String = requireNotNull(builder.customRedirectDomain) { "A non-null value must be provided for customRedirectDomain" }

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

    override fun toString(): kotlin.String = buildString {
        append("TrackingOptions(")
        append("customRedirectDomain=$customRedirectDomain")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = customRedirectDomain.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 TrackingOptions

        if (customRedirectDomain != other.customRedirectDomain) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The domain that you want to use for tracking open and click events.
         */
        public var customRedirectDomain: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointemail.model.TrackingOptions) : this() {
            this.customRedirectDomain = x.customRedirectDomain
        }

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

        internal fun correctErrors(): Builder {
            if (customRedirectDomain == null) customRedirectDomain = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy