zio.aws.health.model.DescribeEntityAggregatesForOrganizationResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-health_3 Show documentation
Show all versions of zio-aws-health_3 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.health.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class DescribeEntityAggregatesForOrganizationResponse(
organizationEntityAggregates: Optional[
Iterable[zio.aws.health.model.OrganizationEntityAggregate]
] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.health.model.DescribeEntityAggregatesForOrganizationResponse = {
import DescribeEntityAggregatesForOrganizationResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.health.model.DescribeEntityAggregatesForOrganizationResponse
.builder()
.optionallyWith(
organizationEntityAggregates.map(value =>
value.map { item =>
item.buildAwsValue()
}.asJavaCollection
)
)(_.organizationEntityAggregates)
.build()
}
def asReadOnly
: zio.aws.health.model.DescribeEntityAggregatesForOrganizationResponse.ReadOnly =
zio.aws.health.model.DescribeEntityAggregatesForOrganizationResponse
.wrap(buildAwsValue())
}
object DescribeEntityAggregatesForOrganizationResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.health.model.DescribeEntityAggregatesForOrganizationResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable
: zio.aws.health.model.DescribeEntityAggregatesForOrganizationResponse =
zio.aws.health.model.DescribeEntityAggregatesForOrganizationResponse(
organizationEntityAggregates.map(value =>
value.map { item =>
item.asEditable
}
)
)
def organizationEntityAggregates: Optional[
List[zio.aws.health.model.OrganizationEntityAggregate.ReadOnly]
]
def getOrganizationEntityAggregates: ZIO[Any, AwsError, List[
zio.aws.health.model.OrganizationEntityAggregate.ReadOnly
]] = AwsError.unwrapOptionField(
"organizationEntityAggregates",
organizationEntityAggregates
)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.health.model.DescribeEntityAggregatesForOrganizationResponse
) extends zio.aws.health.model.DescribeEntityAggregatesForOrganizationResponse.ReadOnly {
override val organizationEntityAggregates: Optional[
List[zio.aws.health.model.OrganizationEntityAggregate.ReadOnly]
] = zio.aws.core.internal
.optionalFromNullable(impl.organizationEntityAggregates())
.map(value =>
value.asScala.map { item =>
zio.aws.health.model.OrganizationEntityAggregate.wrap(item)
}.toList
)
}
def wrap(
impl: software.amazon.awssdk.services.health.model.DescribeEntityAggregatesForOrganizationResponse
): zio.aws.health.model.DescribeEntityAggregatesForOrganizationResponse.ReadOnly =
new Wrapper(impl)
}