com.criteo.marketing.model.MarketplaceCampaignMessage 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.BidMessage;
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;
/**
* MarketplaceCampaignMessage
*/
public class MarketplaceCampaignMessage {
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_ADVERTISER_ID = "advertiserId";
@SerializedName(SERIALIZED_NAME_ADVERTISER_ID)
private Integer advertiserId;
/**
* 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 value) {
for (CampaignStatusEnum b : CampaignStatusEnum.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 CampaignStatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public CampaignStatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return CampaignStatusEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_CAMPAIGN_STATUS = "campaignStatus";
@SerializedName(SERIALIZED_NAME_CAMPAIGN_STATUS)
private CampaignStatusEnum campaignStatus;
public static final String SERIALIZED_NAME_CAMPAIGN_BID = "campaignBid";
@SerializedName(SERIALIZED_NAME_CAMPAIGN_BID)
private BidMessage campaignBid;
public MarketplaceCampaignMessage campaignId(Integer campaignId) {
this.campaignId = campaignId;
return this;
}
/**
* Get campaignId
* @return campaignId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCampaignId() {
return campaignId;
}
public void setCampaignId(Integer campaignId) {
this.campaignId = campaignId;
}
public MarketplaceCampaignMessage campaignName(String campaignName) {
this.campaignName = campaignName;
return this;
}
/**
* Get campaignName
* @return campaignName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCampaignName() {
return campaignName;
}
public void setCampaignName(String campaignName) {
this.campaignName = campaignName;
}
public MarketplaceCampaignMessage advertiserId(Integer advertiserId) {
this.advertiserId = advertiserId;
return this;
}
/**
* Get advertiserId
* @return advertiserId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getAdvertiserId() {
return advertiserId;
}
public void setAdvertiserId(Integer advertiserId) {
this.advertiserId = advertiserId;
}
public MarketplaceCampaignMessage campaignStatus(CampaignStatusEnum campaignStatus) {
this.campaignStatus = campaignStatus;
return this;
}
/**
* Get campaignStatus
* @return campaignStatus
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public CampaignStatusEnum getCampaignStatus() {
return campaignStatus;
}
public void setCampaignStatus(CampaignStatusEnum campaignStatus) {
this.campaignStatus = campaignStatus;
}
public MarketplaceCampaignMessage campaignBid(BidMessage campaignBid) {
this.campaignBid = campaignBid;
return this;
}
/**
* Get campaignBid
* @return campaignBid
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public BidMessage getCampaignBid() {
return campaignBid;
}
public void setCampaignBid(BidMessage campaignBid) {
this.campaignBid = campaignBid;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MarketplaceCampaignMessage marketplaceCampaignMessage = (MarketplaceCampaignMessage) o;
return Objects.equals(this.campaignId, marketplaceCampaignMessage.campaignId) &&
Objects.equals(this.campaignName, marketplaceCampaignMessage.campaignName) &&
Objects.equals(this.advertiserId, marketplaceCampaignMessage.advertiserId) &&
Objects.equals(this.campaignStatus, marketplaceCampaignMessage.campaignStatus) &&
Objects.equals(this.campaignBid, marketplaceCampaignMessage.campaignBid);
}
@Override
public int hashCode() {
return Objects.hash(campaignId, campaignName, advertiserId, campaignStatus, campaignBid);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MarketplaceCampaignMessage {\n");
sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n");
sb.append(" campaignName: ").append(toIndentedString(campaignName)).append("\n");
sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n");
sb.append(" campaignStatus: ").append(toIndentedString(campaignStatus)).append("\n");
sb.append(" campaignBid: ").append(toIndentedString(campaignBid)).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