All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.aws.tnb.model.GetSolFunctionPackageDescriptorResponse.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.10
Show newest version
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 GetSolFunctionPackageDescriptorResponse(
    contentType: Optional[zio.aws.tnb.model.DescriptorContentType] =
      Optional.Absent,
    vnfd: Optional[Blob] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageDescriptorResponse = {
    import GetSolFunctionPackageDescriptorResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageDescriptorResponse
      .builder()
      .optionallyWith(contentType.map(value => value.unwrap))(_.contentType)
      .optionallyWith(
        vnfd.map(value =>
          software.amazon.awssdk.core.SdkBytes
            .fromByteArrayUnsafe(value.toArray[Byte])
        )
      )(_.vnfd)
      .build()
  }
  def asReadOnly
      : zio.aws.tnb.model.GetSolFunctionPackageDescriptorResponse.ReadOnly =
    zio.aws.tnb.model.GetSolFunctionPackageDescriptorResponse
      .wrap(buildAwsValue())
}
object GetSolFunctionPackageDescriptorResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageDescriptorResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.GetSolFunctionPackageDescriptorResponse =
      zio.aws.tnb.model.GetSolFunctionPackageDescriptorResponse(
        contentType.map(value => value),
        vnfd.map(value => value)
      )
    def contentType: Optional[zio.aws.tnb.model.DescriptorContentType]
    def vnfd: Optional[Blob]
    def getContentType
        : ZIO[Any, AwsError, zio.aws.tnb.model.DescriptorContentType] =
      AwsError.unwrapOptionField("contentType", contentType)
    def getVnfd: ZIO[Any, AwsError, Blob] =
      AwsError.unwrapOptionField("vnfd", vnfd)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageDescriptorResponse
  ) extends zio.aws.tnb.model.GetSolFunctionPackageDescriptorResponse.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 vnfd: Optional[Blob] = zio.aws.core.internal
      .optionalFromNullable(impl.vnfd())
      .map(value =>
        zio.aws.tnb.model.primitives
          .Blob(zio.Chunk.fromArray(value.asByteArrayUnsafe()))
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageDescriptorResponse
  ): zio.aws.tnb.model.GetSolFunctionPackageDescriptorResponse.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy