
commonMain.aws.sdk.kotlin.services.iot.model.UpdateProvisioningTemplateRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
public class UpdateProvisioningTemplateRequest private constructor(builder: Builder) {
/**
* The ID of the default provisioning template version.
*/
public val defaultVersionId: kotlin.Int? = builder.defaultVersionId
/**
* The description of the provisioning template.
*/
public val description: kotlin.String? = builder.description
/**
* True to enable the provisioning template, otherwise false.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* Updates the pre-provisioning hook template. Only supports template of type `FLEET_PROVISIONING`. For more information about provisioning template types, see [type](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type).
*/
public val preProvisioningHook: aws.sdk.kotlin.services.iot.model.ProvisioningHook? = builder.preProvisioningHook
/**
* The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.
*/
public val provisioningRoleArn: kotlin.String? = builder.provisioningRoleArn
/**
* Removes pre-provisioning hook template.
*/
public val removePreProvisioningHook: kotlin.Boolean? = builder.removePreProvisioningHook
/**
* The name of the provisioning template.
*/
public val templateName: kotlin.String? = builder.templateName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.UpdateProvisioningTemplateRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateProvisioningTemplateRequest(")
append("defaultVersionId=$defaultVersionId,")
append("description=$description,")
append("enabled=$enabled,")
append("preProvisioningHook=$preProvisioningHook,")
append("provisioningRoleArn=$provisioningRoleArn,")
append("removePreProvisioningHook=$removePreProvisioningHook,")
append("templateName=$templateName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = defaultVersionId ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (enabled?.hashCode() ?: 0)
result = 31 * result + (preProvisioningHook?.hashCode() ?: 0)
result = 31 * result + (provisioningRoleArn?.hashCode() ?: 0)
result = 31 * result + (removePreProvisioningHook?.hashCode() ?: 0)
result = 31 * result + (templateName?.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 UpdateProvisioningTemplateRequest
if (defaultVersionId != other.defaultVersionId) return false
if (description != other.description) return false
if (enabled != other.enabled) return false
if (preProvisioningHook != other.preProvisioningHook) return false
if (provisioningRoleArn != other.provisioningRoleArn) return false
if (removePreProvisioningHook != other.removePreProvisioningHook) return false
if (templateName != other.templateName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.UpdateProvisioningTemplateRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The ID of the default provisioning template version.
*/
public var defaultVersionId: kotlin.Int? = null
/**
* The description of the provisioning template.
*/
public var description: kotlin.String? = null
/**
* True to enable the provisioning template, otherwise false.
*/
public var enabled: kotlin.Boolean? = null
/**
* Updates the pre-provisioning hook template. Only supports template of type `FLEET_PROVISIONING`. For more information about provisioning template types, see [type](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type).
*/
public var preProvisioningHook: aws.sdk.kotlin.services.iot.model.ProvisioningHook? = null
/**
* The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.
*/
public var provisioningRoleArn: kotlin.String? = null
/**
* Removes pre-provisioning hook template.
*/
public var removePreProvisioningHook: kotlin.Boolean? = null
/**
* The name of the provisioning template.
*/
public var templateName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdateProvisioningTemplateRequest) : this() {
this.defaultVersionId = x.defaultVersionId
this.description = x.description
this.enabled = x.enabled
this.preProvisioningHook = x.preProvisioningHook
this.provisioningRoleArn = x.provisioningRoleArn
this.removePreProvisioningHook = x.removePreProvisioningHook
this.templateName = x.templateName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.UpdateProvisioningTemplateRequest = UpdateProvisioningTemplateRequest(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.ProvisioningHook] inside the given [block]
*/
public fun preProvisioningHook(block: aws.sdk.kotlin.services.iot.model.ProvisioningHook.Builder.() -> kotlin.Unit) {
this.preProvisioningHook = aws.sdk.kotlin.services.iot.model.ProvisioningHook.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy