/*
 * 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 security settings of a device.
 *
 * @extends models['BaseModel']
 */
class SecuritySettings extends models['BaseModel'] {
  /**
   * Create a SecuritySettings.
   * @member {object} remoteManagementSettings The settings for remote
   * management of a device.
   * @member {string} [remoteManagementSettings.remoteManagementMode] The
   * remote management mode. Possible values include: 'Unknown', 'Disabled',
   * 'HttpsEnabled', 'HttpsAndHttpEnabled'
   * @member {string} [remoteManagementSettings.remoteManagementCertificate]
   * The remote management certificates.
   * @member {object} chapSettings The Challenge-Handshake Authentication
   * Protocol (CHAP) settings.
   * @member {string} [chapSettings.initiatorUser] The CHAP initiator user.
   * @member {object} [chapSettings.initiatorSecret] The CHAP initiator secret.
   * @member {string} [chapSettings.initiatorSecret.value] The value of the
   * secret.
   * @member {string} [chapSettings.initiatorSecret.encryptionCertThumbprint]
   * Thumbprint certificate that was used to encrypt "Value". If the value in
   * unencrypted, it will be null.
   * @member {string} [chapSettings.initiatorSecret.encryptionAlgorithm] The
   * algorithm used to encrypt "Value". Possible values include: 'None',
   * 'AES256', 'RSAES_PKCS1_v_1_5'
   * @member {string} [chapSettings.targetUser] The CHAP target user.
   * @member {object} [chapSettings.targetSecret] The target secret.
   * @member {string} [chapSettings.targetSecret.value] The value of the
   * secret.
   * @member {string} [chapSettings.targetSecret.encryptionCertThumbprint]
   * Thumbprint certificate that was used to encrypt "Value". If the value in
   * unencrypted, it will be null.
   * @member {string} [chapSettings.targetSecret.encryptionAlgorithm] The
   * algorithm used to encrypt "Value". Possible values include: 'None',
   * 'AES256', 'RSAES_PKCS1_v_1_5'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SecuritySettings
   *
   * @returns {object} metadata of SecuritySettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SecuritySettings',
      type: {
        name: 'Composite',
        className: 'SecuritySettings',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'Enum',
              allowedValues: [ 'Series8000' ]
            }
          },
          remoteManagementSettings: {
            required: true,
            serializedName: 'properties.remoteManagementSettings',
            type: {
              name: 'Composite',
              className: 'RemoteManagementSettings'
            }
          },
          chapSettings: {
            required: true,
            serializedName: 'properties.chapSettings',
            type: {
              name: 'Composite',
              className: 'ChapSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = SecuritySettings;
