com.criteo.marketing.model.SellerBudgetUpdateMessage 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.
*
* OpenAPI spec version: 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.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.time.OffsetDateTime;
/**
* SellerBudgetUpdateMessage
*/
public class SellerBudgetUpdateMessage {
public static final String SERIALIZED_NAME_BUDGET_ID = "budgetId";
@SerializedName(SERIALIZED_NAME_BUDGET_ID)
private Long budgetId;
public static final String SERIALIZED_NAME_AMOUNT = "amount";
@SerializedName(SERIALIZED_NAME_AMOUNT)
private Double amount;
public static final String SERIALIZED_NAME_END_DATE = "endDate";
@SerializedName(SERIALIZED_NAME_END_DATE)
private OffsetDateTime endDate;
/**
* 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 text) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
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(String.valueOf(value));
}
}
}
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private StatusEnum status;
public SellerBudgetUpdateMessage budgetId(Long budgetId) {
this.budgetId = budgetId;
return this;
}
/**
* Get budgetId
* @return budgetId
**/
@ApiModelProperty(value = "")
public Long getBudgetId() {
return budgetId;
}
public void setBudgetId(Long budgetId) {
this.budgetId = budgetId;
}
public SellerBudgetUpdateMessage amount(Double amount) {
this.amount = amount;
return this;
}
/**
* Get amount
* @return amount
**/
@ApiModelProperty(value = "")
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
public SellerBudgetUpdateMessage endDate(OffsetDateTime endDate) {
this.endDate = endDate;
return this;
}
/**
* Get endDate
* @return endDate
**/
@ApiModelProperty(value = "")
public OffsetDateTime getEndDate() {
return endDate;
}
public void setEndDate(OffsetDateTime endDate) {
this.endDate = endDate;
}
public SellerBudgetUpdateMessage status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@ApiModelProperty(value = "")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SellerBudgetUpdateMessage sellerBudgetUpdateMessage = (SellerBudgetUpdateMessage) o;
return Objects.equals(this.budgetId, sellerBudgetUpdateMessage.budgetId) &&
Objects.equals(this.amount, sellerBudgetUpdateMessage.amount) &&
Objects.equals(this.endDate, sellerBudgetUpdateMessage.endDate) &&
Objects.equals(this.status, sellerBudgetUpdateMessage.status);
}
@Override
public int hashCode() {
return Objects.hash(budgetId, amount, endDate, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SellerBudgetUpdateMessage {\n");
sb.append(" budgetId: ").append(toIndentedString(budgetId)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).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 ");
}
}