// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * TargetCpaBiddingScheme.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.adwords.axis.v201702.cm; /** * <a href="https://support.google.com/adwords/answer/6268632">Target * CPA</a> is an automated bid * strategy that sets bids to help get as many conversions * as possible at the target cost per * acquisition (CPA) you set. * * <p>A {@linkplain #targetCpa target CPA} must be set for * the strategy, but can also be optionally * set for individual ad groups in the strategy. Ad group * targets, if set, will override strategy * targets. * * <p>Note that campaigns must meet * <a href="https://support.google.com/adwords/answer/2471188">specific * eligibility requirements</a> * before they can use the Target CPA bid strategy. * <span class="constraint AdxEnabled">This is disabled for * AdX.</span> */ public class TargetCpaBiddingScheme extends com.google.api.ads.adwords.axis.v201702.cm.BiddingScheme implements java.io.Serializable { /* Average cost per acquisition (CPA) target. This target should * be greater than or equal to * minimum billable unit based on the currency for * the account. */ private com.google.api.ads.adwords.axis.v201702.cm.Money targetCpa; /* Maximum cpc bid limit that applies to all keywords managed * by the strategy. * <span class="constraint InRange">This field must * be greater than or equal to 0.</span> */ private com.google.api.ads.adwords.axis.v201702.cm.Money maxCpcBidCeiling; /* Minimum cpc bid limit that applies to all keywords managed * by the strategy. * <span class="constraint InRange">This field must * be greater than or equal to 0.</span> */ private com.google.api.ads.adwords.axis.v201702.cm.Money maxCpcBidFloor; public TargetCpaBiddingScheme() { } public TargetCpaBiddingScheme( java.lang.String biddingSchemeType, com.google.api.ads.adwords.axis.v201702.cm.Money targetCpa, com.google.api.ads.adwords.axis.v201702.cm.Money maxCpcBidCeiling, com.google.api.ads.adwords.axis.v201702.cm.Money maxCpcBidFloor) { super( biddingSchemeType); this.targetCpa = targetCpa; this.maxCpcBidCeiling = maxCpcBidCeiling; this.maxCpcBidFloor = maxCpcBidFloor; } /** * Gets the targetCpa value for this TargetCpaBiddingScheme. * * @return targetCpa * Average cost per acquisition (CPA) target. This target should * be greater than or equal to * minimum billable unit based on the currency for * the account. */ public com.google.api.ads.adwords.axis.v201702.cm.Money getTargetCpa() { return targetCpa; } /** * Sets the targetCpa value for this TargetCpaBiddingScheme. * * @param targetCpa * Average cost per acquisition (CPA) target. This target should * be greater than or equal to * minimum billable unit based on the currency for * the account. */ public void setTargetCpa(com.google.api.ads.adwords.axis.v201702.cm.Money targetCpa) { this.targetCpa = targetCpa; } /** * Gets the maxCpcBidCeiling value for this TargetCpaBiddingScheme. * * @return maxCpcBidCeiling * Maximum cpc bid limit that applies to all keywords managed * by the strategy. * <span class="constraint InRange">This field must * be greater than or equal to 0.</span> */ public com.google.api.ads.adwords.axis.v201702.cm.Money getMaxCpcBidCeiling() { return maxCpcBidCeiling; } /** * Sets the maxCpcBidCeiling value for this TargetCpaBiddingScheme. * * @param maxCpcBidCeiling * Maximum cpc bid limit that applies to all keywords managed * by the strategy. * <span class="constraint InRange">This field must * be greater than or equal to 0.</span> */ public void setMaxCpcBidCeiling(com.google.api.ads.adwords.axis.v201702.cm.Money maxCpcBidCeiling) { this.maxCpcBidCeiling = maxCpcBidCeiling; } /** * Gets the maxCpcBidFloor value for this TargetCpaBiddingScheme. * * @return maxCpcBidFloor * Minimum cpc bid limit that applies to all keywords managed * by the strategy. * <span class="constraint InRange">This field must * be greater than or equal to 0.</span> */ public com.google.api.ads.adwords.axis.v201702.cm.Money getMaxCpcBidFloor() { return maxCpcBidFloor; } /** * Sets the maxCpcBidFloor value for this TargetCpaBiddingScheme. * * @param maxCpcBidFloor * Minimum cpc bid limit that applies to all keywords managed * by the strategy. * <span class="constraint InRange">This field must * be greater than or equal to 0.</span> */ public void setMaxCpcBidFloor(com.google.api.ads.adwords.axis.v201702.cm.Money maxCpcBidFloor) { this.maxCpcBidFloor = maxCpcBidFloor; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof TargetCpaBiddingScheme)) return false; TargetCpaBiddingScheme other = (TargetCpaBiddingScheme) 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.targetCpa==null && other.getTargetCpa()==null) || (this.targetCpa!=null && this.targetCpa.equals(other.getTargetCpa()))) && ((this.maxCpcBidCeiling==null && other.getMaxCpcBidCeiling()==null) || (this.maxCpcBidCeiling!=null && this.maxCpcBidCeiling.equals(other.getMaxCpcBidCeiling()))) && ((this.maxCpcBidFloor==null && other.getMaxCpcBidFloor()==null) || (this.maxCpcBidFloor!=null && this.maxCpcBidFloor.equals(other.getMaxCpcBidFloor()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getTargetCpa() != null) { _hashCode += getTargetCpa().hashCode(); } if (getMaxCpcBidCeiling() != null) { _hashCode += getMaxCpcBidCeiling().hashCode(); } if (getMaxCpcBidFloor() != null) { _hashCode += getMaxCpcBidFloor().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(TargetCpaBiddingScheme.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "TargetCpaBiddingScheme")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("targetCpa"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "targetCpa")); elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "Money")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("maxCpcBidCeiling"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "maxCpcBidCeiling")); elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "Money")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("maxCpcBidFloor"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "maxCpcBidFloor")); elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "Money")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }