com.conekta.model.UpdateProduct Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ct-conekta-java Show documentation
Show all versions of ct-conekta-java Show documentation
This is a java library that allows interaction with https://api.conekta.io API.
The newest version!
/*
* Conekta API
* Conekta sdk
*
* The version of the OpenAPI document: 2.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.conekta.model;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.conekta.JSON;
/**
* UpdateProduct
*/
@JsonPropertyOrder({
UpdateProduct.JSON_PROPERTY_ANTIFRAUD_INFO,
UpdateProduct.JSON_PROPERTY_DESCRIPTION,
UpdateProduct.JSON_PROPERTY_SKU,
UpdateProduct.JSON_PROPERTY_NAME,
UpdateProduct.JSON_PROPERTY_UNIT_PRICE,
UpdateProduct.JSON_PROPERTY_QUANTITY,
UpdateProduct.JSON_PROPERTY_TAGS,
UpdateProduct.JSON_PROPERTY_BRAND,
UpdateProduct.JSON_PROPERTY_METADATA
})
@JsonTypeName("update_product")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class UpdateProduct {
public static final String JSON_PROPERTY_ANTIFRAUD_INFO = "antifraud_info";
private Map antifraudInfo = new HashMap<>();
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_SKU = "sku";
private String sku;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_UNIT_PRICE = "unit_price";
private Long unitPrice;
public static final String JSON_PROPERTY_QUANTITY = "quantity";
private Integer quantity;
public static final String JSON_PROPERTY_TAGS = "tags";
private List tags = new ArrayList<>();
public static final String JSON_PROPERTY_BRAND = "brand";
private String brand;
public static final String JSON_PROPERTY_METADATA = "metadata";
private Map metadata = new HashMap<>();
public UpdateProduct() {
}
public UpdateProduct antifraudInfo(Map antifraudInfo) {
this.antifraudInfo = antifraudInfo;
return this;
}
public UpdateProduct putAntifraudInfoItem(String key, Object antifraudInfoItem) {
if (this.antifraudInfo == null) {
this.antifraudInfo = new HashMap<>();
}
this.antifraudInfo.put(key, antifraudInfoItem);
return this;
}
/**
* Get antifraudInfo
* @return antifraudInfo
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ANTIFRAUD_INFO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getAntifraudInfo() {
return antifraudInfo;
}
@JsonProperty(JSON_PROPERTY_ANTIFRAUD_INFO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAntifraudInfo(Map antifraudInfo) {
this.antifraudInfo = antifraudInfo;
}
public UpdateProduct description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
}
public UpdateProduct sku(String sku) {
this.sku = sku;
return this;
}
/**
* Get sku
* @return sku
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SKU)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSku() {
return sku;
}
@JsonProperty(JSON_PROPERTY_SKU)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSku(String sku) {
this.sku = sku;
}
public UpdateProduct name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
public UpdateProduct unitPrice(Long unitPrice) {
this.unitPrice = unitPrice;
return this;
}
/**
* Get unitPrice
* minimum: 0
* @return unitPrice
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_UNIT_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getUnitPrice() {
return unitPrice;
}
@JsonProperty(JSON_PROPERTY_UNIT_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUnitPrice(Long unitPrice) {
this.unitPrice = unitPrice;
}
public UpdateProduct quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
/**
* Get quantity
* minimum: 1
* @return quantity
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_QUANTITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getQuantity() {
return quantity;
}
@JsonProperty(JSON_PROPERTY_QUANTITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public UpdateProduct tags(List tags) {
this.tags = tags;
return this;
}
public UpdateProduct addTagsItem(String tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getTags() {
return tags;
}
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTags(List tags) {
this.tags = tags;
}
public UpdateProduct brand(String brand) {
this.brand = brand;
return this;
}
/**
* Get brand
* @return brand
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BRAND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBrand() {
return brand;
}
@JsonProperty(JSON_PROPERTY_BRAND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBrand(String brand) {
this.brand = brand;
}
public UpdateProduct metadata(Map metadata) {
this.metadata = metadata;
return this;
}
public UpdateProduct putMetadataItem(String key, String metadataItem) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.put(key, metadataItem);
return this;
}
/**
* Get metadata
* @return metadata
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getMetadata() {
return metadata;
}
@JsonProperty(JSON_PROPERTY_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMetadata(Map metadata) {
this.metadata = metadata;
}
/**
* Return true if this update_product object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UpdateProduct updateProduct = (UpdateProduct) o;
return Objects.equals(this.antifraudInfo, updateProduct.antifraudInfo) &&
Objects.equals(this.description, updateProduct.description) &&
Objects.equals(this.sku, updateProduct.sku) &&
Objects.equals(this.name, updateProduct.name) &&
Objects.equals(this.unitPrice, updateProduct.unitPrice) &&
Objects.equals(this.quantity, updateProduct.quantity) &&
Objects.equals(this.tags, updateProduct.tags) &&
Objects.equals(this.brand, updateProduct.brand) &&
Objects.equals(this.metadata, updateProduct.metadata);
}
@Override
public int hashCode() {
return Objects.hash(antifraudInfo, description, sku, name, unitPrice, quantity, tags, brand, metadata);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UpdateProduct {\n");
sb.append(" antifraudInfo: ").append(toIndentedString(antifraudInfo)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" sku: ").append(toIndentedString(sku)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" brand: ").append(toIndentedString(brand)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}