All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shell.apitest.models.Restriction Maven / Gradle / Ivy

/*
 * ShellCardManagementAPIsLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

package com.shell.apitest.models;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;

/**
 * This is a model class for Restriction type.
 */
public class Restriction {
    private Object usageRestrictions;
    private DayTimeRestrictions dayTimeRestrictions;
    private SearchProductRestriction productRestrictions;
    private LocationRestriction locationRestrictions;

    /**
     * Default constructor.
     */
    public Restriction() {
    }

    /**
     * Initialization constructor.
     * @param  usageRestrictions  Object value for usageRestrictions.
     * @param  dayTimeRestrictions  DayTimeRestrictions value for dayTimeRestrictions.
     * @param  productRestrictions  SearchProductRestriction value for productRestrictions.
     * @param  locationRestrictions  LocationRestriction value for locationRestrictions.
     */
    public Restriction(
            Object usageRestrictions,
            DayTimeRestrictions dayTimeRestrictions,
            SearchProductRestriction productRestrictions,
            LocationRestriction locationRestrictions) {
        this.usageRestrictions = usageRestrictions;
        this.dayTimeRestrictions = dayTimeRestrictions;
        this.productRestrictions = productRestrictions;
        this.locationRestrictions = locationRestrictions;
    }

    /**
     * Getter for UsageRestrictions.
     * @return Returns the Object
     */
    @JsonGetter("UsageRestrictions")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Object getUsageRestrictions() {
        return usageRestrictions;
    }

    /**
     * Setter for UsageRestrictions.
     * @param usageRestrictions Value for Object
     */
    @JsonSetter("UsageRestrictions")
    public void setUsageRestrictions(Object usageRestrictions) {
        this.usageRestrictions = usageRestrictions;
    }

    /**
     * Getter for DayTimeRestrictions.
     * @return Returns the DayTimeRestrictions
     */
    @JsonGetter("DayTimeRestrictions")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public DayTimeRestrictions getDayTimeRestrictions() {
        return dayTimeRestrictions;
    }

    /**
     * Setter for DayTimeRestrictions.
     * @param dayTimeRestrictions Value for DayTimeRestrictions
     */
    @JsonSetter("DayTimeRestrictions")
    public void setDayTimeRestrictions(DayTimeRestrictions dayTimeRestrictions) {
        this.dayTimeRestrictions = dayTimeRestrictions;
    }

    /**
     * Getter for ProductRestrictions.
     * @return Returns the SearchProductRestriction
     */
    @JsonGetter("ProductRestrictions")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public SearchProductRestriction getProductRestrictions() {
        return productRestrictions;
    }

    /**
     * Setter for ProductRestrictions.
     * @param productRestrictions Value for SearchProductRestriction
     */
    @JsonSetter("ProductRestrictions")
    public void setProductRestrictions(SearchProductRestriction productRestrictions) {
        this.productRestrictions = productRestrictions;
    }

    /**
     * Getter for LocationRestrictions.
     * @return Returns the LocationRestriction
     */
    @JsonGetter("LocationRestrictions")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public LocationRestriction getLocationRestrictions() {
        return locationRestrictions;
    }

    /**
     * Setter for LocationRestrictions.
     * @param locationRestrictions Value for LocationRestriction
     */
    @JsonSetter("LocationRestrictions")
    public void setLocationRestrictions(LocationRestriction locationRestrictions) {
        this.locationRestrictions = locationRestrictions;
    }

    /**
     * Converts this Restriction into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "Restriction [" + "usageRestrictions=" + usageRestrictions + ", dayTimeRestrictions="
                + dayTimeRestrictions + ", productRestrictions=" + productRestrictions
                + ", locationRestrictions=" + locationRestrictions + "]";
    }

    /**
     * Builds a new {@link Restriction.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link Restriction.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .usageRestrictions(getUsageRestrictions())
                .dayTimeRestrictions(getDayTimeRestrictions())
                .productRestrictions(getProductRestrictions())
                .locationRestrictions(getLocationRestrictions());
        return builder;
    }

    /**
     * Class to build instances of {@link Restriction}.
     */
    public static class Builder {
        private Object usageRestrictions;
        private DayTimeRestrictions dayTimeRestrictions;
        private SearchProductRestriction productRestrictions;
        private LocationRestriction locationRestrictions;



        /**
         * Setter for usageRestrictions.
         * @param  usageRestrictions  Object value for usageRestrictions.
         * @return Builder
         */
        public Builder usageRestrictions(Object usageRestrictions) {
            this.usageRestrictions = usageRestrictions;
            return this;
        }

        /**
         * Setter for dayTimeRestrictions.
         * @param  dayTimeRestrictions  DayTimeRestrictions value for dayTimeRestrictions.
         * @return Builder
         */
        public Builder dayTimeRestrictions(DayTimeRestrictions dayTimeRestrictions) {
            this.dayTimeRestrictions = dayTimeRestrictions;
            return this;
        }

        /**
         * Setter for productRestrictions.
         * @param  productRestrictions  SearchProductRestriction value for productRestrictions.
         * @return Builder
         */
        public Builder productRestrictions(SearchProductRestriction productRestrictions) {
            this.productRestrictions = productRestrictions;
            return this;
        }

        /**
         * Setter for locationRestrictions.
         * @param  locationRestrictions  LocationRestriction value for locationRestrictions.
         * @return Builder
         */
        public Builder locationRestrictions(LocationRestriction locationRestrictions) {
            this.locationRestrictions = locationRestrictions;
            return this;
        }

        /**
         * Builds a new {@link Restriction} object using the set fields.
         * @return {@link Restriction}
         */
        public Restriction build() {
            return new Restriction(usageRestrictions, dayTimeRestrictions, productRestrictions,
                    locationRestrictions);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy