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

commonMain.aws.sdk.kotlin.services.iotwireless.model.CreateWirelessGatewayTaskDefinitionRequest.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.iotwireless.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateWirelessGatewayTaskDefinitionRequest private constructor(builder: Builder) {
    /**
     * Whether to automatically create tasks using this task definition for all gateways with the specified current version. If `false`, the task must me created by calling `CreateWirelessGatewayTask`.
     */
    public val autoCreateTasks: kotlin.Boolean? = builder.autoCreateTasks
    /**
     * Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see [Ensuring idempotency in Amazon EC2 API requests](https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html).
     */
    public val clientRequestToken: kotlin.String? = builder.clientRequestToken
    /**
     * The name of the new resource.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The tags to attach to the specified resource. Tags are metadata that you can use to manage a resource.
     */
    public val tags: List? = builder.tags
    /**
     * Information about the gateways to update.
     */
    public val update: aws.sdk.kotlin.services.iotwireless.model.UpdateWirelessGatewayTaskCreate? = builder.update

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

    override fun toString(): kotlin.String = buildString {
        append("CreateWirelessGatewayTaskDefinitionRequest(")
        append("autoCreateTasks=$autoCreateTasks,")
        append("clientRequestToken=$clientRequestToken,")
        append("name=$name,")
        append("tags=$tags,")
        append("update=$update")
        append(")")
    }

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

        if (autoCreateTasks != other.autoCreateTasks) return false
        if (clientRequestToken != other.clientRequestToken) return false
        if (name != other.name) return false
        if (tags != other.tags) return false
        if (update != other.update) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Whether to automatically create tasks using this task definition for all gateways with the specified current version. If `false`, the task must me created by calling `CreateWirelessGatewayTask`.
         */
        public var autoCreateTasks: kotlin.Boolean? = null
        /**
         * Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see [Ensuring idempotency in Amazon EC2 API requests](https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html).
         */
        public var clientRequestToken: kotlin.String? = null
        /**
         * The name of the new resource.
         */
        public var name: kotlin.String? = null
        /**
         * The tags to attach to the specified resource. Tags are metadata that you can use to manage a resource.
         */
        public var tags: List? = null
        /**
         * Information about the gateways to update.
         */
        public var update: aws.sdk.kotlin.services.iotwireless.model.UpdateWirelessGatewayTaskCreate? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.CreateWirelessGatewayTaskDefinitionRequest) : this() {
            this.autoCreateTasks = x.autoCreateTasks
            this.clientRequestToken = x.clientRequestToken
            this.name = x.name
            this.tags = x.tags
            this.update = x.update
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy