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

com.adzerk.sdk.generated.model.DecisionRequest Maven / Gradle / Ivy

/*
 * Adzerk Decision API
 * Adzerk Decision API
 *
 * The version of the OpenAPI document: 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.adzerk.sdk.generated.model;

import java.util.Objects;
import java.util.Arrays;
import com.adzerk.sdk.generated.model.Placement;
import com.adzerk.sdk.generated.model.User;
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;
import java.io.Serializable;

/**
 * DecisionRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-04-13T12:24:36.097-04:00[America/New_York]")
public class DecisionRequest implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String SERIALIZED_NAME_PLACEMENTS = "placements";
  @SerializedName(SERIALIZED_NAME_PLACEMENTS)
  private List placements = new ArrayList();

  public static final String SERIALIZED_NAME_USER = "user";
  @SerializedName(SERIALIZED_NAME_USER)
  private User user;

  public static final String SERIALIZED_NAME_KEYWORDS = "keywords";
  @SerializedName(SERIALIZED_NAME_KEYWORDS)
  private List keywords = null;

  public static final String SERIALIZED_NAME_URL = "url";
  @SerializedName(SERIALIZED_NAME_URL)
  private String url;

  public static final String SERIALIZED_NAME_REFERRER = "referrer";
  @SerializedName(SERIALIZED_NAME_REFERRER)
  private String referrer;

  public static final String SERIALIZED_NAME_IP = "ip";
  @SerializedName(SERIALIZED_NAME_IP)
  private String ip;

  public static final String SERIALIZED_NAME_BLOCKED_CREATIVES = "blockedCreatives";
  @SerializedName(SERIALIZED_NAME_BLOCKED_CREATIVES)
  private List blockedCreatives = null;

  public static final String SERIALIZED_NAME_IS_MOBILE = "isMobile";
  @SerializedName(SERIALIZED_NAME_IS_MOBILE)
  private Boolean isMobile;

  public static final String SERIALIZED_NAME_INCLUDE_PRICING_DATA = "includePricingData";
  @SerializedName(SERIALIZED_NAME_INCLUDE_PRICING_DATA)
  private Boolean includePricingData;

  public static final String SERIALIZED_NAME_NOTRACK = "notrack";
  @SerializedName(SERIALIZED_NAME_NOTRACK)
  private Boolean notrack;

  public static final String SERIALIZED_NAME_ENABLE_BOT_FILTERING = "enableBotFiltering";
  @SerializedName(SERIALIZED_NAME_ENABLE_BOT_FILTERING)
  private Boolean enableBotFiltering;

  public static final String SERIALIZED_NAME_ENABLE_USER_D_B_I_P = "enableUserDBIP";
  @SerializedName(SERIALIZED_NAME_ENABLE_USER_D_B_I_P)
  private Boolean enableUserDBIP;

  public static final String SERIALIZED_NAME_CONSENT = "consent";
  @SerializedName(SERIALIZED_NAME_CONSENT)
  private Object consent;

  public static final String SERIALIZED_NAME_DEVICE_I_D = "deviceID";
  @SerializedName(SERIALIZED_NAME_DEVICE_I_D)
  private String deviceID;


  public DecisionRequest placements(List placements) {
    
    this.placements = placements;
    return this;
  }

  public DecisionRequest addPlacementsItem(Placement placementsItem) {
    this.placements.add(placementsItem);
    return this;
  }

   /**
   * One or more Placement objects
   * @return placements
  **/
  @ApiModelProperty(required = true, value = "One or more Placement objects")

  public List getPlacements() {
    return placements;
  }


  public void setPlacements(List placements) {
    this.placements = placements;
  }


  public DecisionRequest user(User user) {
    
    this.user = user;
    return this;
  }

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

  public User getUser() {
    return user;
  }


  public void setUser(User user) {
    this.user = user;
  }


  public DecisionRequest keywords(List keywords) {
    
    this.keywords = keywords;
    return this;
  }

  public DecisionRequest addKeywordsItem(String keywordsItem) {
    if (this.keywords == null) {
      this.keywords = new ArrayList();
    }
    this.keywords.add(keywordsItem);
    return this;
  }

   /**
   * Keywords for keyword Targeting. Such as `\"keywords\": [\"foo\", \"bar\", \"baz\"]`.
   * @return keywords
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Keywords for keyword Targeting. Such as `\"keywords\": [\"foo\", \"bar\", \"baz\"]`.")

  public List getKeywords() {
    return keywords;
  }


  public void setKeywords(List keywords) {
    this.keywords = keywords;
  }


  public DecisionRequest url(String url) {
    
    this.url = url;
    return this;
  }

   /**
   * The current page URL
   * @return url
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The current page URL")

  public String getUrl() {
    return url;
  }


  public void setUrl(String url) {
    this.url = url;
  }


  public DecisionRequest referrer(String referrer) {
    
    this.referrer = referrer;
    return this;
  }

   /**
   * The referrer URL
   * @return referrer
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The referrer URL")

  public String getReferrer() {
    return referrer;
  }


  public void setReferrer(String referrer) {
    this.referrer = referrer;
  }


  public DecisionRequest ip(String ip) {
    
    this.ip = ip;
    return this;
  }

   /**
   * The IP address. Required for [Geo-Targeting](https://dev.adzerk.com/docs/geo-location)
   * @return ip
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The IP address. Required for [Geo-Targeting](https://dev.adzerk.com/docs/geo-location)")

  public String getIp() {
    return ip;
  }


  public void setIp(String ip) {
    this.ip = ip;
  }


  public DecisionRequest blockedCreatives(List blockedCreatives) {
    
    this.blockedCreatives = blockedCreatives;
    return this;
  }

  public DecisionRequest addBlockedCreativesItem(Integer blockedCreativesItem) {
    if (this.blockedCreatives == null) {
      this.blockedCreatives = new ArrayList();
    }
    this.blockedCreatives.add(blockedCreativesItem);
    return this;
  }

   /**
   * Numeric creative ids to disregard for ad selection
   * @return blockedCreatives
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Numeric creative ids to disregard for ad selection")

  public List getBlockedCreatives() {
    return blockedCreatives;
  }


  public void setBlockedCreatives(List blockedCreatives) {
    this.blockedCreatives = blockedCreatives;
  }


  public DecisionRequest isMobile(Boolean isMobile) {
    
    this.isMobile = isMobile;
    return this;
  }

   /**
   * If true, only ads containing a single image will be returned
   * @return isMobile
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, only ads containing a single image will be returned")

  public Boolean getIsMobile() {
    return isMobile;
  }


  public void setIsMobile(Boolean isMobile) {
    this.isMobile = isMobile;
  }


  public DecisionRequest includePricingData(Boolean includePricingData) {
    
    this.includePricingData = includePricingData;
    return this;
  }

   /**
   * If true, return pricing data for the decision in the response
   * @return includePricingData
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, return pricing data for the decision in the response")

  public Boolean getIncludePricingData() {
    return includePricingData;
  }


  public void setIncludePricingData(Boolean includePricingData) {
    this.includePricingData = includePricingData;
  }


  public DecisionRequest notrack(Boolean notrack) {
    
    this.notrack = notrack;
    return this;
  }

   /**
   * If true, only return ads that are set to honor Do Not Track
   * @return notrack
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, only return ads that are set to honor Do Not Track")

  public Boolean getNotrack() {
    return notrack;
  }


  public void setNotrack(Boolean notrack) {
    this.notrack = notrack;
  }


  public DecisionRequest enableBotFiltering(Boolean enableBotFiltering) {
    
    this.enableBotFiltering = enableBotFiltering;
    return this;
  }

   /**
   * If making a client-side request, set to true. Defaults to false to ensure a server isn't seen as a bot. See [here](https://dev.adzerk.com/docs/tracking-overview#section-bot-filtering) for more info
   * @return enableBotFiltering
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If making a client-side request, set to true. Defaults to false to ensure a server isn't seen as a bot. See [here](https://dev.adzerk.com/docs/tracking-overview#section-bot-filtering) for more info")

  public Boolean getEnableBotFiltering() {
    return enableBotFiltering;
  }


  public void setEnableBotFiltering(Boolean enableBotFiltering) {
    this.enableBotFiltering = enableBotFiltering;
  }


  public DecisionRequest enableUserDBIP(Boolean enableUserDBIP) {
    
    this.enableUserDBIP = enableUserDBIP;
    return this;
  }

   /**
   * If true, override the IP address of the request with the IP address supplied on the UserKey. If no IP address is found on the UserKey, this will fall back to the IP address on the request. Requires UserDB
   * @return enableUserDBIP
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If true, override the IP address of the request with the IP address supplied on the UserKey. If no IP address is found on the UserKey, this will fall back to the IP address on the request. Requires UserDB")

  public Boolean getEnableUserDBIP() {
    return enableUserDBIP;
  }


  public void setEnableUserDBIP(Boolean enableUserDBIP) {
    this.enableUserDBIP = enableUserDBIP;
  }


  public DecisionRequest consent(Object consent) {
    
    this.consent = consent;
    return this;
  }

   /**
   * Object that sets the data consent preferences. Other consent settings are available in the GDPR settings documentation.
   * @return consent
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Object that sets the data consent preferences. Other consent settings are available in the GDPR settings documentation.")

  public Object getConsent() {
    return consent;
  }


  public void setConsent(Object consent) {
    this.consent = consent;
  }


  public DecisionRequest deviceID(String deviceID) {
    
    this.deviceID = deviceID;
    return this;
  }

   /**
   * RTB requests only - sets an Identifier for Advertisers (IFA or IDFA)
   * @return deviceID
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "RTB requests only - sets an Identifier for Advertisers (IFA or IDFA)")

  public String getDeviceID() {
    return deviceID;
  }


  public void setDeviceID(String deviceID) {
    this.deviceID = deviceID;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DecisionRequest decisionRequest = (DecisionRequest) o;
    return Objects.equals(this.placements, decisionRequest.placements) &&
        Objects.equals(this.user, decisionRequest.user) &&
        Objects.equals(this.keywords, decisionRequest.keywords) &&
        Objects.equals(this.url, decisionRequest.url) &&
        Objects.equals(this.referrer, decisionRequest.referrer) &&
        Objects.equals(this.ip, decisionRequest.ip) &&
        Objects.equals(this.blockedCreatives, decisionRequest.blockedCreatives) &&
        Objects.equals(this.isMobile, decisionRequest.isMobile) &&
        Objects.equals(this.includePricingData, decisionRequest.includePricingData) &&
        Objects.equals(this.notrack, decisionRequest.notrack) &&
        Objects.equals(this.enableBotFiltering, decisionRequest.enableBotFiltering) &&
        Objects.equals(this.enableUserDBIP, decisionRequest.enableUserDBIP) &&
        Objects.equals(this.consent, decisionRequest.consent) &&
        Objects.equals(this.deviceID, decisionRequest.deviceID);
  }

  @Override
  public int hashCode() {
    return Objects.hash(placements, user, keywords, url, referrer, ip, blockedCreatives, isMobile, includePricingData, notrack, enableBotFiltering, enableUserDBIP, consent, deviceID);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DecisionRequest {\n");
    sb.append("    placements: ").append(toIndentedString(placements)).append("\n");
    sb.append("    user: ").append(toIndentedString(user)).append("\n");
    sb.append("    keywords: ").append(toIndentedString(keywords)).append("\n");
    sb.append("    url: ").append(toIndentedString(url)).append("\n");
    sb.append("    referrer: ").append(toIndentedString(referrer)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    blockedCreatives: ").append(toIndentedString(blockedCreatives)).append("\n");
    sb.append("    isMobile: ").append(toIndentedString(isMobile)).append("\n");
    sb.append("    includePricingData: ").append(toIndentedString(includePricingData)).append("\n");
    sb.append("    notrack: ").append(toIndentedString(notrack)).append("\n");
    sb.append("    enableBotFiltering: ").append(toIndentedString(enableBotFiltering)).append("\n");
    sb.append("    enableUserDBIP: ").append(toIndentedString(enableUserDBIP)).append("\n");
    sb.append("    consent: ").append(toIndentedString(consent)).append("\n");
    sb.append("    deviceID: ").append(toIndentedString(deviceID)).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