zio.aws.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest.scala Maven / Gradle / Ivy
The newest version!
package zio.aws.snowdevicemanagement.model
import zio.ZIO
import zio.aws.core.BuilderHelper
import zio.aws.snowdevicemanagement.model.primitives.ManagedDeviceId
import scala.jdk.CollectionConverters._
final case class DescribeDeviceEc2InstancesRequest(
instanceIds: Iterable[String],
managedDeviceId: ManagedDeviceId
) {
def buildAwsValue()
: software.amazon.awssdk.services.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest = {
import DescribeDeviceEc2InstancesRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest
.builder()
.instanceIds(instanceIds.map { item =>
item: java.lang.String
}.asJavaCollection)
.managedDeviceId(
ManagedDeviceId.unwrap(managedDeviceId): java.lang.String
)
.build()
}
def asReadOnly
: zio.aws.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest.ReadOnly =
zio.aws.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest
.wrap(buildAwsValue())
}
object DescribeDeviceEc2InstancesRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable
: zio.aws.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest =
zio.aws.snowdevicemanagement.model
.DescribeDeviceEc2InstancesRequest(instanceIds, managedDeviceId)
def instanceIds: List[String]
def managedDeviceId: ManagedDeviceId
def getInstanceIds: ZIO[Any, Nothing, List[String]] =
ZIO.succeed(instanceIds)
def getManagedDeviceId: ZIO[Any, Nothing, ManagedDeviceId] =
ZIO.succeed(managedDeviceId)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest
) extends zio.aws.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest.ReadOnly {
override val instanceIds: List[String] = impl
.instanceIds()
.asScala
.map { item =>
item: String
}
.toList
override val managedDeviceId: ManagedDeviceId =
zio.aws.snowdevicemanagement.model.primitives
.ManagedDeviceId(impl.managedDeviceId())
}
def wrap(
impl: software.amazon.awssdk.services.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest
): zio.aws.snowdevicemanagement.model.DescribeDeviceEc2InstancesRequest.ReadOnly =
new Wrapper(impl)
}