/*
 * 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 version.
 *
 * @extends models['Resource']
 */
class WorkflowVersion extends models['Resource'] {
  /**
   * Create a WorkflowVersion.
   * @property {date} [createdTime] Gets the created time.
   * @property {date} [changedTime] Gets the changed time.
   * @property {string} [state] The state. Possible values include:
   * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended'
   * @property {string} [version] Gets the version.
   * @property {string} [accessEndpoint] Gets the access endpoint.
   * @property {object} [sku] The sku.
   * @property {string} [sku.name] The name. Possible values include:
   * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium'
   * @property {object} [sku.plan] The reference to plan.
   * @property {string} [sku.plan.id] The resource id.
   * @property {string} [sku.plan.name] Gets the resource name.
   * @property {string} [sku.plan.type] Gets the resource type.
   * @property {object} [integrationAccount] The integration account.
   * @property {string} [integrationAccount.id] The resource id.
   * @property {string} [integrationAccount.name] Gets the resource name.
   * @property {string} [integrationAccount.type] Gets the resource type.
   * @property {object} [definition] The definition.
   * @property {object} [parameters] The parameters.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of WorkflowVersion
   *
   * @returns {object} metadata of WorkflowVersion
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'WorkflowVersion',
      type: {
        name: 'Composite',
        className: 'WorkflowVersion',
        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'
                  }
              }
            }
          },
          createdTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdTime',
            type: {
              name: 'DateTime'
            }
          },
          changedTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.changedTime',
            type: {
              name: 'DateTime'
            }
          },
          state: {
            required: false,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          version: {
            required: false,
            readOnly: true,
            serializedName: 'properties.version',
            type: {
              name: 'String'
            }
          },
          accessEndpoint: {
            required: false,
            readOnly: true,
            serializedName: 'properties.accessEndpoint',
            type: {
              name: 'String'
            }
          },
          sku: {
            required: false,
            serializedName: 'properties.sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          },
          integrationAccount: {
            required: false,
            serializedName: 'properties.integrationAccount',
            type: {
              name: 'Composite',
              className: 'ResourceReference'
            }
          },
          definition: {
            required: false,
            serializedName: 'properties.definition',
            type: {
              name: 'Object'
            }
          },
          parameters: {
            required: false,
            serializedName: 'properties.parameters',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'WorkflowParameterElementType',
                  type: {
                    name: 'Composite',
                    className: 'WorkflowParameter'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = WorkflowVersion;
