zio.aws.codecatalyst.model.ListDevEnvironmentsResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-codecatalyst_3 Show documentation
Show all versions of zio-aws-codecatalyst_3 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.codecatalyst.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class ListDevEnvironmentsResponse(
items: Iterable[zio.aws.codecatalyst.model.DevEnvironmentSummary],
nextToken: Optional[String] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.codecatalyst.model.ListDevEnvironmentsResponse = {
import ListDevEnvironmentsResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codecatalyst.model.ListDevEnvironmentsResponse
.builder()
.items(items.map { item =>
item.buildAwsValue()
}.asJavaCollection)
.optionallyWith(nextToken.map(value => value: java.lang.String))(
_.nextToken
)
.build()
}
def asReadOnly
: zio.aws.codecatalyst.model.ListDevEnvironmentsResponse.ReadOnly =
zio.aws.codecatalyst.model.ListDevEnvironmentsResponse.wrap(buildAwsValue())
}
object ListDevEnvironmentsResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codecatalyst.model.ListDevEnvironmentsResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codecatalyst.model.ListDevEnvironmentsResponse =
zio.aws.codecatalyst.model.ListDevEnvironmentsResponse(
items.map { item =>
item.asEditable
},
nextToken.map(value => value)
)
def items: List[zio.aws.codecatalyst.model.DevEnvironmentSummary.ReadOnly]
def nextToken: Optional[String]
def getItems: ZIO[Any, Nothing, List[
zio.aws.codecatalyst.model.DevEnvironmentSummary.ReadOnly
]] = ZIO.succeed(items)
def getNextToken: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("nextToken", nextToken)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codecatalyst.model.ListDevEnvironmentsResponse
) extends zio.aws.codecatalyst.model.ListDevEnvironmentsResponse.ReadOnly {
override val items
: List[zio.aws.codecatalyst.model.DevEnvironmentSummary.ReadOnly] = impl
.items()
.asScala
.map { item =>
zio.aws.codecatalyst.model.DevEnvironmentSummary.wrap(item)
}
.toList
override val nextToken: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nextToken())
.map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.codecatalyst.model.ListDevEnvironmentsResponse
): zio.aws.codecatalyst.model.ListDevEnvironmentsResponse.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy