/**
 * PackageResult2.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.adsionline.ADSIShippingWS;

public class PackageResult2  implements java.io.Serializable {
    private long MSN;

    private double discount;

    private double total;

    private double base;

    private double special;

    private java.lang.String trackingNumber;

    private java.lang.String packageID;

    private java.lang.String base64Label;

    private com.adsionline.ADSIShippingWS.NameValuePair[] additionalFields;

    public PackageResult2() {
    }

    public PackageResult2(
           long MSN,
           double discount,
           double total,
           double base,
           double special,
           java.lang.String trackingNumber,
           java.lang.String packageID,
           java.lang.String base64Label,
           com.adsionline.ADSIShippingWS.NameValuePair[] additionalFields) {
           this.MSN = MSN;
           this.discount = discount;
           this.total = total;
           this.base = base;
           this.special = special;
           this.trackingNumber = trackingNumber;
           this.packageID = packageID;
           this.base64Label = base64Label;
           this.additionalFields = additionalFields;
    }


    /**
     * Gets the MSN value for this PackageResult2.
     * 
     * @return MSN
     */
    public long getMSN() {
        return MSN;
    }


    /**
     * Sets the MSN value for this PackageResult2.
     * 
     * @param MSN
     */
    public void setMSN(long MSN) {
        this.MSN = MSN;
    }


    /**
     * Gets the discount value for this PackageResult2.
     * 
     * @return discount
     */
    public double getDiscount() {
        return discount;
    }


    /**
     * Sets the discount value for this PackageResult2.
     * 
     * @param discount
     */
    public void setDiscount(double discount) {
        this.discount = discount;
    }


    /**
     * Gets the total value for this PackageResult2.
     * 
     * @return total
     */
    public double getTotal() {
        return total;
    }


    /**
     * Sets the total value for this PackageResult2.
     * 
     * @param total
     */
    public void setTotal(double total) {
        this.total = total;
    }


    /**
     * Gets the base value for this PackageResult2.
     * 
     * @return base
     */
    public double getBase() {
        return base;
    }


    /**
     * Sets the base value for this PackageResult2.
     * 
     * @param base
     */
    public void setBase(double base) {
        this.base = base;
    }


    /**
     * Gets the special value for this PackageResult2.
     * 
     * @return special
     */
    public double getSpecial() {
        return special;
    }


    /**
     * Sets the special value for this PackageResult2.
     * 
     * @param special
     */
    public void setSpecial(double special) {
        this.special = special;
    }


    /**
     * Gets the trackingNumber value for this PackageResult2.
     * 
     * @return trackingNumber
     */
    public java.lang.String getTrackingNumber() {
        return trackingNumber;
    }


    /**
     * Sets the trackingNumber value for this PackageResult2.
     * 
     * @param trackingNumber
     */
    public void setTrackingNumber(java.lang.String trackingNumber) {
        this.trackingNumber = trackingNumber;
    }


    /**
     * Gets the packageID value for this PackageResult2.
     * 
     * @return packageID
     */
    public java.lang.String getPackageID() {
        return packageID;
    }


    /**
     * Sets the packageID value for this PackageResult2.
     * 
     * @param packageID
     */
    public void setPackageID(java.lang.String packageID) {
        this.packageID = packageID;
    }


    /**
     * Gets the base64Label value for this PackageResult2.
     * 
     * @return base64Label
     */
    public java.lang.String getBase64Label() {
        return base64Label;
    }


    /**
     * Sets the base64Label value for this PackageResult2.
     * 
     * @param base64Label
     */
    public void setBase64Label(java.lang.String base64Label) {
        this.base64Label = base64Label;
    }


    /**
     * Gets the additionalFields value for this PackageResult2.
     * 
     * @return additionalFields
     */
    public com.adsionline.ADSIShippingWS.NameValuePair[] getAdditionalFields() {
        return additionalFields;
    }


    /**
     * Sets the additionalFields value for this PackageResult2.
     * 
     * @param additionalFields
     */
    public void setAdditionalFields(com.adsionline.ADSIShippingWS.NameValuePair[] additionalFields) {
        this.additionalFields = additionalFields;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof PackageResult2)) return false;
        PackageResult2 other = (PackageResult2) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            this.MSN == other.getMSN() &&
            this.discount == other.getDiscount() &&
            this.total == other.getTotal() &&
            this.base == other.getBase() &&
            this.special == other.getSpecial() &&
            ((this.trackingNumber==null && other.getTrackingNumber()==null) || 
             (this.trackingNumber!=null &&
              this.trackingNumber.equals(other.getTrackingNumber()))) &&
            ((this.packageID==null && other.getPackageID()==null) || 
             (this.packageID!=null &&
              this.packageID.equals(other.getPackageID()))) &&
            ((this.base64Label==null && other.getBase64Label()==null) || 
             (this.base64Label!=null &&
              this.base64Label.equals(other.getBase64Label()))) &&
            ((this.additionalFields==null && other.getAdditionalFields()==null) || 
             (this.additionalFields!=null &&
              java.util.Arrays.equals(this.additionalFields, other.getAdditionalFields())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        _hashCode += new Long(getMSN()).hashCode();
        _hashCode += new Double(getDiscount()).hashCode();
        _hashCode += new Double(getTotal()).hashCode();
        _hashCode += new Double(getBase()).hashCode();
        _hashCode += new Double(getSpecial()).hashCode();
        if (getTrackingNumber() != null) {
            _hashCode += getTrackingNumber().hashCode();
        }
        if (getPackageID() != null) {
            _hashCode += getPackageID().hashCode();
        }
        if (getBase64Label() != null) {
            _hashCode += getBase64Label().hashCode();
        }
        if (getAdditionalFields() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getAdditionalFields());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getAdditionalFields(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(PackageResult2.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "PackageResult2"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("MSN");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "MSN"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("discount");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Discount"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("total");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Total"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("base");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Base"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("special");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Special"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("trackingNumber");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "TrackingNumber"));
        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("packageID");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "PackageID"));
        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("base64Label");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Base64Label"));
        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("additionalFields");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "AdditionalFields"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "NameValuePair"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        elemField.setItemQName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "NameValuePair"));
        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);
    }

}
