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

/**
 * Automation key which is used to register a DSC Node
 *
 */
class Key {
  /**
   * Create a Key.
   * @member {string} [keyName] Automation key name. Possible values include:
   * 'Primary', 'Secondary'
   * @member {string} [permissions] Automation key permissions. Possible values
   * include: 'Read', 'Full'
   * @member {string} [value] Value of the Automation Key used for
   * registration.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Key
   *
   * @returns {object} metadata of Key
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Key',
      type: {
        name: 'Composite',
        className: 'Key',
        modelProperties: {
          keyName: {
            required: false,
            readOnly: true,
            serializedName: 'KeyName',
            type: {
              name: 'String'
            }
          },
          permissions: {
            required: false,
            readOnly: true,
            serializedName: 'Permissions',
            type: {
              name: 'String'
            }
          },
          value: {
            required: false,
            readOnly: true,
            serializedName: 'Value',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Key;
