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

zio.aws.nimble.model.GetStreamingSessionResponse.scala Maven / Gradle / Ivy

The newest version!
package zio.aws.nimble.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class GetStreamingSessionResponse(
    session: Optional[zio.aws.nimble.model.StreamingSession] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.nimble.model.GetStreamingSessionResponse = {
    import GetStreamingSessionResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.nimble.model.GetStreamingSessionResponse
      .builder()
      .optionallyWith(session.map(value => value.buildAwsValue()))(_.session)
      .build()
  }
  def asReadOnly: zio.aws.nimble.model.GetStreamingSessionResponse.ReadOnly =
    zio.aws.nimble.model.GetStreamingSessionResponse.wrap(buildAwsValue())
}
object GetStreamingSessionResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.nimble.model.GetStreamingSessionResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.nimble.model.GetStreamingSessionResponse =
      zio.aws.nimble.model
        .GetStreamingSessionResponse(session.map(value => value.asEditable))
    def session: Optional[zio.aws.nimble.model.StreamingSession.ReadOnly]
    def getSession
        : ZIO[Any, AwsError, zio.aws.nimble.model.StreamingSession.ReadOnly] =
      AwsError.unwrapOptionField("session", session)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.nimble.model.GetStreamingSessionResponse
  ) extends zio.aws.nimble.model.GetStreamingSessionResponse.ReadOnly {
    override val session
        : Optional[zio.aws.nimble.model.StreamingSession.ReadOnly] =
      zio.aws.core.internal
        .optionalFromNullable(impl.session())
        .map(value => zio.aws.nimble.model.StreamingSession.wrap(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.nimble.model.GetStreamingSessionResponse
  ): zio.aws.nimble.model.GetStreamingSessionResponse.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy