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

/**
 * Deployment operation information.
 *
 */
class DeploymentOperation {
  /**
   * Create a DeploymentOperation.
   * @property {string} [id] Full deployment operation ID.
   * @property {string} [operationId] Deployment operation ID.
   * @property {object} [properties] Deployment properties.
   * @property {string} [properties.provisioningState] The state of the
   * provisioning.
   * @property {date} [properties.timestamp] The date and time of the
   * operation.
   * @property {string} [properties.serviceRequestId] Deployment operation
   * service request id.
   * @property {string} [properties.statusCode] Operation status code.
   * @property {object} [properties.statusMessage] Operation status message.
   * @property {object} [properties.targetResource] The target resource.
   * @property {string} [properties.targetResource.id] The ID of the resource.
   * @property {string} [properties.targetResource.resourceName] The name of
   * the resource.
   * @property {string} [properties.targetResource.resourceType] The type of
   * the resource.
   * @property {object} [properties.request] The HTTP request message.
   * @property {object} [properties.request.content] HTTP message content.
   * @property {object} [properties.response] The HTTP response message.
   * @property {object} [properties.response.content] HTTP message content.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DeploymentOperation
   *
   * @returns {object} metadata of DeploymentOperation
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DeploymentOperation',
      type: {
        name: 'Composite',
        className: 'DeploymentOperation',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          operationId: {
            required: false,
            readOnly: true,
            serializedName: 'operationId',
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'DeploymentOperationProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = DeploymentOperation;
