/*
 * 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 Details.
 *
 */
class ContactDetails {
  /**
   * Create a ContactDetails.
   * @member {string} contactName Contact name of the person.
   * @member {string} phone Phone number of the contact person.
   * @member {string} [phoneExtension] Phone extension number of the contact
   * person.
   * @member {string} [mobile] Mobile number of the contact person.
   * @member {array} emailList List of Email-ids to be notified about job
   * progress.
   * @member {array} [notificationPreference] Notification preference for a job
   * stage.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ContactDetails
   *
   * @returns {object} metadata of ContactDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ContactDetails',
      type: {
        name: 'Composite',
        className: 'ContactDetails',
        modelProperties: {
          contactName: {
            required: true,
            serializedName: 'contactName',
            type: {
              name: 'String'
            }
          },
          phone: {
            required: true,
            serializedName: 'phone',
            type: {
              name: 'String'
            }
          },
          phoneExtension: {
            required: false,
            serializedName: 'phoneExtension',
            type: {
              name: 'String'
            }
          },
          mobile: {
            required: false,
            serializedName: 'mobile',
            type: {
              name: 'String'
            }
          },
          emailList: {
            required: true,
            serializedName: 'emailList',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          notificationPreference: {
            required: false,
            serializedName: 'notificationPreference',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NotificationPreferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'NotificationPreference'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ContactDetails;
