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

/**
 * The workflow run action repetition definition.
 *
 * @extends models['Resource']
 */
class WorkflowRunActionRepetitionDefinition extends models['Resource'] {
  /**
   * Create a WorkflowRunActionRepetitionDefinition.
   * @property {date} [startTime] The start time of the workflow scope
   * repetition.
   * @property {date} [endTime] The end time of the workflow scope repetition.
   * @property {object} [correlation] The correlation properties.
   * @property {string} [correlation.actionTrackingId] The action tracking
   * identifier.
   * @property {string} [status] The status of the workflow scope repetition.
   * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting',
   * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted',
   * 'TimedOut', 'Aborted', 'Ignored'
   * @property {string} [code] The workflow scope repetition code.
   * @property {object} [error]
   * @property {string} [trackingId] Gets the tracking id.
   * @property {object} [inputs] Gets the inputs.
   * @property {object} [inputsLink] Gets the link to inputs.
   * @property {string} [inputsLink.uri] The content link URI.
   * @property {string} [inputsLink.contentVersion] The content version.
   * @property {number} [inputsLink.contentSize] The content size.
   * @property {object} [inputsLink.contentHash] The content hash.
   * @property {string} [inputsLink.contentHash.algorithm] The algorithm of the
   * content hash.
   * @property {string} [inputsLink.contentHash.value] The value of the content
   * hash.
   * @property {object} [inputsLink.metadata] The metadata.
   * @property {object} [outputs] Gets the outputs.
   * @property {object} [outputsLink] Gets the link to outputs.
   * @property {string} [outputsLink.uri] The content link URI.
   * @property {string} [outputsLink.contentVersion] The content version.
   * @property {number} [outputsLink.contentSize] The content size.
   * @property {object} [outputsLink.contentHash] The content hash.
   * @property {string} [outputsLink.contentHash.algorithm] The algorithm of
   * the content hash.
   * @property {string} [outputsLink.contentHash.value] The value of the
   * content hash.
   * @property {object} [outputsLink.metadata] The metadata.
   * @property {object} [trackedProperties] Gets the tracked properties.
   * @property {array} [retryHistory] Gets the retry histories.
   * @property {number} [iterationCount]
   * @property {array} [repetitionIndexes] The repetition indexes.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of WorkflowRunActionRepetitionDefinition
   *
   * @returns {object} metadata of WorkflowRunActionRepetitionDefinition
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'WorkflowRunActionRepetitionDefinition',
      type: {
        name: 'Composite',
        className: 'WorkflowRunActionRepetitionDefinition',
        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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          startTime: {
            required: false,
            serializedName: 'properties.startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            serializedName: 'properties.endTime',
            type: {
              name: 'DateTime'
            }
          },
          correlation: {
            required: false,
            serializedName: 'properties.correlation',
            type: {
              name: 'Composite',
              className: 'RunActionCorrelation'
            }
          },
          status: {
            required: false,
            serializedName: 'properties.status',
            type: {
              name: 'String'
            }
          },
          code: {
            required: false,
            serializedName: 'properties.code',
            type: {
              name: 'String'
            }
          },
          error: {
            required: false,
            serializedName: 'properties.error',
            type: {
              name: 'Object'
            }
          },
          trackingId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.trackingId',
            type: {
              name: 'String'
            }
          },
          inputs: {
            required: false,
            readOnly: true,
            serializedName: 'properties.inputs',
            type: {
              name: 'Object'
            }
          },
          inputsLink: {
            required: false,
            readOnly: true,
            serializedName: 'properties.inputsLink',
            type: {
              name: 'Composite',
              className: 'ContentLink'
            }
          },
          outputs: {
            required: false,
            readOnly: true,
            serializedName: 'properties.outputs',
            type: {
              name: 'Object'
            }
          },
          outputsLink: {
            required: false,
            readOnly: true,
            serializedName: 'properties.outputsLink',
            type: {
              name: 'Composite',
              className: 'ContentLink'
            }
          },
          trackedProperties: {
            required: false,
            readOnly: true,
            serializedName: 'properties.trackedProperties',
            type: {
              name: 'Object'
            }
          },
          retryHistory: {
            required: false,
            serializedName: 'properties.retryHistory',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RetryHistoryElementType',
                  type: {
                    name: 'Composite',
                    className: 'RetryHistory'
                  }
              }
            }
          },
          iterationCount: {
            required: false,
            serializedName: 'properties.iterationCount',
            type: {
              name: 'Number'
            }
          },
          repetitionIndexes: {
            required: false,
            serializedName: 'properties.repetitionIndexes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RepetitionIndexElementType',
                  type: {
                    name: 'Composite',
                    className: 'RepetitionIndex'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = WorkflowRunActionRepetitionDefinition;
