zio.aws.costoptimizationhub.model.ListRecommendationsRequest.scala Maven / Gradle / Ivy
The newest version!
package zio.aws.costoptimizationhub.model
import zio.prelude.data.Optional
import zio.aws.costoptimizationhub.model.primitives.{
ListRecommendationsRequestMaxResultsInteger,
PrimitiveBoolean
}
import zio.aws.core.{AwsError, BuilderHelper}
import zio.ZIO
import java.lang.Integer
import scala.jdk.CollectionConverters.*
final case class ListRecommendationsRequest(
filter: Optional[zio.aws.costoptimizationhub.model.Filter] =
Optional.Absent,
orderBy: Optional[zio.aws.costoptimizationhub.model.OrderBy] =
Optional.Absent,
includeAllRecommendations: Optional[PrimitiveBoolean] = Optional.Absent,
maxResults: Optional[ListRecommendationsRequestMaxResultsInteger] =
Optional.Absent,
nextToken: Optional[String] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest = {
import ListRecommendationsRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest
.builder()
.optionallyWith(filter.map(value => value.buildAwsValue()))(_.filter)
.optionallyWith(orderBy.map(value => value.buildAwsValue()))(_.orderBy)
.optionallyWith(
includeAllRecommendations.map(value =>
PrimitiveBoolean.unwrap(value): java.lang.Boolean
)
)(_.includeAllRecommendations)
.optionallyWith(
maxResults.map(value =>
ListRecommendationsRequestMaxResultsInteger.unwrap(value): Integer
)
)(_.maxResults)
.optionallyWith(nextToken.map(value => value: java.lang.String))(
_.nextToken
)
.build()
}
def asReadOnly
: zio.aws.costoptimizationhub.model.ListRecommendationsRequest.ReadOnly =
zio.aws.costoptimizationhub.model.ListRecommendationsRequest
.wrap(buildAwsValue())
}
object ListRecommendationsRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable
: zio.aws.costoptimizationhub.model.ListRecommendationsRequest =
zio.aws.costoptimizationhub.model.ListRecommendationsRequest(
filter.map(value => value.asEditable),
orderBy.map(value => value.asEditable),
includeAllRecommendations.map(value => value),
maxResults.map(value => value),
nextToken.map(value => value)
)
def filter: Optional[zio.aws.costoptimizationhub.model.Filter.ReadOnly]
def orderBy: Optional[zio.aws.costoptimizationhub.model.OrderBy.ReadOnly]
def includeAllRecommendations: Optional[PrimitiveBoolean]
def maxResults: Optional[ListRecommendationsRequestMaxResultsInteger]
def nextToken: Optional[String]
def getFilter: ZIO[
Any,
AwsError,
zio.aws.costoptimizationhub.model.Filter.ReadOnly
] = AwsError.unwrapOptionField("filter", filter)
def getOrderBy: ZIO[
Any,
AwsError,
zio.aws.costoptimizationhub.model.OrderBy.ReadOnly
] = AwsError.unwrapOptionField("orderBy", orderBy)
def getIncludeAllRecommendations: ZIO[Any, AwsError, PrimitiveBoolean] =
AwsError.unwrapOptionField(
"includeAllRecommendations",
includeAllRecommendations
)
def getMaxResults
: ZIO[Any, AwsError, ListRecommendationsRequestMaxResultsInteger] =
AwsError.unwrapOptionField("maxResults", maxResults)
def getNextToken: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("nextToken", nextToken)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest
) extends zio.aws.costoptimizationhub.model.ListRecommendationsRequest.ReadOnly {
override val filter
: Optional[zio.aws.costoptimizationhub.model.Filter.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.filter())
.map(value => zio.aws.costoptimizationhub.model.Filter.wrap(value))
override val orderBy
: Optional[zio.aws.costoptimizationhub.model.OrderBy.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.orderBy())
.map(value => zio.aws.costoptimizationhub.model.OrderBy.wrap(value))
override val includeAllRecommendations: Optional[PrimitiveBoolean] =
zio.aws.core.internal
.optionalFromNullable(impl.includeAllRecommendations())
.map(value =>
zio.aws.costoptimizationhub.model.primitives.PrimitiveBoolean(value)
)
override val maxResults
: Optional[ListRecommendationsRequestMaxResultsInteger] =
zio.aws.core.internal
.optionalFromNullable(impl.maxResults())
.map(value =>
zio.aws.costoptimizationhub.model.primitives
.ListRecommendationsRequestMaxResultsInteger(value)
)
override val nextToken: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nextToken())
.map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest
): zio.aws.costoptimizationhub.model.ListRecommendationsRequest.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy