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

commonMain.aws.sdk.kotlin.services.quicksight.model.UpdateTemplateRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.quicksight.model



class UpdateTemplateRequest private constructor(builder: Builder) {
    /**
     * The ID of the Amazon Web Services account that contains the template that you're updating.
     */
    val awsAccountId: kotlin.String? = builder.awsAccountId
    /**
     * The name for the template.
     */
    val name: kotlin.String? = builder.name
    /**
     * The entity that you are using as a source when you update the template. In `SourceEntity`, you specify the type of object you're using as source: `SourceTemplate` for a template or `SourceAnalysis` for an analysis. Both of these require an Amazon Resource Name (ARN). For `SourceTemplate`, specify the ARN of the source template. For `SourceAnalysis`, specify the ARN of the source analysis. The `SourceTemplate` ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region;.
     *
     * Use the `DataSetReferences` entity within `SourceTemplate` or `SourceAnalysis` to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
     */
    val sourceEntity: aws.sdk.kotlin.services.quicksight.model.TemplateSourceEntity? = builder.sourceEntity
    /**
     * The ID for the template.
     */
    val templateId: kotlin.String? = builder.templateId
    /**
     * A description of the current template version that is being updated. Every time you call `UpdateTemplate`, you create a new version of the template. Each version of the template maintains a description of the version in the `VersionDescription` field.
     */
    val versionDescription: kotlin.String? = builder.versionDescription

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateTemplateRequest(")
        append("awsAccountId=$awsAccountId,")
        append("name=$name,")
        append("sourceEntity=$sourceEntity,")
        append("templateId=$templateId,")
        append("versionDescription=$versionDescription)")
    }

    override fun hashCode(): kotlin.Int {
        var result = awsAccountId?.hashCode() ?: 0
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (sourceEntity?.hashCode() ?: 0)
        result = 31 * result + (templateId?.hashCode() ?: 0)
        result = 31 * result + (versionDescription?.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 UpdateTemplateRequest

        if (awsAccountId != other.awsAccountId) return false
        if (name != other.name) return false
        if (sourceEntity != other.sourceEntity) return false
        if (templateId != other.templateId) return false
        if (versionDescription != other.versionDescription) return false

        return true
    }

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

    class Builder {
        /**
         * The ID of the Amazon Web Services account that contains the template that you're updating.
         */
        var awsAccountId: kotlin.String? = null
        /**
         * The name for the template.
         */
        var name: kotlin.String? = null
        /**
         * The entity that you are using as a source when you update the template. In `SourceEntity`, you specify the type of object you're using as source: `SourceTemplate` for a template or `SourceAnalysis` for an analysis. Both of these require an Amazon Resource Name (ARN). For `SourceTemplate`, specify the ARN of the source template. For `SourceAnalysis`, specify the ARN of the source analysis. The `SourceTemplate` ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region;.
         *
         * Use the `DataSetReferences` entity within `SourceTemplate` or `SourceAnalysis` to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
         */
        var sourceEntity: aws.sdk.kotlin.services.quicksight.model.TemplateSourceEntity? = null
        /**
         * The ID for the template.
         */
        var templateId: kotlin.String? = null
        /**
         * A description of the current template version that is being updated. Every time you call `UpdateTemplate`, you create a new version of the template. Each version of the template maintains a description of the version in the `VersionDescription` field.
         */
        var versionDescription: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.quicksight.model.UpdateTemplateRequest) : this() {
            this.awsAccountId = x.awsAccountId
            this.name = x.name
            this.sourceEntity = x.sourceEntity
            this.templateId = x.templateId
            this.versionDescription = x.versionDescription
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy