// Copyright 2016 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. /** * CreativeAsset.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 {@code CreativeAsset} is an asset that can be used in creatives. */ public class CreativeAsset implements java.io.Serializable { /* The ID of the asset. This attribute is generated by Google * upon creation. */ private java.lang.Long assetId; /* The content of the asset as a byte array. This attribute is * required when * creating the creative that contains this asset if * an {@code assetId} is not provided. * <p/> * When updating the content, pass a new byte array, * and set {@code assetId} to null. * Otherwise, this field can be null. * <p/> * The {@code assetByteArray} will be {@code null} when * the creative is * retrieved. */ private byte[] assetByteArray; /* The file name of the asset. This attribute is required when * creating a new asset (e.g. when {@link #assetByteArray} is not null). */ private java.lang.String fileName; /* The file size of the asset in bytes. This attribute is read-only. */ private java.lang.Long fileSize; /* A URL where the asset can be previewed at. This field is read-only * and * set by Google. */ private java.lang.String assetUrl; /* The size of the asset. Note that this may not always reflect * the actual physical * size of the asset, but may reflect the expected size. * This attribute is read-only and is * populated by Google. */ private com.google.api.ads.dfp.axis.v201605.Size size; /* The display density of the image. This is the ratio between * a dimension in pixels * of the image and the dimension in pixels that it should * occupy in device-independent pixels * when displayed. This attribute is optional and defaults * to ONE_TO_ONE. */ private com.google.api.ads.dfp.axis.v201605.ImageDensity imageDensity; public CreativeAsset() { } public CreativeAsset( java.lang.Long assetId, byte[] assetByteArray, java.lang.String fileName, java.lang.Long fileSize, java.lang.String assetUrl, com.google.api.ads.dfp.axis.v201605.Size size, com.google.api.ads.dfp.axis.v201605.ImageDensity imageDensity) { this.assetId = assetId; this.assetByteArray = assetByteArray; this.fileName = fileName; this.fileSize = fileSize; this.assetUrl = assetUrl; this.size = size; this.imageDensity = imageDensity; } /** * Gets the assetId value for this CreativeAsset. * * @return assetId * The ID of the asset. This attribute is generated by Google * upon creation. */ public java.lang.Long getAssetId() { return assetId; } /** * Sets the assetId value for this CreativeAsset. * * @param assetId * The ID of the asset. This attribute is generated by Google * upon creation. */ public void setAssetId(java.lang.Long assetId) { this.assetId = assetId; } /** * Gets the assetByteArray value for this CreativeAsset. * * @return assetByteArray * The content of the asset as a byte array. This attribute is * required when * creating the creative that contains this asset if * an {@code assetId} is not provided. * <p/> * When updating the content, pass a new byte array, * and set {@code assetId} to null. * Otherwise, this field can be null. * <p/> * The {@code assetByteArray} will be {@code null} when * the creative is * retrieved. */ public byte[] getAssetByteArray() { return assetByteArray; } /** * Sets the assetByteArray value for this CreativeAsset. * * @param assetByteArray * The content of the asset as a byte array. This attribute is * required when * creating the creative that contains this asset if * an {@code assetId} is not provided. * <p/> * When updating the content, pass a new byte array, * and set {@code assetId} to null. * Otherwise, this field can be null. * <p/> * The {@code assetByteArray} will be {@code null} when * the creative is * retrieved. */ public void setAssetByteArray(byte[] assetByteArray) { this.assetByteArray = assetByteArray; } /** * Gets the fileName value for this CreativeAsset. * * @return fileName * The file name of the asset. This attribute is required when * creating a new asset (e.g. when {@link #assetByteArray} is not null). */ public java.lang.String getFileName() { return fileName; } /** * Sets the fileName value for this CreativeAsset. * * @param fileName * The file name of the asset. This attribute is required when * creating a new asset (e.g. when {@link #assetByteArray} is not null). */ public void setFileName(java.lang.String fileName) { this.fileName = fileName; } /** * Gets the fileSize value for this CreativeAsset. * * @return fileSize * The file size of the asset in bytes. This attribute is read-only. */ public java.lang.Long getFileSize() { return fileSize; } /** * Sets the fileSize value for this CreativeAsset. * * @param fileSize * The file size of the asset in bytes. This attribute is read-only. */ public void setFileSize(java.lang.Long fileSize) { this.fileSize = fileSize; } /** * Gets the assetUrl value for this CreativeAsset. * * @return assetUrl * A URL where the asset can be previewed at. This field is read-only * and * set by Google. */ public java.lang.String getAssetUrl() { return assetUrl; } /** * Sets the assetUrl value for this CreativeAsset. * * @param assetUrl * A URL where the asset can be previewed at. This field is read-only * and * set by Google. */ public void setAssetUrl(java.lang.String assetUrl) { this.assetUrl = assetUrl; } /** * Gets the size value for this CreativeAsset. * * @return size * The size of the asset. Note that this may not always reflect * the actual physical * size of the asset, but may reflect the expected size. * This attribute is read-only and is * populated by Google. */ public com.google.api.ads.dfp.axis.v201605.Size getSize() { return size; } /** * Sets the size value for this CreativeAsset. * * @param size * The size of the asset. Note that this may not always reflect * the actual physical * size of the asset, but may reflect the expected size. * This attribute is read-only and is * populated by Google. */ public void setSize(com.google.api.ads.dfp.axis.v201605.Size size) { this.size = size; } /** * Gets the imageDensity value for this CreativeAsset. * * @return imageDensity * The display density of the image. This is the ratio between * a dimension in pixels * of the image and the dimension in pixels that it should * occupy in device-independent pixels * when displayed. This attribute is optional and defaults * to ONE_TO_ONE. */ public com.google.api.ads.dfp.axis.v201605.ImageDensity getImageDensity() { return imageDensity; } /** * Sets the imageDensity value for this CreativeAsset. * * @param imageDensity * The display density of the image. This is the ratio between * a dimension in pixels * of the image and the dimension in pixels that it should * occupy in device-independent pixels * when displayed. This attribute is optional and defaults * to ONE_TO_ONE. */ public void setImageDensity(com.google.api.ads.dfp.axis.v201605.ImageDensity imageDensity) { this.imageDensity = imageDensity; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof CreativeAsset)) return false; CreativeAsset other = (CreativeAsset) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.assetId==null && other.getAssetId()==null) || (this.assetId!=null && this.assetId.equals(other.getAssetId()))) && ((this.assetByteArray==null && other.getAssetByteArray()==null) || (this.assetByteArray!=null && java.util.Arrays.equals(this.assetByteArray, other.getAssetByteArray()))) && ((this.fileName==null && other.getFileName()==null) || (this.fileName!=null && this.fileName.equals(other.getFileName()))) && ((this.fileSize==null && other.getFileSize()==null) || (this.fileSize!=null && this.fileSize.equals(other.getFileSize()))) && ((this.assetUrl==null && other.getAssetUrl()==null) || (this.assetUrl!=null && this.assetUrl.equals(other.getAssetUrl()))) && ((this.size==null && other.getSize()==null) || (this.size!=null && this.size.equals(other.getSize()))) && ((this.imageDensity==null && other.getImageDensity()==null) || (this.imageDensity!=null && this.imageDensity.equals(other.getImageDensity()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getAssetId() != null) { _hashCode += getAssetId().hashCode(); } if (getAssetByteArray() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getAssetByteArray()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getAssetByteArray(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } if (getFileName() != null) { _hashCode += getFileName().hashCode(); } if (getFileSize() != null) { _hashCode += getFileSize().hashCode(); } if (getAssetUrl() != null) { _hashCode += getAssetUrl().hashCode(); } if (getSize() != null) { _hashCode += getSize().hashCode(); } if (getImageDensity() != null) { _hashCode += getImageDensity().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(CreativeAsset.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "CreativeAsset")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("assetId"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "assetId")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("assetByteArray"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "assetByteArray")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "base64Binary")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("fileName"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "fileName")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("fileSize"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "fileSize")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("assetUrl"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "assetUrl")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("size"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "size")); elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "Size")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("imageDensity"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "imageDensity")); elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201605", "ImageDensity")); 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); } }