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

/**
 * Details for upgrading vault.
 *
 */
class UpgradeDetails {
  /**
   * Create a UpgradeDetails.
   * @property {string} [operationId] ID of the vault upgrade operation.
   * @property {date} [startTimeUtc] UTC time at which the upgrade operation
   * has started.
   * @property {date} [lastUpdatedTimeUtc] UTC time at which the upgrade
   * operation status was last updated.
   * @property {date} [endTimeUtc] UTC time at which the upgrade operation has
   * ended.
   * @property {string} [status] Status of the vault upgrade operation.
   * Possible values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed'
   * @property {string} [message] Message to the user containing information
   * about the upgrade operation.
   * @property {string} [triggerType] The way the vault upgrade was triggered.
   * Possible values include: 'UserTriggered', 'ForcedUpgrade'
   * @property {string} [upgradedResourceId] Resource ID of the upgraded vault.
   * @property {string} [previousResourceId] Resource ID of the vault before
   * the upgrade.
   */
  constructor() {
  }

  /**
   * Defines the metadata of UpgradeDetails
   *
   * @returns {object} metadata of UpgradeDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'UpgradeDetails',
      type: {
        name: 'Composite',
        className: 'UpgradeDetails',
        modelProperties: {
          operationId: {
            required: false,
            readOnly: true,
            serializedName: 'operationId',
            type: {
              name: 'String'
            }
          },
          startTimeUtc: {
            required: false,
            readOnly: true,
            serializedName: 'startTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          lastUpdatedTimeUtc: {
            required: false,
            readOnly: true,
            serializedName: 'lastUpdatedTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          endTimeUtc: {
            required: false,
            readOnly: true,
            serializedName: 'endTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          message: {
            required: false,
            readOnly: true,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          triggerType: {
            required: false,
            readOnly: true,
            serializedName: 'triggerType',
            type: {
              name: 'String'
            }
          },
          upgradedResourceId: {
            required: false,
            readOnly: true,
            serializedName: 'upgradedResourceId',
            type: {
              name: 'String'
            }
          },
          previousResourceId: {
            required: false,
            readOnly: true,
            serializedName: 'previousResourceId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = UpgradeDetails;
