Skip to content

Commit 0758a38

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e00934d of spec repo
1 parent 53be7d6 commit 0758a38

7 files changed

Lines changed: 117 additions & 48 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20125,10 +20125,14 @@ components:
2012520125
- CONTAINER
2012620126
- CALLOUTVALUE
2012720127
Condition:
20128-
description: Targeting condition details.
20128+
description: |-
20129+
Targeting condition details. A condition is either an inline
20130+
predicate with `operator`, `attribute`, and `value`, or a reference to a
20131+
saved filter with `saved_filter_id`. The inline fields are omitted for saved-filter
20132+
references.
2012920133
properties:
2013020134
attribute:
20131-
description: The user or request attribute to evaluate.
20135+
description: The user or request attribute to evaluate. Omitted for saved-filter references.
2013220136
example: "country"
2013320137
type: string
2013420138
created_at:
@@ -20143,23 +20147,26 @@ components:
2014320147
type: string
2014420148
operator:
2014520149
$ref: "#/components/schemas/ConditionOperator"
20150+
saved_filter_id:
20151+
description: The ID of the saved filter referenced by this condition, or null for inline conditions.
20152+
example: "550e8400-e29b-41d4-a716-446655440090"
20153+
format: uuid
20154+
nullable: true
20155+
type: string
2014620156
updated_at:
2014720157
description: The timestamp when the condition was last updated.
2014820158
example: "2024-01-01T12:00:00Z"
2014920159
format: date-time
2015020160
type: string
2015120161
value:
20152-
description: Values used by the selected operator.
20162+
description: Values used by the selected operator. Omitted for saved-filter references.
2015320163
example: ["US", "CA"]
2015420164
items:
2015520165
description: Target value for the selected operator.
2015620166
type: string
2015720167
type: array
2015820168
required:
2015920169
- id
20160-
- operator
20161-
- attribute
20162-
- value
2016320170
- created_at
2016420171
- updated_at
2016520172
type: object
@@ -20190,25 +20197,32 @@ components:
2019020197
- IS_NULL
2019120198
- EQUALS
2019220199
ConditionRequest:
20193-
description: Condition request payload for targeting rules.
20200+
description: |-
20201+
Condition request payload for targeting rules. A condition is either an inline
20202+
predicate with `operator`, `attribute`, and `value`, or a reference to a
20203+
saved filter with `saved_filter_id`. The two shapes are mutually exclusive.
2019420204
properties:
2019520205
attribute:
20196-
description: The user or request attribute to evaluate.
20206+
description: The user or request attribute to evaluate. Required for inline conditions; omit when `saved_filter_id` is set.
2019720207
example: "user_tier"
2019820208
type: string
2019920209
operator:
2020020210
$ref: "#/components/schemas/ConditionOperator"
20211+
saved_filter_id:
20212+
description: |-
20213+
The ID of a saved filter to reference as this condition. Mutually exclusive
20214+
with `operator`, `attribute`, and `value`. When set, the saved filter's
20215+
targeting rules are evaluated in place of an inline predicate.
20216+
example: "550e8400-e29b-41d4-a716-446655440090"
20217+
format: uuid
20218+
type: string
2020120219
value:
20202-
description: Values used by the selected operator.
20220+
description: Values used by the selected operator. Required for inline conditions; omit when `saved_filter_id` is set.
2020320221
example: ["premium", "enterprise"]
2020420222
items:
2020520223
description: Target value for the selected operator.
2020620224
type: string
2020720225
type: array
20208-
required:
20209-
- operator
20210-
- attribute
20211-
- value
2021220226
type: object
2021320227
ConfigCatCredentials:
2021420228
description: The definition of the `ConfigCatCredentials` object.
@@ -64968,6 +64982,9 @@ components:
6496864982
description: The ID of a component whose output is used as input for this destination.
6496964983
type: string
6497064984
type: array
64985+
tls:
64986+
$ref: "#/components/schemas/ObservabilityPipelineTls"
64987+
description: Configuration for TLS encryption.
6497164988
type:
6497264989
$ref: "#/components/schemas/ObservabilityPipelineCloudPremDestinationType"
6497364990
required:

examples/v2/feature-flags/CreateAllocationsForFeatureFlagInEnvironment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
ConditionRequest(
6363
attribute="user_tier",
6464
operator=ConditionOperator.ONE_OF,
65+
saved_filter_id=UUID("550e8400-e29b-41d4-a716-446655440090"),
6566
value=[
6667
"premium",
6768
"enterprise",

examples/v2/feature-flags/UpdateAllocationsForFeatureFlagInEnvironment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
ConditionRequest(
6464
attribute="user_tier",
6565
operator=ConditionOperator.ONE_OF,
66+
saved_filter_id=UUID("550e8400-e29b-41d4-a716-446655440090"),
6667
value=[
6768
"premium",
6869
"enterprise",

src/datadog_api_client/v2/model/condition.py

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import List, TYPE_CHECKING
6+
from typing import List, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
1111
datetime,
12+
none_type,
13+
unset,
14+
UnsetType,
1215
UUID,
1316
)
1417

@@ -27,6 +30,7 @@ def openapi_types(_):
2730
"created_at": (datetime,),
2831
"id": (UUID,),
2932
"operator": (ConditionOperator,),
33+
"saved_filter_id": (UUID, none_type),
3034
"updated_at": (datetime,),
3135
"value": ([str],),
3236
}
@@ -36,25 +40,30 @@ def openapi_types(_):
3640
"created_at": "created_at",
3741
"id": "id",
3842
"operator": "operator",
43+
"saved_filter_id": "saved_filter_id",
3944
"updated_at": "updated_at",
4045
"value": "value",
4146
}
4247

4348
def __init__(
4449
self_,
45-
attribute: str,
4650
created_at: datetime,
4751
id: UUID,
48-
operator: ConditionOperator,
4952
updated_at: datetime,
50-
value: List[str],
53+
attribute: Union[str, UnsetType] = unset,
54+
operator: Union[ConditionOperator, UnsetType] = unset,
55+
saved_filter_id: Union[UUID, none_type, UnsetType] = unset,
56+
value: Union[List[str], UnsetType] = unset,
5157
**kwargs,
5258
):
5359
"""
54-
Targeting condition details.
60+
Targeting condition details. A condition is either an inline
61+
predicate with ``operator`` , ``attribute`` , and ``value`` , or a reference to a
62+
saved filter with ``saved_filter_id``. The inline fields are omitted for saved-filter
63+
references.
5564
56-
:param attribute: The user or request attribute to evaluate.
57-
:type attribute: str
65+
:param attribute: The user or request attribute to evaluate. Omitted for saved-filter references.
66+
:type attribute: str, optional
5867
5968
:param created_at: The timestamp when the condition was created.
6069
:type created_at: datetime
@@ -63,19 +72,27 @@ def __init__(
6372
:type id: UUID
6473
6574
:param operator: The operator used in a targeting condition.
66-
:type operator: ConditionOperator
75+
:type operator: ConditionOperator, optional
76+
77+
:param saved_filter_id: The ID of the saved filter referenced by this condition, or null for inline conditions.
78+
:type saved_filter_id: UUID, none_type, optional
6779
6880
:param updated_at: The timestamp when the condition was last updated.
6981
:type updated_at: datetime
7082
71-
:param value: Values used by the selected operator.
72-
:type value: [str]
83+
:param value: Values used by the selected operator. Omitted for saved-filter references.
84+
:type value: [str], optional
7385
"""
86+
if attribute is not unset:
87+
kwargs["attribute"] = attribute
88+
if operator is not unset:
89+
kwargs["operator"] = operator
90+
if saved_filter_id is not unset:
91+
kwargs["saved_filter_id"] = saved_filter_id
92+
if value is not unset:
93+
kwargs["value"] = value
7494
super().__init__(kwargs)
7595

76-
self_.attribute = attribute
7796
self_.created_at = created_at
7897
self_.id = id
79-
self_.operator = operator
8098
self_.updated_at = updated_at
81-
self_.value = value

src/datadog_api_client/v2/model/condition_request.py

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import List, TYPE_CHECKING
6+
from typing import List, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
unset,
12+
UnsetType,
13+
UUID,
1114
)
1215

1316

@@ -23,30 +26,50 @@ def openapi_types(_):
2326
return {
2427
"attribute": (str,),
2528
"operator": (ConditionOperator,),
29+
"saved_filter_id": (UUID,),
2630
"value": ([str],),
2731
}
2832

2933
attribute_map = {
3034
"attribute": "attribute",
3135
"operator": "operator",
36+
"saved_filter_id": "saved_filter_id",
3237
"value": "value",
3338
}
3439

35-
def __init__(self_, attribute: str, operator: ConditionOperator, value: List[str], **kwargs):
40+
def __init__(
41+
self_,
42+
attribute: Union[str, UnsetType] = unset,
43+
operator: Union[ConditionOperator, UnsetType] = unset,
44+
saved_filter_id: Union[UUID, UnsetType] = unset,
45+
value: Union[List[str], UnsetType] = unset,
46+
**kwargs,
47+
):
3648
"""
37-
Condition request payload for targeting rules.
49+
Condition request payload for targeting rules. A condition is either an inline
50+
predicate with ``operator`` , ``attribute`` , and ``value`` , or a reference to a
51+
saved filter with ``saved_filter_id``. The two shapes are mutually exclusive.
3852
39-
:param attribute: The user or request attribute to evaluate.
40-
:type attribute: str
53+
:param attribute: The user or request attribute to evaluate. Required for inline conditions; omit when ``saved_filter_id`` is set.
54+
:type attribute: str, optional
4155
4256
:param operator: The operator used in a targeting condition.
43-
:type operator: ConditionOperator
57+
:type operator: ConditionOperator, optional
4458
45-
:param value: Values used by the selected operator.
46-
:type value: [str]
59+
:param saved_filter_id: The ID of a saved filter to reference as this condition. Mutually exclusive
60+
with ``operator`` , ``attribute`` , and ``value``. When set, the saved filter's
61+
targeting rules are evaluated in place of an inline predicate.
62+
:type saved_filter_id: UUID, optional
63+
64+
:param value: Values used by the selected operator. Required for inline conditions; omit when ``saved_filter_id`` is set.
65+
:type value: [str], optional
4766
"""
67+
if attribute is not unset:
68+
kwargs["attribute"] = attribute
69+
if operator is not unset:
70+
kwargs["operator"] = operator
71+
if saved_filter_id is not unset:
72+
kwargs["saved_filter_id"] = saved_filter_id
73+
if value is not unset:
74+
kwargs["value"] = value
4875
super().__init__(kwargs)
49-
50-
self_.attribute = attribute
51-
self_.operator = operator
52-
self_.value = value

src/datadog_api_client/v2/model/observability_pipeline_cloud_prem_destination.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
if TYPE_CHECKING:
1717
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
18+
from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls
1819
from datadog_api_client.v2.model.observability_pipeline_cloud_prem_destination_type import (
1920
ObservabilityPipelineCloudPremDestinationType,
2021
)
@@ -33,6 +34,7 @@ class ObservabilityPipelineCloudPremDestination(ModelNormal):
3334
@cached_property
3435
def openapi_types(_):
3536
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
37+
from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls
3638
from datadog_api_client.v2.model.observability_pipeline_cloud_prem_destination_type import (
3739
ObservabilityPipelineCloudPremDestinationType,
3840
)
@@ -42,6 +44,7 @@ def openapi_types(_):
4244
"endpoint_url_key": (str,),
4345
"id": (str,),
4446
"inputs": ([str],),
47+
"tls": (ObservabilityPipelineTls,),
4548
"type": (ObservabilityPipelineCloudPremDestinationType,),
4649
}
4750

@@ -50,6 +53,7 @@ def openapi_types(_):
5053
"endpoint_url_key": "endpoint_url_key",
5154
"id": "id",
5255
"inputs": "inputs",
56+
"tls": "tls",
5357
"type": "type",
5458
}
5559

@@ -66,6 +70,7 @@ def __init__(
6670
UnsetType,
6771
] = unset,
6872
endpoint_url_key: Union[str, UnsetType] = unset,
73+
tls: Union[ObservabilityPipelineTls, UnsetType] = unset,
6974
**kwargs,
7075
):
7176
"""
@@ -85,13 +90,18 @@ def __init__(
8590
:param inputs: A list of component IDs whose output is used as the ``input`` for this component.
8691
:type inputs: [str]
8792
93+
:param tls: Configuration for enabling TLS encryption between the pipeline component and external services.
94+
:type tls: ObservabilityPipelineTls, optional
95+
8896
:param type: The destination type. The value should always be ``cloud_prem``.
8997
:type type: ObservabilityPipelineCloudPremDestinationType
9098
"""
9199
if buffer is not unset:
92100
kwargs["buffer"] = buffer
93101
if endpoint_url_key is not unset:
94102
kwargs["endpoint_url_key"] = endpoint_url_key
103+
if tls is not unset:
104+
kwargs["tls"] = tls
95105
super().__init__(kwargs)
96106

97107
self_.id = id

0 commit comments

Comments
 (0)