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

localhost.models.TspublicRestV2DataAnswerRequest Maven / Gradle / Ivy

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

package localhost.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 TspublicRestV2DataAnswerRequest type.
 */
public class TspublicRestV2DataAnswerRequest {
    private Integer offset;
    private Integer batchNumber;
    private Integer batchSize;
    private String id;
    private FormatType1Enum formatType;

    /**
     * Default constructor.
     */
    public TspublicRestV2DataAnswerRequest() {
        offset = 0;
        formatType = FormatType1Enum.COMPACT;
    }

    /**
     * Initialization constructor.
     * @param  id  String value for id.
     * @param  offset  Integer value for offset.
     * @param  batchNumber  Integer value for batchNumber.
     * @param  batchSize  Integer value for batchSize.
     * @param  formatType  FormatType1Enum value for formatType.
     */
    public TspublicRestV2DataAnswerRequest(
            String id,
            Integer offset,
            Integer batchNumber,
            Integer batchSize,
            FormatType1Enum formatType) {
        this.offset = offset;
        this.batchNumber = batchNumber;
        this.batchSize = batchSize;
        this.id = id;
        this.formatType = formatType;
    }

    /**
     * Getter for Offset.
     * The offset point, starting from where the records should be included in the response. If no
     * input is provided then offset starts from 0.
     * @return Returns the Integer
     */
    @JsonGetter("offset")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Integer getOffset() {
        return offset;
    }

    /**
     * Setter for Offset.
     * The offset point, starting from where the records should be included in the response. If no
     * input is provided then offset starts from 0.
     * @param offset Value for Integer
     */
    @JsonSetter("offset")
    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    /**
     * Getter for BatchNumber.
     * An alternate way to set offset for the starting point of the response. The value in offset
     * field will not be considered if batchNumber field has value greater than 0. Offset value will
     * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for
     * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set
     * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th
     * record will be considered.
     * @return Returns the Integer
     */
    @JsonGetter("batchNumber")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Integer getBatchNumber() {
        return batchNumber;
    }

    /**
     * Setter for BatchNumber.
     * An alternate way to set offset for the starting point of the response. The value in offset
     * field will not be considered if batchNumber field has value greater than 0. Offset value will
     * be calculated as (batchNumber - 1) * batchSize. It is mandatory to provide a value for
     * batchSize with batchNumber. Example: Assume response has 100 records. Now, batchNumber is set
     * as 2 and batchSize as 10, then offset value will be 10. So, 10 records starting from 11th
     * record will be considered.
     * @param batchNumber Value for Integer
     */
    @JsonSetter("batchNumber")
    public void setBatchNumber(Integer batchNumber) {
        this.batchNumber = batchNumber;
    }

    /**
     * Getter for BatchSize.
     * The number of records that should be included in the response starting from offset position.
     * If no input is provided, then all records starting from the value provided in offset is
     * included in the response.
     * @return Returns the Integer
     */
    @JsonGetter("batchSize")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Integer getBatchSize() {
        return batchSize;
    }

    /**
     * Setter for BatchSize.
     * The number of records that should be included in the response starting from offset position.
     * If no input is provided, then all records starting from the value provided in offset is
     * included in the response.
     * @param batchSize Value for Integer
     */
    @JsonSetter("batchSize")
    public void setBatchSize(Integer batchSize) {
        this.batchSize = batchSize;
    }

    /**
     * Getter for Id.
     * The GUID of the Answer
     * @return Returns the String
     */
    @JsonGetter("id")
    public String getId() {
        return id;
    }

    /**
     * Setter for Id.
     * The GUID of the Answer
     * @param id Value for String
     */
    @JsonSetter("id")
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Getter for FormatType.
     * The format of the data in the response. FULL: The response comes in "column":"value" format.
     * COMPACT: The response includes only the value of the columns.
     * @return Returns the FormatType1Enum
     */
    @JsonGetter("formatType")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public FormatType1Enum getFormatType() {
        return formatType;
    }

    /**
     * Setter for FormatType.
     * The format of the data in the response. FULL: The response comes in "column":"value" format.
     * COMPACT: The response includes only the value of the columns.
     * @param formatType Value for FormatType1Enum
     */
    @JsonSetter("formatType")
    public void setFormatType(FormatType1Enum formatType) {
        this.formatType = formatType;
    }

    /**
     * Converts this TspublicRestV2DataAnswerRequest into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "TspublicRestV2DataAnswerRequest [" + "id=" + id + ", offset=" + offset
                + ", batchNumber=" + batchNumber + ", batchSize=" + batchSize + ", formatType="
                + formatType + "]";
    }

    /**
     * Builds a new {@link Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder(id)
                .offset(getOffset())
                .batchNumber(getBatchNumber())
                .batchSize(getBatchSize())
                .formatType(getFormatType());
        return builder;
    }

    /**
     * Class to build instances of {@link TspublicRestV2DataAnswerRequest}.
     */
    public static class Builder {
        private String id;
        private Integer offset = 0;
        private Integer batchNumber;
        private Integer batchSize;
        private FormatType1Enum formatType = FormatType1Enum.COMPACT;

        /**
         * Initialization constructor.
         */
        public Builder() {
        }

        /**
         * Initialization constructor.
         * @param  id  String value for id.
         */
        public Builder(String id) {
            this.id = id;
        }

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

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

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

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

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

        /**
         * Builds a new {@link TspublicRestV2DataAnswerRequest} object using the set fields.
         * @return {@link TspublicRestV2DataAnswerRequest}
         */
        public TspublicRestV2DataAnswerRequest build() {
            return new TspublicRestV2DataAnswerRequest(id, offset, batchNumber, batchSize,
                    formatType);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy