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

const models = require('./index');

/**
 * Lists the service impacting events that may be affecting the health of the
 * resource.
 *
 */
class ServiceImpactingEvent {
  /**
   * Create a ServiceImpactingEvent.
   * @member {date} [eventStartTime] Timestamp for when the event started.
   * @member {date} [eventStatusLastModifiedTime] Timestamp for when event was
   * submitted/detected.
   * @member {string} [correlationId] Correlation id for the event
   * @member {object} [status] Status of the service impacting event.
   * @member {string} [status.value] Current status of the event
   * @member {object} [incidentProperties] Properties of the service impacting
   * event.
   * @member {string} [incidentProperties.title] Title of the incident.
   * @member {string} [incidentProperties.service] Service impacted by the
   * event.
   * @member {string} [incidentProperties.region] Region impacted by the event.
   * @member {string} [incidentProperties.incidentType] Type of Event.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ServiceImpactingEvent
   *
   * @returns {object} metadata of ServiceImpactingEvent
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'serviceImpactingEvent',
      type: {
        name: 'Composite',
        className: 'ServiceImpactingEvent',
        modelProperties: {
          eventStartTime: {
            required: false,
            serializedName: 'eventStartTime',
            type: {
              name: 'DateTime'
            }
          },
          eventStatusLastModifiedTime: {
            required: false,
            serializedName: 'eventStatusLastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          correlationId: {
            required: false,
            serializedName: 'correlationId',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'status',
            type: {
              name: 'Composite',
              className: 'ServiceImpactingEventStatus'
            }
          },
          incidentProperties: {
            required: false,
            serializedName: 'incidentProperties',
            type: {
              name: 'Composite',
              className: 'ServiceImpactingEventIncidentProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = ServiceImpactingEvent;
