From 3102cdff39be076cc43796cd7c70603dd5e7eb3b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 30 Jan 2026 20:20:56 +0000 Subject: [PATCH] Regenerate client from commit 3924242 of spec repo --- .generator/schemas/v2/openapi.yaml | 178 ++++++-------- .../UpdateTagPipelinesRuleset.java | 4 +- ...ulesetRequestDataAttributesRulesItems.java | 22 +- ...tRequestDataAttributesRulesItemsQuery.java | 47 +++- ...ataAttributesRulesItemsReferenceTable.java | 48 +++- .../DataAttributesRulesItemsIfTagExists.java | 63 +++++ ...a => DataAttributesRulesItemsMapping.java} | 96 +++++--- .../RulesetRespDataAttributesRulesItems.java | 22 +- ...etRespDataAttributesRulesItemsMapping.java | 213 ----------------- ...esetRespDataAttributesRulesItemsQuery.java | 46 +++- ...ataAttributesRulesItemsReferenceTable.java | 47 +++- ...ulesetRequestDataAttributesRulesItems.java | 22 +- ...equestDataAttributesRulesItemsMapping.java | 219 ------------------ ...tRequestDataAttributesRulesItemsQuery.java | 47 +++- ...ataAttributesRulesItemsReferenceTable.java | 48 +++- 15 files changed, 495 insertions(+), 627 deletions(-) create mode 100644 src/main/java/com/datadog/api/client/v2/model/DataAttributesRulesItemsIfTagExists.java rename src/main/java/com/datadog/api/client/v2/model/{CreateRulesetRequestDataAttributesRulesItemsMapping.java => DataAttributesRulesItemsMapping.java} (64%) delete mode 100644 src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsMapping.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsMapping.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 522a89ef735..411e74f5078 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -14369,7 +14369,7 @@ components: key: cost_center value: engineering case_insensitivity: false - if_not_exists: true + if_tag_exists: do_not_apply query: account_id:"123456789" AND service:"web-api" reference_table: null id: New Ruleset @@ -14414,7 +14414,7 @@ components: example: false type: boolean mapping: - $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsMapping' + $ref: '#/components/schemas/DataAttributesRulesItemsMapping' metadata: $ref: '#/components/schemas/RulesetItemMetadata' name: @@ -14429,31 +14429,6 @@ components: - enabled - name type: object - CreateRulesetRequestDataAttributesRulesItemsMapping: - description: The definition of `CreateRulesetRequestDataAttributesRulesItemsMapping` - object. - nullable: true - properties: - destination_key: - description: The `mapping` `destination_key`. - example: '' - type: string - if_not_exists: - description: The `mapping` `if_not_exists`. - example: false - type: boolean - source_keys: - description: The `mapping` `source_keys`. - example: - - '' - items: - type: string - type: array - required: - - destination_key - - if_not_exists - - source_keys - type: object CreateRulesetRequestDataAttributesRulesItemsQuery: description: The definition of `CreateRulesetRequestDataAttributesRulesItemsQuery` object. @@ -14465,16 +14440,17 @@ components: description: The `query` `case_insensitivity`. type: boolean if_not_exists: - description: The `query` `if_not_exists`. - example: false + deprecated: true + description: Deprecated. Use `if_tag_exists` instead. The `query` `if_not_exists`. type: boolean + if_tag_exists: + $ref: '#/components/schemas/DataAttributesRulesItemsIfTagExists' query: description: The `query` `query`. example: '' type: string required: - addition - - if_not_exists - query type: object CreateRulesetRequestDataAttributesRulesItemsQueryAddition: @@ -14508,8 +14484,12 @@ components: $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems' type: array if_not_exists: - description: The `reference_table` `if_not_exists`. + deprecated: true + description: Deprecated. Use `if_tag_exists` instead. The `reference_table` + `if_not_exists`. type: boolean + if_tag_exists: + $ref: '#/components/schemas/DataAttributesRulesItemsIfTagExists' source_keys: description: The `reference_table` `source_keys`. example: @@ -18035,6 +18015,42 @@ components: - INTEGRATION_SCREENBOARD - INTEGRATION_TIMEBOARD - HOST_TIMEBOARD + DataAttributesRulesItemsIfTagExists: + description: The behavior when the tag already exists. + enum: + - append + - do_not_apply + - replace + type: string + x-enum-varnames: + - APPEND + - DO_NOT_APPLY + - REPLACE + DataAttributesRulesItemsMapping: + description: The definition of `DataAttributesRulesItemsMapping` object. + nullable: true + properties: + destination_key: + description: The `mapping` `destination_key`. + example: '' + type: string + if_not_exists: + deprecated: true + description: Deprecated. Use `if_tag_exists` instead. The `mapping` `if_not_exists`. + type: boolean + if_tag_exists: + $ref: '#/components/schemas/DataAttributesRulesItemsIfTagExists' + source_keys: + description: The `mapping` `source_keys`. + example: + - '' + items: + type: string + type: array + required: + - destination_key + - source_keys + type: object DataDeletionResponseItem: description: The created data deletion request information. properties: @@ -49251,13 +49267,13 @@ components: key: abc value: ww case_insensitivity: false - if_not_exists: true + if_tag_exists: do_not_apply query: billingcurrency:"USD" AND account_name:"SZA96462" AND billingcurrency:"USD" reference_table: null - enabled: true mapping: destination_key: h - if_not_exists: true + if_tag_exists: do_not_apply source_keys: - accountname - accountownerid @@ -49277,7 +49293,7 @@ components: output_key: status - input_column: status_description output_key: dess - if_not_exists: false + if_tag_exists: append source_keys: - http_status - status_description @@ -49310,13 +49326,13 @@ components: key: environment value: production case_insensitivity: false - if_not_exists: true + if_tag_exists: do_not_apply query: billingcurrency:"USD" AND account_name:"prod-account" reference_table: null - enabled: true mapping: destination_key: team_owner - if_not_exists: true + if_tag_exists: do_not_apply source_keys: - account_name - service @@ -49336,7 +49352,7 @@ components: output_key: status - input_column: status_description output_key: dess - if_not_exists: false + if_tag_exists: append source_keys: - http_status - status_description @@ -49361,7 +49377,7 @@ components: key: cost_center value: engineering case_insensitivity: true - if_not_exists: true + if_tag_exists: do_not_apply query: account_name:"dev-*" reference_table: null version: 1 @@ -49472,7 +49488,7 @@ components: example: false type: boolean mapping: - $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsMapping' + $ref: '#/components/schemas/DataAttributesRulesItemsMapping' metadata: $ref: '#/components/schemas/RulesetItemMetadata' name: @@ -49487,31 +49503,6 @@ components: - enabled - name type: object - RulesetRespDataAttributesRulesItemsMapping: - description: The definition of `RulesetRespDataAttributesRulesItemsMapping` - object. - nullable: true - properties: - destination_key: - description: The `mapping` `destination_key`. - example: '' - type: string - if_not_exists: - description: The `mapping` `if_not_exists`. - example: false - type: boolean - source_keys: - description: The `mapping` `source_keys`. - example: - - '' - items: - type: string - type: array - required: - - destination_key - - if_not_exists - - source_keys - type: object RulesetRespDataAttributesRulesItemsQuery: description: The definition of `RulesetRespDataAttributesRulesItemsQuery` object. nullable: true @@ -49522,16 +49513,17 @@ components: description: The `query` `case_insensitivity`. type: boolean if_not_exists: - description: The `query` `if_not_exists`. - example: false + deprecated: true + description: Deprecated. Use `if_tag_exists` instead. The `query` `if_not_exists`. type: boolean + if_tag_exists: + $ref: '#/components/schemas/DataAttributesRulesItemsIfTagExists' query: description: The `query` `query`. example: '' type: string required: - addition - - if_not_exists - query type: object RulesetRespDataAttributesRulesItemsQueryAddition: @@ -49565,8 +49557,12 @@ components: $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems' type: array if_not_exists: - description: The `reference_table` `if_not_exists`. + deprecated: true + description: Deprecated. Use `if_tag_exists` instead. The `reference_table` + `if_not_exists`. type: boolean + if_tag_exists: + $ref: '#/components/schemas/DataAttributesRulesItemsIfTagExists' source_keys: description: The `reference_table` `source_keys`. example: @@ -63804,13 +63800,13 @@ components: key: cost_center value: engineering case_insensitivity: false - if_not_exists: true + if_tag_exists: do_not_apply query: account_id:"123456789" AND service:"web-api" reference_table: null - enabled: true mapping: destination_key: team_owner - if_not_exists: true + if_tag_exists: do_not_apply source_keys: - account_name - account_id @@ -63830,7 +63826,7 @@ components: output_key: status - input_column: status_description output_key: dess - if_not_exists: false + if_tag_exists: append source_keys: - http_status - status_description @@ -63882,7 +63878,7 @@ components: example: false type: boolean mapping: - $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsMapping' + $ref: '#/components/schemas/DataAttributesRulesItemsMapping' metadata: $ref: '#/components/schemas/RulesetItemMetadata' name: @@ -63897,31 +63893,6 @@ components: - enabled - name type: object - UpdateRulesetRequestDataAttributesRulesItemsMapping: - description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsMapping` - object. - nullable: true - properties: - destination_key: - description: The `mapping` `destination_key`. - example: '' - type: string - if_not_exists: - description: The `mapping` `if_not_exists`. - example: false - type: boolean - source_keys: - description: The `mapping` `source_keys`. - example: - - '' - items: - type: string - type: array - required: - - destination_key - - if_not_exists - - source_keys - type: object UpdateRulesetRequestDataAttributesRulesItemsQuery: description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsQuery` object. @@ -63933,16 +63904,17 @@ components: description: The `query` `case_insensitivity`. type: boolean if_not_exists: - description: The `query` `if_not_exists`. - example: false + deprecated: true + description: Deprecated. Use `if_tag_exists` instead. The `query` `if_not_exists`. type: boolean + if_tag_exists: + $ref: '#/components/schemas/DataAttributesRulesItemsIfTagExists' query: description: The `query` `query`. example: '' type: string required: - addition - - if_not_exists - query type: object UpdateRulesetRequestDataAttributesRulesItemsQueryAddition: @@ -63976,8 +63948,12 @@ components: $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems' type: array if_not_exists: - description: The `reference_table` `if_not_exists`. + deprecated: true + description: Deprecated. Use `if_tag_exists` instead. The `reference_table` + `if_not_exists`. type: boolean + if_tag_exists: + $ref: '#/components/schemas/DataAttributesRulesItemsIfTagExists' source_keys: description: The `reference_table` `source_keys`. example: diff --git a/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.java b/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.java index 934be510385..2999a00dfb8 100644 --- a/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.java +++ b/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.java @@ -3,12 +3,12 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.DataAttributesRulesItemsMapping; import com.datadog.api.client.v2.model.RulesetResp; import com.datadog.api.client.v2.model.UpdateRulesetRequest; import com.datadog.api.client.v2.model.UpdateRulesetRequestData; import com.datadog.api.client.v2.model.UpdateRulesetRequestDataAttributes; import com.datadog.api.client.v2.model.UpdateRulesetRequestDataAttributesRulesItems; -import com.datadog.api.client.v2.model.UpdateRulesetRequestDataAttributesRulesItemsMapping; import com.datadog.api.client.v2.model.UpdateRulesetRequestDataType; import java.util.Arrays; import java.util.Collections; @@ -31,7 +31,7 @@ public static void main(String[] args) { new UpdateRulesetRequestDataAttributesRulesItems() .enabled(true) .mapping( - new UpdateRulesetRequestDataAttributesRulesItemsMapping() + new DataAttributesRulesItemsMapping() .destinationKey("team_owner") .ifNotExists(true) .sourceKeys( diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItems.java index 6872437291c..ceb0a1f306f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItems.java @@ -35,8 +35,8 @@ public class CreateRulesetRequestDataAttributesRulesItems { private Boolean enabled; public static final String JSON_PROPERTY_MAPPING = "mapping"; - private JsonNullable mapping = - JsonNullable.undefined(); + private JsonNullable mapping = + JsonNullable.undefined(); public static final String JSON_PROPERTY_METADATA = "metadata"; private JsonNullable> metadata = @@ -84,37 +84,35 @@ public void setEnabled(Boolean enabled) { } public CreateRulesetRequestDataAttributesRulesItems mapping( - CreateRulesetRequestDataAttributesRulesItemsMapping mapping) { - this.mapping = JsonNullable.of(mapping); + DataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); return this; } /** - * The definition of CreateRulesetRequestDataAttributesRulesItemsMapping object. + * The definition of DataAttributesRulesItemsMapping object. * * @return mapping */ @jakarta.annotation.Nullable @JsonIgnore - public CreateRulesetRequestDataAttributesRulesItemsMapping getMapping() { + public DataAttributesRulesItemsMapping getMapping() { return mapping.orElse(null); } @JsonProperty(JSON_PROPERTY_MAPPING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public JsonNullable - getMapping_JsonNullable() { + public JsonNullable getMapping_JsonNullable() { return mapping; } @JsonProperty(JSON_PROPERTY_MAPPING) - public void setMapping_JsonNullable( - JsonNullable mapping) { + public void setMapping_JsonNullable(JsonNullable mapping) { this.mapping = mapping; } - public void setMapping(CreateRulesetRequestDataAttributesRulesItemsMapping mapping) { - this.mapping = JsonNullable.of(mapping); + public void setMapping(DataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); } public CreateRulesetRequestDataAttributesRulesItems metadata(Map metadata) { diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQuery.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQuery.java index eb10696fb86..8fcd61af0ea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQuery.java @@ -22,6 +22,7 @@ CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_ADDITION, CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_CASE_INSENSITIVITY, CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_NOT_EXISTS, + CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_TAG_EXISTS, CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_QUERY }) @jakarta.annotation.Generated( @@ -37,6 +38,9 @@ public class CreateRulesetRequestDataAttributesRulesItemsQuery { public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; private Boolean ifNotExists; + public static final String JSON_PROPERTY_IF_TAG_EXISTS = "if_tag_exists"; + private DataAttributesRulesItemsIfTagExists ifTagExists; + public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -46,13 +50,11 @@ public CreateRulesetRequestDataAttributesRulesItemsQuery() {} public CreateRulesetRequestDataAttributesRulesItemsQuery( @JsonProperty(required = true, value = JSON_PROPERTY_ADDITION) CreateRulesetRequestDataAttributesRulesItemsQueryAddition addition, - @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { this.addition = addition; if (addition != null) { this.unparsed |= addition.unparsed; } - this.ifNotExists = ifNotExists; this.query = query; } @@ -110,20 +112,51 @@ public CreateRulesetRequestDataAttributesRulesItemsQuery ifNotExists(Boolean ifN } /** - * The query if_not_exists. + * Deprecated. Use if_tag_exists instead. The query if_not_exists + * . * * @return ifNotExists + * @deprecated */ + @Deprecated + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getIfNotExists() { return ifNotExists; } + @Deprecated public void setIfNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; } + public CreateRulesetRequestDataAttributesRulesItemsQuery ifTagExists( + DataAttributesRulesItemsIfTagExists ifTagExists) { + this.ifTagExists = ifTagExists; + this.unparsed |= !ifTagExists.isValid(); + return this; + } + + /** + * The behavior when the tag already exists. + * + * @return ifTagExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_TAG_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataAttributesRulesItemsIfTagExists getIfTagExists() { + return ifTagExists; + } + + public void setIfTagExists(DataAttributesRulesItemsIfTagExists ifTagExists) { + if (!ifTagExists.isValid()) { + this.unparsed = true; + } + this.ifTagExists = ifTagExists; + } + public CreateRulesetRequestDataAttributesRulesItemsQuery query(String query) { this.query = query; return this; @@ -209,6 +242,8 @@ public boolean equals(Object o) { createRulesetRequestDataAttributesRulesItemsQuery.caseInsensitivity) && Objects.equals( this.ifNotExists, createRulesetRequestDataAttributesRulesItemsQuery.ifNotExists) + && Objects.equals( + this.ifTagExists, createRulesetRequestDataAttributesRulesItemsQuery.ifTagExists) && Objects.equals(this.query, createRulesetRequestDataAttributesRulesItemsQuery.query) && Objects.equals( this.additionalProperties, @@ -217,7 +252,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(addition, caseInsensitivity, ifNotExists, query, additionalProperties); + return Objects.hash( + addition, caseInsensitivity, ifNotExists, ifTagExists, query, additionalProperties); } @Override @@ -227,6 +263,7 @@ public String toString() { sb.append(" addition: ").append(toIndentedString(addition)).append("\n"); sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" ifTagExists: ").append(toIndentedString(ifTagExists)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTable.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTable.java index 7a015154f4d..de9aac6da87 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTable.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTable.java @@ -26,6 +26,7 @@ CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_CASE_INSENSITIVITY, CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_FIELD_PAIRS, CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_NOT_EXISTS, + CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_TAG_EXISTS, CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_SOURCE_KEYS, CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_TABLE_NAME }) @@ -43,6 +44,9 @@ public class CreateRulesetRequestDataAttributesRulesItemsReferenceTable { public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; private Boolean ifNotExists; + public static final String JSON_PROPERTY_IF_TAG_EXISTS = "if_tag_exists"; + private DataAttributesRulesItemsIfTagExists ifTagExists; + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; private List sourceKeys = new ArrayList<>(); @@ -126,10 +130,13 @@ public CreateRulesetRequestDataAttributesRulesItemsReferenceTable ifNotExists( } /** - * The reference_table if_not_exists. + * Deprecated. Use if_tag_exists instead. The reference_table + * if_not_exists. * * @return ifNotExists + * @deprecated */ + @Deprecated @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -137,10 +144,37 @@ public Boolean getIfNotExists() { return ifNotExists; } + @Deprecated public void setIfNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; } + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable ifTagExists( + DataAttributesRulesItemsIfTagExists ifTagExists) { + this.ifTagExists = ifTagExists; + this.unparsed |= !ifTagExists.isValid(); + return this; + } + + /** + * The behavior when the tag already exists. + * + * @return ifTagExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_TAG_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataAttributesRulesItemsIfTagExists getIfTagExists() { + return ifTagExists; + } + + public void setIfTagExists(DataAttributesRulesItemsIfTagExists ifTagExists) { + if (!ifTagExists.isValid()) { + this.unparsed = true; + } + this.ifTagExists = ifTagExists; + } + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable sourceKeys( List sourceKeys) { this.sourceKeys = sourceKeys; @@ -258,6 +292,9 @@ public boolean equals(Object o) { && Objects.equals( this.ifNotExists, createRulesetRequestDataAttributesRulesItemsReferenceTable.ifNotExists) + && Objects.equals( + this.ifTagExists, + createRulesetRequestDataAttributesRulesItemsReferenceTable.ifTagExists) && Objects.equals( this.sourceKeys, createRulesetRequestDataAttributesRulesItemsReferenceTable.sourceKeys) && Objects.equals( @@ -270,7 +307,13 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - caseInsensitivity, fieldPairs, ifNotExists, sourceKeys, tableName, additionalProperties); + caseInsensitivity, + fieldPairs, + ifNotExists, + ifTagExists, + sourceKeys, + tableName, + additionalProperties); } @Override @@ -280,6 +323,7 @@ public String toString() { sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); sb.append(" fieldPairs: ").append(toIndentedString(fieldPairs)).append("\n"); sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" ifTagExists: ").append(toIndentedString(ifTagExists)).append("\n"); sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/DataAttributesRulesItemsIfTagExists.java b/src/main/java/com/datadog/api/client/v2/model/DataAttributesRulesItemsIfTagExists.java new file mode 100644 index 00000000000..7f2f8b24bb1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DataAttributesRulesItemsIfTagExists.java @@ -0,0 +1,63 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The behavior when the tag already exists. */ +@JsonSerialize( + using = DataAttributesRulesItemsIfTagExists.DataAttributesRulesItemsIfTagExistsSerializer.class) +public class DataAttributesRulesItemsIfTagExists extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("append", "do_not_apply", "replace")); + + public static final DataAttributesRulesItemsIfTagExists APPEND = + new DataAttributesRulesItemsIfTagExists("append"); + public static final DataAttributesRulesItemsIfTagExists DO_NOT_APPLY = + new DataAttributesRulesItemsIfTagExists("do_not_apply"); + public static final DataAttributesRulesItemsIfTagExists REPLACE = + new DataAttributesRulesItemsIfTagExists("replace"); + + DataAttributesRulesItemsIfTagExists(String value) { + super(value, allowedValues); + } + + public static class DataAttributesRulesItemsIfTagExistsSerializer + extends StdSerializer { + public DataAttributesRulesItemsIfTagExistsSerializer( + Class t) { + super(t); + } + + public DataAttributesRulesItemsIfTagExistsSerializer() { + this(null); + } + + @Override + public void serialize( + DataAttributesRulesItemsIfTagExists value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DataAttributesRulesItemsIfTagExists fromValue(String value) { + return new DataAttributesRulesItemsIfTagExists(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsMapping.java b/src/main/java/com/datadog/api/client/v2/model/DataAttributesRulesItemsMapping.java similarity index 64% rename from src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsMapping.java rename to src/main/java/com/datadog/api/client/v2/model/DataAttributesRulesItemsMapping.java index 76763e40189..8d4dd25f287 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsMapping.java +++ b/src/main/java/com/datadog/api/client/v2/model/DataAttributesRulesItemsMapping.java @@ -19,15 +19,16 @@ import java.util.Map; import java.util.Objects; -/** The definition of CreateRulesetRequestDataAttributesRulesItemsMapping object. */ +/** The definition of DataAttributesRulesItemsMapping object. */ @JsonPropertyOrder({ - CreateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_DESTINATION_KEY, - CreateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_IF_NOT_EXISTS, - CreateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_SOURCE_KEYS + DataAttributesRulesItemsMapping.JSON_PROPERTY_DESTINATION_KEY, + DataAttributesRulesItemsMapping.JSON_PROPERTY_IF_NOT_EXISTS, + DataAttributesRulesItemsMapping.JSON_PROPERTY_IF_TAG_EXISTS, + DataAttributesRulesItemsMapping.JSON_PROPERTY_SOURCE_KEYS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class CreateRulesetRequestDataAttributesRulesItemsMapping { +public class DataAttributesRulesItemsMapping { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DESTINATION_KEY = "destination_key"; private String destinationKey; @@ -35,22 +36,23 @@ public class CreateRulesetRequestDataAttributesRulesItemsMapping { public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; private Boolean ifNotExists; + public static final String JSON_PROPERTY_IF_TAG_EXISTS = "if_tag_exists"; + private DataAttributesRulesItemsIfTagExists ifTagExists; + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; private List sourceKeys = new ArrayList<>(); - public CreateRulesetRequestDataAttributesRulesItemsMapping() {} + public DataAttributesRulesItemsMapping() {} @JsonCreator - public CreateRulesetRequestDataAttributesRulesItemsMapping( + public DataAttributesRulesItemsMapping( @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION_KEY) String destinationKey, - @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys) { this.destinationKey = destinationKey; - this.ifNotExists = ifNotExists; this.sourceKeys = sourceKeys; } - public CreateRulesetRequestDataAttributesRulesItemsMapping destinationKey(String destinationKey) { + public DataAttributesRulesItemsMapping destinationKey(String destinationKey) { this.destinationKey = destinationKey; return this; } @@ -70,33 +72,63 @@ public void setDestinationKey(String destinationKey) { this.destinationKey = destinationKey; } - public CreateRulesetRequestDataAttributesRulesItemsMapping ifNotExists(Boolean ifNotExists) { + public DataAttributesRulesItemsMapping ifNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; return this; } /** - * The mapping if_not_exists. + * Deprecated. Use if_tag_exists instead. The mapping + * if_not_exists. * * @return ifNotExists + * @deprecated */ + @Deprecated + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getIfNotExists() { return ifNotExists; } + @Deprecated public void setIfNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; } - public CreateRulesetRequestDataAttributesRulesItemsMapping sourceKeys(List sourceKeys) { + public DataAttributesRulesItemsMapping ifTagExists( + DataAttributesRulesItemsIfTagExists ifTagExists) { + this.ifTagExists = ifTagExists; + this.unparsed |= !ifTagExists.isValid(); + return this; + } + + /** + * The behavior when the tag already exists. + * + * @return ifTagExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_TAG_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataAttributesRulesItemsIfTagExists getIfTagExists() { + return ifTagExists; + } + + public void setIfTagExists(DataAttributesRulesItemsIfTagExists ifTagExists) { + if (!ifTagExists.isValid()) { + this.unparsed = true; + } + this.ifTagExists = ifTagExists; + } + + public DataAttributesRulesItemsMapping sourceKeys(List sourceKeys) { this.sourceKeys = sourceKeys; return this; } - public CreateRulesetRequestDataAttributesRulesItemsMapping addSourceKeysItem( - String sourceKeysItem) { + public DataAttributesRulesItemsMapping addSourceKeysItem(String sourceKeysItem) { this.sourceKeys.add(sourceKeysItem); return this; } @@ -128,11 +160,10 @@ public void setSourceKeys(List sourceKeys) { * * @param key The arbitrary key to set * @param value The associated value - * @return CreateRulesetRequestDataAttributesRulesItemsMapping + * @return DataAttributesRulesItemsMapping */ @JsonAnySetter - public CreateRulesetRequestDataAttributesRulesItemsMapping putAdditionalProperty( - String key, Object value) { + public DataAttributesRulesItemsMapping putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -163,9 +194,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** - * Return true if this CreateRulesetRequestDataAttributesRulesItemsMapping object is equal to o. - */ + /** Return true if this DataAttributesRulesItemsMapping object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -174,31 +203,28 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateRulesetRequestDataAttributesRulesItemsMapping - createRulesetRequestDataAttributesRulesItemsMapping = - (CreateRulesetRequestDataAttributesRulesItemsMapping) o; - return Objects.equals( - this.destinationKey, createRulesetRequestDataAttributesRulesItemsMapping.destinationKey) - && Objects.equals( - this.ifNotExists, createRulesetRequestDataAttributesRulesItemsMapping.ifNotExists) - && Objects.equals( - this.sourceKeys, createRulesetRequestDataAttributesRulesItemsMapping.sourceKeys) + DataAttributesRulesItemsMapping dataAttributesRulesItemsMapping = + (DataAttributesRulesItemsMapping) o; + return Objects.equals(this.destinationKey, dataAttributesRulesItemsMapping.destinationKey) + && Objects.equals(this.ifNotExists, dataAttributesRulesItemsMapping.ifNotExists) + && Objects.equals(this.ifTagExists, dataAttributesRulesItemsMapping.ifTagExists) + && Objects.equals(this.sourceKeys, dataAttributesRulesItemsMapping.sourceKeys) && Objects.equals( - this.additionalProperties, - createRulesetRequestDataAttributesRulesItemsMapping.additionalProperties); + this.additionalProperties, dataAttributesRulesItemsMapping.additionalProperties); } @Override public int hashCode() { - return Objects.hash(destinationKey, ifNotExists, sourceKeys, additionalProperties); + return Objects.hash(destinationKey, ifNotExists, ifTagExists, sourceKeys, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateRulesetRequestDataAttributesRulesItemsMapping {\n"); + sb.append("class DataAttributesRulesItemsMapping {\n"); sb.append(" destinationKey: ").append(toIndentedString(destinationKey)).append("\n"); sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" ifTagExists: ").append(toIndentedString(ifTagExists)).append("\n"); sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItems.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItems.java index ef8eb0ebcf2..b4910d62c69 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItems.java @@ -35,8 +35,8 @@ public class RulesetRespDataAttributesRulesItems { private Boolean enabled; public static final String JSON_PROPERTY_MAPPING = "mapping"; - private JsonNullable mapping = - JsonNullable.undefined(); + private JsonNullable mapping = + JsonNullable.undefined(); public static final String JSON_PROPERTY_METADATA = "metadata"; private JsonNullable> metadata = @@ -83,37 +83,35 @@ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public RulesetRespDataAttributesRulesItems mapping( - RulesetRespDataAttributesRulesItemsMapping mapping) { - this.mapping = JsonNullable.of(mapping); + public RulesetRespDataAttributesRulesItems mapping(DataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); return this; } /** - * The definition of RulesetRespDataAttributesRulesItemsMapping object. + * The definition of DataAttributesRulesItemsMapping object. * * @return mapping */ @jakarta.annotation.Nullable @JsonIgnore - public RulesetRespDataAttributesRulesItemsMapping getMapping() { + public DataAttributesRulesItemsMapping getMapping() { return mapping.orElse(null); } @JsonProperty(JSON_PROPERTY_MAPPING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public JsonNullable getMapping_JsonNullable() { + public JsonNullable getMapping_JsonNullable() { return mapping; } @JsonProperty(JSON_PROPERTY_MAPPING) - public void setMapping_JsonNullable( - JsonNullable mapping) { + public void setMapping_JsonNullable(JsonNullable mapping) { this.mapping = mapping; } - public void setMapping(RulesetRespDataAttributesRulesItemsMapping mapping) { - this.mapping = JsonNullable.of(mapping); + public void setMapping(DataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); } public RulesetRespDataAttributesRulesItems metadata(Map metadata) { diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsMapping.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsMapping.java deleted file mode 100644 index 69faa3ecdc1..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsMapping.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** The definition of RulesetRespDataAttributesRulesItemsMapping object. */ -@JsonPropertyOrder({ - RulesetRespDataAttributesRulesItemsMapping.JSON_PROPERTY_DESTINATION_KEY, - RulesetRespDataAttributesRulesItemsMapping.JSON_PROPERTY_IF_NOT_EXISTS, - RulesetRespDataAttributesRulesItemsMapping.JSON_PROPERTY_SOURCE_KEYS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RulesetRespDataAttributesRulesItemsMapping { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DESTINATION_KEY = "destination_key"; - private String destinationKey; - - public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; - private Boolean ifNotExists; - - public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; - private List sourceKeys = new ArrayList<>(); - - public RulesetRespDataAttributesRulesItemsMapping() {} - - @JsonCreator - public RulesetRespDataAttributesRulesItemsMapping( - @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION_KEY) String destinationKey, - @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys) { - this.destinationKey = destinationKey; - this.ifNotExists = ifNotExists; - this.sourceKeys = sourceKeys; - } - - public RulesetRespDataAttributesRulesItemsMapping destinationKey(String destinationKey) { - this.destinationKey = destinationKey; - return this; - } - - /** - * The mapping destination_key. - * - * @return destinationKey - */ - @JsonProperty(JSON_PROPERTY_DESTINATION_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDestinationKey() { - return destinationKey; - } - - public void setDestinationKey(String destinationKey) { - this.destinationKey = destinationKey; - } - - public RulesetRespDataAttributesRulesItemsMapping ifNotExists(Boolean ifNotExists) { - this.ifNotExists = ifNotExists; - return this; - } - - /** - * The mapping if_not_exists. - * - * @return ifNotExists - */ - @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIfNotExists() { - return ifNotExists; - } - - public void setIfNotExists(Boolean ifNotExists) { - this.ifNotExists = ifNotExists; - } - - public RulesetRespDataAttributesRulesItemsMapping sourceKeys(List sourceKeys) { - this.sourceKeys = sourceKeys; - return this; - } - - public RulesetRespDataAttributesRulesItemsMapping addSourceKeysItem(String sourceKeysItem) { - this.sourceKeys.add(sourceKeysItem); - return this; - } - - /** - * The mapping source_keys. - * - * @return sourceKeys - */ - @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSourceKeys() { - return sourceKeys; - } - - public void setSourceKeys(List sourceKeys) { - this.sourceKeys = sourceKeys; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return RulesetRespDataAttributesRulesItemsMapping - */ - @JsonAnySetter - public RulesetRespDataAttributesRulesItemsMapping putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this RulesetRespDataAttributesRulesItemsMapping object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RulesetRespDataAttributesRulesItemsMapping rulesetRespDataAttributesRulesItemsMapping = - (RulesetRespDataAttributesRulesItemsMapping) o; - return Objects.equals( - this.destinationKey, rulesetRespDataAttributesRulesItemsMapping.destinationKey) - && Objects.equals(this.ifNotExists, rulesetRespDataAttributesRulesItemsMapping.ifNotExists) - && Objects.equals(this.sourceKeys, rulesetRespDataAttributesRulesItemsMapping.sourceKeys) - && Objects.equals( - this.additionalProperties, - rulesetRespDataAttributesRulesItemsMapping.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(destinationKey, ifNotExists, sourceKeys, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RulesetRespDataAttributesRulesItemsMapping {\n"); - sb.append(" destinationKey: ").append(toIndentedString(destinationKey)).append("\n"); - sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); - sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQuery.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQuery.java index cefb089d159..93556da2a78 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQuery.java @@ -22,6 +22,7 @@ RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_ADDITION, RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_CASE_INSENSITIVITY, RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_NOT_EXISTS, + RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_TAG_EXISTS, RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_QUERY }) @jakarta.annotation.Generated( @@ -37,6 +38,9 @@ public class RulesetRespDataAttributesRulesItemsQuery { public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; private Boolean ifNotExists; + public static final String JSON_PROPERTY_IF_TAG_EXISTS = "if_tag_exists"; + private DataAttributesRulesItemsIfTagExists ifTagExists; + public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -46,13 +50,11 @@ public RulesetRespDataAttributesRulesItemsQuery() {} public RulesetRespDataAttributesRulesItemsQuery( @JsonProperty(required = true, value = JSON_PROPERTY_ADDITION) RulesetRespDataAttributesRulesItemsQueryAddition addition, - @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { this.addition = addition; if (addition != null) { this.unparsed |= addition.unparsed; } - this.ifNotExists = ifNotExists; this.query = query; } @@ -108,20 +110,51 @@ public RulesetRespDataAttributesRulesItemsQuery ifNotExists(Boolean ifNotExists) } /** - * The query if_not_exists. + * Deprecated. Use if_tag_exists instead. The query if_not_exists + * . * * @return ifNotExists + * @deprecated */ + @Deprecated + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getIfNotExists() { return ifNotExists; } + @Deprecated public void setIfNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; } + public RulesetRespDataAttributesRulesItemsQuery ifTagExists( + DataAttributesRulesItemsIfTagExists ifTagExists) { + this.ifTagExists = ifTagExists; + this.unparsed |= !ifTagExists.isValid(); + return this; + } + + /** + * The behavior when the tag already exists. + * + * @return ifTagExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_TAG_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataAttributesRulesItemsIfTagExists getIfTagExists() { + return ifTagExists; + } + + public void setIfTagExists(DataAttributesRulesItemsIfTagExists ifTagExists) { + if (!ifTagExists.isValid()) { + this.unparsed = true; + } + this.ifTagExists = ifTagExists; + } + public RulesetRespDataAttributesRulesItemsQuery query(String query) { this.query = query; return this; @@ -203,6 +236,7 @@ public boolean equals(Object o) { && Objects.equals( this.caseInsensitivity, rulesetRespDataAttributesRulesItemsQuery.caseInsensitivity) && Objects.equals(this.ifNotExists, rulesetRespDataAttributesRulesItemsQuery.ifNotExists) + && Objects.equals(this.ifTagExists, rulesetRespDataAttributesRulesItemsQuery.ifTagExists) && Objects.equals(this.query, rulesetRespDataAttributesRulesItemsQuery.query) && Objects.equals( this.additionalProperties, @@ -211,7 +245,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(addition, caseInsensitivity, ifNotExists, query, additionalProperties); + return Objects.hash( + addition, caseInsensitivity, ifNotExists, ifTagExists, query, additionalProperties); } @Override @@ -221,6 +256,7 @@ public String toString() { sb.append(" addition: ").append(toIndentedString(addition)).append("\n"); sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" ifTagExists: ").append(toIndentedString(ifTagExists)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTable.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTable.java index 92ec35fd453..6ceb63fbbad 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTable.java +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTable.java @@ -24,6 +24,7 @@ RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_CASE_INSENSITIVITY, RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_FIELD_PAIRS, RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_NOT_EXISTS, + RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_TAG_EXISTS, RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_SOURCE_KEYS, RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_TABLE_NAME }) @@ -41,6 +42,9 @@ public class RulesetRespDataAttributesRulesItemsReferenceTable { public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; private Boolean ifNotExists; + public static final String JSON_PROPERTY_IF_TAG_EXISTS = "if_tag_exists"; + private DataAttributesRulesItemsIfTagExists ifTagExists; + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; private List sourceKeys = new ArrayList<>(); @@ -120,10 +124,13 @@ public RulesetRespDataAttributesRulesItemsReferenceTable ifNotExists(Boolean ifN } /** - * The reference_table if_not_exists. + * Deprecated. Use if_tag_exists instead. The reference_table + * if_not_exists. * * @return ifNotExists + * @deprecated */ + @Deprecated @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -131,10 +138,37 @@ public Boolean getIfNotExists() { return ifNotExists; } + @Deprecated public void setIfNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; } + public RulesetRespDataAttributesRulesItemsReferenceTable ifTagExists( + DataAttributesRulesItemsIfTagExists ifTagExists) { + this.ifTagExists = ifTagExists; + this.unparsed |= !ifTagExists.isValid(); + return this; + } + + /** + * The behavior when the tag already exists. + * + * @return ifTagExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_TAG_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataAttributesRulesItemsIfTagExists getIfTagExists() { + return ifTagExists; + } + + public void setIfTagExists(DataAttributesRulesItemsIfTagExists ifTagExists) { + if (!ifTagExists.isValid()) { + this.unparsed = true; + } + this.ifTagExists = ifTagExists; + } + public RulesetRespDataAttributesRulesItemsReferenceTable sourceKeys(List sourceKeys) { this.sourceKeys = sourceKeys; return this; @@ -247,6 +281,8 @@ public boolean equals(Object o) { this.fieldPairs, rulesetRespDataAttributesRulesItemsReferenceTable.fieldPairs) && Objects.equals( this.ifNotExists, rulesetRespDataAttributesRulesItemsReferenceTable.ifNotExists) + && Objects.equals( + this.ifTagExists, rulesetRespDataAttributesRulesItemsReferenceTable.ifTagExists) && Objects.equals( this.sourceKeys, rulesetRespDataAttributesRulesItemsReferenceTable.sourceKeys) && Objects.equals( @@ -259,7 +295,13 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - caseInsensitivity, fieldPairs, ifNotExists, sourceKeys, tableName, additionalProperties); + caseInsensitivity, + fieldPairs, + ifNotExists, + ifTagExists, + sourceKeys, + tableName, + additionalProperties); } @Override @@ -269,6 +311,7 @@ public String toString() { sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); sb.append(" fieldPairs: ").append(toIndentedString(fieldPairs)).append("\n"); sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" ifTagExists: ").append(toIndentedString(ifTagExists)).append("\n"); sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItems.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItems.java index a7d70440dd5..ab1a3be3941 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItems.java @@ -35,8 +35,8 @@ public class UpdateRulesetRequestDataAttributesRulesItems { private Boolean enabled; public static final String JSON_PROPERTY_MAPPING = "mapping"; - private JsonNullable mapping = - JsonNullable.undefined(); + private JsonNullable mapping = + JsonNullable.undefined(); public static final String JSON_PROPERTY_METADATA = "metadata"; private JsonNullable> metadata = @@ -84,37 +84,35 @@ public void setEnabled(Boolean enabled) { } public UpdateRulesetRequestDataAttributesRulesItems mapping( - UpdateRulesetRequestDataAttributesRulesItemsMapping mapping) { - this.mapping = JsonNullable.of(mapping); + DataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); return this; } /** - * The definition of UpdateRulesetRequestDataAttributesRulesItemsMapping object. + * The definition of DataAttributesRulesItemsMapping object. * * @return mapping */ @jakarta.annotation.Nullable @JsonIgnore - public UpdateRulesetRequestDataAttributesRulesItemsMapping getMapping() { + public DataAttributesRulesItemsMapping getMapping() { return mapping.orElse(null); } @JsonProperty(JSON_PROPERTY_MAPPING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public JsonNullable - getMapping_JsonNullable() { + public JsonNullable getMapping_JsonNullable() { return mapping; } @JsonProperty(JSON_PROPERTY_MAPPING) - public void setMapping_JsonNullable( - JsonNullable mapping) { + public void setMapping_JsonNullable(JsonNullable mapping) { this.mapping = mapping; } - public void setMapping(UpdateRulesetRequestDataAttributesRulesItemsMapping mapping) { - this.mapping = JsonNullable.of(mapping); + public void setMapping(DataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); } public UpdateRulesetRequestDataAttributesRulesItems metadata(Map metadata) { diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsMapping.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsMapping.java deleted file mode 100644 index a8fd9da86b3..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsMapping.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** The definition of UpdateRulesetRequestDataAttributesRulesItemsMapping object. */ -@JsonPropertyOrder({ - UpdateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_DESTINATION_KEY, - UpdateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_IF_NOT_EXISTS, - UpdateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_SOURCE_KEYS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class UpdateRulesetRequestDataAttributesRulesItemsMapping { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DESTINATION_KEY = "destination_key"; - private String destinationKey; - - public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; - private Boolean ifNotExists; - - public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; - private List sourceKeys = new ArrayList<>(); - - public UpdateRulesetRequestDataAttributesRulesItemsMapping() {} - - @JsonCreator - public UpdateRulesetRequestDataAttributesRulesItemsMapping( - @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION_KEY) String destinationKey, - @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, - @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys) { - this.destinationKey = destinationKey; - this.ifNotExists = ifNotExists; - this.sourceKeys = sourceKeys; - } - - public UpdateRulesetRequestDataAttributesRulesItemsMapping destinationKey(String destinationKey) { - this.destinationKey = destinationKey; - return this; - } - - /** - * The mapping destination_key. - * - * @return destinationKey - */ - @JsonProperty(JSON_PROPERTY_DESTINATION_KEY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDestinationKey() { - return destinationKey; - } - - public void setDestinationKey(String destinationKey) { - this.destinationKey = destinationKey; - } - - public UpdateRulesetRequestDataAttributesRulesItemsMapping ifNotExists(Boolean ifNotExists) { - this.ifNotExists = ifNotExists; - return this; - } - - /** - * The mapping if_not_exists. - * - * @return ifNotExists - */ - @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIfNotExists() { - return ifNotExists; - } - - public void setIfNotExists(Boolean ifNotExists) { - this.ifNotExists = ifNotExists; - } - - public UpdateRulesetRequestDataAttributesRulesItemsMapping sourceKeys(List sourceKeys) { - this.sourceKeys = sourceKeys; - return this; - } - - public UpdateRulesetRequestDataAttributesRulesItemsMapping addSourceKeysItem( - String sourceKeysItem) { - this.sourceKeys.add(sourceKeysItem); - return this; - } - - /** - * The mapping source_keys. - * - * @return sourceKeys - */ - @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSourceKeys() { - return sourceKeys; - } - - public void setSourceKeys(List sourceKeys) { - this.sourceKeys = sourceKeys; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return UpdateRulesetRequestDataAttributesRulesItemsMapping - */ - @JsonAnySetter - public UpdateRulesetRequestDataAttributesRulesItemsMapping putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** - * Return true if this UpdateRulesetRequestDataAttributesRulesItemsMapping object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateRulesetRequestDataAttributesRulesItemsMapping - updateRulesetRequestDataAttributesRulesItemsMapping = - (UpdateRulesetRequestDataAttributesRulesItemsMapping) o; - return Objects.equals( - this.destinationKey, updateRulesetRequestDataAttributesRulesItemsMapping.destinationKey) - && Objects.equals( - this.ifNotExists, updateRulesetRequestDataAttributesRulesItemsMapping.ifNotExists) - && Objects.equals( - this.sourceKeys, updateRulesetRequestDataAttributesRulesItemsMapping.sourceKeys) - && Objects.equals( - this.additionalProperties, - updateRulesetRequestDataAttributesRulesItemsMapping.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(destinationKey, ifNotExists, sourceKeys, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateRulesetRequestDataAttributesRulesItemsMapping {\n"); - sb.append(" destinationKey: ").append(toIndentedString(destinationKey)).append("\n"); - sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); - sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQuery.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQuery.java index bf8dfefb238..5c6f8c7a7f8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQuery.java +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQuery.java @@ -22,6 +22,7 @@ UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_ADDITION, UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_CASE_INSENSITIVITY, UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_NOT_EXISTS, + UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_TAG_EXISTS, UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_QUERY }) @jakarta.annotation.Generated( @@ -37,6 +38,9 @@ public class UpdateRulesetRequestDataAttributesRulesItemsQuery { public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; private Boolean ifNotExists; + public static final String JSON_PROPERTY_IF_TAG_EXISTS = "if_tag_exists"; + private DataAttributesRulesItemsIfTagExists ifTagExists; + public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -46,13 +50,11 @@ public UpdateRulesetRequestDataAttributesRulesItemsQuery() {} public UpdateRulesetRequestDataAttributesRulesItemsQuery( @JsonProperty(required = true, value = JSON_PROPERTY_ADDITION) UpdateRulesetRequestDataAttributesRulesItemsQueryAddition addition, - @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { this.addition = addition; if (addition != null) { this.unparsed |= addition.unparsed; } - this.ifNotExists = ifNotExists; this.query = query; } @@ -110,20 +112,51 @@ public UpdateRulesetRequestDataAttributesRulesItemsQuery ifNotExists(Boolean ifN } /** - * The query if_not_exists. + * Deprecated. Use if_tag_exists instead. The query if_not_exists + * . * * @return ifNotExists + * @deprecated */ + @Deprecated + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getIfNotExists() { return ifNotExists; } + @Deprecated public void setIfNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; } + public UpdateRulesetRequestDataAttributesRulesItemsQuery ifTagExists( + DataAttributesRulesItemsIfTagExists ifTagExists) { + this.ifTagExists = ifTagExists; + this.unparsed |= !ifTagExists.isValid(); + return this; + } + + /** + * The behavior when the tag already exists. + * + * @return ifTagExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_TAG_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataAttributesRulesItemsIfTagExists getIfTagExists() { + return ifTagExists; + } + + public void setIfTagExists(DataAttributesRulesItemsIfTagExists ifTagExists) { + if (!ifTagExists.isValid()) { + this.unparsed = true; + } + this.ifTagExists = ifTagExists; + } + public UpdateRulesetRequestDataAttributesRulesItemsQuery query(String query) { this.query = query; return this; @@ -209,6 +242,8 @@ public boolean equals(Object o) { updateRulesetRequestDataAttributesRulesItemsQuery.caseInsensitivity) && Objects.equals( this.ifNotExists, updateRulesetRequestDataAttributesRulesItemsQuery.ifNotExists) + && Objects.equals( + this.ifTagExists, updateRulesetRequestDataAttributesRulesItemsQuery.ifTagExists) && Objects.equals(this.query, updateRulesetRequestDataAttributesRulesItemsQuery.query) && Objects.equals( this.additionalProperties, @@ -217,7 +252,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(addition, caseInsensitivity, ifNotExists, query, additionalProperties); + return Objects.hash( + addition, caseInsensitivity, ifNotExists, ifTagExists, query, additionalProperties); } @Override @@ -227,6 +263,7 @@ public String toString() { sb.append(" addition: ").append(toIndentedString(addition)).append("\n"); sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" ifTagExists: ").append(toIndentedString(ifTagExists)).append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.java index bfe4bcb2daa..1f196e28ff2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.java +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.java @@ -26,6 +26,7 @@ UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_CASE_INSENSITIVITY, UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_FIELD_PAIRS, UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_NOT_EXISTS, + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_TAG_EXISTS, UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_SOURCE_KEYS, UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_TABLE_NAME }) @@ -43,6 +44,9 @@ public class UpdateRulesetRequestDataAttributesRulesItemsReferenceTable { public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; private Boolean ifNotExists; + public static final String JSON_PROPERTY_IF_TAG_EXISTS = "if_tag_exists"; + private DataAttributesRulesItemsIfTagExists ifTagExists; + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; private List sourceKeys = new ArrayList<>(); @@ -126,10 +130,13 @@ public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable ifNotExists( } /** - * The reference_table if_not_exists. + * Deprecated. Use if_tag_exists instead. The reference_table + * if_not_exists. * * @return ifNotExists + * @deprecated */ + @Deprecated @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -137,10 +144,37 @@ public Boolean getIfNotExists() { return ifNotExists; } + @Deprecated public void setIfNotExists(Boolean ifNotExists) { this.ifNotExists = ifNotExists; } + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable ifTagExists( + DataAttributesRulesItemsIfTagExists ifTagExists) { + this.ifTagExists = ifTagExists; + this.unparsed |= !ifTagExists.isValid(); + return this; + } + + /** + * The behavior when the tag already exists. + * + * @return ifTagExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_TAG_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DataAttributesRulesItemsIfTagExists getIfTagExists() { + return ifTagExists; + } + + public void setIfTagExists(DataAttributesRulesItemsIfTagExists ifTagExists) { + if (!ifTagExists.isValid()) { + this.unparsed = true; + } + this.ifTagExists = ifTagExists; + } + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable sourceKeys( List sourceKeys) { this.sourceKeys = sourceKeys; @@ -258,6 +292,9 @@ public boolean equals(Object o) { && Objects.equals( this.ifNotExists, updateRulesetRequestDataAttributesRulesItemsReferenceTable.ifNotExists) + && Objects.equals( + this.ifTagExists, + updateRulesetRequestDataAttributesRulesItemsReferenceTable.ifTagExists) && Objects.equals( this.sourceKeys, updateRulesetRequestDataAttributesRulesItemsReferenceTable.sourceKeys) && Objects.equals( @@ -270,7 +307,13 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - caseInsensitivity, fieldPairs, ifNotExists, sourceKeys, tableName, additionalProperties); + caseInsensitivity, + fieldPairs, + ifNotExists, + ifTagExists, + sourceKeys, + tableName, + additionalProperties); } @Override @@ -280,6 +323,7 @@ public String toString() { sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); sb.append(" fieldPairs: ").append(toIndentedString(fieldPairs)).append("\n"); sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" ifTagExists: ").append(toIndentedString(ifTagExists)).append("\n"); sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); sb.append(" additionalProperties: ")