/*
 * 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 information.
 *
 * @extends models['BaseResource']
 */
class DeploymentExtended extends models['BaseResource'] {
  /**
   * Create a DeploymentExtended.
   * @property {string} [id] The ID of the deployment.
   * @property {string} [name] The name of the deployment.
   * @property {string} [type] The type of the deployment.
   * @property {string} [location] the location of the deployment.
   * @property {object} [properties] Deployment properties.
   * @property {string} [properties.provisioningState] The state of the
   * provisioning.
   * @property {string} [properties.correlationId] The correlation ID of the
   * deployment.
   * @property {date} [properties.timestamp] The timestamp of the template
   * deployment.
   * @property {object} [properties.outputs] Key/value pairs that represent
   * deployment output.
   * @property {array} [properties.providers] The list of resource providers
   * needed for the deployment.
   * @property {array} [properties.dependencies] The list of deployment
   * dependencies.
   * @property {object} [properties.template] The template content. Use only
   * one of Template or TemplateLink.
   * @property {object} [properties.templateLink] The URI referencing the
   * template. Use only one of Template or TemplateLink.
   * @property {string} [properties.templateLink.uri] The URI of the template
   * to deploy.
   * @property {string} [properties.templateLink.contentVersion] If included,
   * must match the ContentVersion in the template.
   * @property {object} [properties.parameters] Deployment parameters. Use only
   * one of Parameters or ParametersLink.
   * @property {object} [properties.parametersLink] The URI referencing the
   * parameters. Use only one of Parameters or ParametersLink.
   * @property {string} [properties.parametersLink.uri] The URI of the
   * parameters file.
   * @property {string} [properties.parametersLink.contentVersion] If included,
   * must match the ContentVersion in the template.
   * @property {string} [properties.mode] The deployment mode. Possible values
   * are Incremental and Complete. Possible values include: 'Incremental',
   * 'Complete'
   * @property {object} [properties.debugSetting] The debug setting of the
   * deployment.
   * @property {string} [properties.debugSetting.detailLevel] Specifies the
   * type of information to log for debugging. The permitted values are none,
   * requestContent, responseContent, or both requestContent and
   * responseContent separated by a comma. The default is none. When setting
   * this value, carefully consider the type of information you are passing in
   * during deployment. By logging information about the request or response,
   * you could potentially expose sensitive data that is retrieved through the
   * deployment operations.
   * @property {object} [properties.onErrorDeployment] The deployment on error
   * behavior.
   * @property {string} [properties.onErrorDeployment.provisioningState] The
   * state of the provisioning for the on error deployment.
   * @property {string} [properties.onErrorDeployment.type] The deployment on
   * error behavior type. Possible values are LastSuccessful and
   * SpecificDeployment. Possible values include: 'LastSuccessful',
   * 'SpecificDeployment'
   * @property {string} [properties.onErrorDeployment.deploymentName] The
   * deployment to be used on error case.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DeploymentExtended
   *
   * @returns {object} metadata of DeploymentExtended
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DeploymentExtended',
      type: {
        name: 'Composite',
        className: 'DeploymentExtended',
        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'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'DeploymentPropertiesExtended'
            }
          }
        }
      }
    };
  }
}

module.exports = DeploymentExtended;
