Skip to content

Commit 4f60631

Browse files
codebrainrusscam
andauthored
Ignore experimental APIs from 7.6.0 (#4459)
This commit ignores the non-stable APIs that were brought in from ES upstream 7.x branch. It also replaces the usage of the Transform API methods with DoRequest calls as these are marked experimental and therefore not present in the generated client. Co-authored-by: Russ Cam <russ.cam@elastic.co>
1 parent 04ed38b commit 4f60631

12 files changed

+25
-880
lines changed

src/ApiGenerator/Configuration/CodeConfiguration.cs

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ public static class CodeConfiguration
2525
"ml.put_trained_model.json",
2626
"ml.explain_data_frame_analytics.json",
2727

28+
"transform.delete_transform.json",
29+
"transform.get_transform.json",
30+
"transform.get_transform_stats.json",
31+
"transform.preview_transform.json",
32+
"transform.put_transform.json",
33+
"transform.start_transform.json",
34+
"transform.stop_transform.json",
35+
"transform.update_transform.json",
36+
37+
"ml.set_upgrade_mode.json",
38+
"ml.find_file_structure.json",
39+
"ml.evaluate_data_frame.json",
40+
"ml.delete_data_frame_analytics.json",
41+
"ml.get_data_frame_analytics.json",
42+
"ml.get_data_frame_analytics_stats.json",
43+
"ml.put_data_frame_analytics.json",
44+
"ml.start_data_frame_analytics.json",
45+
"ml.stop_data_frame_analytics.json",
46+
47+
"get_script_context.json",
48+
"get_script_languages.json",
49+
2850
// Internal API,
2951
"monitoring.bulk.json",
3052

@@ -41,40 +63,10 @@ public static class CodeConfiguration
4163

4264
public static string[] IgnoredApisHighLevel { get; } = new []
4365
{
44-
"get_script_context.json",
45-
"get_script_languages.json",
4666
"scripts_painless_context.json",
4767
"security.get_builtin_privileges.json",
4868

49-
// these APIs are new and need to be mapped
50-
"transform.delete_transform.json",
51-
"transform.get_transform.json",
52-
"transform.get_transform_stats.json",
53-
"transform.preview_transform.json",
54-
"transform.put_transform.json",
55-
"transform.start_transform.json",
56-
"transform.stop_transform.json",
57-
"transform.update_transform.json",
58-
59-
"data_frame.delete_data_frame_transform.json",
60-
"data_frame.get_data_frame_transform.json",
61-
"data_frame.get_data_frame_transform_stats.json",
62-
"data_frame.preview_data_frame_transform.json",
63-
"data_frame.put_data_frame_transform.json",
64-
"data_frame.start_data_frame_transform.json",
65-
"data_frame.stop_data_frame_transform.json",
66-
"data_frame.update_data_frame_transform.json",
67-
6869
"ml.estimate_memory_usage.json",
69-
"ml.set_upgrade_mode.json",
70-
"ml.find_file_structure.json",
71-
"ml.evaluate_data_frame.json",
72-
"ml.delete_data_frame_analytics.json",
73-
"ml.get_data_frame_analytics.json",
74-
"ml.get_data_frame_analytics_stats.json",
75-
"ml.put_data_frame_analytics.json",
76-
"ml.start_data_frame_analytics.json",
77-
"ml.stop_data_frame_analytics.json",
7870
};
7971

8072

src/Elasticsearch.Net/Api/Enums.Generated.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -396,19 +396,6 @@ public enum IndicesShardStoresStatus
396396
All
397397
}
398398

399-
[StringEnum]
400-
public enum MachineLearningFindFileStructureFormat
401-
{
402-
[EnumMember(Value = "ndjson")]
403-
Ndjson,
404-
[EnumMember(Value = "xml")]
405-
Xml,
406-
[EnumMember(Value = "delimited")]
407-
Delimited,
408-
[EnumMember(Value = "semi_structured_text")]
409-
SemiStructuredText
410-
}
411-
412399
[StringEnum]
413400
public enum ThreadType
414401
{
@@ -469,7 +456,6 @@ static KnownEnums()
469456
EnumStringResolvers.TryAdd(typeof(SearchType), (e) => GetStringValue((SearchType)e));
470457
EnumStringResolvers.TryAdd(typeof(OpType), (e) => GetStringValue((OpType)e));
471458
EnumStringResolvers.TryAdd(typeof(IndicesShardStoresStatus), (e) => GetStringValue((IndicesShardStoresStatus)e));
472-
EnumStringResolvers.TryAdd(typeof(MachineLearningFindFileStructureFormat), (e) => GetStringValue((MachineLearningFindFileStructureFormat)e));
473459
EnumStringResolvers.TryAdd(typeof(ThreadType), (e) => GetStringValue((ThreadType)e));
474460
EnumStringResolvers.TryAdd(typeof(SuggestMode), (e) => GetStringValue((SuggestMode)e));
475461
EnumStringResolvers.TryAdd(typeof(GroupBy), (e) => GetStringValue((GroupBy)e));
@@ -924,23 +910,6 @@ public static string GetStringValue(this IndicesShardStoresStatus enumValue)
924910
throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'IndicesShardStoresStatus'");
925911
}
926912

927-
public static string GetStringValue(this MachineLearningFindFileStructureFormat enumValue)
928-
{
929-
switch (enumValue)
930-
{
931-
case MachineLearningFindFileStructureFormat.Ndjson:
932-
return "ndjson";
933-
case MachineLearningFindFileStructureFormat.Xml:
934-
return "xml";
935-
case MachineLearningFindFileStructureFormat.Delimited:
936-
return "delimited";
937-
case MachineLearningFindFileStructureFormat.SemiStructuredText:
938-
return "semi_structured_text";
939-
}
940-
941-
throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'MachineLearningFindFileStructureFormat'");
942-
}
943-
944913
public static string GetStringValue(this ThreadType enumValue)
945914
{
946915
switch (enumValue)

0 commit comments

Comments
 (0)