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

/**
 * Parameters supplied to the Regenerate Authorization Rule operation,
 * specifies which key needs to be reset.
 *
 */
class RegenerateAccessKeyParameters {
  /**
   * Create a RegenerateAccessKeyParameters.
   * @property {string} keyType The access key to regenerate. Possible values
   * include: 'PrimaryKey', 'SecondaryKey'
   * @property {string} [key] Optional, if the key value provided, is reset for
   * KeyType value or autogenerate Key value set for keyType
   */
  constructor() {
  }

  /**
   * Defines the metadata of RegenerateAccessKeyParameters
   *
   * @returns {object} metadata of RegenerateAccessKeyParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RegenerateAccessKeyParameters',
      type: {
        name: 'Composite',
        className: 'RegenerateAccessKeyParameters',
        modelProperties: {
          keyType: {
            required: true,
            serializedName: 'keyType',
            type: {
              name: 'Enum',
              allowedValues: [ 'PrimaryKey', 'SecondaryKey' ]
            }
          },
          key: {
            required: false,
            serializedName: 'key',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = RegenerateAccessKeyParameters;
