/*
 * 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 updates profile of a device.
 *
 * @extends models['BaseModel']
 */
class Updates extends models['BaseModel'] {
  /**
   * Create a Updates.
   * @member {boolean} [regularUpdatesAvailable] Set to 'true' if regular
   * updates are available for the device.
   * @member {boolean} [maintenanceModeUpdatesAvailable] Set to 'true' if
   * maintenance mode update available.
   * @member {boolean} [isUpdateInProgress] Indicates whether an update is in
   * progress or not.
   * @member {date} [lastUpdatedTime] The time when the last update was
   * completed.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Updates
   *
   * @returns {object} metadata of Updates
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Updates',
      type: {
        name: 'Composite',
        className: 'Updates',
        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' ]
            }
          },
          regularUpdatesAvailable: {
            required: false,
            serializedName: 'properties.regularUpdatesAvailable',
            type: {
              name: 'Boolean'
            }
          },
          maintenanceModeUpdatesAvailable: {
            required: false,
            serializedName: 'properties.maintenanceModeUpdatesAvailable',
            type: {
              name: 'Boolean'
            }
          },
          isUpdateInProgress: {
            required: false,
            serializedName: 'properties.isUpdateInProgress',
            type: {
              name: 'Boolean'
            }
          },
          lastUpdatedTime: {
            required: false,
            serializedName: 'properties.lastUpdatedTime',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = Updates;
