/**
 * @fileoverview AUTOMATICALLY GENERATED service for API.Client.OrderBookL3Api.
 * Do not edit this file by hand or your changes will be lost next time it is
 * generated.
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 * Version: v1
* Generator version: 7.14.0
 * Generated by: org.openapitools.codegen.languages.JavascriptClosureAngularClientCodegen
 */
/**
 * @license MIT License
 * https://github.com/api-bricks/api-bricks-sdk/blob/master/LICENSE
 */

goog.provide('API.Client.OrderBookL3Api');

goog.require('API.Client.v1.OrderBookBase');

/**
 * @constructor
 * @param {!angular.$http} $http
 * @param {!Object} $httpParamSerializer
 * @param {!angular.$injector} $injector
 * @struct
 */
API.Client.OrderBookL3Api = function($http, $httpParamSerializer, $injector) {
  /** @private {!string} */
  this.basePath_ = $injector.has('OrderBookL3ApiBasePath') ?
                   /** @type {!string} */ ($injector.get('OrderBookL3ApiBasePath')) :
                   'https://rest.coinapi.io';

  /** @private {!Object<string, string>} */
  this.defaultHeaders_ = $injector.has('OrderBookL3ApiDefaultHeaders') ?
                   /** @type {!Object<string, string>} */ (
                       $injector.get('OrderBookL3ApiDefaultHeaders')) :
                   {};

  /** @private {!angular.$http} */
  this.http_ = $http;

  /** @package {!Object} */
  this.httpParamSerializer = $injector.get('$httpParamSerializer');
}
API.Client.OrderBookL3Api.$inject = ['$http', '$httpParamSerializer', '$injector'];

/**
 * Current order books
 * 
 * @param {!string=} opt_filterSymbolId Comma or semicolon delimited parts of symbol identifier used to filter the response.
 * @param {!number=} opt_limitLevels The maximum number of levels to include in the response.
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.v1.OrderBookBase>>}
 */
API.Client.OrderBookL3Api.prototype.v1Orderbooks3CurrentGet = function(opt_filterSymbolId, opt_limitLevels, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/orderbooks3/current';

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  if (opt_filterSymbolId !== undefined) {
    queryParameters['filter_symbol_id'] = opt_filterSymbolId;
  }

  if (opt_limitLevels !== undefined) {
    queryParameters['limit_levels'] = opt_limitLevels;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * Current order book by symbol_id
 * Retrieves the current order book for the specified symbol.
 * @param {!string} symbolId The symbol ID (from the Metadata -&gt; Symbols)
 * @param {!number=} opt_limitLevels The maximum number of levels to include in the response.
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!API.Client.v1.OrderBookBase>}
 */
API.Client.OrderBookL3Api.prototype.v1Orderbooks3SymbolIdCurrentGet = function(symbolId, opt_limitLevels, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/orderbooks3/{symbol_id}/current'
      .replace('{' + 'symbol_id' + '}', String(symbolId));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'symbolId' is set
  if (!symbolId) {
    throw new Error('Missing required parameter symbolId when calling v1Orderbooks3SymbolIdCurrentGet');
  }
  if (opt_limitLevels !== undefined) {
    queryParameters['limit_levels'] = opt_limitLevels;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}
