com.criteo.marketing.model.SellerInfoMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marketing.java-client Show documentation
Show all versions of marketing.java-client Show documentation
Criteo Marketing SDK for Java
/*
* Marketing API v.1.0
* IMPORTANT: This swagger links to Criteo production environment. Any test applied here will thus impact real campaigns.
*
* The version of the OpenAPI document: v.1.0
*
*
* 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.criteo.marketing.model;
import java.util.Objects;
import java.util.Arrays;
import com.criteo.marketing.model.SellerBudgetInfoMessage;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* SellerInfoMessage
*/
public class SellerInfoMessage {
public static final String SERIALIZED_NAME_SELLER_NAME = "sellerName";
@SerializedName(SERIALIZED_NAME_SELLER_NAME)
private String sellerName;
public static final String SERIALIZED_NAME_BID = "bid";
@SerializedName(SERIALIZED_NAME_BID)
private Double bid;
/**
* Gets or Sets status
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
INACTIVE("Inactive"),
ACTIVE("Active");
private String value;
StatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StatusEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private StatusEnum status;
public static final String SERIALIZED_NAME_BUDGETS = "budgets";
@SerializedName(SERIALIZED_NAME_BUDGETS)
private List budgets = null;
public SellerInfoMessage sellerName(String sellerName) {
this.sellerName = sellerName;
return this;
}
/**
* Get sellerName
* @return sellerName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSellerName() {
return sellerName;
}
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
public SellerInfoMessage bid(Double bid) {
this.bid = bid;
return this;
}
/**
* Get bid
* @return bid
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getBid() {
return bid;
}
public void setBid(Double bid) {
this.bid = bid;
}
public SellerInfoMessage status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public SellerInfoMessage budgets(List budgets) {
this.budgets = budgets;
return this;
}
public SellerInfoMessage addBudgetsItem(SellerBudgetInfoMessage budgetsItem) {
if (this.budgets == null) {
this.budgets = new ArrayList<>();
}
this.budgets.add(budgetsItem);
return this;
}
/**
* Get budgets
* @return budgets
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List getBudgets() {
return budgets;
}
public void setBudgets(List budgets) {
this.budgets = budgets;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SellerInfoMessage sellerInfoMessage = (SellerInfoMessage) o;
return Objects.equals(this.sellerName, sellerInfoMessage.sellerName) &&
Objects.equals(this.bid, sellerInfoMessage.bid) &&
Objects.equals(this.status, sellerInfoMessage.status) &&
Objects.equals(this.budgets, sellerInfoMessage.budgets);
}
@Override
public int hashCode() {
return Objects.hash(sellerName, bid, status, budgets);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SellerInfoMessage {\n");
sb.append(" sellerName: ").append(toIndentedString(sellerName)).append("\n");
sb.append(" bid: ").append(toIndentedString(bid)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" budgets: ").append(toIndentedString(budgets)).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