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

/**
 * This class represents the virtual machine task details.
 *
 * @extends models['TaskTypeDetails']
 */
class VirtualMachineTaskDetails extends models['TaskTypeDetails'] {
  /**
   * Create a VirtualMachineTaskDetails.
   * @member {string} [skippedReason] The skipped reason.
   * @member {string} [skippedReasonString] The skipped reason string.
   * @member {object} [jobTask] The job entity.
   * @member {string} [jobTask.jobId] The job id.
   * @member {string} [jobTask.jobFriendlyName] The job display name.
   * @member {string} [jobTask.targetObjectId] The object id.
   * @member {string} [jobTask.targetObjectName] The object name.
   * @member {string} [jobTask.targetInstanceType] The workflow affected object
   * type.
   * @member {string} [jobTask.jobScenarioName] The job name. Enum type
   * ScenarioName.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VirtualMachineTaskDetails
   *
   * @returns {object} metadata of VirtualMachineTaskDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VirtualMachineTaskDetails',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'TaskTypeDetails',
        className: 'VirtualMachineTaskDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          skippedReason: {
            required: false,
            serializedName: 'skippedReason',
            type: {
              name: 'String'
            }
          },
          skippedReasonString: {
            required: false,
            serializedName: 'skippedReasonString',
            type: {
              name: 'String'
            }
          },
          jobTask: {
            required: false,
            serializedName: 'jobTask',
            type: {
              name: 'Composite',
              className: 'JobEntity'
            }
          }
        }
      }
    };
  }
}

module.exports = VirtualMachineTaskDetails;
