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

zio.aws.mediastore.model.DescribeContainerResponse.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.6
Show newest version
package zio.aws.mediastore.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class DescribeContainerResponse(
    container: Optional[zio.aws.mediastore.model.Container] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.mediastore.model.DescribeContainerResponse = {
    import DescribeContainerResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.mediastore.model.DescribeContainerResponse
      .builder()
      .optionallyWith(container.map(value => value.buildAwsValue()))(
        _.container
      )
      .build()
  }
  def asReadOnly: zio.aws.mediastore.model.DescribeContainerResponse.ReadOnly =
    zio.aws.mediastore.model.DescribeContainerResponse.wrap(buildAwsValue())
}
object DescribeContainerResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.mediastore.model.DescribeContainerResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.mediastore.model.DescribeContainerResponse =
      zio.aws.mediastore.model
        .DescribeContainerResponse(container.map(value => value.asEditable))
    def container: Optional[zio.aws.mediastore.model.Container.ReadOnly]
    def getContainer
        : ZIO[Any, AwsError, zio.aws.mediastore.model.Container.ReadOnly] =
      AwsError.unwrapOptionField("container", container)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.mediastore.model.DescribeContainerResponse
  ) extends zio.aws.mediastore.model.DescribeContainerResponse.ReadOnly {
    override val container
        : Optional[zio.aws.mediastore.model.Container.ReadOnly] =
      zio.aws.core.internal
        .optionalFromNullable(impl.container())
        .map(value => zio.aws.mediastore.model.Container.wrap(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.mediastore.model.DescribeContainerResponse
  ): zio.aws.mediastore.model.DescribeContainerResponse.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy