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

aws.sdk.kotlin.services.sagemaker.model.CreateHumanTaskUiRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sagemaker.model



class CreateHumanTaskUiRequest private constructor(builder: BuilderImpl) {
    /**
     * The name of the user interface you are creating.
     */
    val humanTaskUiName: String? = builder.humanTaskUiName
    /**
     * An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.
     */
    val tags: List? = builder.tags
    /**
     * The Liquid template for the worker user interface.
     */
    val uiTemplate: UiTemplate? = builder.uiTemplate

    companion object {
        @JvmStatic
        fun fluentBuilder(): FluentBuilder = BuilderImpl()

        internal fun builder(): DslBuilder = BuilderImpl()

        operator fun invoke(block: DslBuilder.() -> kotlin.Unit): CreateHumanTaskUiRequest = BuilderImpl().apply(block).build()

    }

    override fun toString(): kotlin.String = buildString {
        append("CreateHumanTaskUiRequest(")
        append("humanTaskUiName=$humanTaskUiName,")
        append("tags=$tags,")
        append("uiTemplate=$uiTemplate)")
    }

    override fun hashCode(): kotlin.Int {
        var result = humanTaskUiName?.hashCode() ?: 0
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (uiTemplate?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as CreateHumanTaskUiRequest

        if (humanTaskUiName != other.humanTaskUiName) return false
        if (tags != other.tags) return false
        if (uiTemplate != other.uiTemplate) return false

        return true
    }

    fun copy(block: DslBuilder.() -> kotlin.Unit = {}): CreateHumanTaskUiRequest = BuilderImpl(this).apply(block).build()

    interface FluentBuilder {
        fun build(): CreateHumanTaskUiRequest
        /**
         * The name of the user interface you are creating.
         */
        fun humanTaskUiName(humanTaskUiName: String): FluentBuilder
        /**
         * An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.
         */
        fun tags(tags: List): FluentBuilder
        /**
         * The Liquid template for the worker user interface.
         */
        fun uiTemplate(uiTemplate: UiTemplate): FluentBuilder
    }

    interface DslBuilder {
        /**
         * The name of the user interface you are creating.
         */
        var humanTaskUiName: String?
        /**
         * An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.
         */
        var tags: List?
        /**
         * The Liquid template for the worker user interface.
         */
        var uiTemplate: UiTemplate?

        fun build(): CreateHumanTaskUiRequest
        /**
         * construct an [aws.sdk.kotlin.services.sagemaker.model.UiTemplate] inside the given [block]
         */
        fun uiTemplate(block: UiTemplate.DslBuilder.() -> kotlin.Unit) {
            this.uiTemplate = UiTemplate.invoke(block)
        }
    }

    private class BuilderImpl() : FluentBuilder, DslBuilder {
        override var humanTaskUiName: String? = null
        override var tags: List? = null
        override var uiTemplate: UiTemplate? = null

        constructor(x: CreateHumanTaskUiRequest) : this() {
            this.humanTaskUiName = x.humanTaskUiName
            this.tags = x.tags
            this.uiTemplate = x.uiTemplate
        }

        override fun build(): CreateHumanTaskUiRequest = CreateHumanTaskUiRequest(this)
        override fun humanTaskUiName(humanTaskUiName: String): FluentBuilder = apply { this.humanTaskUiName = humanTaskUiName }
        override fun tags(tags: List): FluentBuilder = apply { this.tags = tags }
        override fun uiTemplate(uiTemplate: UiTemplate): FluentBuilder = apply { this.uiTemplate = uiTemplate }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy