|
3 | 3 | // See the LICENSE file in the project root for more information
|
4 | 4 |
|
5 | 5 | using System.Collections.Frozen;
|
6 |
| -using System.ComponentModel.DataAnnotations; |
7 |
| -using Elastic.Markdown.Suggestions; |
| 6 | +using Elastic.Documentation.Configuration.Builder; |
| 7 | +using Elastic.Documentation.Configuration.Suggestions; |
8 | 8 | using YamlDotNet.Core;
|
9 | 9 | using YamlDotNet.Core.Events;
|
10 | 10 | using YamlDotNet.Serialization;
|
11 | 11 |
|
12 | 12 | namespace Elastic.Markdown.Myst.FrontMatter;
|
13 | 13 |
|
14 |
| -public record Product(string Id, string DisplayName); |
15 |
| - |
16 |
| -public static class Products |
17 |
| -{ |
18 |
| - public static FrozenSet<Product> All { get; } = [ |
19 |
| - new("apm", "APM"), |
20 |
| - new("apm-dotnet-agent", "APM .NET Agent"), |
21 |
| - new("apm-android-agent", "APM Android Agent"), |
22 |
| - new("apm-attacher", "APM Attacher"), |
23 |
| - new("apm-aws-lambda-extension", "APM AWS Lambda extension"), |
24 |
| - new("apm-go-agent", "APM Go Agent"), |
25 |
| - new("apm-ios-agent", "APM iOS Agent"), |
26 |
| - new("apm-java-agent", "APM Java Agent"), |
27 |
| - new("apm-node-agent", "APM Node.js Agent"), |
28 |
| - new("apm-php-agent", "APM PHP Agent"), |
29 |
| - new("apm-python-agent", "APM Python Agent"), |
30 |
| - new("apm-ruby-agent", "APM Ruby Agent"), |
31 |
| - new("apm-rum-agent", "APM RUM Agent"), |
32 |
| - new("beats-logging-plugin", "Beats Logging plugin"), |
33 |
| - new("cloud-control-ecctl", "Cloud Control ECCTL"), |
34 |
| - new("cloud-enterprise", "Cloud Enterprise"), |
35 |
| - new("cloud-hosted", "Cloud Hosted"), |
36 |
| - new("cloud-kubernetes", "Cloud Kubernetes"), |
37 |
| - new("cloud-native-ingest", "Cloud Native Ingest"), |
38 |
| - new("cloud-serverless", "Cloud Serverless"), |
39 |
| - new("cloud-terraform", "Cloud Terraform"), |
40 |
| - new("ecs-logging", "ECS Logging"), |
41 |
| - new("ecs-logging-dotnet", "ECS Logging .NET"), |
42 |
| - new("ecs-logging-go-logrus", "ECS Logging Go Logrus"), |
43 |
| - new("ecs-logging-go-zap", "ECS Logging Go Zap"), |
44 |
| - new("ecs-logging-go-zerolog", "ECS Logging Go Zerolog"), |
45 |
| - new("ecs-logging-java", "ECS Logging Java"), |
46 |
| - new("ecs-logging-node", "ECS Logging Node.js"), |
47 |
| - new("ecs-logging-php", "ECS Logging PHP"), |
48 |
| - new("ecs-logging-python", "ECS Logging Python"), |
49 |
| - new("ecs-logging-ruby", "ECS Logging Ruby"), |
50 |
| - new("elastic-agent", "Elastic Agent"), |
51 |
| - new("ecs", "Elastic Common Schema (ECS)"), |
52 |
| - new("elastic-products-platform", "Elastic Products platform"), |
53 |
| - new("elastic-stack", "Elastic Stack"), |
54 |
| - new("elasticsearch", "Elasticsearch"), |
55 |
| - new("elasticsearch-dotnet-client", "Elasticsearch .NET Client"), |
56 |
| - new("elasticsearch-apache-hadoop", "Elasticsearch Apache Hadoop"), |
57 |
| - new("elasticsearch-cloud-hosted-heroku", "Elasticsearch Cloud Hosted Heroku"), |
58 |
| - new("elasticsearch-community-clients", "Elasticsearch community clients"), |
59 |
| - new("elasticsearch-curator", "Elasticsearch Curator"), |
60 |
| - new("elasticsearch-eland-python-client", "Elasticsearch Eland Python Client"), |
61 |
| - new("elasticsearch-go-client", "Elasticsearch Go Client"), |
62 |
| - new("elasticsearch-groovy-client", "Elasticsearch Groovy Client"), |
63 |
| - new("elasticsearch-java-client", "Elasticsearch Java Client"), |
64 |
| - new("elasticsearch-java-script-client", "Elasticsearch JavaScript Client"), |
65 |
| - new("elasticsearch-painless-scripting-language", "Elasticsearch Painless scripting language"), |
66 |
| - new("elasticsearch-perl-client", "Elasticsearch Perl Client"), |
67 |
| - new("elasticsearch-php-client", "Elasticsearch PHP Client"), |
68 |
| - new("elasticsearch-plugins", "Elasticsearch plugins"), |
69 |
| - new("elasticsearch-python-client", "Elasticsearch Python Client"), |
70 |
| - new("elasticsearch-resiliency-status", "Elasticsearch Resiliency Status"), |
71 |
| - new("elasticsearch-ruby-client", "Elasticsearch Ruby Client"), |
72 |
| - new("elasticsearch-rust-client", "Elasticsearch Rust Client"), |
73 |
| - new("fleet", "Fleet"), |
74 |
| - new("ingest", "Ingest"), |
75 |
| - new("integrations", "Integrations"), |
76 |
| - new("kibana", "Kibana"), |
77 |
| - new("logstash", "Logstash"), |
78 |
| - new("machine-learning", "Machine Learning"), |
79 |
| - new("observability", "Observability"), |
80 |
| - new("reference-architectures", "Reference Architectures"), |
81 |
| - new("search-ui", "Search UI"), |
82 |
| - new("security", "Security"), |
83 |
| - new("edot-collector", "Elastic Distribution of OpenTelemetry Collector"), |
84 |
| - new("edot-java", "Elastic Distribution of OpenTelemetry Java"), |
85 |
| - new("edot-dotnet", "Elastic Distribution of OpenTelemetry .NET"), |
86 |
| - new("edot-nodejs", "Elastic Distribution of OpenTelemetry Node.js"), |
87 |
| - new("edot-php", "Elastic Distribution of OpenTelemetry PHP"), |
88 |
| - new("edot-python", "Elastic Distribution of OpenTelemetry Python"), |
89 |
| - new("edot-android", "Elastic Distribution of OpenTelemetry Android"), |
90 |
| - new("edot-ios", "Elastic Distribution of OpenTelemetry iOS") |
91 |
| - ]; |
92 |
| - |
93 |
| - public static FrozenDictionary<string, Product> AllById { get; } = All.ToDictionary(p => p.Id, StringComparer.Ordinal).ToFrozenDictionary(); |
94 |
| -} |
95 |
| - |
96 | 14 | public class ProductConverter : IYamlTypeConverter
|
97 | 15 | {
|
98 | 16 | public bool Accepts(Type type) => type == typeof(Product);
|
|
0 commit comments