/*
 * 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 StorSimple device.
 *
 * @extends models['BaseModel']
 */
class Device extends models['BaseModel'] {
  /**
   * Create a Device.
   * @member {string} friendlyName The friendly name of the device.
   * @member {date} activationTime The UTC time at which the device was
   * activated
   * @member {string} culture The language culture setting on the device. For
   * eg: "en-US"
   * @member {string} deviceDescription The device description.
   * @member {string} deviceSoftwareVersion The version number of the software
   * running on the device.
   * @member {string} [friendlySoftwareName] The friendly name of the software
   * running on the device.
   * @member {string} deviceConfigurationStatus The current configuration
   * status of the device. Possible values include: 'Complete', 'Pending'
   * @member {string} targetIqn The target IQN.
   * @member {string} modelDescription The device model.
   * @member {string} status The current status of the device. Possible values
   * include: 'Unknown', 'Online', 'Offline', 'Deactivated',
   * 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning',
   * 'Deactivating', 'Deleted', 'ReadyToSetup'
   * @member {string} serialNumber The serial number.
   * @member {string} deviceType The type of the device. Possible values
   * include: 'Invalid', 'Series8000VirtualAppliance',
   * 'Series8000PhysicalAppliance'
   * @member {string} activeController The identifier of the active controller
   * of the device. Possible values include: 'Unknown', 'None', 'Controller0',
   * 'Controller1'
   * @member {string} friendlySoftwareVersion The device friendly software
   * version.
   * @member {number} [availableLocalStorageInBytes] The storage in bytes that
   * is available locally on the device.
   * @member {number} [availableTieredStorageInBytes] The storage in bytes that
   * is available on the device for tiered volumes.
   * @member {number} [provisionedTieredStorageInBytes] The storage in bytes
   * that has been provisioned on the device for tiered volumes.
   * @member {number} [provisionedLocalStorageInBytes] The storage in bytes
   * used for locally pinned volumes on the device (including additional local
   * reservation).
   * @member {number} [provisionedVolumeSizeInBytes] Total capacity in bytes of
   * tiered and locally pinned volumes on the device
   * @member {number} [usingStorageInBytes] The storage in bytes that is
   * currently being used on the device, including both local and cloud.
   * @member {number} [totalTieredStorageInBytes] The total tiered storage
   * available on the device in bytes.
   * @member {number} [agentGroupVersion] The device agent group version.
   * @member {number} [networkInterfaceCardCount] The number of network
   * interface cards
   * @member {string} [deviceLocation] The location of the virtual appliance.
   * @member {string} [virtualMachineApiType] The virtual machine API type.
   * Possible values include: 'Classic', 'Arm'
   * @member {object} [details] The additional device details regarding the end
   * point count and volume container count.
   * @member {number} [details.endpointCount] The total number of endpoints
   * that are currently on the device ( i.e. number of volumes).
   * @member {number} [details.volumeContainerCount] The total number of volume
   * containers on the device.
   * @member {object} [rolloverDetails] The additional device details for the
   * service data encryption key rollover.
   * @member {string} [rolloverDetails.authorizationEligibility] The
   * eligibility status of device for service data encryption key rollover.
   * Possible values include: 'InEligible', 'Eligible'
   * @member {string} [rolloverDetails.authorizationStatus] The authorization
   * status of the device for service data encryption key rollover. Possible
   * values include: 'Disabled', 'Enabled'
   * @member {string} [rolloverDetails.inEligibilityReason] The reason for
   * inEligibility of device, in case it's not eligible for service data
   * encryption key rollover. Possible values include: 'DeviceNotOnline',
   * 'NotSupportedAppliance', 'RolloverPending'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Device
   *
   * @returns {object} metadata of Device
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Device',
      type: {
        name: 'Composite',
        className: 'Device',
        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' ]
            }
          },
          friendlyName: {
            required: true,
            serializedName: 'properties.friendlyName',
            type: {
              name: 'String'
            }
          },
          activationTime: {
            required: true,
            serializedName: 'properties.activationTime',
            type: {
              name: 'DateTime'
            }
          },
          culture: {
            required: true,
            serializedName: 'properties.culture',
            type: {
              name: 'String'
            }
          },
          deviceDescription: {
            required: true,
            serializedName: 'properties.deviceDescription',
            type: {
              name: 'String'
            }
          },
          deviceSoftwareVersion: {
            required: true,
            serializedName: 'properties.deviceSoftwareVersion',
            type: {
              name: 'String'
            }
          },
          friendlySoftwareName: {
            required: false,
            serializedName: 'properties.friendlySoftwareName',
            type: {
              name: 'String'
            }
          },
          deviceConfigurationStatus: {
            required: true,
            serializedName: 'properties.deviceConfigurationStatus',
            type: {
              name: 'Enum',
              allowedValues: [ 'Complete', 'Pending' ]
            }
          },
          targetIqn: {
            required: true,
            serializedName: 'properties.targetIqn',
            type: {
              name: 'String'
            }
          },
          modelDescription: {
            required: true,
            serializedName: 'properties.modelDescription',
            type: {
              name: 'String'
            }
          },
          status: {
            required: true,
            serializedName: 'properties.status',
            type: {
              name: 'Enum',
              allowedValues: [ 'Unknown', 'Online', 'Offline', 'Deactivated', 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning', 'Deactivating', 'Deleted', 'ReadyToSetup' ]
            }
          },
          serialNumber: {
            required: true,
            serializedName: 'properties.serialNumber',
            type: {
              name: 'String'
            }
          },
          deviceType: {
            required: true,
            serializedName: 'properties.deviceType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Invalid', 'Series8000VirtualAppliance', 'Series8000PhysicalAppliance' ]
            }
          },
          activeController: {
            required: true,
            serializedName: 'properties.activeController',
            type: {
              name: 'Enum',
              allowedValues: [ 'Unknown', 'None', 'Controller0', 'Controller1' ]
            }
          },
          friendlySoftwareVersion: {
            required: true,
            serializedName: 'properties.friendlySoftwareVersion',
            type: {
              name: 'String'
            }
          },
          availableLocalStorageInBytes: {
            required: false,
            serializedName: 'properties.availableLocalStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          availableTieredStorageInBytes: {
            required: false,
            serializedName: 'properties.availableTieredStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          provisionedTieredStorageInBytes: {
            required: false,
            serializedName: 'properties.provisionedTieredStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          provisionedLocalStorageInBytes: {
            required: false,
            serializedName: 'properties.provisionedLocalStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          provisionedVolumeSizeInBytes: {
            required: false,
            serializedName: 'properties.provisionedVolumeSizeInBytes',
            type: {
              name: 'Number'
            }
          },
          usingStorageInBytes: {
            required: false,
            serializedName: 'properties.usingStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          totalTieredStorageInBytes: {
            required: false,
            serializedName: 'properties.totalTieredStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          agentGroupVersion: {
            required: false,
            serializedName: 'properties.agentGroupVersion',
            type: {
              name: 'Number'
            }
          },
          networkInterfaceCardCount: {
            required: false,
            serializedName: 'properties.networkInterfaceCardCount',
            type: {
              name: 'Number'
            }
          },
          deviceLocation: {
            required: false,
            serializedName: 'properties.deviceLocation',
            type: {
              name: 'String'
            }
          },
          virtualMachineApiType: {
            required: false,
            readOnly: true,
            serializedName: 'properties.virtualMachineApiType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Classic', 'Arm' ]
            }
          },
          details: {
            required: false,
            serializedName: 'properties.details',
            type: {
              name: 'Composite',
              className: 'DeviceDetails'
            }
          },
          rolloverDetails: {
            required: false,
            serializedName: 'properties.rolloverDetails',
            type: {
              name: 'Composite',
              className: 'DeviceRolloverDetails'
            }
          }
        }
      }
    };
  }
}

module.exports = Device;
