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

/**
 * The properties that define an Azure Deployment Manager step.
 *
 */
class Step {
  /**
   * Create a Step.
   * @member {string} name The name of the step group.
   * @member {array} [dependsOnStepGroups] The list of step group names on
   * which this step group depends on.
   * @member {array} [preDeploymentSteps] The list of steps to be run before
   * deploying the target.
   * @member {string} deploymentTargetId The resource Id of service unit to be
   * deployed. The service unit should be from the service topology referenced
   * in targetServiceTopologyId
   * @member {array} [postDeploymentSteps] The list of steps to be run after
   * deploying the target.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Step
   *
   * @returns {object} metadata of Step
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Step',
      type: {
        name: 'Composite',
        className: 'Step',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          dependsOnStepGroups: {
            required: false,
            serializedName: 'dependsOnStepGroups',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          preDeploymentSteps: {
            required: false,
            serializedName: 'preDeploymentSteps',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PrePostStepElementType',
                  type: {
                    name: 'Composite',
                    className: 'PrePostStep'
                  }
              }
            }
          },
          deploymentTargetId: {
            required: true,
            serializedName: 'deploymentTargetId',
            type: {
              name: 'String'
            }
          },
          postDeploymentSteps: {
            required: false,
            serializedName: 'postDeploymentSteps',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PrePostStepElementType',
                  type: {
                    name: 'Composite',
                    className: 'PrePostStep'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = Step;
