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

commonMain.aws.sdk.kotlin.services.greengrass.model.CreateFunctionDefinitionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.greengrass.model



public class CreateFunctionDefinitionRequest private constructor(builder: Builder) {
    /**
     * A client token used to correlate requests and responses.
     */
    public val amznClientToken: kotlin.String? = builder.amznClientToken
    /**
     * Information about the initial version of the function definition.
     */
    public val initialVersion: aws.sdk.kotlin.services.greengrass.model.FunctionDefinitionVersion? = builder.initialVersion
    /**
     * The name of the function definition.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Tag(s) to add to the new resource.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateFunctionDefinitionRequest(")
        append("amznClientToken=$amznClientToken,")
        append("initialVersion=$initialVersion,")
        append("name=$name,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = amznClientToken?.hashCode() ?: 0
        result = 31 * result + (initialVersion?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateFunctionDefinitionRequest

        if (amznClientToken != other.amznClientToken) return false
        if (initialVersion != other.initialVersion) return false
        if (name != other.name) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * A client token used to correlate requests and responses.
         */
        public var amznClientToken: kotlin.String? = null
        /**
         * Information about the initial version of the function definition.
         */
        public var initialVersion: aws.sdk.kotlin.services.greengrass.model.FunctionDefinitionVersion? = null
        /**
         * The name of the function definition.
         */
        public var name: kotlin.String? = null
        /**
         * Tag(s) to add to the new resource.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.greengrass.model.CreateFunctionDefinitionRequest) : this() {
            this.amznClientToken = x.amznClientToken
            this.initialVersion = x.initialVersion
            this.name = x.name
            this.tags = x.tags
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy