001
002package com.commercetools.api.models.order;
003
004import java.time.*;
005import java.time.ZonedDateTime;
006import java.util.*;
007import java.util.function.Function;
008
009import javax.annotation.Nullable;
010
011import com.fasterxml.jackson.annotation.*;
012import com.fasterxml.jackson.databind.annotation.*;
013
014import io.vrap.rmf.base.client.utils.Generated;
015
016/**
017 * OrderSearchDateRangeValue
018 *
019 * <hr>
020 * Example to create an instance using the builder pattern
021 * <div class=code-example>
022 * <pre><code class='java'>
023 *     OrderSearchDateRangeValue orderSearchDateRangeValue = OrderSearchDateRangeValue.builder()
024 *             .field("{field}")
025 *             .build()
026 * </code></pre>
027 * </div>
028 */
029@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
030@JsonDeserialize(as = OrderSearchDateRangeValueImpl.class)
031public interface OrderSearchDateRangeValue extends OrderSearchQueryExpressionValue {
032
033    /**
034     *
035     * @return gte
036     */
037
038    @JsonProperty("gte")
039    public ZonedDateTime getGte();
040
041    /**
042     *
043     * @return lte
044     */
045
046    @JsonProperty("lte")
047    public ZonedDateTime getLte();
048
049    /**
050     * set gte
051     * @param gte value to be set
052     */
053
054    public void setGte(final ZonedDateTime gte);
055
056    /**
057     * set lte
058     * @param lte value to be set
059     */
060
061    public void setLte(final ZonedDateTime lte);
062
063    /**
064     * factory method
065     * @return instance of OrderSearchDateRangeValue
066     */
067    public static OrderSearchDateRangeValue of() {
068        return new OrderSearchDateRangeValueImpl();
069    }
070
071    /**
072     * factory method to create a shallow copy OrderSearchDateRangeValue
073     * @param template instance to be copied
074     * @return copy instance
075     */
076    public static OrderSearchDateRangeValue of(final OrderSearchDateRangeValue template) {
077        OrderSearchDateRangeValueImpl instance = new OrderSearchDateRangeValueImpl();
078        instance.setField(template.getField());
079        instance.setBoost(template.getBoost());
080        instance.setCustomType(template.getCustomType());
081        instance.setGte(template.getGte());
082        instance.setLte(template.getLte());
083        return instance;
084    }
085
086    /**
087     * factory method to create a deep copy of OrderSearchDateRangeValue
088     * @param template instance to be copied
089     * @return copy instance
090     */
091    @Nullable
092    public static OrderSearchDateRangeValue deepCopy(@Nullable final OrderSearchDateRangeValue template) {
093        if (template == null) {
094            return null;
095        }
096        OrderSearchDateRangeValueImpl instance = new OrderSearchDateRangeValueImpl();
097        instance.setField(template.getField());
098        instance.setBoost(template.getBoost());
099        instance.setCustomType(template.getCustomType());
100        instance.setGte(template.getGte());
101        instance.setLte(template.getLte());
102        return instance;
103    }
104
105    /**
106     * builder factory method for OrderSearchDateRangeValue
107     * @return builder
108     */
109    public static OrderSearchDateRangeValueBuilder builder() {
110        return OrderSearchDateRangeValueBuilder.of();
111    }
112
113    /**
114     * create builder for OrderSearchDateRangeValue instance
115     * @param template instance with prefilled values for the builder
116     * @return builder
117     */
118    public static OrderSearchDateRangeValueBuilder builder(final OrderSearchDateRangeValue template) {
119        return OrderSearchDateRangeValueBuilder.of(template);
120    }
121
122    /**
123     * accessor map function
124     * @param <T> mapped type
125     * @param helper function to map the object
126     * @return mapped value
127     */
128    default <T> T withOrderSearchDateRangeValue(Function<OrderSearchDateRangeValue, T> helper) {
129        return helper.apply(this);
130    }
131
132    /**
133     * gives a TypeReference for usage with Jackson DataBind
134     * @return TypeReference
135     */
136    public static com.fasterxml.jackson.core.type.TypeReference<OrderSearchDateRangeValue> typeReference() {
137        return new com.fasterxml.jackson.core.type.TypeReference<OrderSearchDateRangeValue>() {
138            @Override
139            public String toString() {
140                return "TypeReference<OrderSearchDateRangeValue>";
141            }
142        };
143    }
144}