/*
 * 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 vulnerability assessment scan record.
 *
 * @extends models['ProxyResource']
 */
class VulnerabilityAssessmentScanRecord extends models['ProxyResource'] {
  /**
   * Create a VulnerabilityAssessmentScanRecord.
   * @property {string} [scanId] The scan ID.
   * @property {string} [triggerType] The scan trigger type. Possible values
   * include: 'OnDemand', 'Recurring'
   * @property {string} [state] The scan status. Possible values include:
   * 'Passed', 'Failed', 'FailedToRun', 'InProgress'
   * @property {date} [startTime] The scan start time (UTC).
   * @property {date} [endTime] The scan end time (UTC).
   * @property {array} [errors] The scan errors.
   * @property {string} [storageContainerPath] The scan results storage
   * container path.
   * @property {number} [numberOfFailedSecurityChecks] The number of failed
   * security checks.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VulnerabilityAssessmentScanRecord
   *
   * @returns {object} metadata of VulnerabilityAssessmentScanRecord
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VulnerabilityAssessmentScanRecord',
      type: {
        name: 'Composite',
        className: 'VulnerabilityAssessmentScanRecord',
        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'
            }
          },
          scanId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.scanId',
            type: {
              name: 'String'
            }
          },
          triggerType: {
            required: false,
            readOnly: true,
            serializedName: 'properties.triggerType',
            type: {
              name: 'String'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          startTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.endTime',
            type: {
              name: 'DateTime'
            }
          },
          errors: {
            required: false,
            readOnly: true,
            serializedName: 'properties.errors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VulnerabilityAssessmentScanErrorElementType',
                  type: {
                    name: 'Composite',
                    className: 'VulnerabilityAssessmentScanError'
                  }
              }
            }
          },
          storageContainerPath: {
            required: false,
            readOnly: true,
            serializedName: 'properties.storageContainerPath',
            type: {
              name: 'String'
            }
          },
          numberOfFailedSecurityChecks: {
            required: false,
            readOnly: true,
            serializedName: 'properties.numberOfFailedSecurityChecks',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = VulnerabilityAssessmentScanRecord;
