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

/**
 * Contact information for domain registration. If 'Domain Privacy' option is
 * not selected then the contact information is made publicly available through
 * the Whois
 * directories as per ICANN requirements.
 *
 */
class Contact {
  /**
   * Create a Contact.
   * @member {object} [addressMailing] Mailing address.
   * @member {string} [addressMailing.address1] First line of an Address.
   * @member {string} [addressMailing.address2] The second line of the Address.
   * Optional.
   * @member {string} [addressMailing.city] The city for the address.
   * @member {string} [addressMailing.country] The country for the address.
   * @member {string} [addressMailing.postalCode] The postal code for the
   * address.
   * @member {string} [addressMailing.state] The state or province for the
   * address.
   * @member {string} email Email address.
   * @member {string} [fax] Fax number.
   * @member {string} [jobTitle] Job title.
   * @member {string} nameFirst First name.
   * @member {string} nameLast Last name.
   * @member {string} [nameMiddle] Middle name.
   * @member {string} [organization] Organization contact belongs to.
   * @member {string} phone Phone number.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Contact
   *
   * @returns {object} metadata of Contact
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Contact',
      type: {
        name: 'Composite',
        className: 'Contact',
        modelProperties: {
          addressMailing: {
            required: false,
            serializedName: 'addressMailing',
            type: {
              name: 'Composite',
              className: 'Address'
            }
          },
          email: {
            required: true,
            serializedName: 'email',
            type: {
              name: 'String'
            }
          },
          fax: {
            required: false,
            serializedName: 'fax',
            type: {
              name: 'String'
            }
          },
          jobTitle: {
            required: false,
            serializedName: 'jobTitle',
            type: {
              name: 'String'
            }
          },
          nameFirst: {
            required: true,
            serializedName: 'nameFirst',
            type: {
              name: 'String'
            }
          },
          nameLast: {
            required: true,
            serializedName: 'nameLast',
            type: {
              name: 'String'
            }
          },
          nameMiddle: {
            required: false,
            serializedName: 'nameMiddle',
            type: {
              name: 'String'
            }
          },
          organization: {
            required: false,
            serializedName: 'organization',
            type: {
              name: 'String'
            }
          },
          phone: {
            required: true,
            serializedName: 'phone',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Contact;
