=begin
#CoinAPI Market Data REST API

#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: v1
Contact: support@apibricks.io
Generated by: https://openapi-generator.tech
Generator version: 7.14.0

=end

require 'cgi'

module OpenapiClient
  class MetricsV2Api
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end
    # Historical metrics for the asset
    # Get asset metrics history.
    # @param metric_id [String] Metric identifier (e.g., &#x60;TVL&#x60;, &#x60;STABLES_BRIDGED_USD&#x60;)
    # @param asset_id [String] Asset identifier (e.g., &#x60;USDC&#x60;, &#x60;USDT&#x60;)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;1MIN&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1MIN&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<Object>]
    def v2_metrics_asset_history_get(metric_id, asset_id, opts = {})
      data, _status_code, _headers = v2_metrics_asset_history_get_with_http_info(metric_id, asset_id, opts)
      data
    end

    # Historical metrics for the asset
    # Get asset metrics history.
    # @param metric_id [String] Metric identifier (e.g., &#x60;TVL&#x60;, &#x60;STABLES_BRIDGED_USD&#x60;)
    # @param asset_id [String] Asset identifier (e.g., &#x60;USDC&#x60;, &#x60;USDT&#x60;)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;1MIN&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1MIN&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
    def v2_metrics_asset_history_get_with_http_info(metric_id, asset_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV2Api.v2_metrics_asset_history_get ...'
      end
      # verify the required parameter 'metric_id' is set
      if @api_client.config.client_side_validation && metric_id.nil?
        fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsV2Api.v2_metrics_asset_history_get"
      end
      # verify the required parameter 'asset_id' is set
      if @api_client.config.client_side_validation && asset_id.nil?
        fail ArgumentError, "Missing the required parameter 'asset_id' when calling MetricsV2Api.v2_metrics_asset_history_get"
      end
      # resource path
      local_var_path = '/v2/metrics/asset/history'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = metric_id
      query_params[:'asset_id'] = asset_id
      query_params[:'time_start'] = opts[:'time_start'] if !opts[:'time_start'].nil?
      query_params[:'time_end'] = opts[:'time_end'] if !opts[:'time_end'].nil?
      query_params[:'time_format'] = opts[:'time_format'] if !opts[:'time_format'].nil?
      query_params[:'period_id'] = opts[:'period_id'] if !opts[:'period_id'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Object>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV2Api.v2_metrics_asset_history_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV2Api#v2_metrics_asset_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of metrics available for specific asset
    # Get all metrics that are actually available for the specified asset.
    # @param asset_id [String] Asset identifier (e.g., USDC, USDT)
    # @param [Hash] opts the optional parameters
    # @return [Array<V1MetricInfo>]
    def v2_metrics_asset_listing_get(asset_id, opts = {})
      data, _status_code, _headers = v2_metrics_asset_listing_get_with_http_info(asset_id, opts)
      data
    end

    # Listing of metrics available for specific asset
    # Get all metrics that are actually available for the specified asset.
    # @param asset_id [String] Asset identifier (e.g., USDC, USDT)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1MetricInfo>, Integer, Hash)>] Array<V1MetricInfo> data, response status code and response headers
    def v2_metrics_asset_listing_get_with_http_info(asset_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV2Api.v2_metrics_asset_listing_get ...'
      end
      # verify the required parameter 'asset_id' is set
      if @api_client.config.client_side_validation && asset_id.nil?
        fail ArgumentError, "Missing the required parameter 'asset_id' when calling MetricsV2Api.v2_metrics_asset_listing_get"
      end
      # resource path
      local_var_path = '/v2/metrics/asset/listing'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'asset_id'] = asset_id

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1MetricInfo>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV2Api.v2_metrics_asset_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV2Api#v2_metrics_asset_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Historical metrics for the chain
    # Get chain metrics history.
    # @param metric_id [String] Metric identifier (e.g., &#x60;TVL&#x60;, &#x60;STABLES_BRIDGED_USD&#x60;)
    # @param chain_id [String] Chain identifier (e.g., &#x60;Ethereum&#x60;, &#x60;Arbitrum&#x60;)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;1MIN&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1MIN&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<Object>]
    def v2_metrics_chain_history_get(metric_id, chain_id, opts = {})
      data, _status_code, _headers = v2_metrics_chain_history_get_with_http_info(metric_id, chain_id, opts)
      data
    end

    # Historical metrics for the chain
    # Get chain metrics history.
    # @param metric_id [String] Metric identifier (e.g., &#x60;TVL&#x60;, &#x60;STABLES_BRIDGED_USD&#x60;)
    # @param chain_id [String] Chain identifier (e.g., &#x60;Ethereum&#x60;, &#x60;Arbitrum&#x60;)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;1MIN&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1MIN&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
    def v2_metrics_chain_history_get_with_http_info(metric_id, chain_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV2Api.v2_metrics_chain_history_get ...'
      end
      # verify the required parameter 'metric_id' is set
      if @api_client.config.client_side_validation && metric_id.nil?
        fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsV2Api.v2_metrics_chain_history_get"
      end
      # verify the required parameter 'chain_id' is set
      if @api_client.config.client_side_validation && chain_id.nil?
        fail ArgumentError, "Missing the required parameter 'chain_id' when calling MetricsV2Api.v2_metrics_chain_history_get"
      end
      # resource path
      local_var_path = '/v2/metrics/chain/history'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = metric_id
      query_params[:'chain_id'] = chain_id
      query_params[:'time_start'] = opts[:'time_start'] if !opts[:'time_start'].nil?
      query_params[:'time_end'] = opts[:'time_end'] if !opts[:'time_end'].nil?
      query_params[:'time_format'] = opts[:'time_format'] if !opts[:'time_format'].nil?
      query_params[:'period_id'] = opts[:'period_id'] if !opts[:'period_id'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Object>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV2Api.v2_metrics_chain_history_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV2Api#v2_metrics_chain_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of metrics available for specific chain
    # Get all metrics that are actually available for the specified blockchain chain.
    # @param chain_id [String] Chain identifier (e.g., ETHEREUM, ARBITRUM)
    # @param [Hash] opts the optional parameters
    # @return [Array<V1MetricInfo>]
    def v2_metrics_chain_listing_get(chain_id, opts = {})
      data, _status_code, _headers = v2_metrics_chain_listing_get_with_http_info(chain_id, opts)
      data
    end

    # Listing of metrics available for specific chain
    # Get all metrics that are actually available for the specified blockchain chain.
    # @param chain_id [String] Chain identifier (e.g., ETHEREUM, ARBITRUM)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1MetricInfo>, Integer, Hash)>] Array<V1MetricInfo> data, response status code and response headers
    def v2_metrics_chain_listing_get_with_http_info(chain_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV2Api.v2_metrics_chain_listing_get ...'
      end
      # verify the required parameter 'chain_id' is set
      if @api_client.config.client_side_validation && chain_id.nil?
        fail ArgumentError, "Missing the required parameter 'chain_id' when calling MetricsV2Api.v2_metrics_chain_listing_get"
      end
      # resource path
      local_var_path = '/v2/metrics/chain/listing'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'chain_id'] = chain_id

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1MetricInfo>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV2Api.v2_metrics_chain_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV2Api#v2_metrics_chain_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Historical metrics for the exchange
    # Get exchange metrics history.
    # @param metric_id [String] Metric identifier (e.g., &#x60;TVL&#x60;, &#x60;STABLES_BRIDGED_USD&#x60;)
    # @param exchange_id [String] Exchange identifier (e.g., &#x60;BINANCE&#x60;, &#x60;UNISWAP-V3-ETHEREUM&#x60;)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;1MIN&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1MIN&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<Object>]
    def v2_metrics_exchange_history_get(metric_id, exchange_id, opts = {})
      data, _status_code, _headers = v2_metrics_exchange_history_get_with_http_info(metric_id, exchange_id, opts)
      data
    end

    # Historical metrics for the exchange
    # Get exchange metrics history.
    # @param metric_id [String] Metric identifier (e.g., &#x60;TVL&#x60;, &#x60;STABLES_BRIDGED_USD&#x60;)
    # @param exchange_id [String] Exchange identifier (e.g., &#x60;BINANCE&#x60;, &#x60;UNISWAP-V3-ETHEREUM&#x60;)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;1MIN&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1MIN&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
    def v2_metrics_exchange_history_get_with_http_info(metric_id, exchange_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV2Api.v2_metrics_exchange_history_get ...'
      end
      # verify the required parameter 'metric_id' is set
      if @api_client.config.client_side_validation && metric_id.nil?
        fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsV2Api.v2_metrics_exchange_history_get"
      end
      # verify the required parameter 'exchange_id' is set
      if @api_client.config.client_side_validation && exchange_id.nil?
        fail ArgumentError, "Missing the required parameter 'exchange_id' when calling MetricsV2Api.v2_metrics_exchange_history_get"
      end
      # resource path
      local_var_path = '/v2/metrics/exchange/history'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = metric_id
      query_params[:'exchange_id'] = exchange_id
      query_params[:'time_start'] = opts[:'time_start'] if !opts[:'time_start'].nil?
      query_params[:'time_end'] = opts[:'time_end'] if !opts[:'time_end'].nil?
      query_params[:'time_format'] = opts[:'time_format'] if !opts[:'time_format'].nil?
      query_params[:'period_id'] = opts[:'period_id'] if !opts[:'period_id'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<Object>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV2Api.v2_metrics_exchange_history_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV2Api#v2_metrics_exchange_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of metrics available for specific exchange
    # Get all metrics that are actually available for the specified exchange.
    # @param exchange_id [String] Exchange identifier (e.g., BINANCE, UNISWAP-V3-ETHEREUM)
    # @param [Hash] opts the optional parameters
    # @return [Array<V1MetricInfo>]
    def v2_metrics_exchange_listing_get(exchange_id, opts = {})
      data, _status_code, _headers = v2_metrics_exchange_listing_get_with_http_info(exchange_id, opts)
      data
    end

    # Listing of metrics available for specific exchange
    # Get all metrics that are actually available for the specified exchange.
    # @param exchange_id [String] Exchange identifier (e.g., BINANCE, UNISWAP-V3-ETHEREUM)
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1MetricInfo>, Integer, Hash)>] Array<V1MetricInfo> data, response status code and response headers
    def v2_metrics_exchange_listing_get_with_http_info(exchange_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV2Api.v2_metrics_exchange_listing_get ...'
      end
      # verify the required parameter 'exchange_id' is set
      if @api_client.config.client_side_validation && exchange_id.nil?
        fail ArgumentError, "Missing the required parameter 'exchange_id' when calling MetricsV2Api.v2_metrics_exchange_listing_get"
      end
      # resource path
      local_var_path = '/v2/metrics/exchange/listing'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'exchange_id'] = exchange_id

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1MetricInfo>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV2Api.v2_metrics_exchange_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV2Api#v2_metrics_exchange_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of all supported metrics
    # Get all metrics available in the system.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1MetricInfo>]
    def v2_metrics_listing_get(opts = {})
      data, _status_code, _headers = v2_metrics_listing_get_with_http_info(opts)
      data
    end

    # Listing of all supported metrics
    # Get all metrics available in the system.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1MetricInfo>, Integer, Hash)>] Array<V1MetricInfo> data, response status code and response headers
    def v2_metrics_listing_get_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV2Api.v2_metrics_listing_get ...'
      end
      # resource path
      local_var_path = '/v2/metrics/listing'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1MetricInfo>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV2Api.v2_metrics_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV2Api#v2_metrics_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
