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

commonMain.aws.sdk.kotlin.services.mediaconvert.model.Preset.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.mediaconvert.model

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

/**
 * A preset is a collection of preconfigured media conversion settings that you want MediaConvert to apply to the output during the conversion process.
 */
public class Preset private constructor(builder: Builder) {
    /**
     * An identifier for this resource that is unique within all of AWS.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * An optional category you create to organize your presets.
     */
    public val category: kotlin.String? = builder.category
    /**
     * The timestamp in epoch seconds for preset creation.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * An optional description you create for each preset.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The timestamp in epoch seconds when the preset was last updated.
     */
    public val lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdated
    /**
     * A name you create for each preset. Each name must be unique within your account.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Settings for preset
     */
    public val settings: aws.sdk.kotlin.services.mediaconvert.model.PresetSettings? = builder.settings
    /**
     * A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
     */
    public val type: aws.sdk.kotlin.services.mediaconvert.model.Type? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("Preset(")
        append("arn=$arn,")
        append("category=$category,")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("lastUpdated=$lastUpdated,")
        append("name=$name,")
        append("settings=$settings,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (category?.hashCode() ?: 0)
        result = 31 * result + (createdAt?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (lastUpdated?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (settings?.hashCode() ?: 0)
        result = 31 * result + (type?.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 Preset

        if (arn != other.arn) return false
        if (category != other.category) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (lastUpdated != other.lastUpdated) return false
        if (name != other.name) return false
        if (settings != other.settings) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * An identifier for this resource that is unique within all of AWS.
         */
        public var arn: kotlin.String? = null
        /**
         * An optional category you create to organize your presets.
         */
        public var category: kotlin.String? = null
        /**
         * The timestamp in epoch seconds for preset creation.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * An optional description you create for each preset.
         */
        public var description: kotlin.String? = null
        /**
         * The timestamp in epoch seconds when the preset was last updated.
         */
        public var lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A name you create for each preset. Each name must be unique within your account.
         */
        public var name: kotlin.String? = null
        /**
         * Settings for preset
         */
        public var settings: aws.sdk.kotlin.services.mediaconvert.model.PresetSettings? = null
        /**
         * A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
         */
        public var type: aws.sdk.kotlin.services.mediaconvert.model.Type? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediaconvert.model.Preset) : this() {
            this.arn = x.arn
            this.category = x.category
            this.createdAt = x.createdAt
            this.description = x.description
            this.lastUpdated = x.lastUpdated
            this.name = x.name
            this.settings = x.settings
            this.type = x.type
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy