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

com.criteo.marketing.model.AudiencePatchRequest 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.
 *
 * 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.util.ArrayList;
import java.util.List;

/**
 * AudiencePatchRequest
 */

public class AudiencePatchRequest {
  public static final String SERIALIZED_NAME_OPERATION = "operation";
  @SerializedName(SERIALIZED_NAME_OPERATION)
  private String operation;

  public static final String SERIALIZED_NAME_SCHEMA = "schema";
  @SerializedName(SERIALIZED_NAME_SCHEMA)
  private String schema;

  public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers";
  @SerializedName(SERIALIZED_NAME_IDENTIFIERS)
  private List identifiers = new ArrayList<>();

  public static final String SERIALIZED_NAME_GUM_CALLER_ID = "gumCallerId";
  @SerializedName(SERIALIZED_NAME_GUM_CALLER_ID)
  private Integer gumCallerId;

  public AudiencePatchRequest operation(String operation) {
    this.operation = operation;
    return this;
  }

   /**
   * Mandatory. The Operation of this request. Can be either 'add' or 'remove'.
   * @return operation
  **/
  @ApiModelProperty(value = "Mandatory. The Operation of this request. Can be either 'add' or 'remove'.")
  public String getOperation() {
    return operation;
  }

  public void setOperation(String operation) {
    this.operation = operation;
  }

  public AudiencePatchRequest schema(String schema) {
    this.schema = schema;
    return this;
  }

   /**
   * Mandatory. The Schema specified for the identifiers. Can be 'email', 'madid', 'identityLink' or 'gum'.
   * @return schema
  **/
  @ApiModelProperty(value = "Mandatory. The Schema specified for the identifiers. Can be 'email', 'madid', 'identityLink' or 'gum'.")
  public String getSchema() {
    return schema;
  }

  public void setSchema(String schema) {
    this.schema = schema;
  }

  public AudiencePatchRequest identifiers(List identifiers) {
    this.identifiers = identifiers;
    return this;
  }

  public AudiencePatchRequest addIdentifiersItem(String identifiersItem) {
    if (this.identifiers == null) {
      this.identifiers = new ArrayList<>();
    }
    this.identifiers.add(identifiersItem);
    return this;
  }

   /**
   * Mandatory. The identifiers.
   * @return identifiers
  **/
  @ApiModelProperty(value = "Mandatory. The identifiers.")
  public List getIdentifiers() {
    return identifiers;
  }

  public void setIdentifiers(List identifiers) {
    this.identifiers = identifiers;
  }

  public AudiencePatchRequest gumCallerId(Integer gumCallerId) {
    this.gumCallerId = gumCallerId;
    return this;
  }

   /**
   * Optional. GumCallerId required only when patching identifiers with 'gum' schema.
   * @return gumCallerId
  **/
  @ApiModelProperty(value = "Optional. GumCallerId required only when patching identifiers with 'gum' schema.")
  public Integer getGumCallerId() {
    return gumCallerId;
  }

  public void setGumCallerId(Integer gumCallerId) {
    this.gumCallerId = gumCallerId;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AudiencePatchRequest audiencePatchRequest = (AudiencePatchRequest) o;
    return Objects.equals(this.operation, audiencePatchRequest.operation) &&
        Objects.equals(this.schema, audiencePatchRequest.schema) &&
        Objects.equals(this.identifiers, audiencePatchRequest.identifiers) &&
        Objects.equals(this.gumCallerId, audiencePatchRequest.gumCallerId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(operation, schema, identifiers, gumCallerId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AudiencePatchRequest {\n");
    sb.append("    operation: ").append(toIndentedString(operation)).append("\n");
    sb.append("    schema: ").append(toIndentedString(schema)).append("\n");
    sb.append("    identifiers: ").append(toIndentedString(identifiers)).append("\n");
    sb.append("    gumCallerId: ").append(toIndentedString(gumCallerId)).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 - 2024 Weber Informatics LLC | Privacy Policy