001
002package com.commercetools.api.predicates.query.message;
003
004import java.util.function.Function;
005
006import com.commercetools.api.predicates.query.*;
007
008public class InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl {
009    public InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl() {
010    }
011
012    public static InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl of() {
013        return new InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl();
014    }
015
016    public StringComparisonPredicateBuilder<InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl> type() {
017        return new StringComparisonPredicateBuilder<>(
018            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")),
019            p -> new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of));
020    }
021
022    public LongComparisonPredicateBuilder<InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl> oldQuantityOnStock() {
023        return new LongComparisonPredicateBuilder<>(
024            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldQuantityOnStock")),
025            p -> new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of));
026    }
027
028    public LongComparisonPredicateBuilder<InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl> newQuantityOnStock() {
029        return new LongComparisonPredicateBuilder<>(
030            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("newQuantityOnStock")),
031            p -> new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of));
032    }
033
034    public LongComparisonPredicateBuilder<InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl> oldAvailableQuantity() {
035        return new LongComparisonPredicateBuilder<>(
036            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldAvailableQuantity")),
037            p -> new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of));
038    }
039
040    public LongComparisonPredicateBuilder<InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl> newAvailableQuantity() {
041        return new LongComparisonPredicateBuilder<>(
042            BinaryQueryPredicate.of().left(new ConstantQueryPredicate("newAvailableQuantity")),
043            p -> new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of));
044    }
045
046    public CombinationQueryPredicate<InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl> supplyChannel(
047            Function<com.commercetools.api.predicates.query.channel.ChannelReferenceQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.channel.ChannelReferenceQueryBuilderDsl>> fn) {
048        return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
049                .parent(ConstantQueryPredicate.of().constant("supplyChannel"))
050                .inner(fn.apply(com.commercetools.api.predicates.query.channel.ChannelReferenceQueryBuilderDsl.of())),
051            InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of);
052    }
053
054}