/**
 * Carrier.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 Carrier  implements java.io.Serializable {
    private java.lang.String symbol;

    private java.lang.String friendlyName;

    private java.lang.String shortName;

    private com.adsionline.ADSIShippingWS.LabelDefinition[] labelDefinitions;

    private com.adsionline.ADSIShippingWS.Service[] services;

    private com.adsionline.ADSIShippingWS.StockDefinition[] stockDefinitions;

    public Carrier() {
    }

    public Carrier(
           java.lang.String symbol,
           java.lang.String friendlyName,
           java.lang.String shortName,
           com.adsionline.ADSIShippingWS.LabelDefinition[] labelDefinitions,
           com.adsionline.ADSIShippingWS.Service[] services,
           com.adsionline.ADSIShippingWS.StockDefinition[] stockDefinitions) {
           this.symbol = symbol;
           this.friendlyName = friendlyName;
           this.shortName = shortName;
           this.labelDefinitions = labelDefinitions;
           this.services = services;
           this.stockDefinitions = stockDefinitions;
    }


    /**
     * Gets the symbol value for this Carrier.
     * 
     * @return symbol
     */
    public java.lang.String getSymbol() {
        return symbol;
    }


    /**
     * Sets the symbol value for this Carrier.
     * 
     * @param symbol
     */
    public void setSymbol(java.lang.String symbol) {
        this.symbol = symbol;
    }


    /**
     * Gets the friendlyName value for this Carrier.
     * 
     * @return friendlyName
     */
    public java.lang.String getFriendlyName() {
        return friendlyName;
    }


    /**
     * Sets the friendlyName value for this Carrier.
     * 
     * @param friendlyName
     */
    public void setFriendlyName(java.lang.String friendlyName) {
        this.friendlyName = friendlyName;
    }


    /**
     * Gets the shortName value for this Carrier.
     * 
     * @return shortName
     */
    public java.lang.String getShortName() {
        return shortName;
    }


    /**
     * Sets the shortName value for this Carrier.
     * 
     * @param shortName
     */
    public void setShortName(java.lang.String shortName) {
        this.shortName = shortName;
    }


    /**
     * Gets the labelDefinitions value for this Carrier.
     * 
     * @return labelDefinitions
     */
    public com.adsionline.ADSIShippingWS.LabelDefinition[] getLabelDefinitions() {
        return labelDefinitions;
    }


    /**
     * Sets the labelDefinitions value for this Carrier.
     * 
     * @param labelDefinitions
     */
    public void setLabelDefinitions(com.adsionline.ADSIShippingWS.LabelDefinition[] labelDefinitions) {
        this.labelDefinitions = labelDefinitions;
    }


    /**
     * Gets the services value for this Carrier.
     * 
     * @return services
     */
    public com.adsionline.ADSIShippingWS.Service[] getServices() {
        return services;
    }


    /**
     * Sets the services value for this Carrier.
     * 
     * @param services
     */
    public void setServices(com.adsionline.ADSIShippingWS.Service[] services) {
        this.services = services;
    }


    /**
     * Gets the stockDefinitions value for this Carrier.
     * 
     * @return stockDefinitions
     */
    public com.adsionline.ADSIShippingWS.StockDefinition[] getStockDefinitions() {
        return stockDefinitions;
    }


    /**
     * Sets the stockDefinitions value for this Carrier.
     * 
     * @param stockDefinitions
     */
    public void setStockDefinitions(com.adsionline.ADSIShippingWS.StockDefinition[] stockDefinitions) {
        this.stockDefinitions = stockDefinitions;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Carrier)) return false;
        Carrier other = (Carrier) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.symbol==null && other.getSymbol()==null) || 
             (this.symbol!=null &&
              this.symbol.equals(other.getSymbol()))) &&
            ((this.friendlyName==null && other.getFriendlyName()==null) || 
             (this.friendlyName!=null &&
              this.friendlyName.equals(other.getFriendlyName()))) &&
            ((this.shortName==null && other.getShortName()==null) || 
             (this.shortName!=null &&
              this.shortName.equals(other.getShortName()))) &&
            ((this.labelDefinitions==null && other.getLabelDefinitions()==null) || 
             (this.labelDefinitions!=null &&
              java.util.Arrays.equals(this.labelDefinitions, other.getLabelDefinitions()))) &&
            ((this.services==null && other.getServices()==null) || 
             (this.services!=null &&
              java.util.Arrays.equals(this.services, other.getServices()))) &&
            ((this.stockDefinitions==null && other.getStockDefinitions()==null) || 
             (this.stockDefinitions!=null &&
              java.util.Arrays.equals(this.stockDefinitions, other.getStockDefinitions())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getSymbol() != null) {
            _hashCode += getSymbol().hashCode();
        }
        if (getFriendlyName() != null) {
            _hashCode += getFriendlyName().hashCode();
        }
        if (getShortName() != null) {
            _hashCode += getShortName().hashCode();
        }
        if (getLabelDefinitions() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getLabelDefinitions());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getLabelDefinitions(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getServices() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getServices());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getServices(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getStockDefinitions() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getStockDefinitions());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getStockDefinitions(), 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(Carrier.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Carrier"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("symbol");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Symbol"));
        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("friendlyName");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "FriendlyName"));
        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("shortName");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "ShortName"));
        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("labelDefinitions");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "LabelDefinitions"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "LabelDefinition"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        elemField.setItemQName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "LabelDefinition"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("services");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Services"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Service"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        elemField.setItemQName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "Service"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("stockDefinitions");
        elemField.setXmlName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "StockDefinitions"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "StockDefinition"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        elemField.setItemQName(new javax.xml.namespace.QName("http://adsionline.com/ADSIShippingWS/", "StockDefinition"));
        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);
    }

}
