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

com.shell.apitest.models.CardSearchResponse 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;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.apimatic.core.types.OptionalNullable;
import java.util.List;

/**
 * This is a model class for CardSearchResponse type.
 */
public class CardSearchResponse {
    private OptionalNullable requestId;
    private OptionalNullable status;
    private List data;
    private Integer page;
    private Integer pageSize;
    private Integer totalPages;
    private Integer totalRecords;

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

    /**
     * Initialization constructor.
     * @param  requestId  String value for requestId.
     * @param  status  String value for status.
     * @param  data  List of Card value for data.
     * @param  page  Integer value for page.
     * @param  pageSize  Integer value for pageSize.
     * @param  totalPages  Integer value for totalPages.
     * @param  totalRecords  Integer value for totalRecords.
     */
    public CardSearchResponse(
            String requestId,
            String status,
            List data,
            Integer page,
            Integer pageSize,
            Integer totalPages,
            Integer totalRecords) {
        this.requestId = OptionalNullable.of(requestId);
        this.status = OptionalNullable.of(status);
        this.data = data;
        this.page = page;
        this.pageSize = pageSize;
        this.totalPages = totalPages;
        this.totalRecords = totalRecords;
    }

    /**
     * Initialization constructor.
     * @param  requestId  String value for requestId.
     * @param  status  String value for status.
     * @param  data  List of Card value for data.
     * @param  page  Integer value for page.
     * @param  pageSize  Integer value for pageSize.
     * @param  totalPages  Integer value for totalPages.
     * @param  totalRecords  Integer value for totalRecords.
     */

    protected CardSearchResponse(OptionalNullable requestId,
            OptionalNullable status, List data, Integer page, Integer pageSize,
            Integer totalPages, Integer totalRecords) {
        this.requestId = requestId;
        this.status = status;
        this.data = data;
        this.page = page;
        this.pageSize = pageSize;
        this.totalPages = totalPages;
        this.totalRecords = totalRecords;
    }

    /**
     * Internal Getter for RequestId.
     * Unique request identifier passed from end user. This identifier helps in tracing a
     * transaction
     * @return Returns the Internal String
     */
    @JsonGetter("RequestId")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetRequestId() {
        return this.requestId;
    }

    /**
     * Getter for RequestId.
     * Unique request identifier passed from end user. This identifier helps in tracing a
     * transaction
     * @return Returns the String
     */
    public String getRequestId() {
        return OptionalNullable.getFrom(requestId);
    }

    /**
     * Setter for RequestId.
     * Unique request identifier passed from end user. This identifier helps in tracing a
     * transaction
     * @param requestId Value for String
     */
    @JsonSetter("RequestId")
    public void setRequestId(String requestId) {
        this.requestId = OptionalNullable.of(requestId);
    }

    /**
     * UnSetter for RequestId.
     * Unique request identifier passed from end user. This identifier helps in tracing a
     * transaction
     */
    public void unsetRequestId() {
        requestId = null;
    }

    /**
     * Internal Getter for Status.
     * Indicates overall status of the request. Allowed values: SUCCES, FAILED, PARTIAL_SUCCES
     * @return Returns the Internal String
     */
    @JsonGetter("Status")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetStatus() {
        return this.status;
    }

    /**
     * Getter for Status.
     * Indicates overall status of the request. Allowed values: SUCCES, FAILED, PARTIAL_SUCCES
     * @return Returns the String
     */
    public String getStatus() {
        return OptionalNullable.getFrom(status);
    }

    /**
     * Setter for Status.
     * Indicates overall status of the request. Allowed values: SUCCES, FAILED, PARTIAL_SUCCES
     * @param status Value for String
     */
    @JsonSetter("Status")
    public void setStatus(String status) {
        this.status = OptionalNullable.of(status);
    }

    /**
     * UnSetter for Status.
     * Indicates overall status of the request. Allowed values: SUCCES, FAILED, PARTIAL_SUCCES
     */
    public void unsetStatus() {
        status = null;
    }

