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

zio.aws.snowdevicemanagement.model.ListTasksRequest.scala Maven / Gradle / Ivy

The newest version!
package zio.aws.snowdevicemanagement.model
import zio.aws.snowdevicemanagement.model.primitives.{NextToken, MaxResults}
import zio.prelude.data.Optional
import zio.aws.core.{AwsError, BuilderHelper}
import zio.ZIO
import java.lang.Integer
import scala.jdk.CollectionConverters._
final case class ListTasksRequest(
    maxResults: Optional[MaxResults] = Optional.Absent,
    nextToken: Optional[NextToken] = Optional.Absent,
    state: Optional[zio.aws.snowdevicemanagement.model.TaskState] =
      Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.snowdevicemanagement.model.ListTasksRequest = {
    import ListTasksRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.snowdevicemanagement.model.ListTasksRequest
      .builder()
      .optionallyWith(
        maxResults.map(value => MaxResults.unwrap(value): Integer)
      )(_.maxResults)
      .optionallyWith(
        nextToken.map(value => NextToken.unwrap(value): java.lang.String)
      )(_.nextToken)
      .optionallyWith(state.map(value => value.unwrap))(_.state)
      .build()
  }
  def asReadOnly: zio.aws.snowdevicemanagement.model.ListTasksRequest.ReadOnly =
    zio.aws.snowdevicemanagement.model.ListTasksRequest.wrap(buildAwsValue())
}
object ListTasksRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.snowdevicemanagement.model.ListTasksRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.snowdevicemanagement.model.ListTasksRequest =
      zio.aws.snowdevicemanagement.model.ListTasksRequest(
        maxResults.map(value => value),
        nextToken.map(value => value),
        state.map(value => value)
      )
    def maxResults: Optional[MaxResults]
    def nextToken: Optional[NextToken]
    def state: Optional[zio.aws.snowdevicemanagement.model.TaskState]
    def getMaxResults: ZIO[Any, AwsError, MaxResults] =
      AwsError.unwrapOptionField("maxResults", maxResults)
    def getNextToken: ZIO[Any, AwsError, NextToken] =
      AwsError.unwrapOptionField("nextToken", nextToken)
    def getState
        : ZIO[Any, AwsError, zio.aws.snowdevicemanagement.model.TaskState] =
      AwsError.unwrapOptionField("state", state)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.snowdevicemanagement.model.ListTasksRequest
  ) extends zio.aws.snowdevicemanagement.model.ListTasksRequest.ReadOnly {
    override val maxResults: Optional[MaxResults] = zio.aws.core.internal
      .optionalFromNullable(impl.maxResults())
      .map(value =>
        zio.aws.snowdevicemanagement.model.primitives.MaxResults(value)
      )
    override val nextToken: Optional[NextToken] = zio.aws.core.internal
      .optionalFromNullable(impl.nextToken())
      .map(value =>
        zio.aws.snowdevicemanagement.model.primitives.NextToken(value)
      )
    override val state: Optional[zio.aws.snowdevicemanagement.model.TaskState] =
      zio.aws.core.internal
        .optionalFromNullable(impl.state())
        .map(value => zio.aws.snowdevicemanagement.model.TaskState.wrap(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.snowdevicemanagement.model.ListTasksRequest
  ): zio.aws.snowdevicemanagement.model.ListTasksRequest.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy