zio.aws.nimble.model.StreamingImageEncryptionConfiguration.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-nimble_3 Show documentation
Show all versions of zio-aws-nimble_3 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.nimble.model
import zio.aws.nimble.model.primitives.StreamingImageEncryptionConfigurationKeyArn
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class StreamingImageEncryptionConfiguration(
keyArn: Optional[StreamingImageEncryptionConfigurationKeyArn] =
Optional.Absent,
keyType: zio.aws.nimble.model.StreamingImageEncryptionConfigurationKeyType
) {
def buildAwsValue()
: software.amazon.awssdk.services.nimble.model.StreamingImageEncryptionConfiguration = {
import StreamingImageEncryptionConfiguration.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.nimble.model.StreamingImageEncryptionConfiguration
.builder()
.optionallyWith(
keyArn.map(value =>
StreamingImageEncryptionConfigurationKeyArn.unwrap(
value
): java.lang.String
)
)(_.keyArn)
.keyType(keyType.unwrap)
.build()
}
def asReadOnly
: zio.aws.nimble.model.StreamingImageEncryptionConfiguration.ReadOnly =
zio.aws.nimble.model.StreamingImageEncryptionConfiguration
.wrap(buildAwsValue())
}
object StreamingImageEncryptionConfiguration {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.nimble.model.StreamingImageEncryptionConfiguration
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.nimble.model.StreamingImageEncryptionConfiguration =
zio.aws.nimble.model.StreamingImageEncryptionConfiguration(
keyArn.map(value => value),
keyType
)
def keyArn: Optional[StreamingImageEncryptionConfigurationKeyArn]
def keyType
: zio.aws.nimble.model.StreamingImageEncryptionConfigurationKeyType
def getKeyArn
: ZIO[Any, AwsError, StreamingImageEncryptionConfigurationKeyArn] =
AwsError.unwrapOptionField("keyArn", keyArn)
def getKeyType: ZIO[
Any,
Nothing,
zio.aws.nimble.model.StreamingImageEncryptionConfigurationKeyType
] = ZIO.succeed(keyType)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.nimble.model.StreamingImageEncryptionConfiguration
) extends zio.aws.nimble.model.StreamingImageEncryptionConfiguration.ReadOnly {
override val keyArn: Optional[StreamingImageEncryptionConfigurationKeyArn] =
zio.aws.core.internal
.optionalFromNullable(impl.keyArn())
.map(value =>
zio.aws.nimble.model.primitives
.StreamingImageEncryptionConfigurationKeyArn(value)
)
override val keyType
: zio.aws.nimble.model.StreamingImageEncryptionConfigurationKeyType =
zio.aws.nimble.model.StreamingImageEncryptionConfigurationKeyType
.wrap(impl.keyType())
}
def wrap(
impl: software.amazon.awssdk.services.nimble.model.StreamingImageEncryptionConfiguration
): zio.aws.nimble.model.StreamingImageEncryptionConfiguration.ReadOnly =
new Wrapper(impl)
}