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

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

There is a newer version: 7.28.29.5
Show newest version
package zio.aws.nimble.model
import zio.aws.nimble.model.primitives.ClientToken
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class AcceptEulasRequest(
    clientToken: Optional[ClientToken] = Optional.Absent,
    eulaIds: Optional[Iterable[String]] = Optional.Absent,
    studioId: String
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.nimble.model.AcceptEulasRequest = {
    import AcceptEulasRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.nimble.model.AcceptEulasRequest
      .builder()
      .optionallyWith(
        clientToken.map(value => ClientToken.unwrap(value): java.lang.String)
      )(_.clientToken)
      .optionallyWith(
        eulaIds.map(value =>
          value.map { item =>
            item: java.lang.String
          }.asJavaCollection
        )
      )(_.eulaIds)
      .studioId(studioId: java.lang.String)
      .build()
  }
  def asReadOnly: zio.aws.nimble.model.AcceptEulasRequest.ReadOnly =
    zio.aws.nimble.model.AcceptEulasRequest.wrap(buildAwsValue())
}
object AcceptEulasRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.nimble.model.AcceptEulasRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.nimble.model.AcceptEulasRequest =
      zio.aws.nimble.model.AcceptEulasRequest(
        clientToken.map(value => value),
        eulaIds.map(value => value),
        studioId
      )
    def clientToken: Optional[ClientToken]
    def eulaIds: Optional[List[String]]
    def studioId: String
    def getClientToken: ZIO[Any, AwsError, ClientToken] =
      AwsError.unwrapOptionField("clientToken", clientToken)
    def getEulaIds: ZIO[Any, AwsError, List[String]] =
      AwsError.unwrapOptionField("eulaIds", eulaIds)
    def getStudioId: ZIO[Any, Nothing, String] = ZIO.succeed(studioId)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.nimble.model.AcceptEulasRequest
  ) extends zio.aws.nimble.model.AcceptEulasRequest.ReadOnly {
    override val clientToken: Optional[ClientToken] = zio.aws.core.internal
      .optionalFromNullable(impl.clientToken())
      .map(value => zio.aws.nimble.model.primitives.ClientToken(value))
    override val eulaIds: Optional[List[String]] = zio.aws.core.internal
      .optionalFromNullable(impl.eulaIds())
      .map(value =>
        value.asScala.map { item =>
          item: String
        }.toList
      )
    override val studioId: String = impl.studioId(): String
  }
  def wrap(
      impl: software.amazon.awssdk.services.nimble.model.AcceptEulasRequest
  ): zio.aws.nimble.model.AcceptEulasRequest.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy