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

com.shell.apitest.models.PurchaseCategoryResponse 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 java.util.List;

/**
 * This is a model class for PurchaseCategoryResponse type.
 */
public class PurchaseCategoryResponse {
    private List purchaseCategories;
    private ErrorStatus error;

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

    /**
     * Initialization constructor.
     * @param  purchaseCategories  List of PurchaseCategory1AllOf0 value for purchaseCategories.
     * @param  error  ErrorStatus value for error.
     */
    public PurchaseCategoryResponse(
            List purchaseCategories,
            ErrorStatus error) {
        this.purchaseCategories = purchaseCategories;
        this.error = error;
    }

    /**
     * Getter for PurchaseCategories.
     * @return Returns the List of PurchaseCategory1AllOf0
     */
    @JsonGetter("PurchaseCategories")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public List getPurchaseCategories() {
        return purchaseCategories;
    }

    /**
     * Setter for PurchaseCategories.
     * @param purchaseCategories Value for List of PurchaseCategory1AllOf0
     */
    @JsonSetter("PurchaseCategories")
    public void setPurchaseCategories(List purchaseCategories) {
        this.purchaseCategories = purchaseCategories;
    }

    /**
     * Getter for Error.
     * @return Returns the ErrorStatus
     */
    @JsonGetter("Error")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public ErrorStatus getError() {
        return error;
    }

    /**
     * Setter for Error.
     * @param error Value for ErrorStatus
     */
    @JsonSetter("Error")
    public void setError(ErrorStatus error) {
        this.error = error;
    }

    /**
     * Converts this PurchaseCategoryResponse into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "PurchaseCategoryResponse [" + "purchaseCategories=" + purchaseCategories
                + ", error=" + error + "]";
    }

    /**
     * Builds a new {@link PurchaseCategoryResponse.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link PurchaseCategoryResponse.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .purchaseCategories(getPurchaseCategories())
                .error(getError());
        return builder;
    }

    /**
     * Class to build instances of {@link PurchaseCategoryResponse}.
     */
    public static class Builder {
        private List purchaseCategories;
        private ErrorStatus error;



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

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

        /**
         * Builds a new {@link PurchaseCategoryResponse} object using the set fields.
         * @return {@link PurchaseCategoryResponse}
         */
        public PurchaseCategoryResponse build() {
            return new PurchaseCategoryResponse(purchaseCategories, error);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy