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

/**
 * Definition of the Dsc Compilation job.
 *
 * @extends models['ProxyResource']
 */
class DscCompilationJob extends models['ProxyResource'] {
  /**
   * Create a DscCompilationJob.
   * @member {object} [configuration] Gets or sets the configuration.
   * @member {string} [configuration.name] Gets or sets the name of the Dsc
   * configuration.
   * @member {string} [startedBy] Gets the compilation job started by.
   * @member {uuid} [jobId] Gets the id of the job.
   * @member {date} [creationTime] Gets the creation time of the job.
   * @member {string} [provisioningState] The current provisioning state of the
   * job. Possible values include: 'Failed', 'Succeeded', 'Suspended',
   * 'Processing'
   * @member {string} [runOn] Gets or sets the runOn which specifies the group
   * name where the job is to be executed.
   * @member {string} [status] Gets or sets the status of the job. Possible
   * values include: 'New', 'Activating', 'Running', 'Completed', 'Failed',
   * 'Stopped', 'Blocked', 'Suspended', 'Disconnected', 'Suspending',
   * 'Stopping', 'Resuming', 'Removing'
   * @member {string} [statusDetails] Gets or sets the status details of the
   * job.
   * @member {date} [startTime] Gets the start time of the job.
   * @member {date} [endTime] Gets the end time of the job.
   * @member {string} [exception] Gets the exception of the job.
   * @member {date} [lastModifiedTime] Gets the last modified time of the job.
   * @member {date} [lastStatusModifiedTime] Gets the last status modified time
   * of the job.
   * @member {object} [parameters] Gets or sets the parameters of the job.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DscCompilationJob
   *
   * @returns {object} metadata of DscCompilationJob
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DscCompilationJob',
      type: {
        name: 'Composite',
        className: 'DscCompilationJob',
        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'
            }
          },
          configuration: {
            required: false,
            serializedName: 'properties.configuration',
            type: {
              name: 'Composite',
              className: 'DscConfigurationAssociationProperty'
            }
          },
          startedBy: {
            required: false,
            readOnly: true,
            serializedName: 'properties.startedBy',
            type: {
              name: 'String'
            }
          },
          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'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          runOn: {
            required: false,
            serializedName: 'properties.runOn',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'properties.status',
            type: {
              name: 'String'
            }
          },
          statusDetails: {
            required: false,
            serializedName: 'properties.statusDetails',
            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'
            }
          },
          exception: {
            required: false,
            readOnly: true,
            serializedName: 'properties.exception',
            type: {
              name: 'String'
            }
          },
          lastModifiedTime: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.lastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          lastStatusModifiedTime: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'properties.lastStatusModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          parameters: {
            required: false,
            serializedName: 'properties.parameters',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DscCompilationJob;
