def metrics(options = {})
      batches = Enumerator.new do |y|
        resp = @client.list_metrics(options)
        resp.each_page do |page|
          batch = []
          page.data.metrics.each do |m|
            batch << Metric.new(
              namespace: m.namespace,
              name: m.metric_name,
              data: m,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Metric::Collection.new(batches)
    end
def metrics(options = {})
      batches = Enumerator.new do |y|
        resp = @client.list_metrics(options)
        resp.each_page do |page|
          batch = []
          page.data.metrics.each do |m|
            batch << Metric.new(
              namespace: m.namespace,
              name: m.metric_name,
              data: m,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Metric::Collection.new(batches)
    end
@example Request syntax with placeholder values

   metrics = cloud_watch.metrics({
     namespace: "Namespace",
     metric_name: "MetricName",
     dimensions: [
       {
         name: "DimensionName", # required
         value: "DimensionValue",
       },
     ],
   })
 @param [Hash] options ({})
 @option options [String] :namespace
   The namespace to filter against.
 @option options [String] :metric_name
   The name of the metric to filter against.
 @option options [Array<Types::DimensionFilter>] :dimensions
   The dimensions to filter against.
 @return [Metric::Collection]