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

/**
 * Deployment dependency information.
 *
 */
class Dependency {
  /**
   * Create a Dependency.
   * @member {array} [dependsOn] The list of dependencies.
   * @member {string} [id] The ID of the dependency.
   * @member {string} [resourceType] The dependency resource type.
   * @member {string} [resourceName] The dependency resource name.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Dependency
   *
   * @returns {object} metadata of Dependency
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Dependency',
      type: {
        name: 'Composite',
        className: 'Dependency',
        modelProperties: {
          dependsOn: {
            required: false,
            serializedName: 'dependsOn',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'BasicDependencyElementType',
                  type: {
                    name: 'Composite',
                    className: 'BasicDependency'
                  }
              }
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          resourceType: {
            required: false,
            serializedName: 'resourceType',
            type: {
              name: 'String'
            }
          },
          resourceName: {
            required: false,
            serializedName: 'resourceName',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Dependency;
