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

/**
 * Patch Resource information, as returned by the resource provider.
 *
 * @extends models['PatchTrackedResource']
 */
class PatchVault extends models['PatchTrackedResource'] {
  /**
   * Create a PatchVault.
   * @property {object} [properties]
   * @property {string} [properties.provisioningState] Provisioning State.
   * @property {object} [properties.upgradeDetails]
   * @property {string} [properties.upgradeDetails.operationId] ID of the vault
   * upgrade operation.
   * @property {date} [properties.upgradeDetails.startTimeUtc] UTC time at
   * which the upgrade operation has started.
   * @property {date} [properties.upgradeDetails.lastUpdatedTimeUtc] UTC time
   * at which the upgrade operation status was last updated.
   * @property {date} [properties.upgradeDetails.endTimeUtc] UTC time at which
   * the upgrade operation has ended.
   * @property {string} [properties.upgradeDetails.status] Status of the vault
   * upgrade operation. Possible values include: 'Unknown', 'InProgress',
   * 'Upgraded', 'Failed'
   * @property {string} [properties.upgradeDetails.message] Message to the user
   * containing information about the upgrade operation.
   * @property {string} [properties.upgradeDetails.triggerType] The way the
   * vault upgrade was triggered. Possible values include: 'UserTriggered',
   * 'ForcedUpgrade'
   * @property {string} [properties.upgradeDetails.upgradedResourceId] Resource
   * ID of the upgraded vault.
   * @property {string} [properties.upgradeDetails.previousResourceId] Resource
   * ID of the vault before the upgrade.
   * @property {object} [sku]
   * @property {string} [sku.name] The Sku name. Possible values include:
   * 'Standard', 'RS0'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of PatchVault
   *
   * @returns {object} metadata of PatchVault
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PatchVault',
      type: {
        name: 'Composite',
        className: 'PatchVault',
        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'
            }
          },
          eTag: {
            required: false,
            serializedName: 'eTag',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'VaultProperties'
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          }
        }
      }
    };
  }
}

module.exports = PatchVault;
