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