/*
 * 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 task details for an automation runbook.
 *
 * @extends models['TaskTypeDetails']
 */
class AutomationRunbookTaskDetails extends models['TaskTypeDetails'] {
  /**
   * Create a AutomationRunbookTaskDetails.
   * @member {string} [name] The recovery plan task name.
   * @member {string} [cloudServiceName] The cloud service of the automation
   * runbook account.
   * @member {string} [subscriptionId] The subscription Id of the automation
   * runbook account.
   * @member {string} [accountName] The automation account name of the runbook.
   * @member {string} [runbookId] The runbook Id.
   * @member {string} [runbookName] The runbook name.
   * @member {string} [jobId] The job Id of the runbook execution.
   * @member {string} [jobOutput] The execution output of the runbook.
   * @member {boolean} [isPrimarySideScript] A value indicating whether it is a
   * primary side script or not.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AutomationRunbookTaskDetails
   *
   * @returns {object} metadata of AutomationRunbookTaskDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AutomationRunbookTaskDetails',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'TaskTypeDetails',
        className: 'AutomationRunbookTaskDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          cloudServiceName: {
            required: false,
            serializedName: 'cloudServiceName',
            type: {
              name: 'String'
            }
          },
          subscriptionId: {
            required: false,
            serializedName: 'subscriptionId',
            type: {
              name: 'String'
            }
          },
          accountName: {
            required: false,
            serializedName: 'accountName',
            type: {
              name: 'String'
            }
          },
          runbookId: {
            required: false,
            serializedName: 'runbookId',
            type: {
              name: 'String'
            }
          },
          runbookName: {
            required: false,
            serializedName: 'runbookName',
            type: {
              name: 'String'
            }
          },
          jobId: {
            required: false,
            serializedName: 'jobId',
            type: {
              name: 'String'
            }
          },
          jobOutput: {
            required: false,
            serializedName: 'jobOutput',
            type: {
              name: 'String'
            }
          },
          isPrimarySideScript: {
            required: false,
            serializedName: 'isPrimarySideScript',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = AutomationRunbookTaskDetails;
