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

/**
 * Job collection item properties.
 *
 * @extends models['ProxyResource']
 */
class JobCollectionItem extends models['ProxyResource'] {
  /**
   * Create a JobCollectionItem.
   * @member {object} [runbook] The runbook association.
   * @member {string} [runbook.name] Gets or sets the name of the runbook.
   * @member {uuid} [jobId] The id of the job.
   * @member {date} [creationTime] The creation time of the job.
   * @member {string} [status] The status of the job. Possible values include:
   * 'New', 'Activating', 'Running', 'Completed', 'Failed', 'Stopped',
   * 'Blocked', 'Suspended', 'Disconnected', 'Suspending', 'Stopping',
   * 'Resuming', 'Removing'
   * @member {date} [startTime] The start time of the job.
   * @member {date} [endTime] The end time of the job.
   * @member {date} [lastModifiedTime] The last modified time of the job.
   * @member {string} [provisioningState] The provisioning state of a resource.
   * @member {string} [runOn] Specifies the runOn group name where the job was
   * executed.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of JobCollectionItem
   *
   * @returns {object} metadata of JobCollectionItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'JobCollectionItem',
      type: {
        name: 'Composite',
        className: 'JobCollectionItem',
        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'
            }
          },
          runbook: {
            required: false,
            readOnly: true,
            serializedName: 'properties.runbook',
            type: {
              name: 'Composite',
              className: 'RunbookAssociationProperty'
            }
          },
          jobId: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.jobId',
            type: {
              name: 'String'
            }
          },
          creationTime: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.creationTime',
            type: {
              name: 'DateTime'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'properties.status',
            type: {
              name: 'String'
            }
          },
          startTime: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'properties.startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'properties.endTime',
            type: {
              name: 'DateTime'
            }
          },
          lastModifiedTime: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'properties.lastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          runOn: {
            required: false,
            serializedName: 'properties.runOn',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = JobCollectionItem;
