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

zio.aws.tnb.model.ListSolFunctionInstancesResponse.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.10
Show newest version
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 ListSolFunctionInstancesResponse(
    functionInstances: Optional[
      Iterable[zio.aws.tnb.model.ListSolFunctionInstanceInfo]
    ] = Optional.Absent,
    nextToken: Optional[PaginationToken] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.ListSolFunctionInstancesResponse = {
    import ListSolFunctionInstancesResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.ListSolFunctionInstancesResponse
      .builder()
      .optionallyWith(
        functionInstances.map(value =>
          value.map { item =>
            item.buildAwsValue()
          }.asJavaCollection
        )
      )(_.functionInstances)
      .optionallyWith(
        nextToken.map(value => PaginationToken.unwrap(value): java.lang.String)
      )(_.nextToken)
      .build()
  }
  def asReadOnly: zio.aws.tnb.model.ListSolFunctionInstancesResponse.ReadOnly =
    zio.aws.tnb.model.ListSolFunctionInstancesResponse.wrap(buildAwsValue())
}
object ListSolFunctionInstancesResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.ListSolFunctionInstancesResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.ListSolFunctionInstancesResponse =
      zio.aws.tnb.model.ListSolFunctionInstancesResponse(
        functionInstances.map(value =>
          value.map { item =>
            item.asEditable
          }
        ),
        nextToken.map(value => value)
      )
    def functionInstances
        : Optional[List[zio.aws.tnb.model.ListSolFunctionInstanceInfo.ReadOnly]]
    def nextToken: Optional[PaginationToken]
    def getFunctionInstances: ZIO[Any, AwsError, List[
      zio.aws.tnb.model.ListSolFunctionInstanceInfo.ReadOnly
    ]] = AwsError.unwrapOptionField("functionInstances", functionInstances)
    def getNextToken: ZIO[Any, AwsError, PaginationToken] =
      AwsError.unwrapOptionField("nextToken", nextToken)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.ListSolFunctionInstancesResponse
  ) extends zio.aws.tnb.model.ListSolFunctionInstancesResponse.ReadOnly {
    override val functionInstances: Optional[
      List[zio.aws.tnb.model.ListSolFunctionInstanceInfo.ReadOnly]
    ] = zio.aws.core.internal
      .optionalFromNullable(impl.functionInstances())
      .map(value =>
        value.asScala.map { item =>
          zio.aws.tnb.model.ListSolFunctionInstanceInfo.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.ListSolFunctionInstancesResponse
  ): zio.aws.tnb.model.ListSolFunctionInstancesResponse.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy