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

/**
 * Represents the patch request for the security settings of a device.
 *
 */
class SecuritySettingsPatch {
  /**
   * Create a SecuritySettingsPatch.
   * @member {object} [remoteManagementSettings] The remote management
   * settings.
   * @member {string} [remoteManagementSettings.remoteManagementMode] The
   * remote management mode. Possible values include: 'Unknown', 'Disabled',
   * 'HttpsEnabled', 'HttpsAndHttpEnabled'
   * @member {object} [deviceAdminPassword] The device administrator password.
   * @member {string} [deviceAdminPassword.value] The value of the secret.
   * @member {string} [deviceAdminPassword.encryptionCertThumbprint] Thumbprint
   * certificate that was used to encrypt "Value". If the value in unencrypted,
   * it will be null.
   * @member {string} [deviceAdminPassword.encryptionAlgorithm] The algorithm
   * used to encrypt "Value". Possible values include: 'None', 'AES256',
   * 'RSAES_PKCS1_v_1_5'
   * @member {object} [snapshotPassword] The snapshot manager password.
   * @member {string} [snapshotPassword.value] The value of the secret.
   * @member {string} [snapshotPassword.encryptionCertThumbprint] Thumbprint
   * certificate that was used to encrypt "Value". If the value in unencrypted,
   * it will be null.
   * @member {string} [snapshotPassword.encryptionAlgorithm] The algorithm used
   * to encrypt "Value". Possible values include: 'None', 'AES256',
   * 'RSAES_PKCS1_v_1_5'
   * @member {object} [chapSettings] The device CHAP and reverse-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'
   * @member {object} [cloudApplianceSettings] The cloud appliance settings.
   * @member {object} [cloudApplianceSettings.serviceDataEncryptionKey] The
   * service data encryption key (encrypted with DAK).
   * @member {string} [cloudApplianceSettings.serviceDataEncryptionKey.value]
   * The value of the secret.
   * @member {string}
   * [cloudApplianceSettings.serviceDataEncryptionKey.encryptionCertThumbprint]
   * Thumbprint certificate that was used to encrypt "Value". If the value in
   * unencrypted, it will be null.
   * @member {string}
   * [cloudApplianceSettings.serviceDataEncryptionKey.encryptionAlgorithm] The
   * algorithm used to encrypt "Value". Possible values include: 'None',
   * 'AES256', 'RSAES_PKCS1_v_1_5'
   * @member {object} [cloudApplianceSettings.channelIntegrityKey] The channel
   * integrity key (encrypted with DAK).
   * @member {string} [cloudApplianceSettings.channelIntegrityKey.value] The
   * value of the secret.
   * @member {string}
   * [cloudApplianceSettings.channelIntegrityKey.encryptionCertThumbprint]
   * Thumbprint certificate that was used to encrypt "Value". If the value in
   * unencrypted, it will be null.
   * @member {string}
   * [cloudApplianceSettings.channelIntegrityKey.encryptionAlgorithm] The
   * algorithm used to encrypt "Value". Possible values include: 'None',
   * 'AES256', 'RSAES_PKCS1_v_1_5'
   */
  constructor() {
  }

  /**
   * Defines the metadata of SecuritySettingsPatch
   *
   * @returns {object} metadata of SecuritySettingsPatch
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SecuritySettingsPatch',
      type: {
        name: 'Composite',
        className: 'SecuritySettingsPatch',
        modelProperties: {
          remoteManagementSettings: {
            required: false,
            serializedName: 'properties.remoteManagementSettings',
            type: {
              name: 'Composite',
              className: 'RemoteManagementSettingsPatch'
            }
          },
          deviceAdminPassword: {
            required: false,
            serializedName: 'properties.deviceAdminPassword',
            type: {
              name: 'Composite',
              className: 'AsymmetricEncryptedSecret'
            }
          },
          snapshotPassword: {
            required: false,
            serializedName: 'properties.snapshotPassword',
            type: {
              name: 'Composite',
              className: 'AsymmetricEncryptedSecret'
            }
          },
          chapSettings: {
            required: false,
            serializedName: 'properties.chapSettings',
            type: {
              name: 'Composite',
              className: 'ChapSettings'
            }
          },
          cloudApplianceSettings: {
            required: false,
            serializedName: 'properties.cloudApplianceSettings',
            type: {
              name: 'Composite',
              className: 'CloudApplianceSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = SecuritySettingsPatch;
