/*
 * 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 attributes of a key managed by the key vault service.
 *
 * @extends models['Attributes']
 */
class KeyAttributes extends models['Attributes'] {
  /**
   * Create a KeyAttributes.
   * @member {string} [recoveryLevel] Reflects the deletion recovery level
   * currently in effect for keys in the current vault. If it contains
   * 'Purgeable' the key can be permanently deleted by a privileged user;
   * otherwise, only the system can purge the key, at the end of the retention
   * interval. Possible values include: 'Purgeable', 'Recoverable+Purgeable',
   * 'Recoverable', 'Recoverable+ProtectedSubscription'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of KeyAttributes
   *
   * @returns {object} metadata of KeyAttributes
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KeyAttributes',
      type: {
        name: 'Composite',
        className: 'KeyAttributes',
        modelProperties: {
          enabled: {
            required: false,
            serializedName: 'enabled',
            type: {
              name: 'Boolean'
            }
          },
          notBefore: {
            required: false,
            serializedName: 'nbf',
            type: {
              name: 'UnixTime'
            }
          },
          expires: {
            required: false,
            serializedName: 'exp',
            type: {
              name: 'UnixTime'
            }
          },
          created: {
            required: false,
            readOnly: true,
            serializedName: 'created',
            type: {
              name: 'UnixTime'
            }
          },
          updated: {
            required: false,
            readOnly: true,
            serializedName: 'updated',
            type: {
              name: 'UnixTime'
            }
          },
          recoveryLevel: {
            required: false,
            readOnly: true,
            serializedName: 'recoveryLevel',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = KeyAttributes;
