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

/**
 * A managed instance vulnerability assessment.
 *
 * @extends models['ProxyResource']
 */
class ManagedInstanceVulnerabilityAssessment extends models['ProxyResource'] {
  /**
   * Create a ManagedInstanceVulnerabilityAssessment.
   * @property {string} storageContainerPath A blob storage container path to
   * hold the scan results (e.g.
   * https://myStorage.blob.core.windows.net/VaScans/).
   * @property {string} [storageContainerSasKey] A shared access signature (SAS
   * Key) that has write access to the blob container specified in
   * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't
   * specified, StorageContainerSasKey is required.
   * @property {string} [storageAccountAccessKey] Specifies the identifier key
   * of the storage account for vulnerability assessment scan results. If
   * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is
   * required.
   * @property {object} [recurringScans] The recurring scans settings
   * @property {boolean} [recurringScans.isEnabled] Recurring scans state.
   * @property {boolean} [recurringScans.emailSubscriptionAdmins] Specifies
   * that the schedule scan notification will be is sent to the subscription
   * administrators.
   * @property {array} [recurringScans.emails] Specifies an array of e-mail
   * addresses to which the scan notification is sent.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ManagedInstanceVulnerabilityAssessment
   *
   * @returns {object} metadata of ManagedInstanceVulnerabilityAssessment
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ManagedInstanceVulnerabilityAssessment',
      type: {
        name: 'Composite',
        className: 'ManagedInstanceVulnerabilityAssessment',
        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'
            }
          },
          storageContainerPath: {
            required: true,
            serializedName: 'properties.storageContainerPath',
            type: {
              name: 'String'
            }
          },
          storageContainerSasKey: {
            required: false,
            serializedName: 'properties.storageContainerSasKey',
            type: {
              name: 'String'
            }
          },
          storageAccountAccessKey: {
            required: false,
            serializedName: 'properties.storageAccountAccessKey',
            type: {
              name: 'String'
            }
          },
          recurringScans: {
            required: false,
            serializedName: 'properties.recurringScans',
            type: {
              name: 'Composite',
              className: 'VulnerabilityAssessmentRecurringScansProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = ManagedInstanceVulnerabilityAssessment;
