zio.aws.tnb.model.GetSolNetworkPackageContentResponse.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 GetSolNetworkPackageContentResponse(
contentType: Optional[zio.aws.tnb.model.PackageContentType] =
Optional.Absent,
nsdContent: Optional[Blob] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageContentResponse = {
import GetSolNetworkPackageContentResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageContentResponse
.builder()
.optionallyWith(contentType.map(value => value.unwrap))(_.contentType)
.optionallyWith(
nsdContent.map(value =>
software.amazon.awssdk.core.SdkBytes
.fromByteArrayUnsafe(value.toArray[Byte])
)
)(_.nsdContent)
.build()
}
def asReadOnly
: zio.aws.tnb.model.GetSolNetworkPackageContentResponse.ReadOnly =
zio.aws.tnb.model.GetSolNetworkPackageContentResponse.wrap(buildAwsValue())
}
object GetSolNetworkPackageContentResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageContentResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.GetSolNetworkPackageContentResponse =
zio.aws.tnb.model.GetSolNetworkPackageContentResponse(
contentType.map(value => value),
nsdContent.map(value => value)
)
def contentType: Optional[zio.aws.tnb.model.PackageContentType]
def nsdContent: Optional[Blob]
def getContentType
: ZIO[Any, AwsError, zio.aws.tnb.model.PackageContentType] =
AwsError.unwrapOptionField("contentType", contentType)
def getNsdContent: ZIO[Any, AwsError, Blob] =
AwsError.unwrapOptionField("nsdContent", nsdContent)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageContentResponse
) extends zio.aws.tnb.model.GetSolNetworkPackageContentResponse.ReadOnly {
override val contentType: Optional[zio.aws.tnb.model.PackageContentType] =
zio.aws.core.internal
.optionalFromNullable(impl.contentType())
.map(value => zio.aws.tnb.model.PackageContentType.wrap(value))
override val nsdContent: Optional[Blob] = zio.aws.core.internal
.optionalFromNullable(impl.nsdContent())
.map(value =>
zio.aws.tnb.model.primitives
.Blob(zio.Chunk.fromArray(value.asByteArrayUnsafe()))
)
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageContentResponse
): zio.aws.tnb.model.GetSolNetworkPackageContentResponse.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy