Skip to content

Commit 09b33e8

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Expose use_legacy_search_syntax flag in the Observability Pipelines API (#3433)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 37270a8 commit 09b33e8

File tree

2 files changed

+55
-2
lines changed

2 files changed

+55
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37916,6 +37916,18 @@ components:
3791637916
items:
3791737917
$ref: '#/components/schemas/ObservabilityPipelineConfigSourceItem'
3791837918
type: array
37919+
use_legacy_search_syntax:
37920+
description: 'Set to `true` to continue using the legacy search syntax while
37921+
migrating filter queries. After migrating all queries to the new syntax,
37922+
set to `false`.
37923+
37924+
The legacy syntax is deprecated and will eventually be removed.
37925+
37926+
Requires Observability Pipelines Worker 2.11 or later.
37927+
37928+
See [Upgrade Your Filter Queries to the New Search Syntax](https://docs.datadoghq.com/observability_pipelines/guide/upgrade_your_filter_queries_to_the_new_search_syntax/)
37929+
for more information.'
37930+
type: boolean
3791937931
required:
3792037932
- sources
3792137933
- destinations

src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfig.java

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
ObservabilityPipelineConfig.JSON_PROPERTY_PIPELINE_TYPE,
2626
ObservabilityPipelineConfig.JSON_PROPERTY_PROCESSOR_GROUPS,
2727
ObservabilityPipelineConfig.JSON_PROPERTY_PROCESSORS,
28-
ObservabilityPipelineConfig.JSON_PROPERTY_SOURCES
28+
ObservabilityPipelineConfig.JSON_PROPERTY_SOURCES,
29+
ObservabilityPipelineConfig.JSON_PROPERTY_USE_LEGACY_SEARCH_SYNTAX
2930
})
3031
@jakarta.annotation.Generated(
3132
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
@@ -47,6 +48,9 @@ public class ObservabilityPipelineConfig {
4748
public static final String JSON_PROPERTY_SOURCES = "sources";
4849
private List<ObservabilityPipelineConfigSourceItem> sources = new ArrayList<>();
4950

51+
public static final String JSON_PROPERTY_USE_LEGACY_SEARCH_SYNTAX = "use_legacy_search_syntax";
52+
private Boolean useLegacySearchSyntax;
53+
5054
public ObservabilityPipelineConfig() {}
5155

5256
@JsonCreator
@@ -222,6 +226,32 @@ public void setSources(List<ObservabilityPipelineConfigSourceItem> sources) {
222226
this.sources = sources;
223227
}
224228

229+
public ObservabilityPipelineConfig useLegacySearchSyntax(Boolean useLegacySearchSyntax) {
230+
this.useLegacySearchSyntax = useLegacySearchSyntax;
231+
return this;
232+
}
233+
234+
/**
235+
* Set to <code>true</code> to continue using the legacy search syntax while migrating filter
236+
* queries. After migrating all queries to the new syntax, set to <code>false</code>. The legacy
237+
* syntax is deprecated and will eventually be removed. Requires Observability Pipelines Worker
238+
* 2.11 or later. See <a
239+
* href="https://docs.datadoghq.com/observability_pipelines/guide/upgrade_your_filter_queries_to_the_new_search_syntax/">Upgrade
240+
* Your Filter Queries to the New Search Syntax</a> for more information.
241+
*
242+
* @return useLegacySearchSyntax
243+
*/
244+
@jakarta.annotation.Nullable
245+
@JsonProperty(JSON_PROPERTY_USE_LEGACY_SEARCH_SYNTAX)
246+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
247+
public Boolean getUseLegacySearchSyntax() {
248+
return useLegacySearchSyntax;
249+
}
250+
251+
public void setUseLegacySearchSyntax(Boolean useLegacySearchSyntax) {
252+
this.useLegacySearchSyntax = useLegacySearchSyntax;
253+
}
254+
225255
/**
226256
* A container for additional, undeclared properties. This is a holder for any undeclared
227257
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -283,14 +313,22 @@ public boolean equals(Object o) {
283313
&& Objects.equals(this.processorGroups, observabilityPipelineConfig.processorGroups)
284314
&& Objects.equals(this.processors, observabilityPipelineConfig.processors)
285315
&& Objects.equals(this.sources, observabilityPipelineConfig.sources)
316+
&& Objects.equals(
317+
this.useLegacySearchSyntax, observabilityPipelineConfig.useLegacySearchSyntax)
286318
&& Objects.equals(
287319
this.additionalProperties, observabilityPipelineConfig.additionalProperties);
288320
}
289321

290322
@Override
291323
public int hashCode() {
292324
return Objects.hash(
293-
destinations, pipelineType, processorGroups, processors, sources, additionalProperties);
325+
destinations,
326+
pipelineType,
327+
processorGroups,
328+
processors,
329+
sources,
330+
useLegacySearchSyntax,
331+
additionalProperties);
294332
}
295333

296334
@Override
@@ -302,6 +340,9 @@ public String toString() {
302340
sb.append(" processorGroups: ").append(toIndentedString(processorGroups)).append("\n");
303341
sb.append(" processors: ").append(toIndentedString(processors)).append("\n");
304342
sb.append(" sources: ").append(toIndentedString(sources)).append("\n");
343+
sb.append(" useLegacySearchSyntax: ")
344+
.append(toIndentedString(useLegacySearchSyntax))
345+
.append("\n");
305346
sb.append(" additionalProperties: ")
306347
.append(toIndentedString(additionalProperties))
307348
.append("\n");

0 commit comments

Comments
 (0)