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

com.google.api.ads.dfp.axis.v201605.CustomCriteria Maven / Gradle / Ivy

There is a newer version: 5.8.0
Show newest version
/**
 * CustomCriteria.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.dfp.axis.v201605;


/**
 * A {@link CustomCriteria} object is used to perform custom criteria
 * targeting
 *             on custom targeting keys of type {@link CustomTargetingKey.Type#PREDEFINED}
 * or {@link CustomTargetingKey.Type#FREEFORM}.
 */
public class CustomCriteria  extends com.google.api.ads.dfp.axis.v201605.CustomCriteriaLeaf  implements java.io.Serializable {
    /* The {@link CustomTargetingKey#id} of the {@link CustomTargetingKey}
     * object
     *                     that was created using {@link CustomTargetingService}.
     * This attribute is
     *                     required. */
    private java.lang.Long keyId;

    /* The ids of {@link CustomTargetingValue} objects to target the
     * custom
     *                     targeting key with id {@link CustomCriteria#keyId}.
     * This attribute is
     *                     required. */
    private long[] valueIds;

    /* The comparison operator. This attribute is required. */
    private com.google.api.ads.dfp.axis.v201605.CustomCriteriaComparisonOperator operator;

    public CustomCriteria() {
    }

    public CustomCriteria(
           java.lang.Long keyId,
           long[] valueIds,
           com.google.api.ads.dfp.axis.v201605.CustomCriteriaComparisonOperator operator) {
        this.keyId = keyId;
        this.valueIds = valueIds;
        this.operator = operator;
    }


    /**
     * Gets the keyId value for this CustomCriteria.
     * 
     * @return keyId   * The {@link CustomTargetingKey#id} of the {@link CustomTargetingKey}
     * object
     *                     that was created using {@link CustomTargetingService}.
     * This attribute is
     *                     required.
     */
    public java.lang.Long getKeyId() {
        return keyId;
    }


    /**
     * Sets the keyId value for this CustomCriteria.
     * 
     * @param keyId   * The {@link CustomTargetingKey#id} of the {@link CustomTargetingKey}
     * object
     *                     that was created using {@link CustomTargetingService}.
     * This attribute is
     *                     required.
     */
    public void setKeyId(java.lang.Long keyId) {
        this.keyId = keyId;
    }


    /**
     * Gets the valueIds value for this CustomCriteria.
     * 
     * @return valueIds   * The ids of {@link CustomTargetingValue} objects to target the
     * custom
     *                     targeting key with id {@link CustomCriteria#keyId}.
     * This attribute is
     *                     required.
     */
    public long[] getValueIds() {
        return valueIds;
    }


    /**
     * Sets the valueIds value for this CustomCriteria.
     * 
     * @param valueIds   * The ids of {@link CustomTargetingValue} objects to target the
     * custom
     *                     targeting key with id {@link CustomCriteria#keyId}.
     * This attribute is
     *                     required.
     */
    public void setValueIds(long[] valueIds) {
        this.valueIds = valueIds;
    }

    public long getValueIds(int i) {
        return this.valueIds[i];
    }

    public void setValueIds(int i, long _value) {
        this.valueIds[i] = _value;
    }


    /**
     * Gets the operator value for this CustomCriteria.
     * 
     * @return operator   * The comparison operator. This attribute is required.
     */
    public com.google.api.ads.dfp.axis.v201605.CustomCriteriaComparisonOperator getOperator() {
        return operator;
    }


    /**
     * Sets the operator value for this CustomCriteria.
     * 
     * @param operator   * The comparison operator. This attribute is required.
     */
    public void setOperator(com.google.api.ads.dfp.axis.v201605.CustomCriteriaComparisonOperator operator) {
        this.operator = operator;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof CustomCriteria)) return false;
        CustomCriteria other = (CustomCriteria) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = super.equals(obj) && 
            ((this.keyId==null && other.getKeyId()==null) || 
             (this.keyId!=null &&
              this.keyId.equals(other.getKeyId()))) &&
            ((this.valueIds==null && other.getValueIds()==null) || 
             (this.valueIds!=null &&
              java.util.Arrays.equals(this.valueIds, other.getValueIds()))) &&
            ((this.operator==null && other.getOperator()==null) || 
             (this.operator!=null &&
              this.operator.equals(other.getOperator())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = super.hashCode();
        if (getKeyId() != null) {
            _hashCode += getKeyId().hashCode();
        }
        if (getValueIds() != null) {
            for (int i=0;
                 i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy