001
002package com.commercetools.api.predicates.query.product;
003
004import java.util.function.Function;
005
006import com.commercetools.api.predicates.query.*;
007
008public class ProductChangePriceActionQueryBuilderDsl {
009    public ProductChangePriceActionQueryBuilderDsl() {
010    }
011
012    public static ProductChangePriceActionQueryBuilderDsl of() {
013        return new ProductChangePriceActionQueryBuilderDsl();
014    }
015
016    public StringComparisonPredicateBuilder<ProductChangePriceActionQueryBuilderDsl> action() {
017        return new StringComparisonPredicateBuilder<>(
018            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")),
019            p -> new CombinationQueryPredicate<>(p, ProductChangePriceActionQueryBuilderDsl::of));
020    }
021
022    public StringComparisonPredicateBuilder<ProductChangePriceActionQueryBuilderDsl> priceId() {
023        return new StringComparisonPredicateBuilder<>(
024            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")),
025            p -> new CombinationQueryPredicate<>(p, ProductChangePriceActionQueryBuilderDsl::of));
026    }
027
028    public CombinationQueryPredicate<ProductChangePriceActionQueryBuilderDsl> price(
029            Function<com.commercetools.api.predicates.query.common.PriceDraftQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.common.PriceDraftQueryBuilderDsl>> fn) {
030        return new CombinationQueryPredicate<>(
031            ContainerQueryPredicate.of()
032                    .parent(ConstantQueryPredicate.of().constant("price"))
033                    .inner(fn.apply(com.commercetools.api.predicates.query.common.PriceDraftQueryBuilderDsl.of())),
034            ProductChangePriceActionQueryBuilderDsl::of);
035    }
036
037    public BooleanComparisonPredicateBuilder<ProductChangePriceActionQueryBuilderDsl> staged() {
038        return new BooleanComparisonPredicateBuilder<>(
039            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")),
040            p -> new CombinationQueryPredicate<>(p, ProductChangePriceActionQueryBuilderDsl::of));
041    }
042
043}