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

/**
 * Defines the schedule used by Chaos.
 *
 */
class ChaosSchedule {
  /**
   * Create a ChaosSchedule.
   * @property {date} [startDate] The date and time Chaos will start using this
   * schedule. Default value: new Date('1601-01-01T00:00:00Z') .
   * @property {date} [expiryDate] The date and time Chaos will continue to use
   * this schedule until. Default value: new Date('9999-12-31T23:59:59.999Z') .
   * @property {array} [chaosParametersDictionary] A mapping of string names to
   * Chaos Parameters to be referenced by Chaos Schedule Jobs.
   * @property {array} [jobs] A list of all Chaos Schedule Jobs that will be
   * automated by the schedule.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ChaosSchedule
   *
   * @returns {object} metadata of ChaosSchedule
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ChaosSchedule',
      type: {
        name: 'Composite',
        className: 'ChaosSchedule',
        modelProperties: {
          startDate: {
            required: false,
            serializedName: 'StartDate',
            defaultValue: new Date('1601-01-01T00:00:00Z'),
            type: {
              name: 'DateTime'
            }
          },
          expiryDate: {
            required: false,
            serializedName: 'ExpiryDate',
            defaultValue: new Date('9999-12-31T23:59:59.999Z'),
            type: {
              name: 'DateTime'
            }
          },
          chaosParametersDictionary: {
            required: false,
            serializedName: 'ChaosParametersDictionary',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ChaosParametersDictionaryItemElementType',
                  type: {
                    name: 'Composite',
                    className: 'ChaosParametersDictionaryItem'
                  }
              }
            }
          },
          jobs: {
            required: false,
            serializedName: 'Jobs',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ChaosScheduleJobElementType',
                  type: {
                    name: 'Composite',
                    className: 'ChaosScheduleJob'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ChaosSchedule;
