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

/**
 * Chaos Started event.
 *
 * @extends models['ClusterEvent']
 */
class ChaosStartedEvent extends models['ClusterEvent'] {
  /**
   * Create a ChaosStartedEvent.
   * @property {number} maxConcurrentFaults Maximum number of concurrent
   * faults.
   * @property {number} timeToRunInSeconds Time to run in seconds.
   * @property {number} maxClusterStabilizationTimeoutInSeconds Maximum timeout
   * for cluster stabilization in seconds.
   * @property {number} waitTimeBetweenIterationsInSeconds Wait time between
   * iterations in seconds.
   * @property {number} waitTimeBetweenFautlsInSeconds Wait time between faults
   * in seconds.
   * @property {boolean} moveReplicaFaultEnabled Indicates MoveReplica fault is
   * enabled.
   * @property {string} includedNodeTypeList List of included Node types.
   * @property {string} includedApplicationList List of included Applications.
   * @property {string} clusterHealthPolicy Health policy.
   * @property {string} chaosContext Chaos Context.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ChaosStartedEvent
   *
   * @returns {object} metadata of ChaosStartedEvent
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ChaosStarted',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'Kind',
          clientName: 'kind'
        },
        uberParent: 'FabricEvent',
        className: 'ChaosStartedEvent',
        modelProperties: {
          eventInstanceId: {
            required: true,
            serializedName: 'EventInstanceId',
            type: {
              name: 'String'
            }
          },
          category: {
            required: false,
            serializedName: 'Category',
            type: {
              name: 'String'
            }
          },
          timeStamp: {
            required: true,
            serializedName: 'TimeStamp',
            type: {
              name: 'DateTime'
            }
          },
          hasCorrelatedEvents: {
            required: false,
            serializedName: 'HasCorrelatedEvents',
            type: {
              name: 'Boolean'
            }
          },
          kind: {
            required: true,
            serializedName: 'Kind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          maxConcurrentFaults: {
            required: true,
            serializedName: 'MaxConcurrentFaults',
            type: {
              name: 'Number'
            }
          },
          timeToRunInSeconds: {
            required: true,
            serializedName: 'TimeToRunInSeconds',
            type: {
              name: 'Number'
            }
          },
          maxClusterStabilizationTimeoutInSeconds: {
            required: true,
            serializedName: 'MaxClusterStabilizationTimeoutInSeconds',
            type: {
              name: 'Number'
            }
          },
          waitTimeBetweenIterationsInSeconds: {
            required: true,
            serializedName: 'WaitTimeBetweenIterationsInSeconds',
            type: {
              name: 'Number'
            }
          },
          waitTimeBetweenFautlsInSeconds: {
            required: true,
            serializedName: 'WaitTimeBetweenFautlsInSeconds',
            type: {
              name: 'Number'
            }
          },
          moveReplicaFaultEnabled: {
            required: true,
            serializedName: 'MoveReplicaFaultEnabled',
            type: {
              name: 'Boolean'
            }
          },
          includedNodeTypeList: {
            required: true,
            serializedName: 'IncludedNodeTypeList',
            type: {
              name: 'String'
            }
          },
          includedApplicationList: {
            required: true,
            serializedName: 'IncludedApplicationList',
            type: {
              name: 'String'
            }
          },
          clusterHealthPolicy: {
            required: true,
            serializedName: 'ClusterHealthPolicy',
            type: {
              name: 'String'
            }
          },
          chaosContext: {
            required: true,
            serializedName: 'ChaosContext',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ChaosStartedEvent;
