Skip to content

Commit d765a5b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 94cb0f4 of spec repo (#3646)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 6211440 commit d765a5b

10 files changed

Lines changed: 366 additions & 0 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17308,6 +17308,7 @@ components:
1730817308
- $ref: "#/components/schemas/SyntheticsBasicAuthDigest"
1730917309
- $ref: "#/components/schemas/SyntheticsBasicAuthOauthClient"
1731017310
- $ref: "#/components/schemas/SyntheticsBasicAuthOauthROP"
17311+
- $ref: "#/components/schemas/SyntheticsBasicAuthJWT"
1731117312
SyntheticsBasicAuthDigest:
1731217313
description: Object to handle digest authentication when performing the test.
1731317314
properties:
@@ -17335,6 +17336,78 @@ components:
1733517336
type: string
1733617337
x-enum-varnames:
1733717338
- DIGEST
17339+
SyntheticsBasicAuthJWT:
17340+
description: Object to handle JWT authentication when performing the test.
17341+
properties:
17342+
addClaims:
17343+
$ref: "#/components/schemas/SyntheticsBasicAuthJWTAddClaims"
17344+
algorithm:
17345+
$ref: "#/components/schemas/SyntheticsBasicAuthJWTAlgorithm"
17346+
expiresIn:
17347+
description: Token time-to-live in seconds.
17348+
example: 3600
17349+
format: int64
17350+
minimum: 1
17351+
type: integer
17352+
header:
17353+
description: Custom JWT header as a JSON string.
17354+
example: '{"kid": "my-key-id"}'
17355+
type: string
17356+
payload:
17357+
description: JWT claims as a JSON string.
17358+
example: '{"sub": "1234567890", "name": "John Doe"}'
17359+
type: string
17360+
secret:
17361+
description: |-
17362+
Signing key for the JWT authentication. Use the shared secret for `HS256`
17363+
or the private key (PEM format) for `RS256` and `ES256`.
17364+
example: "mysecretkey"
17365+
type: string
17366+
tokenPrefix:
17367+
description: Prefix added before the token in the `Authorization` header. Defaults to `Bearer`.
17368+
example: "Bearer"
17369+
type: string
17370+
type:
17371+
$ref: "#/components/schemas/SyntheticsBasicAuthJWTType"
17372+
required:
17373+
- algorithm
17374+
- payload
17375+
- secret
17376+
- type
17377+
type: object
17378+
SyntheticsBasicAuthJWTAddClaims:
17379+
description: Standard JWT claims to automatically inject.
17380+
properties:
17381+
exp:
17382+
description: Whether to inject the `exp` (expiration) claim.
17383+
example: true
17384+
type: boolean
17385+
iat:
17386+
description: Whether to inject the `iat` (issued at) claim.
17387+
example: true
17388+
type: boolean
17389+
type: object
17390+
SyntheticsBasicAuthJWTAlgorithm:
17391+
description: Algorithm to use for the JWT authentication.
17392+
enum:
17393+
- HS256
17394+
- RS256
17395+
- ES256
17396+
example: "HS256"
17397+
type: string
17398+
x-enum-varnames:
17399+
- HS256
17400+
- RS256
17401+
- ES256
17402+
SyntheticsBasicAuthJWTType:
17403+
default: "jwt"
17404+
description: The type of authentication to use when performing the test.
17405+
enum:
17406+
- jwt
17407+
example: "jwt"
17408+
type: string
17409+
x-enum-varnames:
17410+
- JWT
1733817411
SyntheticsBasicAuthNTLM:
1733917412
description: Object to handle `NTLM` authentication when performing the test.
1734017413
properties:

docs/datadog_api_client.v1.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5457,6 +5457,34 @@ datadog\_api\_client.v1.model.synthetics\_basic\_auth\_digest\_type module
54575457
:members:
54585458
:show-inheritance:
54595459

5460+
datadog\_api\_client.v1.model.synthetics\_basic\_auth\_jwt module
5461+
-----------------------------------------------------------------
5462+
5463+
.. automodule:: datadog_api_client.v1.model.synthetics_basic_auth_jwt
5464+
:members:
5465+
:show-inheritance:
5466+
5467+
datadog\_api\_client.v1.model.synthetics\_basic\_auth\_jwt\_add\_claims module
5468+
------------------------------------------------------------------------------
5469+
5470+
.. automodule:: datadog_api_client.v1.model.synthetics_basic_auth_jwt_add_claims
5471+
:members:
5472+
:show-inheritance:
5473+
5474+
datadog\_api\_client.v1.model.synthetics\_basic\_auth\_jwt\_algorithm module
5475+
----------------------------------------------------------------------------
5476+
5477+
.. automodule:: datadog_api_client.v1.model.synthetics_basic_auth_jwt_algorithm
5478+
:members:
5479+
:show-inheritance:
5480+
5481+
datadog\_api\_client.v1.model.synthetics\_basic\_auth\_jwt\_type module
5482+
-----------------------------------------------------------------------
5483+
5484+
.. automodule:: datadog_api_client.v1.model.synthetics_basic_auth_jwt_type
5485+
:members:
5486+
:show-inheritance:
5487+
54605488
datadog\_api\_client.v1.model.synthetics\_basic\_auth\_ntlm module
54615489
------------------------------------------------------------------
54625490

src/datadog_api_client/v1/model/synthetics_basic_auth.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,28 @@ def __init__(self, **kwargs):
6565
6666
:param token_api_authentication: Type of token to use when performing the authentication.
6767
:type token_api_authentication: SyntheticsBasicAuthOauthTokenApiAuthentication
68+
69+
:param add_claims: Standard JWT claims to automatically inject.
70+
:type add_claims: SyntheticsBasicAuthJWTAddClaims, optional
71+
72+
:param algorithm: Algorithm to use for the JWT authentication.
73+
:type algorithm: SyntheticsBasicAuthJWTAlgorithm
74+
75+
:param expires_in: Token time-to-live in seconds.
76+
:type expires_in: int, optional
77+
78+
:param header: Custom JWT header as a JSON string.
79+
:type header: str, optional
80+
81+
:param payload: JWT claims as a JSON string.
82+
:type payload: str
83+
84+
:param secret: Signing key for the JWT authentication. Use the shared secret for `HS256`
85+
or the private key (PEM format) for `RS256` and `ES256`.
86+
:type secret: str
87+
88+
:param token_prefix: Prefix added before the token in the `Authorization` header. Defaults to `Bearer`.
89+
:type token_prefix: str, optional
6890
"""
6991
super().__init__(kwargs)
7092

@@ -83,6 +105,7 @@ def _composed_schemas(_):
83105
from datadog_api_client.v1.model.synthetics_basic_auth_digest import SyntheticsBasicAuthDigest
84106
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_client import SyntheticsBasicAuthOauthClient
85107
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_rop import SyntheticsBasicAuthOauthROP
108+
from datadog_api_client.v1.model.synthetics_basic_auth_jwt import SyntheticsBasicAuthJWT
86109

87110
return {
88111
"oneOf": [
@@ -92,5 +115,6 @@ def _composed_schemas(_):
92115
SyntheticsBasicAuthDigest,
93116
SyntheticsBasicAuthOauthClient,
94117
SyntheticsBasicAuthOauthROP,
118+
SyntheticsBasicAuthJWT,
95119
],
96120
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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 Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v1.model.synthetics_basic_auth_jwt_add_claims import SyntheticsBasicAuthJWTAddClaims
18+
from datadog_api_client.v1.model.synthetics_basic_auth_jwt_algorithm import SyntheticsBasicAuthJWTAlgorithm
19+
from datadog_api_client.v1.model.synthetics_basic_auth_jwt_type import SyntheticsBasicAuthJWTType
20+
21+
22+
class SyntheticsBasicAuthJWT(ModelNormal):
23+
validations = {
24+
"expires_in": {
25+
"inclusive_minimum": 1,
26+
},
27+
}
28+
29+
@cached_property
30+
def openapi_types(_):
31+
from datadog_api_client.v1.model.synthetics_basic_auth_jwt_add_claims import SyntheticsBasicAuthJWTAddClaims
32+
from datadog_api_client.v1.model.synthetics_basic_auth_jwt_algorithm import SyntheticsBasicAuthJWTAlgorithm
33+
from datadog_api_client.v1.model.synthetics_basic_auth_jwt_type import SyntheticsBasicAuthJWTType
34+
35+
return {
36+
"add_claims": (SyntheticsBasicAuthJWTAddClaims,),
37+
"algorithm": (SyntheticsBasicAuthJWTAlgorithm,),
38+
"expires_in": (int,),
39+
"header": (str,),
40+
"payload": (str,),
41+
"secret": (str,),
42+
"token_prefix": (str,),
43+
"type": (SyntheticsBasicAuthJWTType,),
44+
}
45+
46+
attribute_map = {
47+
"add_claims": "addClaims",
48+
"algorithm": "algorithm",
49+
"expires_in": "expiresIn",
50+
"header": "header",
51+
"payload": "payload",
52+
"secret": "secret",
53+
"token_prefix": "tokenPrefix",
54+
"type": "type",
55+
}
56+
57+
def __init__(
58+
self_,
59+
algorithm: SyntheticsBasicAuthJWTAlgorithm,
60+
payload: str,
61+
secret: str,
62+
type: SyntheticsBasicAuthJWTType,
63+
add_claims: Union[SyntheticsBasicAuthJWTAddClaims, UnsetType] = unset,
64+
expires_in: Union[int, UnsetType] = unset,
65+
header: Union[str, UnsetType] = unset,
66+
token_prefix: Union[str, UnsetType] = unset,
67+
**kwargs,
68+
):
69+
"""
70+
Object to handle JWT authentication when performing the test.
71+
72+
:param add_claims: Standard JWT claims to automatically inject.
73+
:type add_claims: SyntheticsBasicAuthJWTAddClaims, optional
74+
75+
:param algorithm: Algorithm to use for the JWT authentication.
76+
:type algorithm: SyntheticsBasicAuthJWTAlgorithm
77+
78+
:param expires_in: Token time-to-live in seconds.
79+
:type expires_in: int, optional
80+
81+
:param header: Custom JWT header as a JSON string.
82+
:type header: str, optional
83+
84+
:param payload: JWT claims as a JSON string.
85+
:type payload: str
86+
87+
:param secret: Signing key for the JWT authentication. Use the shared secret for ``HS256``
88+
or the private key (PEM format) for ``RS256`` and ``ES256``.
89+
:type secret: str
90+
91+
:param token_prefix: Prefix added before the token in the ``Authorization`` header. Defaults to ``Bearer``.
92+
:type token_prefix: str, optional
93+
94+
:param type: The type of authentication to use when performing the test.
95+
:type type: SyntheticsBasicAuthJWTType
96+
"""
97+
if add_claims is not unset:
98+
kwargs["add_claims"] = add_claims
99+
if expires_in is not unset:
100+
kwargs["expires_in"] = expires_in
101+
if header is not unset:
102+
kwargs["header"] = header
103+
if token_prefix is not unset:
104+
kwargs["token_prefix"] = token_prefix
105+
super().__init__(kwargs)
106+
107+
self_.algorithm = algorithm
108+
self_.payload = payload
109+
self_.secret = secret
110+
self_.type = type
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class SyntheticsBasicAuthJWTAddClaims(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"exp": (bool,),
21+
"iat": (bool,),
22+
}
23+
24+
attribute_map = {
25+
"exp": "exp",
26+
"iat": "iat",
27+
}
28+
29+
def __init__(self_, exp: Union[bool, UnsetType] = unset, iat: Union[bool, UnsetType] = unset, **kwargs):
30+
"""
31+
Standard JWT claims to automatically inject.
32+
33+
:param exp: Whether to inject the ``exp`` (expiration) claim.
34+
:type exp: bool, optional
35+
36+
:param iat: Whether to inject the ``iat`` (issued at) claim.
37+
:type iat: bool, optional
38+
"""
39+
if exp is not unset:
40+
kwargs["exp"] = exp
41+
if iat is not unset:
42+
kwargs["iat"] = iat
43+
super().__init__(kwargs)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
7+
from datadog_api_client.model_utils import (
8+
ModelSimple,
9+
cached_property,
10+
)
11+
12+
from typing import ClassVar
13+
14+
15+
class SyntheticsBasicAuthJWTAlgorithm(ModelSimple):
16+
"""
17+
Algorithm to use for the JWT authentication.
18+
19+
:param value: Must be one of ["HS256", "RS256", "ES256"].
20+
:type value: str
21+
"""
22+
23+
allowed_values = {
24+
"HS256",
25+
"RS256",
26+
"ES256",
27+
}
28+
HS256: ClassVar["SyntheticsBasicAuthJWTAlgorithm"]
29+
RS256: ClassVar["SyntheticsBasicAuthJWTAlgorithm"]
30+
ES256: ClassVar["SyntheticsBasicAuthJWTAlgorithm"]
31+
32+
@cached_property
33+
def openapi_types(_):
34+
return {
35+
"value": (str,),
36+
}
37+
38+
39+
SyntheticsBasicAuthJWTAlgorithm.HS256 = SyntheticsBasicAuthJWTAlgorithm("HS256")
40+
SyntheticsBasicAuthJWTAlgorithm.RS256 = SyntheticsBasicAuthJWTAlgorithm("RS256")
41+
SyntheticsBasicAuthJWTAlgorithm.ES256 = SyntheticsBasicAuthJWTAlgorithm("ES256")
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
7+
from datadog_api_client.model_utils import (
8+
ModelSimple,
9+
cached_property,
10+
)
11+
12+
from typing import ClassVar
13+
14+
15+
class SyntheticsBasicAuthJWTType(ModelSimple):
16+
"""
17+
The type of authentication to use when performing the test.
18+
19+
:param value: If omitted defaults to "jwt". Must be one of ["jwt"].
20+
:type value: str
21+
"""
22+
23+
allowed_values = {
24+
"jwt",
25+
}
26+
JWT: ClassVar["SyntheticsBasicAuthJWTType"]
27+
28+
@cached_property
29+
def openapi_types(_):
30+
return {
31+
"value": (str,),
32+
}
33+
34+
35+
SyntheticsBasicAuthJWTType.JWT = SyntheticsBasicAuthJWTType("jwt")

0 commit comments

Comments
 (0)