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

/**
 * Information about an activity run in a pipeline.
 *
 */
class ActivityRun {
  /**
   * Create a ActivityRun.
   * @member {string} [pipelineName] The name of the pipeline.
   * @member {string} [pipelineRunId] The id of the pipeline run.
   * @member {string} [activityName] The name of the activity.
   * @member {string} [activityType] The type of the activity.
   * @member {string} [activityRunId] The id of the activity run.
   * @member {string} [linkedServiceName] The name of the compute linked
   * service.
   * @member {string} [status] The status of the activity run.
   * @member {date} [activityRunStart] The start time of the activity run in
   * 'ISO 8601' format.
   * @member {date} [activityRunEnd] The end time of the activity run in 'ISO
   * 8601' format.
   * @member {number} [durationInMs] The duration of the activity run.
   * @member {object} [input] The input for the activity.
   * @member {object} [output] The output for the activity.
   * @member {object} [error] The error if any from the activity run.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ActivityRun
   *
   * @returns {object} metadata of ActivityRun
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ActivityRun',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        className: 'ActivityRun',
        modelProperties: {
          pipelineName: {
            required: false,
            readOnly: true,
            serializedName: 'pipelineName',
            type: {
              name: 'String'
            }
          },
          pipelineRunId: {
            required: false,
            readOnly: true,
            serializedName: 'pipelineRunId',
            type: {
              name: 'String'
            }
          },
          activityName: {
            required: false,
            readOnly: true,
            serializedName: 'activityName',
            type: {
              name: 'String'
            }
          },
          activityType: {
            required: false,
            readOnly: true,
            serializedName: 'activityType',
            type: {
              name: 'String'
            }
          },
          activityRunId: {
            required: false,
            readOnly: true,
            serializedName: 'activityRunId',
            type: {
              name: 'String'
            }
          },
          linkedServiceName: {
            required: false,
            readOnly: true,
            serializedName: 'linkedServiceName',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          activityRunStart: {
            required: false,
            readOnly: true,
            serializedName: 'activityRunStart',
            type: {
              name: 'DateTime'
            }
          },
          activityRunEnd: {
            required: false,
            readOnly: true,
            serializedName: 'activityRunEnd',
            type: {
              name: 'DateTime'
            }
          },
          durationInMs: {
            required: false,
            readOnly: true,
            serializedName: 'durationInMs',
            type: {
              name: 'Number'
            }
          },
          input: {
            required: false,
            readOnly: true,
            serializedName: 'input',
            type: {
              name: 'Object'
            }
          },
          output: {
            required: false,
            readOnly: true,
            serializedName: 'output',
            type: {
              name: 'Object'
            }
          },
          error: {
            required: false,
            readOnly: true,
            serializedName: 'error',
            type: {
              name: 'Object'
            }
          }
        }
      }
    };
  }
}

module.exports = ActivityRun;
