All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.vigoo.zioaws.elasticloadbalancing.model.DescribeAccountLimitsResponse.scala Maven / Gradle / Ivy

package io.github.vigoo.zioaws.elasticloadbalancing.model
import zio.ZIO
import io.github.vigoo.zioaws.elasticloadbalancing.model.primitives.Marker
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class DescribeAccountLimitsResponse(
    limits: Option[
      Iterable[io.github.vigoo.zioaws.elasticloadbalancing.model.Limit]
    ] = None,
    nextMarker: Option[Marker] = None
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.elasticloadbalancing.model.DescribeAccountLimitsResponse = {
    import DescribeAccountLimitsResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.elasticloadbalancing.model.DescribeAccountLimitsResponse
      .builder()
      .optionallyWith(
        limits.map(value =>
          value.map { item =>
            item.buildAwsValue()
          }.asJavaCollection
        )
      )(_.limits)
      .optionallyWith(nextMarker.map(value => value: java.lang.String))(
        _.nextMarker
      )
      .build()
  }
  def asReadOnly
      : io.github.vigoo.zioaws.elasticloadbalancing.model.DescribeAccountLimitsResponse.ReadOnly =
    io.github.vigoo.zioaws.elasticloadbalancing.model.DescribeAccountLimitsResponse
      .wrap(buildAwsValue())
}
object DescribeAccountLimitsResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.elasticloadbalancing.model.DescribeAccountLimitsResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def editable
        : io.github.vigoo.zioaws.elasticloadbalancing.model.DescribeAccountLimitsResponse =
      io.github.vigoo.zioaws.elasticloadbalancing.model
        .DescribeAccountLimitsResponse(
          limitsValue.map(value =>
            value.map { item =>
              item.editable
            }
          ),
          nextMarkerValue.map(value => value)
        )
    def limitsValue: Option[
      List[io.github.vigoo.zioaws.elasticloadbalancing.model.Limit.ReadOnly]
    ]
    def nextMarkerValue: Option[Marker]
    def limits: ZIO[Any, AwsError, List[
      io.github.vigoo.zioaws.elasticloadbalancing.model.Limit.ReadOnly
    ]] = AwsError.unwrapOptionField("limits", limitsValue)
    def nextMarker: ZIO[Any, AwsError, Marker] =
      AwsError.unwrapOptionField("nextMarker", nextMarkerValue)
  }
  private class Wrapper(
      impl: software.amazon.awssdk.services.elasticloadbalancing.model.DescribeAccountLimitsResponse
  ) extends io.github.vigoo.zioaws.elasticloadbalancing.model.DescribeAccountLimitsResponse.ReadOnly {
    override def limitsValue: Option[
      List[io.github.vigoo.zioaws.elasticloadbalancing.model.Limit.ReadOnly]
    ] = scala
      .Option(impl.limits())
      .map(value =>
        value.asScala.map { item =>
          io.github.vigoo.zioaws.elasticloadbalancing.model.Limit.wrap(item)
        }.toList
      )
    override def nextMarkerValue: Option[Marker] =
      scala.Option(impl.nextMarker()).map(value => value: Marker)
  }
  def wrap(
      impl: software.amazon.awssdk.services.elasticloadbalancing.model.DescribeAccountLimitsResponse
  ): io.github.vigoo.zioaws.elasticloadbalancing.model.DescribeAccountLimitsResponse.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy