top_metrics is a metric aggregation that does not support sub aggregations. Currently if you add sub aggregation they will be silently ignored. Instead it should throw an error reporting it to the user. It is very easy to reproduce by using the example in the docs:

```
POST /test/_bulk?refresh
{"index": {}}
{"s": 1, "m": 3.1415}
{"index": {}}
{"s": 2, "m": 1.0}
{"index": {}}
{"s": 3, "m": 2.71828}

POST /test/_search?filter_path=aggregations
{
  "aggs": {
    "tm": {
      "top_metrics": {
        "metrics": {"field": "m"},
        "sort": {"s": "desc"}
      },
      "aggs": {
        "min": {
          "min": {
            "field": "m"
          }
        }
      }
    }
  }
}
```
x-pack/plugin/analytics/src/test/java/org/elasticsearch/xpack/analytics/topmetrics/TopMetricsAggregationBuilderTests.java
protected TopMetricsAggregationBuilder mutateInstance(TopMetricsAggregationBuilder instance) {
        return null;
    }
    public void testClientBuilder() throws IOException {
        AbstractXContentTestCase.xContentTester(this::createParser, this::createTestInstance, this::toXContentThroughClientBuilder, p -> {
            p.nextToken();
            AggregatorFactories.Builder b = AggregatorFactories.parseAggregators(p);
            assertThat(b.getAggregatorFactories(), hasSize(1));
            assertThat(b.getPipelineAggregatorFactories(), empty());
            return (TopMetricsAggregationBuilder) b.getAggregatorFactories().iterator().next();
        }).test();
    }
    private void toXContentThroughClientBuilder(TopMetricsAggregationBuilder serverBuilder, XContentBuilder builder) throws IOException {
        builder.startObject();
        createClientBuilder(serverBuilder).toXContent(builder, ToXContent.EMPTY_PARAMS);
        builder.endObject();
    }
    private org.elasticsearch.client.analytics.TopMetricsAggregationBuilder createClientBuilder(
        TopMetricsAggregationBuilder serverBuilder
    ) {
        assertThat(serverBuilder.getSortBuilders(), hasSize(1));
        return new org.elasticsearch.client.analytics.TopMetricsAggregationBuilder(
            serverBuilder.getName(),
            serverBuilder.getSortBuilders().get(0),
            serverBuilder.getSize(),
            serverBuilder.getMetricFields().stream().map(MultiValuesSourceFieldConfig::getFieldName).toArray(String[]::new)
        );
    }
}