
commonMain.aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfile.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudfront.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A complex data type for field-level encryption profiles.
*/
public class FieldLevelEncryptionProfile private constructor(builder: Builder) {
/**
* A complex data type that includes the profile name and the encryption entities for the field-level encryption profile.
*/
public val fieldLevelEncryptionProfileConfig: aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfileConfig? = builder.fieldLevelEncryptionProfileConfig
/**
* The ID for a field-level encryption profile configuration which includes a set of profiles that specify certain selected data fields to be encrypted by specific public keys.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* The last time the field-level encryption profile was updated.
*/
public val lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModifiedTime) { "A non-null value must be provided for lastModifiedTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfile = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FieldLevelEncryptionProfile(")
append("fieldLevelEncryptionProfileConfig=$fieldLevelEncryptionProfileConfig,")
append("id=$id,")
append("lastModifiedTime=$lastModifiedTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = fieldLevelEncryptionProfileConfig?.hashCode() ?: 0
result = 31 * result + (id.hashCode())
result = 31 * result + (lastModifiedTime.hashCode())
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 FieldLevelEncryptionProfile
if (fieldLevelEncryptionProfileConfig != other.fieldLevelEncryptionProfileConfig) return false
if (id != other.id) return false
if (lastModifiedTime != other.lastModifiedTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfile = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A complex data type that includes the profile name and the encryption entities for the field-level encryption profile.
*/
public var fieldLevelEncryptionProfileConfig: aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfileConfig? = null
/**
* The ID for a field-level encryption profile configuration which includes a set of profiles that specify certain selected data fields to be encrypted by specific public keys.
*/
public var id: kotlin.String? = null
/**
* The last time the field-level encryption profile was updated.
*/
public var lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfile) : this() {
this.fieldLevelEncryptionProfileConfig = x.fieldLevelEncryptionProfileConfig
this.id = x.id
this.lastModifiedTime = x.lastModifiedTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfile = FieldLevelEncryptionProfile(this)
/**
* construct an [aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfileConfig] inside the given [block]
*/
public fun fieldLevelEncryptionProfileConfig(block: aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfileConfig.Builder.() -> kotlin.Unit) {
this.fieldLevelEncryptionProfileConfig = aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryptionProfileConfig.invoke(block)
}
internal fun correctErrors(): Builder {
if (id == null) id = ""
if (lastModifiedTime == null) lastModifiedTime = Instant.fromEpochSeconds(0)
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy