<commit_before>module Fog
  module Google
    class Monitoring
      ##
      # List metric descriptors that match the query. If the query is not set, then all of the metric descriptors
      # will be returned.
      #
      # @see https://cloud.google.com/monitoring/v2beta2/metricDescriptors/list
      class Real
        def list_metric_descriptors(options = {})
          api_method = @monitoring.metric_descriptors.list
          parameters = {
            "project" => @project
          }

          parameters["count"] = options[:count] if options.key?(:count)
          parameters["pageToken"] = options[:page_token] if options.key?(:page_token)
          parameters["query"] = options[:query] if options.key?(:query)

          request(api_method, parameters)
        end
      end

      class Mock
        def list_metric_descriptors(_options = {})
          body = {
            "kind" => 'cloudmonitoring#listMetricDescriptorsResponse',
            "metrics" => [<commit_msg>New format for list metric descriptors request<commit_after>module Fog
  module Google
    class Monitoring
      ##
      # List metric descriptors that match the query. If the query is not set, then all of the metric descriptors
      # will be returned.
      #
      # @see https://cloud.google.com/monitoring/v2beta2/metricDescriptors/list
      class Real
        def list_metric_descriptors(options = {})
          @monitoring.list_metric_descriptors(@project,
                                              nil,
                                              :count => options[:count],
                                              :page_token => options[:page_token],
                                              :query => options[:query])
        end
      end

      class Mock
        def list_metric_descriptors(_options = {})
          body = {
            "kind" => 'cloudmonitoring#listMetricDescriptorsResponse',
            "metrics" => [
{'fraction_non_alphanumeric': 0.08997429305912596, 'fraction_numerical': 0.002056555269922879, 'mean_word_length': 1.8243831640058055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4262768', 'n_tokens_mistral': 470, 'n_tokens_neox': 471, 'n_words': 121}