All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.criteo.marketing.model.CampaignBidChangeResponse Maven / Gradle / Ivy

There is a newer version: 1.0.28
Show newest version
/*
 * 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.CategoryUpdateError;
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;

/**
 * CampaignBidChangeResponse
 */

public class CampaignBidChangeResponse {
  public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId";
  @SerializedName(SERIALIZED_NAME_CAMPAIGN_ID)
  private Integer campaignId;

  /**
   * Gets or Sets errorCode
   */
  @JsonAdapter(ErrorCodeEnum.Adapter.class)
  public enum ErrorCodeEnum {
    OK("OK"),
    
    ACCESSDENIED("AccessDenied"),
    
    ENABLEDCATEGORYNUMBEREXCEEDED("EnabledCategoryNumberExceeded"),
    
    CATEGORIESNOTENABLED("CategoriesNotEnabled"),
    
    DUPLICATECATALOGENTRY("DuplicateCatalogEntry"),
    
    INVALIDCATALOGID("InvalidCatalogId"),
    
    INVALIDCATEGORYHASHCODE("InvalidCategoryHashcode"),
    
    INACTIVECATEGORY("InactiveCategory"),
    
    DUPLICATECATEGORYENTRY("DuplicateCategoryEntry"),
    
    BIDDINGCATEGORIESONTHISCAMPAIGNNOTALLOWED("BiddingCategoriesOnThisCampaignNotAllowed"),
    
    CAMPAIGNNOTINPORTFOLIOORNOTACTIVE("CampaignNotInPortfolioOrNotActive"),
    
    DUPLICATECAMPAIGNENTRY("DuplicateCampaignEntry"),
    
    BIDDINGONTHISCAMPAIGNNOTALLOWED("BiddingOnThisCampaignNotAllowed"),
    
    BIDNOTINRANGE("BidNotInRange"),
    
    FOURDECIMALSNOTALLOWED("FourDecimalsNotAllowed"),
    
    BIDDINGONTARGETBUDGETCAMPAIGNNOTALLOWED("BiddingOnTargetBudgetCampaignNotAllowed");

    private String value;

    ErrorCodeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ErrorCodeEnum fromValue(String value) {
      for (ErrorCodeEnum b : ErrorCodeEnum.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 ErrorCodeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ErrorCodeEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return ErrorCodeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ERROR_CODE = "errorCode";
  @SerializedName(SERIALIZED_NAME_ERROR_CODE)
  private ErrorCodeEnum errorCode;

  public static final String SERIALIZED_NAME_ERROR_MESSAGE = "errorMessage";
  @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE)
  private String errorMessage;

  public static final String SERIALIZED_NAME_CATEGORIES = "categories";
  @SerializedName(SERIALIZED_NAME_CATEGORIES)
  private List categories = null;


  public CampaignBidChangeResponse 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 CampaignBidChangeResponse errorCode(ErrorCodeEnum errorCode) {
    
    this.errorCode = errorCode;
    return this;
  }

   /**
   * Get errorCode
   * @return errorCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ErrorCodeEnum getErrorCode() {
    return errorCode;
  }



  public void setErrorCode(ErrorCodeEnum errorCode) {
    this.errorCode = errorCode;
  }


   /**
   * Get errorMessage
   * @return errorMessage
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public String getErrorMessage() {
    return errorMessage;
  }




  public CampaignBidChangeResponse categories(List categories) {
    
    this.categories = categories;
    return this;
  }

  public CampaignBidChangeResponse addCategoriesItem(CategoryUpdateError categoriesItem) {
    if (this.categories == null) {
      this.categories = new ArrayList<>();
    }
    this.categories.add(categoriesItem);
    return this;
  }

   /**
   * Get categories
   * @return categories
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public List getCategories() {
    return categories;
  }



  public void setCategories(List categories) {
    this.categories = categories;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CampaignBidChangeResponse campaignBidChangeResponse = (CampaignBidChangeResponse) o;
    return Objects.equals(this.campaignId, campaignBidChangeResponse.campaignId) &&
        Objects.equals(this.errorCode, campaignBidChangeResponse.errorCode) &&
        Objects.equals(this.errorMessage, campaignBidChangeResponse.errorMessage) &&
        Objects.equals(this.categories, campaignBidChangeResponse.categories);
  }

  @Override
  public int hashCode() {
    return Objects.hash(campaignId, errorCode, errorMessage, categories);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CampaignBidChangeResponse {\n");
    sb.append("    campaignId: ").append(toIndentedString(campaignId)).append("\n");
    sb.append("    errorCode: ").append(toIndentedString(errorCode)).append("\n");
    sb.append("    errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
    sb.append("    categories: ").append(toIndentedString(categories)).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