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

/**
 * Details of a single deployment created by the remediation.
 *
 */
class RemediationDeployment {
  /**
   * Create a RemediationDeployment.
   * @property {string} [remediatedResourceId] Resource ID of the resource that
   * is being remediated by the deployment.
   * @property {string} [deploymentId] Resource ID of the template deployment
   * that will remediate the resource.
   * @property {string} [status] Status of the remediation deployment.
   * @property {string} [resourceLocation] Location of the resource that is
   * being remediated.
   * @property {object} [error] Error encountered while remediated the
   * resource.
   * @property {string} [error.code] Service specific error code which serves
   * as the substatus for the HTTP error code.
   * @property {string} [error.message] Description of the error.
   * @property {string} [error.target] The target of the error.
   * @property {array} [error.details] Internal error details.
   * @property {array} [error.additionalInfo] Additional scenario specific
   * error details.
   * @property {date} [createdOn] The time at which the remediation was
   * created.
   * @property {date} [lastUpdatedOn] The time at which the remediation
   * deployment was last updated.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RemediationDeployment
   *
   * @returns {object} metadata of RemediationDeployment
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RemediationDeployment',
      type: {
        name: 'Composite',
        className: 'RemediationDeployment',
        modelProperties: {
          remediatedResourceId: {
            required: false,
            readOnly: true,
            serializedName: 'remediatedResourceId',
            type: {
              name: 'String'
            }
          },
          deploymentId: {
            required: false,
            readOnly: true,
            serializedName: 'deploymentId',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          resourceLocation: {
            required: false,
            readOnly: true,
            serializedName: 'resourceLocation',
            type: {
              name: 'String'
            }
          },
          error: {
            required: false,
            readOnly: true,
            serializedName: 'error',
            type: {
              name: 'Composite',
              className: 'ErrorDefinition'
            }
          },
          createdOn: {
            required: false,
            readOnly: true,
            serializedName: 'createdOn',
            type: {
              name: 'DateTime'
            }
          },
          lastUpdatedOn: {
            required: false,
            readOnly: true,
            serializedName: 'lastUpdatedOn',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = RemediationDeployment;
