zio.aws.snowdevicemanagement.model.ListExecutionsRequest.scala Maven / Gradle / Ivy
The newest version!
package zio.aws.snowdevicemanagement.model
import zio.aws.snowdevicemanagement.model.primitives.{
TaskId,
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 ListExecutionsRequest(
maxResults: Optional[MaxResults] = Optional.Absent,
nextToken: Optional[NextToken] = Optional.Absent,
state: Optional[zio.aws.snowdevicemanagement.model.ExecutionState] =
Optional.Absent,
taskId: TaskId
) {
def buildAwsValue()
: software.amazon.awssdk.services.snowdevicemanagement.model.ListExecutionsRequest = {
import ListExecutionsRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.snowdevicemanagement.model.ListExecutionsRequest
.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)
.taskId(TaskId.unwrap(taskId): java.lang.String)
.build()
}
def asReadOnly
: zio.aws.snowdevicemanagement.model.ListExecutionsRequest.ReadOnly =
zio.aws.snowdevicemanagement.model.ListExecutionsRequest
.wrap(buildAwsValue())
}
object ListExecutionsRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.snowdevicemanagement.model.ListExecutionsRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.snowdevicemanagement.model.ListExecutionsRequest =
zio.aws.snowdevicemanagement.model.ListExecutionsRequest(
maxResults.map(value => value),
nextToken.map(value => value),
state.map(value => value),
taskId
)
def maxResults: Optional[MaxResults]
def nextToken: Optional[NextToken]
def state: Optional[zio.aws.snowdevicemanagement.model.ExecutionState]
def taskId: TaskId
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.ExecutionState
] = AwsError.unwrapOptionField("state", state)
def getTaskId: ZIO[Any, Nothing, TaskId] = ZIO.succeed(taskId)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.snowdevicemanagement.model.ListExecutionsRequest
) extends zio.aws.snowdevicemanagement.model.ListExecutionsRequest.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.ExecutionState] =
zio.aws.core.internal
.optionalFromNullable(impl.state())
.map(value =>
zio.aws.snowdevicemanagement.model.ExecutionState.wrap(value)
)
override val taskId: TaskId =
zio.aws.snowdevicemanagement.model.primitives.TaskId(impl.taskId())
}
def wrap(
impl: software.amazon.awssdk.services.snowdevicemanagement.model.ListExecutionsRequest
): zio.aws.snowdevicemanagement.model.ListExecutionsRequest.ReadOnly =
new Wrapper(impl)
}