zio.aws.tnb.model.GetSolNetworkPackageDescriptorResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-tnb_3 Show documentation
Show all versions of zio-aws-tnb_3 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.tnb.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import zio.aws.tnb.model.primitives.Blob
import scala.jdk.CollectionConverters.*
final case class GetSolNetworkPackageDescriptorResponse(
contentType: Optional[zio.aws.tnb.model.DescriptorContentType] =
Optional.Absent,
nsd: Optional[Blob] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageDescriptorResponse = {
import GetSolNetworkPackageDescriptorResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageDescriptorResponse
.builder()
.optionallyWith(contentType.map(value => value.unwrap))(_.contentType)
.optionallyWith(
nsd.map(value =>
software.amazon.awssdk.core.SdkBytes
.fromByteArrayUnsafe(value.toArray[Byte])
)
)(_.nsd)
.build()
}
def asReadOnly
: zio.aws.tnb.model.GetSolNetworkPackageDescriptorResponse.ReadOnly =
zio.aws.tnb.model.GetSolNetworkPackageDescriptorResponse
.wrap(buildAwsValue())
}
object GetSolNetworkPackageDescriptorResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageDescriptorResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.GetSolNetworkPackageDescriptorResponse =
zio.aws.tnb.model.GetSolNetworkPackageDescriptorResponse(
contentType.map(value => value),
nsd.map(value => value)
)
def contentType: Optional[zio.aws.tnb.model.DescriptorContentType]
def nsd: Optional[Blob]
def getContentType
: ZIO[Any, AwsError, zio.aws.tnb.model.DescriptorContentType] =
AwsError.unwrapOptionField("contentType", contentType)
def getNsd: ZIO[Any, AwsError, Blob] =
AwsError.unwrapOptionField("nsd", nsd)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageDescriptorResponse
) extends zio.aws.tnb.model.GetSolNetworkPackageDescriptorResponse.ReadOnly {
override val contentType
: Optional[zio.aws.tnb.model.DescriptorContentType] =
zio.aws.core.internal
.optionalFromNullable(impl.contentType())
.map(value => zio.aws.tnb.model.DescriptorContentType.wrap(value))
override val nsd: Optional[Blob] = zio.aws.core.internal
.optionalFromNullable(impl.nsd())
.map(value =>
zio.aws.tnb.model.primitives
.Blob(zio.Chunk.fromArray(value.asByteArrayUnsafe()))
)
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageDescriptorResponse
): zio.aws.tnb.model.GetSolNetworkPackageDescriptorResponse.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy