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

/**
 * Properties of the key pair backing a certificate.
 *
 */
class KeyProperties {
  /**
   * Create a KeyProperties.
   * @member {boolean} [exportable] Indicates if the private key can be
   * exported.
   * @member {string} [keyType] The type of key pair to be used for the
   * certificate. Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM',
   * 'oct'
   * @member {number} [keySize] The key size in bits. For example: 2048, 3072,
   * or 4096 for RSA.
   * @member {boolean} [reuseKey] Indicates if the same key pair will be used
   * on certificate renewal.
   * @member {string} [curve] Elliptic curve name. For valid values, see
   * JsonWebKeyCurveName. Possible values include: 'P-256', 'P-384', 'P-521',
   * 'P-256K'
   */
  constructor() {
  }

  /**
   * Defines the metadata of KeyProperties
   *
   * @returns {object} metadata of KeyProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KeyProperties',
      type: {
        name: 'Composite',
        className: 'KeyProperties',
        modelProperties: {
          exportable: {
            required: false,
            serializedName: 'exportable',
            type: {
              name: 'Boolean'
            }
          },
          keyType: {
            required: false,
            serializedName: 'kty',
            type: {
              name: 'String'
            }
          },
          keySize: {
            required: false,
            serializedName: 'key_size',
            type: {
              name: 'Number'
            }
          },
          reuseKey: {
            required: false,
            serializedName: 'reuse_key',
            type: {
              name: 'Boolean'
            }
          },
          curve: {
            required: false,
            serializedName: 'crv',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = KeyProperties;
