zio.aws.nimble.model.StopStreamingSessionResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-nimble_3 Show documentation
Show all versions of zio-aws-nimble_3 Show documentation
Low-level AWS wrapper for ZIO
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 StopStreamingSessionResponse(
session: Optional[zio.aws.nimble.model.StreamingSession] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.nimble.model.StopStreamingSessionResponse = {
import StopStreamingSessionResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.nimble.model.StopStreamingSessionResponse
.builder()
.optionallyWith(session.map(value => value.buildAwsValue()))(_.session)
.build()
}
def asReadOnly: zio.aws.nimble.model.StopStreamingSessionResponse.ReadOnly =
zio.aws.nimble.model.StopStreamingSessionResponse.wrap(buildAwsValue())
}
object StopStreamingSessionResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.nimble.model.StopStreamingSessionResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.nimble.model.StopStreamingSessionResponse =
zio.aws.nimble.model
.StopStreamingSessionResponse(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.StopStreamingSessionResponse
) extends zio.aws.nimble.model.StopStreamingSessionResponse.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.StopStreamingSessionResponse
): zio.aws.nimble.model.StopStreamingSessionResponse.ReadOnly = new Wrapper(
impl
)
}