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

com.squareup.connect.models.ListCustomersResponse Maven / Gradle / Ivy

There is a newer version: 2.20191120.0
Show newest version
/*
 * Square Connect API
 * Client library for accessing the Square Connect APIs
 *
 * OpenAPI spec version: 2.0
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.squareup.connect.models;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.squareup.connect.models.Customer;
import com.squareup.connect.models.Error;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * Defines the fields that are included in the response body of a request to the [ListCustomers](#endpoint-listcustomers) endpoint.  One of `errors` or `customers` is present in a given response (never both).
 */
@ApiModel(description = "Defines the fields that are included in the response body of a request to the [ListCustomers](#endpoint-listcustomers) endpoint.  One of `errors` or `customers` is present in a given response (never both).")

public class ListCustomersResponse {
  @JsonProperty("errors")
  private List errors = new ArrayList();

  @JsonProperty("customers")
  private List customers = new ArrayList();

  @JsonProperty("cursor")
  private String cursor = null;

  public ListCustomersResponse errors(List errors) {
    this.errors = errors;
    return this;
  }

  public ListCustomersResponse addErrorsItem(Error errorsItem) {
    this.errors.add(errorsItem);
    return this;
  }

   /**
   * Any errors that occurred during the request.
   * @return errors
  **/
  @ApiModelProperty(value = "Any errors that occurred during the request.")
  public List getErrors() {
    return errors;
  }

  public void setErrors(List errors) {
    this.errors = errors;
  }

  public ListCustomersResponse customers(List customers) {
    this.customers = customers;
    return this;
  }

  public ListCustomersResponse addCustomersItem(Customer customersItem) {
    this.customers.add(customersItem);
    return this;
  }

   /**
   * An array of `Customer` objects that match your query.
   * @return customers
  **/
  @ApiModelProperty(value = "An array of `Customer` objects that match your query.")
  public List getCustomers() {
    return customers;
  }

  public void setCustomers(List customers) {
    this.customers = customers;
  }

  public ListCustomersResponse cursor(String cursor) {
    this.cursor = cursor;
    return this;
  }

   /**
   * A pagination cursor to retrieve the next set of results for your original query to the endpoint. This value is present only if the request succeeded and additional results are available.  See [Paginating results](#paginatingresults) for more information.
   * @return cursor
  **/
  @ApiModelProperty(value = "A pagination cursor to retrieve the next set of results for your original query to the endpoint. This value is present only if the request succeeded and additional results are available.  See [Paginating results](#paginatingresults) for more information.")
  public String getCursor() {
    return cursor;
  }

  public void setCursor(String cursor) {
    this.cursor = cursor;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ListCustomersResponse listCustomersResponse = (ListCustomersResponse) o;
    return Objects.equals(this.errors, listCustomersResponse.errors) &&
        Objects.equals(this.customers, listCustomersResponse.customers) &&
        Objects.equals(this.cursor, listCustomersResponse.cursor);
  }

  @Override
  public int hashCode() {
    return Objects.hash(errors, customers, cursor);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ListCustomersResponse {\n");
    
    sb.append("    errors: ").append(toIndentedString(errors)).append("\n");
    sb.append("    customers: ").append(toIndentedString(customers)).append("\n");
    sb.append("    cursor: ").append(toIndentedString(cursor)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
  
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy