diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 522a89ef73..411e74f507 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/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 6fda36e8e2..d7ade379cc 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -5905,13 +5905,6 @@ datadog\_api\_client.v2.model.create\_ruleset\_request\_data\_attributes\_rules\ :members: :show-inheritance: -datadog\_api\_client.v2.model.create\_ruleset\_request\_data\_attributes\_rules\_items\_mapping module ------------------------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_mapping - :members: - :show-inheritance: - datadog\_api\_client.v2.model.create\_ruleset\_request\_data\_attributes\_rules\_items\_query module ---------------------------------------------------------------------------------------------------- @@ -7081,6 +7074,20 @@ datadog\_api\_client.v2.model.dashboard\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.data\_attributes\_rules\_items\_if\_tag\_exists module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.data\_attributes\_rules\_items\_mapping module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.data_attributes_rules_items_mapping + :members: + :show-inheritance: + datadog\_api\_client.v2.model.data\_deletion\_response\_item module ------------------------------------------------------------------- @@ -21438,13 +21445,6 @@ datadog\_api\_client.v2.model.ruleset\_resp\_data\_attributes\_rules\_items modu :members: :show-inheritance: -datadog\_api\_client.v2.model.ruleset\_resp\_data\_attributes\_rules\_items\_mapping module -------------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_mapping - :members: - :show-inheritance: - datadog\_api\_client.v2.model.ruleset\_resp\_data\_attributes\_rules\_items\_query module ----------------------------------------------------------------------------------------- @@ -28214,13 +28214,6 @@ datadog\_api\_client.v2.model.update\_ruleset\_request\_data\_attributes\_rules\ :members: :show-inheritance: -datadog\_api\_client.v2.model.update\_ruleset\_request\_data\_attributes\_rules\_items\_mapping module ------------------------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_mapping - :members: - :show-inheritance: - datadog\_api\_client.v2.model.update\_ruleset\_request\_data\_attributes\_rules\_items\_query module ---------------------------------------------------------------------------------------------------- diff --git a/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.py b/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.py index e7cccb525c..3648907dc9 100644 --- a/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.py +++ b/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.py @@ -4,15 +4,13 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi +from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.update_ruleset_request import UpdateRulesetRequest from datadog_api_client.v2.model.update_ruleset_request_data import UpdateRulesetRequestData from datadog_api_client.v2.model.update_ruleset_request_data_attributes import UpdateRulesetRequestDataAttributes from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items import ( UpdateRulesetRequestDataAttributesRulesItems, ) -from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_mapping import ( - UpdateRulesetRequestDataAttributesRulesItemsMapping, -) from datadog_api_client.v2.model.update_ruleset_request_data_type import UpdateRulesetRequestDataType body = UpdateRulesetRequest( @@ -23,7 +21,7 @@ rules=[ UpdateRulesetRequestDataAttributesRulesItems( enabled=True, - mapping=UpdateRulesetRequestDataAttributesRulesItemsMapping( + mapping=DataAttributesRulesItemsMapping( destination_key="team_owner", if_not_exists=True, source_keys=[ diff --git a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items.py b/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items.py index 67a38d3c90..f078a3a1ec 100644 --- a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items.py +++ b/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items.py @@ -15,9 +15,7 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_mapping import ( - CreateRulesetRequestDataAttributesRulesItemsMapping, - ) + from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.ruleset_item_metadata import RulesetItemMetadata from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_query import ( CreateRulesetRequestDataAttributesRulesItemsQuery, @@ -30,9 +28,7 @@ class CreateRulesetRequestDataAttributesRulesItems(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_mapping import ( - CreateRulesetRequestDataAttributesRulesItemsMapping, - ) + from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.ruleset_item_metadata import RulesetItemMetadata from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_query import ( CreateRulesetRequestDataAttributesRulesItemsQuery, @@ -43,7 +39,7 @@ def openapi_types(_): return { "enabled": (bool,), - "mapping": (CreateRulesetRequestDataAttributesRulesItemsMapping,), + "mapping": (DataAttributesRulesItemsMapping,), "metadata": (RulesetItemMetadata,), "name": (str,), "query": (CreateRulesetRequestDataAttributesRulesItemsQuery,), @@ -63,7 +59,7 @@ def __init__( self_, enabled: bool, name: str, - mapping: Union[CreateRulesetRequestDataAttributesRulesItemsMapping, none_type, UnsetType] = unset, + mapping: Union[DataAttributesRulesItemsMapping, none_type, UnsetType] = unset, metadata: Union[RulesetItemMetadata, none_type, UnsetType] = unset, query: Union[CreateRulesetRequestDataAttributesRulesItemsQuery, none_type, UnsetType] = unset, reference_table: Union[ @@ -77,8 +73,8 @@ def __init__( :param enabled: The ``items`` ``enabled``. :type enabled: bool - :param mapping: The definition of ``CreateRulesetRequestDataAttributesRulesItemsMapping`` object. - :type mapping: CreateRulesetRequestDataAttributesRulesItemsMapping, none_type, optional + :param mapping: The definition of ``DataAttributesRulesItemsMapping`` object. + :type mapping: DataAttributesRulesItemsMapping, none_type, optional :param metadata: The ``items`` ``metadata``. :type metadata: RulesetItemMetadata, none_type, optional diff --git a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_mapping.py b/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_mapping.py deleted file mode 100644 index 37081fb959..0000000000 --- a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_mapping.py +++ /dev/null @@ -1,48 +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. -from __future__ import annotations - -from typing import List - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class CreateRulesetRequestDataAttributesRulesItemsMapping(ModelNormal): - _nullable = True - - @cached_property - def openapi_types(_): - return { - "destination_key": (str,), - "if_not_exists": (bool,), - "source_keys": ([str],), - } - - attribute_map = { - "destination_key": "destination_key", - "if_not_exists": "if_not_exists", - "source_keys": "source_keys", - } - - def __init__(self_, destination_key: str, if_not_exists: bool, source_keys: List[str], **kwargs): - """ - The definition of ``CreateRulesetRequestDataAttributesRulesItemsMapping`` object. - - :param destination_key: The ``mapping`` ``destination_key``. - :type destination_key: str - - :param if_not_exists: The ``mapping`` ``if_not_exists``. - :type if_not_exists: bool - - :param source_keys: The ``mapping`` ``source_keys``. - :type source_keys: [str] - """ - super().__init__(kwargs) - - self_.destination_key = destination_key - self_.if_not_exists = if_not_exists - self_.source_keys = source_keys diff --git a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_query.py b/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_query.py index 35d731e65c..9c195753cb 100644 --- a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_query.py +++ b/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_query.py @@ -18,6 +18,9 @@ from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_query_addition import ( CreateRulesetRequestDataAttributesRulesItemsQueryAddition, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) class CreateRulesetRequestDataAttributesRulesItemsQuery(ModelNormal): @@ -28,11 +31,15 @@ def openapi_types(_): from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_query_addition import ( CreateRulesetRequestDataAttributesRulesItemsQueryAddition, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) return { "addition": (CreateRulesetRequestDataAttributesRulesItemsQueryAddition,), "case_insensitivity": (bool,), "if_not_exists": (bool,), + "if_tag_exists": (DataAttributesRulesItemsIfTagExists,), "query": (str,), } @@ -40,15 +47,17 @@ def openapi_types(_): "addition": "addition", "case_insensitivity": "case_insensitivity", "if_not_exists": "if_not_exists", + "if_tag_exists": "if_tag_exists", "query": "query", } def __init__( self_, addition: Union[CreateRulesetRequestDataAttributesRulesItemsQueryAddition, none_type], - if_not_exists: bool, query: str, case_insensitivity: Union[bool, UnsetType] = unset, + if_not_exists: Union[bool, UnsetType] = unset, + if_tag_exists: Union[DataAttributesRulesItemsIfTagExists, UnsetType] = unset, **kwargs, ): """ @@ -60,16 +69,22 @@ def __init__( :param case_insensitivity: The ``query`` ``case_insensitivity``. :type case_insensitivity: bool, optional - :param if_not_exists: The ``query`` ``if_not_exists``. - :type if_not_exists: bool + :param if_not_exists: Deprecated. Use ``if_tag_exists`` instead. The ``query`` ``if_not_exists``. **Deprecated**. + :type if_not_exists: bool, optional + + :param if_tag_exists: The behavior when the tag already exists. + :type if_tag_exists: DataAttributesRulesItemsIfTagExists, optional :param query: The ``query`` ``query``. :type query: str """ if case_insensitivity is not unset: kwargs["case_insensitivity"] = case_insensitivity + if if_not_exists is not unset: + kwargs["if_not_exists"] = if_not_exists + if if_tag_exists is not unset: + kwargs["if_tag_exists"] = if_tag_exists super().__init__(kwargs) self_.addition = addition - self_.if_not_exists = if_not_exists self_.query = query diff --git a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_reference_table.py b/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_reference_table.py index 5d49da4a86..11429ee352 100644 --- a/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_reference_table.py +++ b/src/datadog_api_client/v2/model/create_ruleset_request_data_attributes_rules_items_reference_table.py @@ -17,6 +17,9 @@ from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items import ( CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) class CreateRulesetRequestDataAttributesRulesItemsReferenceTable(ModelNormal): @@ -27,11 +30,15 @@ def openapi_types(_): from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items import ( CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) return { "case_insensitivity": (bool,), "field_pairs": ([CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems],), "if_not_exists": (bool,), + "if_tag_exists": (DataAttributesRulesItemsIfTagExists,), "source_keys": ([str],), "table_name": (str,), } @@ -40,6 +47,7 @@ def openapi_types(_): "case_insensitivity": "case_insensitivity", "field_pairs": "field_pairs", "if_not_exists": "if_not_exists", + "if_tag_exists": "if_tag_exists", "source_keys": "source_keys", "table_name": "table_name", } @@ -51,6 +59,7 @@ def __init__( table_name: str, case_insensitivity: Union[bool, UnsetType] = unset, if_not_exists: Union[bool, UnsetType] = unset, + if_tag_exists: Union[DataAttributesRulesItemsIfTagExists, UnsetType] = unset, **kwargs, ): """ @@ -62,9 +71,12 @@ def __init__( :param field_pairs: The ``reference_table`` ``field_pairs``. :type field_pairs: [CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems] - :param if_not_exists: The ``reference_table`` ``if_not_exists``. + :param if_not_exists: Deprecated. Use ``if_tag_exists`` instead. The ``reference_table`` ``if_not_exists``. **Deprecated**. :type if_not_exists: bool, optional + :param if_tag_exists: The behavior when the tag already exists. + :type if_tag_exists: DataAttributesRulesItemsIfTagExists, optional + :param source_keys: The ``reference_table`` ``source_keys``. :type source_keys: [str] @@ -75,6 +87,8 @@ def __init__( kwargs["case_insensitivity"] = case_insensitivity if if_not_exists is not unset: kwargs["if_not_exists"] = if_not_exists + if if_tag_exists is not unset: + kwargs["if_tag_exists"] = if_tag_exists super().__init__(kwargs) self_.field_pairs = field_pairs diff --git a/src/datadog_api_client/v2/model/data_attributes_rules_items_if_tag_exists.py b/src/datadog_api_client/v2/model/data_attributes_rules_items_if_tag_exists.py new file mode 100644 index 0000000000..31ac3bc213 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_attributes_rules_items_if_tag_exists.py @@ -0,0 +1,41 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DataAttributesRulesItemsIfTagExists(ModelSimple): + """ + The behavior when the tag already exists. + + :param value: Must be one of ["append", "do_not_apply", "replace"]. + :type value: str + """ + + allowed_values = { + "append", + "do_not_apply", + "replace", + } + APPEND: ClassVar["DataAttributesRulesItemsIfTagExists"] + DO_NOT_APPLY: ClassVar["DataAttributesRulesItemsIfTagExists"] + REPLACE: ClassVar["DataAttributesRulesItemsIfTagExists"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DataAttributesRulesItemsIfTagExists.APPEND = DataAttributesRulesItemsIfTagExists("append") +DataAttributesRulesItemsIfTagExists.DO_NOT_APPLY = DataAttributesRulesItemsIfTagExists("do_not_apply") +DataAttributesRulesItemsIfTagExists.REPLACE = DataAttributesRulesItemsIfTagExists("replace") diff --git a/src/datadog_api_client/v2/model/data_attributes_rules_items_mapping.py b/src/datadog_api_client/v2/model/data_attributes_rules_items_mapping.py new file mode 100644 index 0000000000..63dc4b6e3b --- /dev/null +++ b/src/datadog_api_client/v2/model/data_attributes_rules_items_mapping.py @@ -0,0 +1,75 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) + + +class DataAttributesRulesItemsMapping(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) + + return { + "destination_key": (str,), + "if_not_exists": (bool,), + "if_tag_exists": (DataAttributesRulesItemsIfTagExists,), + "source_keys": ([str],), + } + + attribute_map = { + "destination_key": "destination_key", + "if_not_exists": "if_not_exists", + "if_tag_exists": "if_tag_exists", + "source_keys": "source_keys", + } + + def __init__( + self_, + destination_key: str, + source_keys: List[str], + if_not_exists: Union[bool, UnsetType] = unset, + if_tag_exists: Union[DataAttributesRulesItemsIfTagExists, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``DataAttributesRulesItemsMapping`` object. + + :param destination_key: The ``mapping`` ``destination_key``. + :type destination_key: str + + :param if_not_exists: Deprecated. Use ``if_tag_exists`` instead. The ``mapping`` ``if_not_exists``. **Deprecated**. + :type if_not_exists: bool, optional + + :param if_tag_exists: The behavior when the tag already exists. + :type if_tag_exists: DataAttributesRulesItemsIfTagExists, optional + + :param source_keys: The ``mapping`` ``source_keys``. + :type source_keys: [str] + """ + if if_not_exists is not unset: + kwargs["if_not_exists"] = if_not_exists + if if_tag_exists is not unset: + kwargs["if_tag_exists"] = if_tag_exists + super().__init__(kwargs) + + self_.destination_key = destination_key + self_.source_keys = source_keys diff --git a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items.py b/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items.py index dd7b4bb310..15e705b00b 100644 --- a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items.py +++ b/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items.py @@ -15,9 +15,7 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_mapping import ( - RulesetRespDataAttributesRulesItemsMapping, - ) + from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.ruleset_item_metadata import RulesetItemMetadata from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_query import ( RulesetRespDataAttributesRulesItemsQuery, @@ -30,9 +28,7 @@ class RulesetRespDataAttributesRulesItems(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_mapping import ( - RulesetRespDataAttributesRulesItemsMapping, - ) + from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.ruleset_item_metadata import RulesetItemMetadata from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_query import ( RulesetRespDataAttributesRulesItemsQuery, @@ -43,7 +39,7 @@ def openapi_types(_): return { "enabled": (bool,), - "mapping": (RulesetRespDataAttributesRulesItemsMapping,), + "mapping": (DataAttributesRulesItemsMapping,), "metadata": (RulesetItemMetadata,), "name": (str,), "query": (RulesetRespDataAttributesRulesItemsQuery,), @@ -63,7 +59,7 @@ def __init__( self_, enabled: bool, name: str, - mapping: Union[RulesetRespDataAttributesRulesItemsMapping, none_type, UnsetType] = unset, + mapping: Union[DataAttributesRulesItemsMapping, none_type, UnsetType] = unset, metadata: Union[RulesetItemMetadata, none_type, UnsetType] = unset, query: Union[RulesetRespDataAttributesRulesItemsQuery, none_type, UnsetType] = unset, reference_table: Union[RulesetRespDataAttributesRulesItemsReferenceTable, none_type, UnsetType] = unset, @@ -75,8 +71,8 @@ def __init__( :param enabled: The ``items`` ``enabled``. :type enabled: bool - :param mapping: The definition of ``RulesetRespDataAttributesRulesItemsMapping`` object. - :type mapping: RulesetRespDataAttributesRulesItemsMapping, none_type, optional + :param mapping: The definition of ``DataAttributesRulesItemsMapping`` object. + :type mapping: DataAttributesRulesItemsMapping, none_type, optional :param metadata: The ``items`` ``metadata``. :type metadata: RulesetItemMetadata, none_type, optional diff --git a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_mapping.py b/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_mapping.py deleted file mode 100644 index dbc1f56cf5..0000000000 --- a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_mapping.py +++ /dev/null @@ -1,48 +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. -from __future__ import annotations - -from typing import List - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class RulesetRespDataAttributesRulesItemsMapping(ModelNormal): - _nullable = True - - @cached_property - def openapi_types(_): - return { - "destination_key": (str,), - "if_not_exists": (bool,), - "source_keys": ([str],), - } - - attribute_map = { - "destination_key": "destination_key", - "if_not_exists": "if_not_exists", - "source_keys": "source_keys", - } - - def __init__(self_, destination_key: str, if_not_exists: bool, source_keys: List[str], **kwargs): - """ - The definition of ``RulesetRespDataAttributesRulesItemsMapping`` object. - - :param destination_key: The ``mapping`` ``destination_key``. - :type destination_key: str - - :param if_not_exists: The ``mapping`` ``if_not_exists``. - :type if_not_exists: bool - - :param source_keys: The ``mapping`` ``source_keys``. - :type source_keys: [str] - """ - super().__init__(kwargs) - - self_.destination_key = destination_key - self_.if_not_exists = if_not_exists - self_.source_keys = source_keys diff --git a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_query.py b/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_query.py index 30c9cf32db..5d53c19641 100644 --- a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_query.py +++ b/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_query.py @@ -18,6 +18,9 @@ from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_query_addition import ( RulesetRespDataAttributesRulesItemsQueryAddition, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) class RulesetRespDataAttributesRulesItemsQuery(ModelNormal): @@ -28,11 +31,15 @@ def openapi_types(_): from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_query_addition import ( RulesetRespDataAttributesRulesItemsQueryAddition, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) return { "addition": (RulesetRespDataAttributesRulesItemsQueryAddition,), "case_insensitivity": (bool,), "if_not_exists": (bool,), + "if_tag_exists": (DataAttributesRulesItemsIfTagExists,), "query": (str,), } @@ -40,15 +47,17 @@ def openapi_types(_): "addition": "addition", "case_insensitivity": "case_insensitivity", "if_not_exists": "if_not_exists", + "if_tag_exists": "if_tag_exists", "query": "query", } def __init__( self_, addition: Union[RulesetRespDataAttributesRulesItemsQueryAddition, none_type], - if_not_exists: bool, query: str, case_insensitivity: Union[bool, UnsetType] = unset, + if_not_exists: Union[bool, UnsetType] = unset, + if_tag_exists: Union[DataAttributesRulesItemsIfTagExists, UnsetType] = unset, **kwargs, ): """ @@ -60,16 +69,22 @@ def __init__( :param case_insensitivity: The ``query`` ``case_insensitivity``. :type case_insensitivity: bool, optional - :param if_not_exists: The ``query`` ``if_not_exists``. - :type if_not_exists: bool + :param if_not_exists: Deprecated. Use ``if_tag_exists`` instead. The ``query`` ``if_not_exists``. **Deprecated**. + :type if_not_exists: bool, optional + + :param if_tag_exists: The behavior when the tag already exists. + :type if_tag_exists: DataAttributesRulesItemsIfTagExists, optional :param query: The ``query`` ``query``. :type query: str """ if case_insensitivity is not unset: kwargs["case_insensitivity"] = case_insensitivity + if if_not_exists is not unset: + kwargs["if_not_exists"] = if_not_exists + if if_tag_exists is not unset: + kwargs["if_tag_exists"] = if_tag_exists super().__init__(kwargs) self_.addition = addition - self_.if_not_exists = if_not_exists self_.query = query diff --git a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_reference_table.py b/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_reference_table.py index 6c6075ac3d..708911247d 100644 --- a/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_reference_table.py +++ b/src/datadog_api_client/v2/model/ruleset_resp_data_attributes_rules_items_reference_table.py @@ -17,6 +17,9 @@ from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items import ( RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) class RulesetRespDataAttributesRulesItemsReferenceTable(ModelNormal): @@ -27,11 +30,15 @@ def openapi_types(_): from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items import ( RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) return { "case_insensitivity": (bool,), "field_pairs": ([RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems],), "if_not_exists": (bool,), + "if_tag_exists": (DataAttributesRulesItemsIfTagExists,), "source_keys": ([str],), "table_name": (str,), } @@ -40,6 +47,7 @@ def openapi_types(_): "case_insensitivity": "case_insensitivity", "field_pairs": "field_pairs", "if_not_exists": "if_not_exists", + "if_tag_exists": "if_tag_exists", "source_keys": "source_keys", "table_name": "table_name", } @@ -51,6 +59,7 @@ def __init__( table_name: str, case_insensitivity: Union[bool, UnsetType] = unset, if_not_exists: Union[bool, UnsetType] = unset, + if_tag_exists: Union[DataAttributesRulesItemsIfTagExists, UnsetType] = unset, **kwargs, ): """ @@ -62,9 +71,12 @@ def __init__( :param field_pairs: The ``reference_table`` ``field_pairs``. :type field_pairs: [RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems] - :param if_not_exists: The ``reference_table`` ``if_not_exists``. + :param if_not_exists: Deprecated. Use ``if_tag_exists`` instead. The ``reference_table`` ``if_not_exists``. **Deprecated**. :type if_not_exists: bool, optional + :param if_tag_exists: The behavior when the tag already exists. + :type if_tag_exists: DataAttributesRulesItemsIfTagExists, optional + :param source_keys: The ``reference_table`` ``source_keys``. :type source_keys: [str] @@ -75,6 +87,8 @@ def __init__( kwargs["case_insensitivity"] = case_insensitivity if if_not_exists is not unset: kwargs["if_not_exists"] = if_not_exists + if if_tag_exists is not unset: + kwargs["if_tag_exists"] = if_tag_exists super().__init__(kwargs) self_.field_pairs = field_pairs diff --git a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items.py b/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items.py index 95fb20d421..3412558737 100644 --- a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items.py +++ b/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items.py @@ -15,9 +15,7 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_mapping import ( - UpdateRulesetRequestDataAttributesRulesItemsMapping, - ) + from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.ruleset_item_metadata import RulesetItemMetadata from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_query import ( UpdateRulesetRequestDataAttributesRulesItemsQuery, @@ -30,9 +28,7 @@ class UpdateRulesetRequestDataAttributesRulesItems(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_mapping import ( - UpdateRulesetRequestDataAttributesRulesItemsMapping, - ) + from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.ruleset_item_metadata import RulesetItemMetadata from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_query import ( UpdateRulesetRequestDataAttributesRulesItemsQuery, @@ -43,7 +39,7 @@ def openapi_types(_): return { "enabled": (bool,), - "mapping": (UpdateRulesetRequestDataAttributesRulesItemsMapping,), + "mapping": (DataAttributesRulesItemsMapping,), "metadata": (RulesetItemMetadata,), "name": (str,), "query": (UpdateRulesetRequestDataAttributesRulesItemsQuery,), @@ -63,7 +59,7 @@ def __init__( self_, enabled: bool, name: str, - mapping: Union[UpdateRulesetRequestDataAttributesRulesItemsMapping, none_type, UnsetType] = unset, + mapping: Union[DataAttributesRulesItemsMapping, none_type, UnsetType] = unset, metadata: Union[RulesetItemMetadata, none_type, UnsetType] = unset, query: Union[UpdateRulesetRequestDataAttributesRulesItemsQuery, none_type, UnsetType] = unset, reference_table: Union[ @@ -77,8 +73,8 @@ def __init__( :param enabled: The ``items`` ``enabled``. :type enabled: bool - :param mapping: The definition of ``UpdateRulesetRequestDataAttributesRulesItemsMapping`` object. - :type mapping: UpdateRulesetRequestDataAttributesRulesItemsMapping, none_type, optional + :param mapping: The definition of ``DataAttributesRulesItemsMapping`` object. + :type mapping: DataAttributesRulesItemsMapping, none_type, optional :param metadata: The ``items`` ``metadata``. :type metadata: RulesetItemMetadata, none_type, optional diff --git a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_mapping.py b/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_mapping.py deleted file mode 100644 index a8ff7c0b08..0000000000 --- a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_mapping.py +++ /dev/null @@ -1,48 +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. -from __future__ import annotations - -from typing import List - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class UpdateRulesetRequestDataAttributesRulesItemsMapping(ModelNormal): - _nullable = True - - @cached_property - def openapi_types(_): - return { - "destination_key": (str,), - "if_not_exists": (bool,), - "source_keys": ([str],), - } - - attribute_map = { - "destination_key": "destination_key", - "if_not_exists": "if_not_exists", - "source_keys": "source_keys", - } - - def __init__(self_, destination_key: str, if_not_exists: bool, source_keys: List[str], **kwargs): - """ - The definition of ``UpdateRulesetRequestDataAttributesRulesItemsMapping`` object. - - :param destination_key: The ``mapping`` ``destination_key``. - :type destination_key: str - - :param if_not_exists: The ``mapping`` ``if_not_exists``. - :type if_not_exists: bool - - :param source_keys: The ``mapping`` ``source_keys``. - :type source_keys: [str] - """ - super().__init__(kwargs) - - self_.destination_key = destination_key - self_.if_not_exists = if_not_exists - self_.source_keys = source_keys diff --git a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_query.py b/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_query.py index 1cf536d9f5..94d6731e7e 100644 --- a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_query.py +++ b/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_query.py @@ -18,6 +18,9 @@ from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_query_addition import ( UpdateRulesetRequestDataAttributesRulesItemsQueryAddition, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) class UpdateRulesetRequestDataAttributesRulesItemsQuery(ModelNormal): @@ -28,11 +31,15 @@ def openapi_types(_): from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_query_addition import ( UpdateRulesetRequestDataAttributesRulesItemsQueryAddition, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) return { "addition": (UpdateRulesetRequestDataAttributesRulesItemsQueryAddition,), "case_insensitivity": (bool,), "if_not_exists": (bool,), + "if_tag_exists": (DataAttributesRulesItemsIfTagExists,), "query": (str,), } @@ -40,15 +47,17 @@ def openapi_types(_): "addition": "addition", "case_insensitivity": "case_insensitivity", "if_not_exists": "if_not_exists", + "if_tag_exists": "if_tag_exists", "query": "query", } def __init__( self_, addition: Union[UpdateRulesetRequestDataAttributesRulesItemsQueryAddition, none_type], - if_not_exists: bool, query: str, case_insensitivity: Union[bool, UnsetType] = unset, + if_not_exists: Union[bool, UnsetType] = unset, + if_tag_exists: Union[DataAttributesRulesItemsIfTagExists, UnsetType] = unset, **kwargs, ): """ @@ -60,16 +69,22 @@ def __init__( :param case_insensitivity: The ``query`` ``case_insensitivity``. :type case_insensitivity: bool, optional - :param if_not_exists: The ``query`` ``if_not_exists``. - :type if_not_exists: bool + :param if_not_exists: Deprecated. Use ``if_tag_exists`` instead. The ``query`` ``if_not_exists``. **Deprecated**. + :type if_not_exists: bool, optional + + :param if_tag_exists: The behavior when the tag already exists. + :type if_tag_exists: DataAttributesRulesItemsIfTagExists, optional :param query: The ``query`` ``query``. :type query: str """ if case_insensitivity is not unset: kwargs["case_insensitivity"] = case_insensitivity + if if_not_exists is not unset: + kwargs["if_not_exists"] = if_not_exists + if if_tag_exists is not unset: + kwargs["if_tag_exists"] = if_tag_exists super().__init__(kwargs) self_.addition = addition - self_.if_not_exists = if_not_exists self_.query = query diff --git a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_reference_table.py b/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_reference_table.py index 0f2dbb7713..b35ae9a7db 100644 --- a/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_reference_table.py +++ b/src/datadog_api_client/v2/model/update_ruleset_request_data_attributes_rules_items_reference_table.py @@ -17,6 +17,9 @@ from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items import ( UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) class UpdateRulesetRequestDataAttributesRulesItemsReferenceTable(ModelNormal): @@ -27,11 +30,15 @@ def openapi_types(_): from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items import ( UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems, ) + from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import ( + DataAttributesRulesItemsIfTagExists, + ) return { "case_insensitivity": (bool,), "field_pairs": ([UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems],), "if_not_exists": (bool,), + "if_tag_exists": (DataAttributesRulesItemsIfTagExists,), "source_keys": ([str],), "table_name": (str,), } @@ -40,6 +47,7 @@ def openapi_types(_): "case_insensitivity": "case_insensitivity", "field_pairs": "field_pairs", "if_not_exists": "if_not_exists", + "if_tag_exists": "if_tag_exists", "source_keys": "source_keys", "table_name": "table_name", } @@ -51,6 +59,7 @@ def __init__( table_name: str, case_insensitivity: Union[bool, UnsetType] = unset, if_not_exists: Union[bool, UnsetType] = unset, + if_tag_exists: Union[DataAttributesRulesItemsIfTagExists, UnsetType] = unset, **kwargs, ): """ @@ -62,9 +71,12 @@ def __init__( :param field_pairs: The ``reference_table`` ``field_pairs``. :type field_pairs: [UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems] - :param if_not_exists: The ``reference_table`` ``if_not_exists``. + :param if_not_exists: Deprecated. Use ``if_tag_exists`` instead. The ``reference_table`` ``if_not_exists``. **Deprecated**. :type if_not_exists: bool, optional + :param if_tag_exists: The behavior when the tag already exists. + :type if_tag_exists: DataAttributesRulesItemsIfTagExists, optional + :param source_keys: The ``reference_table`` ``source_keys``. :type source_keys: [str] @@ -75,6 +87,8 @@ def __init__( kwargs["case_insensitivity"] = case_insensitivity if if_not_exists is not unset: kwargs["if_not_exists"] = if_not_exists + if if_tag_exists is not unset: + kwargs["if_tag_exists"] = if_tag_exists super().__init__(kwargs) self_.field_pairs = field_pairs diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 4a34c20b16..cb0d84c06f 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1132,9 +1132,6 @@ from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items import ( CreateRulesetRequestDataAttributesRulesItems, ) -from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_mapping import ( - CreateRulesetRequestDataAttributesRulesItemsMapping, -) from datadog_api_client.v2.model.create_ruleset_request_data_attributes_rules_items_query import ( CreateRulesetRequestDataAttributesRulesItemsQuery, ) @@ -1453,6 +1450,8 @@ from datadog_api_client.v2.model.dashboard_list_update_items_response import DashboardListUpdateItemsResponse from datadog_api_client.v2.model.dashboard_trigger_wrapper import DashboardTriggerWrapper from datadog_api_client.v2.model.dashboard_type import DashboardType +from datadog_api_client.v2.model.data_attributes_rules_items_if_tag_exists import DataAttributesRulesItemsIfTagExists +from datadog_api_client.v2.model.data_attributes_rules_items_mapping import DataAttributesRulesItemsMapping from datadog_api_client.v2.model.data_deletion_response_item import DataDeletionResponseItem from datadog_api_client.v2.model.data_deletion_response_item_attributes import DataDeletionResponseItemAttributes from datadog_api_client.v2.model.data_deletion_response_meta import DataDeletionResponseMeta @@ -4382,9 +4381,6 @@ from datadog_api_client.v2.model.ruleset_resp_data_attributes_created import RulesetRespDataAttributesCreated from datadog_api_client.v2.model.ruleset_resp_data_attributes_modified import RulesetRespDataAttributesModified from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items import RulesetRespDataAttributesRulesItems -from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_mapping import ( - RulesetRespDataAttributesRulesItemsMapping, -) from datadog_api_client.v2.model.ruleset_resp_data_attributes_rules_items_query import ( RulesetRespDataAttributesRulesItemsQuery, ) @@ -5699,9 +5695,6 @@ from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items import ( UpdateRulesetRequestDataAttributesRulesItems, ) -from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_mapping import ( - UpdateRulesetRequestDataAttributesRulesItemsMapping, -) from datadog_api_client.v2.model.update_ruleset_request_data_attributes_rules_items_query import ( UpdateRulesetRequestDataAttributesRulesItemsQuery, ) @@ -6695,7 +6688,6 @@ "CreateRulesetRequestData", "CreateRulesetRequestDataAttributes", "CreateRulesetRequestDataAttributesRulesItems", - "CreateRulesetRequestDataAttributesRulesItemsMapping", "CreateRulesetRequestDataAttributesRulesItemsQuery", "CreateRulesetRequestDataAttributesRulesItemsQueryAddition", "CreateRulesetRequestDataAttributesRulesItemsReferenceTable", @@ -6896,6 +6888,8 @@ "DashboardListUpdateItemsResponse", "DashboardTriggerWrapper", "DashboardType", + "DataAttributesRulesItemsIfTagExists", + "DataAttributesRulesItemsMapping", "DataDeletionResponseItem", "DataDeletionResponseItemAttributes", "DataDeletionResponseMeta", @@ -8967,7 +8961,6 @@ "RulesetRespDataAttributesCreated", "RulesetRespDataAttributesModified", "RulesetRespDataAttributesRulesItems", - "RulesetRespDataAttributesRulesItemsMapping", "RulesetRespDataAttributesRulesItemsQuery", "RulesetRespDataAttributesRulesItemsQueryAddition", "RulesetRespDataAttributesRulesItemsReferenceTable", @@ -9888,7 +9881,6 @@ "UpdateRulesetRequestData", "UpdateRulesetRequestDataAttributes", "UpdateRulesetRequestDataAttributesRulesItems", - "UpdateRulesetRequestDataAttributesRulesItemsMapping", "UpdateRulesetRequestDataAttributesRulesItemsQuery", "UpdateRulesetRequestDataAttributesRulesItemsQueryAddition", "UpdateRulesetRequestDataAttributesRulesItemsReferenceTable",