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