001
002package com.commercetools.api.predicates.query.product;
003
004import java.util.function.Function;
005
006import com.commercetools.api.predicates.query.*;
007
008public class ProductUpdateQueryBuilderDsl {
009    public ProductUpdateQueryBuilderDsl() {
010    }
011
012    public static ProductUpdateQueryBuilderDsl of() {
013        return new ProductUpdateQueryBuilderDsl();
014    }
015
016    public LongComparisonPredicateBuilder<ProductUpdateQueryBuilderDsl> version() {
017        return new LongComparisonPredicateBuilder<>(
018            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")),
019            p -> new CombinationQueryPredicate<>(p, ProductUpdateQueryBuilderDsl::of));
020    }
021
022    public CombinationQueryPredicate<ProductUpdateQueryBuilderDsl> actions(
023            Function<com.commercetools.api.predicates.query.product.ProductUpdateActionQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.product.ProductUpdateActionQueryBuilderDsl>> fn) {
024        return new CombinationQueryPredicate<>(
025            ContainerQueryPredicate.of()
026                    .parent(ConstantQueryPredicate.of().constant("actions"))
027                    .inner(fn.apply(
028                        com.commercetools.api.predicates.query.product.ProductUpdateActionQueryBuilderDsl.of())),
029            ProductUpdateQueryBuilderDsl::of);
030    }
031
032    public CollectionPredicateBuilder<ProductUpdateQueryBuilderDsl> actions() {
033        return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("actions")),
034            p -> new CombinationQueryPredicate<>(p, ProductUpdateQueryBuilderDsl::of));
035    }
036
037}