/*
 * 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';

/**
 * Address information for domain registration.
 *
 */
class Address {
  /**
   * Create a Address.
   * @member {string} address1 First line of an Address.
   * @member {string} [address2] The second line of the Address. Optional.
   * @member {string} city The city for the address.
   * @member {string} country The country for the address.
   * @member {string} postalCode The postal code for the address.
   * @member {string} state The state or province for the address.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Address
   *
   * @returns {object} metadata of Address
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Address',
      type: {
        name: 'Composite',
        className: 'Address',
        modelProperties: {
          address1: {
            required: true,
            serializedName: 'address1',
            type: {
              name: 'String'
            }
          },
          address2: {
            required: false,
            serializedName: 'address2',
            type: {
              name: 'String'
            }
          },
          city: {
            required: true,
            serializedName: 'city',
            type: {
              name: 'String'
            }
          },
          country: {
            required: true,
            serializedName: 'country',
            type: {
              name: 'String'
            }
          },
          postalCode: {
            required: true,
            serializedName: 'postalCode',
            type: {
              name: 'String'
            }
          },
          state: {
            required: true,
            serializedName: 'state',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Address;
