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

/**
 * Class representing Abnormal Time Period identified in diagnosis
 *
 */
class AbnormalTimePeriod {
  /**
   * Create a AbnormalTimePeriod.
   * @member {date} [startTime] Start time of the downtime
   * @member {date} [endTime] End time of the downtime
   * @member {array} [events] List of Possible Cause of downtime
   * @member {array} [solutions] List of proposed solutions
   */
  constructor() {
  }

  /**
   * Defines the metadata of AbnormalTimePeriod
   *
   * @returns {object} metadata of AbnormalTimePeriod
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AbnormalTimePeriod',
      type: {
        name: 'Composite',
        className: 'AbnormalTimePeriod',
        modelProperties: {
          startTime: {
            required: false,
            serializedName: 'startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            serializedName: 'endTime',
            type: {
              name: 'DateTime'
            }
          },
          events: {
            required: false,
            serializedName: 'events',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DetectorAbnormalTimePeriodElementType',
                  type: {
                    name: 'Composite',
                    className: 'DetectorAbnormalTimePeriod'
                  }
              }
            }
          },
          solutions: {
            required: false,
            serializedName: 'solutions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SolutionElementType',
                  type: {
                    name: 'Composite',
                    className: 'Solution'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = AbnormalTimePeriod;
