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