Skip to content

Commit 7297e95

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b4de72c1 of spec repo
1 parent c1ecc56 commit 7297e95

25 files changed

+185
-70
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-08-05 16:34:56.168477",
8-
"spec_repo_commit": "578f6c8c"
7+
"regenerated": "2024-08-06 12:13:39.879707",
8+
"spec_repo_commit": "b4de72c1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-05 16:34:56.186208",
13-
"spec_repo_commit": "578f6c8c"
12+
"regenerated": "2024-08-06 12:13:39.897176",
13+
"spec_repo_commit": "b4de72c1"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13818,6 +13818,7 @@ components:
1381813818
- $ref: '#/components/schemas/SyntheticsAssertionJSONPathTarget'
1381913819
- $ref: '#/components/schemas/SyntheticsAssertionJSONSchemaTarget'
1382013820
- $ref: '#/components/schemas/SyntheticsAssertionXPathTarget'
13821+
- $ref: '#/components/schemas/SyntheticsAssertionJavascript'
1382113822
SyntheticsAssertionBodyHashOperator:
1382213823
description: Assertion operator to apply.
1382313824
enum:
@@ -13934,6 +13935,19 @@ components:
1393413935
metaSchema:
1393513936
$ref: '#/components/schemas/SyntheticsAssertionJSONSchemaMetaSchema'
1393613937
type: object
13938+
SyntheticsAssertionJavascript:
13939+
description: A JavaScript assertion.
13940+
properties:
13941+
code:
13942+
description: The JavaScript code that performs the assertions.
13943+
example: dd.expect(dd.response.statusCode).to.equal(200);
13944+
type: string
13945+
type:
13946+
$ref: '#/components/schemas/SyntheticsAssertionType'
13947+
required:
13948+
- type
13949+
- code
13950+
type: object
1393713951
SyntheticsAssertionOperator:
1393813952
description: Assertion operator to apply.
1393913953
enum:
@@ -14021,6 +14035,7 @@ components:
1402114035
- grpcMetadata
1402214036
- grpcProto
1402314037
- connection
14038+
- javascript
1402414039
example: statusCode
1402514040
type: string
1402614041
x-enum-varnames:
@@ -14043,6 +14058,7 @@ components:
1404314058
- GRPC_METADATA
1404414059
- GRPC_PROTO
1404514060
- CONNECTION
14061+
- JAVASCRIPT
1404614062
SyntheticsAssertionXPathOperator:
1404714063
description: Assertion operator to apply.
1404814064
enum:

docs/datadog_api_client.v1.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3910,6 +3910,13 @@ datadog\_api\_client.v1.model.synthetics\_assertion\_body\_hash\_type module
39103910
:members:
39113911
:show-inheritance:
39123912

3913+
datadog\_api\_client.v1.model.synthetics\_assertion\_javascript module
3914+
----------------------------------------------------------------------
3915+
3916+
.. automodule:: datadog_api_client.v1.model.synthetics_assertion_javascript
3917+
:members:
3918+
:show-inheritance:
3919+
39133920
datadog\_api\_client.v1.model.synthetics\_assertion\_json\_path\_operator module
39143921
--------------------------------------------------------------------------------
39153922

examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from datadog_api_client.v1.model.synthetics_assertion_body_hash_operator import SyntheticsAssertionBodyHashOperator
1111
from datadog_api_client.v1.model.synthetics_assertion_body_hash_target import SyntheticsAssertionBodyHashTarget
1212
from datadog_api_client.v1.model.synthetics_assertion_body_hash_type import SyntheticsAssertionBodyHashType
13+
from datadog_api_client.v1.model.synthetics_assertion_javascript import SyntheticsAssertionJavascript
1314
from datadog_api_client.v1.model.synthetics_assertion_json_path_operator import SyntheticsAssertionJSONPathOperator
1415
from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
1516
from datadog_api_client.v1.model.synthetics_assertion_json_path_target_target import (
@@ -103,6 +104,10 @@
103104
target="a",
104105
type=SyntheticsAssertionBodyHashType.BODY_HASH,
105106
),
107+
SyntheticsAssertionJavascript(
108+
code="const hello = 'world';",
109+
type=SyntheticsAssertionType.JAVASCRIPT,
110+
),
106111
],
107112
config_variables=[
108113
SyntheticsConfigVariable(

examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from datadog_api_client.v1.model.synthetics_assertion_body_hash_operator import SyntheticsAssertionBodyHashOperator
1111
from datadog_api_client.v1.model.synthetics_assertion_body_hash_target import SyntheticsAssertionBodyHashTarget
1212
from datadog_api_client.v1.model.synthetics_assertion_body_hash_type import SyntheticsAssertionBodyHashType
13+
from datadog_api_client.v1.model.synthetics_assertion_javascript import SyntheticsAssertionJavascript
1314
from datadog_api_client.v1.model.synthetics_assertion_json_path_operator import SyntheticsAssertionJSONPathOperator
1415
from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
1516
from datadog_api_client.v1.model.synthetics_assertion_json_path_target_target import (
@@ -103,6 +104,10 @@
103104
target="a",
104105
type=SyntheticsAssertionBodyHashType.BODY_HASH,
105106
),
107+
SyntheticsAssertionJavascript(
108+
code="const hello = 'world';",
109+
type=SyntheticsAssertionType.JAVASCRIPT,
110+
),
106111
],
107112
config_variables=[
108113
SyntheticsConfigVariable(

src/datadog_api_client/v1/model/synthetics_api_test_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
2424
from datadog_api_client.v1.model.synthetics_assertion_json_schema_target import SyntheticsAssertionJSONSchemaTarget
2525
from datadog_api_client.v1.model.synthetics_assertion_x_path_target import SyntheticsAssertionXPathTarget
26+
from datadog_api_client.v1.model.synthetics_assertion_javascript import SyntheticsAssertionJavascript
2627
from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep
2728
from datadog_api_client.v1.model.synthetics_api_wait_step import SyntheticsAPIWaitStep
2829

@@ -62,6 +63,7 @@ def __init__(
6263
SyntheticsAssertionJSONPathTarget,
6364
SyntheticsAssertionJSONSchemaTarget,
6465
SyntheticsAssertionXPathTarget,
66+
SyntheticsAssertionJavascript,
6567
]
6668
],
6769
UnsetType,

src/datadog_api_client/v1/model/synthetics_assertion.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def __init__(self, **kwargs):
3030
3131
:param type: Type of the assertion.
3232
:type type: SyntheticsAssertionType
33+
34+
:param code: The JavaScript code that performs the assertions.
35+
:type code: str
3336
"""
3437
super().__init__(kwargs)
3538

@@ -49,6 +52,7 @@ def _composed_schemas(_):
4952
SyntheticsAssertionJSONSchemaTarget,
5053
)
5154
from datadog_api_client.v1.model.synthetics_assertion_x_path_target import SyntheticsAssertionXPathTarget
55+
from datadog_api_client.v1.model.synthetics_assertion_javascript import SyntheticsAssertionJavascript
5256

5357
return {
5458
"oneOf": [
@@ -57,5 +61,6 @@ def _composed_schemas(_):
5761
SyntheticsAssertionJSONPathTarget,
5862
SyntheticsAssertionJSONSchemaTarget,
5963
SyntheticsAssertionXPathTarget,
64+
SyntheticsAssertionJavascript,
6065
],
6166
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
16+
17+
18+
class SyntheticsAssertionJavascript(ModelNormal):
19+
@cached_property
20+
def openapi_types(_):
21+
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
22+
23+
return {
24+
"code": (str,),
25+
"type": (SyntheticsAssertionType,),
26+
}
27+
28+
attribute_map = {
29+
"code": "code",
30+
"type": "type",
31+
}
32+
33+
def __init__(self_, code: str, type: SyntheticsAssertionType, **kwargs):
34+
"""
35+
A JavaScript assertion.
36+
37+
:param code: The JavaScript code that performs the assertions.
38+
:type code: str
39+
40+
:param type: Type of the assertion.
41+
:type type: SyntheticsAssertionType
42+
"""
43+
super().__init__(kwargs)
44+
45+
self_.code = code
46+
self_.type = type

src/datadog_api_client/v1/model/synthetics_assertion_type.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SyntheticsAssertionType(ModelSimple):
1616
"""
1717
Type of the assertion.
1818
19-
:param value: Must be one of ["body", "header", "statusCode", "certificate", "responseTime", "property", "recordEvery", "recordSome", "tlsVersion", "minTlsVersion", "latency", "packetLossPercentage", "packetsReceived", "networkHop", "receivedMessage", "grpcHealthcheckStatus", "grpcMetadata", "grpcProto", "connection"].
19+
:param value: Must be one of ["body", "header", "statusCode", "certificate", "responseTime", "property", "recordEvery", "recordSome", "tlsVersion", "minTlsVersion", "latency", "packetLossPercentage", "packetsReceived", "networkHop", "receivedMessage", "grpcHealthcheckStatus", "grpcMetadata", "grpcProto", "connection", "javascript"].
2020
:type value: str
2121
"""
2222

@@ -40,6 +40,7 @@ class SyntheticsAssertionType(ModelSimple):
4040
"grpcMetadata",
4141
"grpcProto",
4242
"connection",
43+
"javascript",
4344
}
4445
BODY: ClassVar["SyntheticsAssertionType"]
4546
HEADER: ClassVar["SyntheticsAssertionType"]
@@ -60,6 +61,7 @@ class SyntheticsAssertionType(ModelSimple):
6061
GRPC_METADATA: ClassVar["SyntheticsAssertionType"]
6162
GRPC_PROTO: ClassVar["SyntheticsAssertionType"]
6263
CONNECTION: ClassVar["SyntheticsAssertionType"]
64+
JAVASCRIPT: ClassVar["SyntheticsAssertionType"]
6365

6466
@cached_property
6567
def openapi_types(_):
@@ -87,3 +89,4 @@ def openapi_types(_):
8789
SyntheticsAssertionType.GRPC_METADATA = SyntheticsAssertionType("grpcMetadata")
8890
SyntheticsAssertionType.GRPC_PROTO = SyntheticsAssertionType("grpcProto")
8991
SyntheticsAssertionType.CONNECTION = SyntheticsAssertionType("connection")
92+
SyntheticsAssertionType.JAVASCRIPT = SyntheticsAssertionType("javascript")

src/datadog_api_client/v1/model/synthetics_test_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
2424
from datadog_api_client.v1.model.synthetics_assertion_json_schema_target import SyntheticsAssertionJSONSchemaTarget
2525
from datadog_api_client.v1.model.synthetics_assertion_x_path_target import SyntheticsAssertionXPathTarget
26+
from datadog_api_client.v1.model.synthetics_assertion_javascript import SyntheticsAssertionJavascript
2627

2728

2829
class SyntheticsTestConfig(ModelNormal):
@@ -58,6 +59,7 @@ def __init__(
5859
SyntheticsAssertionJSONPathTarget,
5960
SyntheticsAssertionJSONSchemaTarget,
6061
SyntheticsAssertionXPathTarget,
62+
SyntheticsAssertionJavascript,
6163
]
6264
],
6365
UnsetType,

src/datadog_api_client/v1/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@
641641
from datadog_api_client.v1.model.synthetics_assertion_json_schema_target_target import (
642642
SyntheticsAssertionJSONSchemaTargetTarget,
643643
)
644+
from datadog_api_client.v1.model.synthetics_assertion_javascript import SyntheticsAssertionJavascript
644645
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
645646
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
646647
from datadog_api_client.v1.model.synthetics_assertion_timings_scope import SyntheticsAssertionTimingsScope
@@ -1547,6 +1548,7 @@
15471548
"SyntheticsAssertionJSONSchemaOperator",
15481549
"SyntheticsAssertionJSONSchemaTarget",
15491550
"SyntheticsAssertionJSONSchemaTargetTarget",
1551+
"SyntheticsAssertionJavascript",
15501552
"SyntheticsAssertionOperator",
15511553
"SyntheticsAssertionTarget",
15521554
"SyntheticsAssertionTimingsScope",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-06-14T14:40:25.126Z
1+
2024-08-05T15:40:27.317Z

0 commit comments

Comments
 (0)