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

/**
 * Security task that we recommend to do in order to strengthen security
 *
 * @extends models['Resource']
 */
class SecurityTask extends models['Resource'] {
  /**
   * Create a SecurityTask.
   * @member {string} [state] State of the task (Active, Resolved etc.)
   * @member {date} [creationTimeUtc] The time this task was discovered in UTC
   * @member {object} [securityTaskParameters]
   * @member {string} [securityTaskParameters.name] Name of the task type
   * @member {date} [lastStateChangeTimeUtc] The time this task's details were
   * last changed in UTC
   * @member {string} [subState] Additional data on the state of the task
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SecurityTask
   *
   * @returns {object} metadata of SecurityTask
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SecurityTask',
      type: {
        name: 'Composite',
        className: 'SecurityTask',
        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'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          creationTimeUtc: {
            required: false,
            readOnly: true,
            serializedName: 'properties.creationTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          securityTaskParameters: {
            required: false,
            serializedName: 'properties.securityTaskParameters',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'SecurityTaskParameters'
            }
          },
          lastStateChangeTimeUtc: {
            required: false,
            readOnly: true,
            serializedName: 'properties.lastStateChangeTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          subState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.subState',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = SecurityTask;
