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

commonMain.aws.sdk.kotlin.services.elastictranscoder.model.JobWatermark.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elastictranscoder.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Watermarks can be in .png or .jpg format. If you want to display a watermark that is not rectangular, use the .png format, which supports transparency.
 */
public class JobWatermark private constructor(builder: Builder) {
    /**
     * The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.
     */
    public val encryption: aws.sdk.kotlin.services.elastictranscoder.model.Encryption? = builder.encryption
    /**
     * The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by `Pipeline`; the `Input Bucket` object in that pipeline identifies the bucket.
     *
     *  If the file name includes a prefix, for example, **logos/128x64.png**, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.
     */
    public val inputKey: kotlin.String? = builder.inputKey
    /**
     * The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.
     */
    public val presetWatermarkId: kotlin.String? = builder.presetWatermarkId

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

    override fun toString(): kotlin.String = buildString {
        append("JobWatermark(")
        append("encryption=$encryption,")
        append("inputKey=$inputKey,")
        append("presetWatermarkId=$presetWatermarkId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = encryption?.hashCode() ?: 0
        result = 31 * result + (inputKey?.hashCode() ?: 0)
        result = 31 * result + (presetWatermarkId?.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 JobWatermark

        if (encryption != other.encryption) return false
        if (inputKey != other.inputKey) return false
        if (presetWatermarkId != other.presetWatermarkId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.
         */
        public var encryption: aws.sdk.kotlin.services.elastictranscoder.model.Encryption? = null
        /**
         * The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by `Pipeline`; the `Input Bucket` object in that pipeline identifies the bucket.
         *
         *  If the file name includes a prefix, for example, **logos/128x64.png**, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.
         */
        public var inputKey: kotlin.String? = null
        /**
         * The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.
         */
        public var presetWatermarkId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elastictranscoder.model.JobWatermark) : this() {
            this.encryption = x.encryption
            this.inputKey = x.inputKey
            this.presetWatermarkId = x.presetWatermarkId
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy