/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * Shipping address where customer wishes to receive the device.
 *
 */
class ShippingAddress {
  /**
   * Create a ShippingAddress.
   * @member {string} streetAddress1 Street Address line 1.
   * @member {string} [streetAddress2] Street Address line 2.
   * @member {string} [streetAddress3] Street Address line 3.
   * @member {string} [city] Name of the City.
   * @member {string} [stateOrProvince] Name of the State or Province.
   * @member {string} country Name of the Country.
   * @member {string} postalCode Postal code.
   * @member {string} [zipExtendedCode] Extended Zip Code.
   * @member {string} [companyName] Name of the company.
   * @member {string} [addressType] Type of address. Possible values include:
   * 'None', 'Residential', 'Commercial'
   */
  constructor() {
  }

  /**
   * Defines the metadata of ShippingAddress
   *
   * @returns {object} metadata of ShippingAddress
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ShippingAddress',
      type: {
        name: 'Composite',
        className: 'ShippingAddress',
        modelProperties: {
          streetAddress1: {
            required: true,
            serializedName: 'streetAddress1',
            type: {
              name: 'String'
            }
          },
          streetAddress2: {
            required: false,
            serializedName: 'streetAddress2',
            type: {
              name: 'String'
            }
          },
          streetAddress3: {
            required: false,
            serializedName: 'streetAddress3',
            type: {
              name: 'String'
            }
          },
          city: {
            required: false,
            serializedName: 'city',
            type: {
              name: 'String'
            }
          },
          stateOrProvince: {
            required: false,
            serializedName: 'stateOrProvince',
            type: {
              name: 'String'
            }
          },
          country: {
            required: true,
            serializedName: 'country',
            type: {
              name: 'String'
            }
          },
          postalCode: {
            required: true,
            serializedName: 'postalCode',
            type: {
              name: 'String'
            }
          },
          zipExtendedCode: {
            required: false,
            serializedName: 'zipExtendedCode',
            type: {
              name: 'String'
            }
          },
          companyName: {
            required: false,
            serializedName: 'companyName',
            type: {
              name: 'String'
            }
          },
          addressType: {
            required: false,
            serializedName: 'addressType',
            type: {
              name: 'Enum',
              allowedValues: [ 'None', 'Residential', 'Commercial' ]
            }
          }
        }
      }
    };
  }
}

module.exports = ShippingAddress;
