com.criteo.marketing.model.CampaignBidMessage 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.criteo.marketing.model.BidMessage;
import com.criteo.marketing.model.CategoryBidMessage;
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;
/**
* CampaignBidMessage
*/
public class CampaignBidMessage {
public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId";
@SerializedName(SERIALIZED_NAME_CAMPAIGN_ID)
private Integer campaignId;
public static final String SERIALIZED_NAME_CAMPAIGN_NAME = "campaignName";
@SerializedName(SERIALIZED_NAME_CAMPAIGN_NAME)
private String campaignName;
public static final String SERIALIZED_NAME_CAMPAIGN_BID = "campaignBid";
@SerializedName(SERIALIZED_NAME_CAMPAIGN_BID)
private BidMessage campaignBid = null;
public static final String SERIALIZED_NAME_CATEGORIES = "categories";
@SerializedName(SERIALIZED_NAME_CATEGORIES)
private List categories = new ArrayList<>();
/**
* Gets or Sets campaignStatus
*/
@JsonAdapter(CampaignStatusEnum.Adapter.class)
public enum CampaignStatusEnum {
RUNNING("Running"),
ARCHIVED("Archived"),
NOTRUNNING("NotRunning");
private String value;
CampaignStatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static CampaignStatusEnum fromValue(String text) {
for (CampaignStatusEnum b : CampaignStatusEnum.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 CampaignStatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public CampaignStatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return CampaignStatusEnum.fromValue(String.valueOf(value));
}
}
}
public static final String SERIALIZED_NAME_CAMPAIGN_STATUS = "campaignStatus";
@SerializedName(SERIALIZED_NAME_CAMPAIGN_STATUS)
private CampaignStatusEnum campaignStatus;
public CampaignBidMessage campaignId(Integer campaignId) {
this.campaignId = campaignId;
return this;
}
/**
* Get campaignId
* @return campaignId
**/
@ApiModelProperty(value = "")
public Integer getCampaignId() {
return campaignId;
}
public void setCampaignId(Integer campaignId) {
this.campaignId = campaignId;
}
public CampaignBidMessage campaignName(String campaignName) {
this.campaignName = campaignName;
return this;
}
/**
* Get campaignName
* @return campaignName
**/
@ApiModelProperty(value = "")
public String getCampaignName() {
return campaignName;
}
public void setCampaignName(String campaignName) {
this.campaignName = campaignName;
}
public CampaignBidMessage campaignBid(BidMessage campaignBid) {
this.campaignBid = campaignBid;
return this;
}
/**
* Get campaignBid
* @return campaignBid
**/
@ApiModelProperty(value = "")
public BidMessage getCampaignBid() {
return campaignBid;
}
public void setCampaignBid(BidMessage campaignBid) {
this.campaignBid = campaignBid;
}
public CampaignBidMessage categories(List categories) {
this.categories = categories;
return this;
}
public CampaignBidMessage addCategoriesItem(CategoryBidMessage categoriesItem) {
if (this.categories == null) {
this.categories = new ArrayList<>();
}
this.categories.add(categoriesItem);
return this;
}
/**
* Get categories
* @return categories
**/
@ApiModelProperty(value = "")
public List getCategories() {
return categories;
}
public void setCategories(List categories) {
this.categories = categories;
}
public CampaignBidMessage campaignStatus(CampaignStatusEnum campaignStatus) {
this.campaignStatus = campaignStatus;
return this;
}
/**
* Get campaignStatus
* @return campaignStatus
**/
@ApiModelProperty(value = "")
public CampaignStatusEnum getCampaignStatus() {
return campaignStatus;
}
public void setCampaignStatus(CampaignStatusEnum campaignStatus) {
this.campaignStatus = campaignStatus;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CampaignBidMessage campaignBidMessage = (CampaignBidMessage) o;
return Objects.equals(this.campaignId, campaignBidMessage.campaignId) &&
Objects.equals(this.campaignName, campaignBidMessage.campaignName) &&
Objects.equals(this.campaignBid, campaignBidMessage.campaignBid) &&
Objects.equals(this.categories, campaignBidMessage.categories) &&
Objects.equals(this.campaignStatus, campaignBidMessage.campaignStatus);
}
@Override
public int hashCode() {
return Objects.hash(campaignId, campaignName, campaignBid, categories, campaignStatus);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CampaignBidMessage {\n");
sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n");
sb.append(" campaignName: ").append(toIndentedString(campaignName)).append("\n");
sb.append(" campaignBid: ").append(toIndentedString(campaignBid)).append("\n");
sb.append(" categories: ").append(toIndentedString(categories)).append("\n");
sb.append(" campaignStatus: ").append(toIndentedString(campaignStatus)).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 ");
}
}