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