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

/**
 * The controller power state change request.
 *
 * @extends models['BaseModel']
 */
class ControllerPowerStateChangeRequest extends models['BaseModel'] {
  /**
   * Create a ControllerPowerStateChangeRequest.
   * @member {string} action The power state that the request is expecting for
   * the controller of the device. Possible values include: 'Start', 'Restart',
   * 'Shutdown'
   * @member {string} activeController The active controller that the request
   * is expecting on the device. Possible values include: 'Unknown', 'None',
   * 'Controller0', 'Controller1'
   * @member {string} controller0State The controller 0's status that the
   * request is expecting on the device. Possible values include: 'NotPresent',
   * 'PoweredOff', 'Ok', 'Recovering', 'Warning', 'Failure'
   * @member {string} controller1State The controller 1's status that the
   * request is expecting on the device. Possible values include: 'NotPresent',
   * 'PoweredOff', 'Ok', 'Recovering', 'Warning', 'Failure'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ControllerPowerStateChangeRequest
   *
   * @returns {object} metadata of ControllerPowerStateChangeRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ControllerPowerStateChangeRequest',
      type: {
        name: 'Composite',
        className: 'ControllerPowerStateChangeRequest',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'Enum',
              allowedValues: [ 'Series8000' ]
            }
          },
          action: {
            required: true,
            serializedName: 'properties.action',
            type: {
              name: 'Enum',
              allowedValues: [ 'Start', 'Restart', 'Shutdown' ]
            }
          },
          activeController: {
            required: true,
            serializedName: 'properties.activeController',
            type: {
              name: 'Enum',
              allowedValues: [ 'Unknown', 'None', 'Controller0', 'Controller1' ]
            }
          },
          controller0State: {
            required: true,
            serializedName: 'properties.controller0State',
            type: {
              name: 'Enum',
              allowedValues: [ 'NotPresent', 'PoweredOff', 'Ok', 'Recovering', 'Warning', 'Failure' ]
            }
          },
          controller1State: {
            required: true,
            serializedName: 'properties.controller1State',
            type: {
              name: 'Enum',
              allowedValues: [ 'NotPresent', 'PoweredOff', 'Ok', 'Recovering', 'Warning', 'Failure' ]
            }
          }
        }
      }
    };
  }
}

module.exports = ControllerPowerStateChangeRequest;
