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

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

There is a newer version: 2.8.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.CatalogIdMapping;
import com.squareup.connect.models.CatalogObject;
import com.squareup.connect.models.Error;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 */
@ApiModel(description = "")

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

  @JsonProperty("catalog_object")
  private CatalogObject catalogObject = null;

  @JsonProperty("id_mappings")
  private List idMappings = new ArrayList();

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

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

   /**
   * Information on any errors encountered.
   * @return errors
  **/
  @ApiModelProperty(value = "Information on any errors encountered.")
  public List getErrors() {
    return errors;
  }

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

  public UpsertCatalogObjectResponse catalogObject(CatalogObject catalogObject) {
    this.catalogObject = catalogObject;
    return this;
  }

   /**
   * The successfully created or updated CatalogObject.
   * @return catalogObject
  **/
  @ApiModelProperty(value = "The successfully created or updated CatalogObject.")
  public CatalogObject getCatalogObject() {
    return catalogObject;
  }

  public void setCatalogObject(CatalogObject catalogObject) {
    this.catalogObject = catalogObject;
  }

  public UpsertCatalogObjectResponse idMappings(List idMappings) {
    this.idMappings = idMappings;
    return this;
  }

  public UpsertCatalogObjectResponse addIdMappingsItem(CatalogIdMapping idMappingsItem) {
    this.idMappings.add(idMappingsItem);
    return this;
  }

   /**
   * The mapping between client and server IDs for this upsert.
   * @return idMappings
  **/
  @ApiModelProperty(value = "The mapping between client and server IDs for this upsert.")
  public List getIdMappings() {
    return idMappings;
  }

  public void setIdMappings(List idMappings) {
    this.idMappings = idMappings;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpsertCatalogObjectResponse upsertCatalogObjectResponse = (UpsertCatalogObjectResponse) o;
    return Objects.equals(this.errors, upsertCatalogObjectResponse.errors) &&
        Objects.equals(this.catalogObject, upsertCatalogObjectResponse.catalogObject) &&
        Objects.equals(this.idMappings, upsertCatalogObjectResponse.idMappings);
  }

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


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpsertCatalogObjectResponse {\n");
    
    sb.append("    errors: ").append(toIndentedString(errors)).append("\n");
    sb.append("    catalogObject: ").append(toIndentedString(catalogObject)).append("\n");
    sb.append("    idMappings: ").append(toIndentedString(idMappings)).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 - 2025 Weber Informatics LLC | Privacy Policy