/*
 * 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 request history.
 *
 */
class RequestHistoryProperties {
  /**
   * Create a RequestHistoryProperties.
   * @property {date} [startTime] The time the request started.
   * @property {date} [endTime] The time the request ended.
   * @property {object} [request] The request.
   * @property {object} [request.headers] A list of all the headers attached to
   * the request.
   * @property {string} [request.uri] The destination for the request.
   * @property {string} [request.method] The HTTP method used for the request.
   * @property {object} [response] The response.
   * @property {object} [response.headers] A list of all the headers attached
   * to the response.
   * @property {number} [response.statusCode] The status code of the response.
   * @property {object} [response.bodyLink] Details on the location of the body
   * content.
   * @property {string} [response.bodyLink.uri] The content link URI.
   * @property {string} [response.bodyLink.contentVersion] The content version.
   * @property {number} [response.bodyLink.contentSize] The content size.
   * @property {object} [response.bodyLink.contentHash] The content hash.
   * @property {string} [response.bodyLink.contentHash.algorithm] The algorithm
   * of the content hash.
   * @property {string} [response.bodyLink.contentHash.value] The value of the
   * content hash.
   * @property {object} [response.bodyLink.metadata] The metadata.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RequestHistoryProperties
   *
   * @returns {object} metadata of RequestHistoryProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RequestHistoryProperties',
      type: {
        name: 'Composite',
        className: 'RequestHistoryProperties',
        modelProperties: {
          startTime: {
            required: false,
            serializedName: 'startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            serializedName: 'endTime',
            type: {
              name: 'DateTime'
            }
          },
          request: {
            required: false,
            serializedName: 'request',
            type: {
              name: 'Composite',
              className: 'Request'
            }
          },
          response: {
            required: false,
            serializedName: 'response',
            type: {
              name: 'Composite',
              className: 'Response'
            }
          }
        }
      }
    };
  }
}

module.exports = RequestHistoryProperties;
