/*
 * 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 Challenge-Handshake Authentication Protocol (CHAP) settings.
 *
 */
class ChapSettings {
  /**
   * Create a ChapSettings.
   * @member {string} [initiatorUser] The CHAP initiator user.
   * @member {object} [initiatorSecret] The CHAP initiator secret.
   * @member {string} [initiatorSecret.value] The value of the secret.
   * @member {string} [initiatorSecret.encryptionCertThumbprint] Thumbprint
   * certificate that was used to encrypt "Value". If the value in unencrypted,
   * it will be null.
   * @member {string} [initiatorSecret.encryptionAlgorithm] The algorithm used
   * to encrypt "Value". Possible values include: 'None', 'AES256',
   * 'RSAES_PKCS1_v_1_5'
   * @member {string} [targetUser] The CHAP target user.
   * @member {object} [targetSecret] The target secret.
   * @member {string} [targetSecret.value] The value of the secret.
   * @member {string} [targetSecret.encryptionCertThumbprint] Thumbprint
   * certificate that was used to encrypt "Value". If the value in unencrypted,
   * it will be null.
   * @member {string} [targetSecret.encryptionAlgorithm] The algorithm used to
   * encrypt "Value". Possible values include: 'None', 'AES256',
   * 'RSAES_PKCS1_v_1_5'
   */
  constructor() {
  }

  /**
   * Defines the metadata of ChapSettings
   *
   * @returns {object} metadata of ChapSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ChapSettings',
      type: {
        name: 'Composite',
        className: 'ChapSettings',
        modelProperties: {
          initiatorUser: {
            required: false,
            serializedName: 'initiatorUser',
            type: {
              name: 'String'
            }
          },
          initiatorSecret: {
            required: false,
            serializedName: 'initiatorSecret',
            type: {
              name: 'Composite',
              className: 'AsymmetricEncryptedSecret'
            }
          },
          targetUser: {
            required: false,
            serializedName: 'targetUser',
            type: {
              name: 'String'
            }
          },
          targetSecret: {
            required: false,
            serializedName: 'targetSecret',
            type: {
              name: 'Composite',
              className: 'AsymmetricEncryptedSecret'
            }
          }
        }
      }
    };
  }
}

module.exports = ChapSettings;