    /**
     * Getter for Data.
     * @return Returns the List of Card
     */
    @JsonGetter("Data")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public List getData() {
        return data;
    }

    /**
     * Setter for Data.
     * @param data Value for List of Card
     */
    @JsonSetter("Data")
    public void setData(List data) {
        this.data = data;
    }

    /**
     * Getter for Page.
     * Specifies the returned page of the results
     * @return Returns the Integer
     */
    @JsonGetter("Page")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Integer getPage() {
        return page;
    }

    /**
     * Setter for Page.
     * Specifies the returned page of the results
     * @param page Value for Integer
     */
    @JsonSetter("Page")
    public void setPage(Integer page) {
        this.page = page;
    }

    /**
     * Getter for PageSize.
     * Specifies the number of records to be returned which could be less than the PageSize in the
     * request
     * @return Returns the Integer
     */
    @JsonGetter("PageSize")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Integer getPageSize() {
        return pageSize;
    }

    /**
     * Setter for PageSize.
     * Specifies the number of records to be returned which could be less than the PageSize in the
     * request
     * @param pageSize Value for Integer
     */
    @JsonSetter("PageSize")
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    /**
     * Getter for TotalPages.
     * Specifies the total pages available in the result
     * @return Returns the Integer
     */
    @JsonGetter("TotalPages")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Integer getTotalPages() {
        return totalPages;
    }

    /**
     * Setter for TotalPages.
     * Specifies the total pages available in the result
     * @param totalPages Value for Integer
     */
    @JsonSetter("TotalPages")
    public void setTotalPages(Integer totalPages) {
        this.totalPages = totalPages;
    }

    /**
     * Getter for TotalRecords.
     * Specifies the total pages available in the result
     * @return Returns the Integer
     */
    @JsonGetter("TotalRecords")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public Integer getTotalRecords() {
        return totalRecords;
    }

    /**
     * Setter for TotalRecords.
     * Specifies the total pages available in the result
     * @param totalRecords Value for Integer
     */
    @JsonSetter("TotalRecords")
    public void setTotalRecords(Integer totalRecords) {
        this.totalRecords = totalRecords;
    }

    /**
     * Converts this CardSearchResponse into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "CardSearchResponse [" + "requestId=" + requestId + ", status=" + status + ", data="
                + data + ", page=" + page + ", pageSize=" + pageSize + ", totalPages=" + totalPages
                + ", totalRecords=" + totalRecords + "]";
    }

    /**
     * Builds a new {@link CardSearchResponse.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link CardSearchResponse.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .data(getData())
                .page(getPage())
                .pageSize(getPageSize())
                .totalPages(getTotalPages())
                .totalRecords(getTotalRecords());
        builder.requestId = internalGetRequestId();
        builder.status = internalGetStatus();
        return builder;
    }

    /**
     * Class to build instances of {@link CardSearchResponse}.
     */
    public static class Builder {
        private OptionalNullable requestId;
        private OptionalNullable status;
        private List data;
        private Integer page;
        private Integer pageSize;
        private Integer totalPages;
        private Integer totalRecords;



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

        /**
         * UnSetter for requestId.
         * @return Builder
         */
        public Builder unsetRequestId() {
            requestId = null;
            return this;
        }

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

        /**
         * UnSetter for status.
         * @return Builder
         */
        public Builder unsetStatus() {
            status = null;
            return this;
        }

        /**
         * Setter for data.
         * @param  data  List of Card value for data.
         * @return Builder
         */
        public Builder data(List data) {
            this.data = data;
            return this;
        }

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

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

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

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

        /**
         * Builds a new {@link CardSearchResponse} object using the set fields.
         * @return {@link CardSearchResponse}
         */
        public CardSearchResponse build() {
            return new CardSearchResponse(requestId, status, data, page, pageSize, totalPages,
                    totalRecords);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy