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

zio.aws.verifiedpermissions.model.ListPolicyStoresRequest.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.5
Show newest version
package zio.aws.verifiedpermissions.model
import zio.prelude.data.Optional
import zio.aws.core.{AwsError, BuilderHelper}
import zio.ZIO
import java.lang.Integer
import zio.aws.verifiedpermissions.model.primitives.{MaxResults, NextToken}
import scala.jdk.CollectionConverters._
final case class ListPolicyStoresRequest(
    nextToken: Optional[NextToken] = Optional.Absent,
    maxResults: Optional[MaxResults] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.verifiedpermissions.model.ListPolicyStoresRequest = {
    import ListPolicyStoresRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.verifiedpermissions.model.ListPolicyStoresRequest
      .builder()
      .optionallyWith(
        nextToken.map(value => NextToken.unwrap(value): java.lang.String)
      )(_.nextToken)
      .optionallyWith(
        maxResults.map(value => MaxResults.unwrap(value): Integer)
      )(_.maxResults)
      .build()
  }
  def asReadOnly
      : zio.aws.verifiedpermissions.model.ListPolicyStoresRequest.ReadOnly =
    zio.aws.verifiedpermissions.model.ListPolicyStoresRequest
      .wrap(buildAwsValue())
}
object ListPolicyStoresRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.verifiedpermissions.model.ListPolicyStoresRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.verifiedpermissions.model.ListPolicyStoresRequest =
      zio.aws.verifiedpermissions.model.ListPolicyStoresRequest(
        nextToken.map(value => value),
        maxResults.map(value => value)
      )
    def nextToken: Optional[NextToken]
    def maxResults: Optional[MaxResults]
    def getNextToken: ZIO[Any, AwsError, NextToken] =
      AwsError.unwrapOptionField("nextToken", nextToken)
    def getMaxResults: ZIO[Any, AwsError, MaxResults] =
      AwsError.unwrapOptionField("maxResults", maxResults)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.verifiedpermissions.model.ListPolicyStoresRequest
  ) extends zio.aws.verifiedpermissions.model.ListPolicyStoresRequest.ReadOnly {
    override val nextToken: Optional[NextToken] = zio.aws.core.internal
      .optionalFromNullable(impl.nextToken())
      .map(value =>
        zio.aws.verifiedpermissions.model.primitives.NextToken(value)
      )
    override val maxResults: Optional[MaxResults] = zio.aws.core.internal
      .optionalFromNullable(impl.maxResults())
      .map(value =>
        zio.aws.verifiedpermissions.model.primitives.MaxResults(value)
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.verifiedpermissions.model.ListPolicyStoresRequest
  ): zio.aws.verifiedpermissions.model.ListPolicyStoresRequest.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy