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

/**
 * An email receiver.
 *
 */
class EmailReceiver {
  /**
   * Create a EmailReceiver.
   * @property {string} name The name of the email receiver. Names must be
   * unique across all receivers within an action group.
   * @property {string} emailAddress The email address of this receiver.
   * @property {boolean} useCommonAlertSchema Indicates whether to use common
   * alert schema.
   * @property {string} [status] The receiver status of the e-mail. Possible
   * values include: 'NotSpecified', 'Enabled', 'Disabled'
   */
  constructor() {
  }

  /**
   * Defines the metadata of EmailReceiver
   *
   * @returns {object} metadata of EmailReceiver
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EmailReceiver',
      type: {
        name: 'Composite',
        className: 'EmailReceiver',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          emailAddress: {
            required: true,
            serializedName: 'emailAddress',
            type: {
              name: 'String'
            }
          },
          useCommonAlertSchema: {
            required: true,
            serializedName: 'useCommonAlertSchema',
            type: {
              name: 'Boolean'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'Enum',
              allowedValues: [ 'NotSpecified', 'Enabled', 'Disabled' ]
            }
          }
        }
      }
    };
  }
}

module.exports = EmailReceiver;
