commonMain.aws.sdk.kotlin.services.iotsitewise.model.DescribeDefaultEncryptionConfigurationResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotsitewise-jvm Show documentation
Show all versions of iotsitewise-jvm Show documentation
The AWS SDK for Kotlin client for IoTSiteWise
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotsitewise.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DescribeDefaultEncryptionConfigurationResponse private constructor(builder: Builder) {
/**
* The status of the account configuration. This contains the `ConfigurationState`. If there's an error, it also contains the `ErrorDetails`.
*/
public val configurationStatus: aws.sdk.kotlin.services.iotsitewise.model.ConfigurationStatus? = builder.configurationStatus
/**
* The type of encryption used for the encryption configuration.
*/
public val encryptionType: aws.sdk.kotlin.services.iotsitewise.model.EncryptionType = requireNotNull(builder.encryptionType) { "A non-null value must be provided for encryptionType" }
/**
* The key ARN of the customer managed key used for KMS encryption if you use `KMS_BASED_ENCRYPTION`.
*/
public val kmsKeyArn: kotlin.String? = builder.kmsKeyArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotsitewise.model.DescribeDefaultEncryptionConfigurationResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeDefaultEncryptionConfigurationResponse(")
append("configurationStatus=$configurationStatus,")
append("encryptionType=$encryptionType,")
append("kmsKeyArn=$kmsKeyArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configurationStatus?.hashCode() ?: 0
result = 31 * result + (encryptionType.hashCode())
result = 31 * result + (kmsKeyArn?.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 DescribeDefaultEncryptionConfigurationResponse
if (configurationStatus != other.configurationStatus) return false
if (encryptionType != other.encryptionType) return false
if (kmsKeyArn != other.kmsKeyArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotsitewise.model.DescribeDefaultEncryptionConfigurationResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The status of the account configuration. This contains the `ConfigurationState`. If there's an error, it also contains the `ErrorDetails`.
*/
public var configurationStatus: aws.sdk.kotlin.services.iotsitewise.model.ConfigurationStatus? = null
/**
* The type of encryption used for the encryption configuration.
*/
public var encryptionType: aws.sdk.kotlin.services.iotsitewise.model.EncryptionType? = null
/**
* The key ARN of the customer managed key used for KMS encryption if you use `KMS_BASED_ENCRYPTION`.
*/
public var kmsKeyArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.DescribeDefaultEncryptionConfigurationResponse) : this() {
this.configurationStatus = x.configurationStatus
this.encryptionType = x.encryptionType
this.kmsKeyArn = x.kmsKeyArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotsitewise.model.DescribeDefaultEncryptionConfigurationResponse = DescribeDefaultEncryptionConfigurationResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iotsitewise.model.ConfigurationStatus] inside the given [block]
*/
public fun configurationStatus(block: aws.sdk.kotlin.services.iotsitewise.model.ConfigurationStatus.Builder.() -> kotlin.Unit) {
this.configurationStatus = aws.sdk.kotlin.services.iotsitewise.model.ConfigurationStatus.invoke(block)
}
internal fun correctErrors(): Builder {
if (encryptionType == null) encryptionType = EncryptionType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy