com.criteo.marketing.model.StatsQueryMessageEx 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;
import java.util.ArrayList;
import java.util.List;
/**
* StatsQueryMessageEx
*/
public class StatsQueryMessageEx {
/**
* Gets or Sets reportType
*/
@JsonAdapter(ReportTypeEnum.Adapter.class)
public enum ReportTypeEnum {
CAMPAIGNPERFORMANCE("CampaignPerformance"),
FACEBOOKDPA("FacebookDPA"),
TRANSACTIONID("TransactionID");
private String value;
ReportTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ReportTypeEnum fromValue(String text) {
for (ReportTypeEnum b : ReportTypeEnum.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 ReportTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ReportTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ReportTypeEnum.fromValue(String.valueOf(value));
}
}
}
public static final String SERIALIZED_NAME_REPORT_TYPE = "reportType";
@SerializedName(SERIALIZED_NAME_REPORT_TYPE)
private ReportTypeEnum reportType;
public static final String SERIALIZED_NAME_IGNORE_X_DEVICE = "ignoreXDevice";
@SerializedName(SERIALIZED_NAME_IGNORE_X_DEVICE)
private Boolean ignoreXDevice;
public static final String SERIALIZED_NAME_ADVERTISER_IDS = "advertiserIds";
@SerializedName(SERIALIZED_NAME_ADVERTISER_IDS)
private String advertiserIds;
public static final String SERIALIZED_NAME_START_DATE = "startDate";
@SerializedName(SERIALIZED_NAME_START_DATE)
private OffsetDateTime startDate;
public static final String SERIALIZED_NAME_END_DATE = "endDate";
@SerializedName(SERIALIZED_NAME_END_DATE)
private OffsetDateTime endDate;
/**
* Gets or Sets dimensions
*/
@JsonAdapter(DimensionsEnum.Adapter.class)
public enum DimensionsEnum {
CAMPAIGNID("CampaignId"),
ADVERTISERID("AdvertiserId"),
CATEGORY("Category"),
SELLER("Seller"),
HOUR("Hour"),
DAY("Day"),
WEEK("Week"),
MONTH("Month"),
YEAR("Year");
private String value;
DimensionsEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static DimensionsEnum fromValue(String text) {
for (DimensionsEnum b : DimensionsEnum.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 DimensionsEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public DimensionsEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return DimensionsEnum.fromValue(String.valueOf(value));
}
}
}
public static final String SERIALIZED_NAME_DIMENSIONS = "dimensions";
@SerializedName(SERIALIZED_NAME_DIMENSIONS)
private List dimensions = new ArrayList<>();
public static final String SERIALIZED_NAME_METRICS = "metrics";
@SerializedName(SERIALIZED_NAME_METRICS)
private List metrics = new ArrayList<>();
/**
* Gets or Sets format
*/
@JsonAdapter(FormatEnum.Adapter.class)
public enum FormatEnum {
CSV("Csv"),
EXCEL("Excel"),
XML("Xml"),
JSON("Json");
private String value;
FormatEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static FormatEnum fromValue(String text) {
for (FormatEnum b : FormatEnum.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 FormatEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public FormatEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return FormatEnum.fromValue(String.valueOf(value));
}
}
}
public static final String SERIALIZED_NAME_FORMAT = "format";
@SerializedName(SERIALIZED_NAME_FORMAT)
private FormatEnum format;
public static final String SERIALIZED_NAME_CURRENCY = "currency";
@SerializedName(SERIALIZED_NAME_CURRENCY)
private String currency;
/**
* Gets or Sets timezone
*/
@JsonAdapter(TimezoneEnum.Adapter.class)
public enum TimezoneEnum {
GMT("GMT"),
PST("PST"),
JST("JST");
private String value;
TimezoneEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TimezoneEnum fromValue(String text) {
for (TimezoneEnum b : TimezoneEnum.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 TimezoneEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TimezoneEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TimezoneEnum.fromValue(String.valueOf(value));
}
}
}
public static final String SERIALIZED_NAME_TIMEZONE = "timezone";
@SerializedName(SERIALIZED_NAME_TIMEZONE)
private TimezoneEnum timezone;
public StatsQueryMessageEx reportType(ReportTypeEnum reportType) {
this.reportType = reportType;
return this;
}
/**
* Get reportType
* @return reportType
**/
@ApiModelProperty(value = "")
public ReportTypeEnum getReportType() {
return reportType;
}
public void setReportType(ReportTypeEnum reportType) {
this.reportType = reportType;
}
public StatsQueryMessageEx ignoreXDevice(Boolean ignoreXDevice) {
this.ignoreXDevice = ignoreXDevice;
return this;
}
/**
* Get ignoreXDevice
* @return ignoreXDevice
**/
@ApiModelProperty(value = "")
public Boolean getIgnoreXDevice() {
return ignoreXDevice;
}
public void setIgnoreXDevice(Boolean ignoreXDevice) {
this.ignoreXDevice = ignoreXDevice;
}
public StatsQueryMessageEx advertiserIds(String advertiserIds) {
this.advertiserIds = advertiserIds;
return this;
}
/**
* Get advertiserIds
* @return advertiserIds
**/
@ApiModelProperty(value = "")
public String getAdvertiserIds() {
return advertiserIds;
}
public void setAdvertiserIds(String advertiserIds) {
this.advertiserIds = advertiserIds;
}
public StatsQueryMessageEx startDate(OffsetDateTime startDate) {
this.startDate = startDate;
return this;
}
/**
* Get startDate
* @return startDate
**/
@ApiModelProperty(value = "")
public OffsetDateTime getStartDate() {
return startDate;
}
public void setStartDate(OffsetDateTime startDate) {
this.startDate = startDate;
}
public StatsQueryMessageEx 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 StatsQueryMessageEx dimensions(List dimensions) {
this.dimensions = dimensions;
return this;
}
public StatsQueryMessageEx addDimensionsItem(DimensionsEnum dimensionsItem) {
if (this.dimensions == null) {
this.dimensions = new ArrayList<>();
}
this.dimensions.add(dimensionsItem);
return this;
}
/**
* Get dimensions
* @return dimensions
**/
@ApiModelProperty(value = "")
public List getDimensions() {
return dimensions;
}
public void setDimensions(List dimensions) {
this.dimensions = dimensions;
}
public StatsQueryMessageEx metrics(List metrics) {
this.metrics = metrics;
return this;
}
public StatsQueryMessageEx addMetricsItem(String metricsItem) {
if (this.metrics == null) {
this.metrics = new ArrayList<>();
}
this.metrics.add(metricsItem);
return this;
}
/**
* Get metrics
* @return metrics
**/
@ApiModelProperty(value = "")
public List getMetrics() {
return metrics;
}
public void setMetrics(List metrics) {
this.metrics = metrics;
}
public StatsQueryMessageEx format(FormatEnum format) {
this.format = format;
return this;
}
/**
* Get format
* @return format
**/
@ApiModelProperty(value = "")
public FormatEnum getFormat() {
return format;
}
public void setFormat(FormatEnum format) {
this.format = format;
}
public StatsQueryMessageEx currency(String currency) {
this.currency = currency;
return this;
}
/**
* Get currency
* @return currency
**/
@ApiModelProperty(value = "")
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public StatsQueryMessageEx timezone(TimezoneEnum timezone) {
this.timezone = timezone;
return this;
}
/**
* Get timezone
* @return timezone
**/
@ApiModelProperty(value = "")
public TimezoneEnum getTimezone() {
return timezone;
}
public void setTimezone(TimezoneEnum timezone) {
this.timezone = timezone;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StatsQueryMessageEx statsQueryMessageEx = (StatsQueryMessageEx) o;
return Objects.equals(this.reportType, statsQueryMessageEx.reportType) &&
Objects.equals(this.ignoreXDevice, statsQueryMessageEx.ignoreXDevice) &&
Objects.equals(this.advertiserIds, statsQueryMessageEx.advertiserIds) &&
Objects.equals(this.startDate, statsQueryMessageEx.startDate) &&
Objects.equals(this.endDate, statsQueryMessageEx.endDate) &&
Objects.equals(this.dimensions, statsQueryMessageEx.dimensions) &&
Objects.equals(this.metrics, statsQueryMessageEx.metrics) &&
Objects.equals(this.format, statsQueryMessageEx.format) &&
Objects.equals(this.currency, statsQueryMessageEx.currency) &&
Objects.equals(this.timezone, statsQueryMessageEx.timezone);
}
@Override
public int hashCode() {
return Objects.hash(reportType, ignoreXDevice, advertiserIds, startDate, endDate, dimensions, metrics, format, currency, timezone);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StatsQueryMessageEx {\n");
sb.append(" reportType: ").append(toIndentedString(reportType)).append("\n");
sb.append(" ignoreXDevice: ").append(toIndentedString(ignoreXDevice)).append("\n");
sb.append(" advertiserIds: ").append(toIndentedString(advertiserIds)).append("\n");
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
sb.append(" dimensions: ").append(toIndentedString(dimensions)).append("\n");
sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n");
sb.append(" format: ").append(toIndentedString(format)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" timezone: ").append(toIndentedString(timezone)).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 ");
}
}