Skip to content

Commit bc63536

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e44e440e of spec repo
1 parent 2a936fe commit bc63536

20 files changed

+589
-74
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-03-19 19:35:49.311297",
8-
"spec_repo_commit": "a7489f2d"
7+
"regenerated": "2024-03-20 18:32:43.305343",
8+
"spec_repo_commit": "e44e440e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-03-19 19:35:49.331556",
13-
"spec_repo_commit": "a7489f2d"
12+
"regenerated": "2024-03-20 18:32:43.328699",
13+
"spec_repo_commit": "e44e440e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 97 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,11 +1325,10 @@ components:
13251325
- type
13261326
type: object
13271327
AuthNMappingCreateRelationships:
1328-
description: Relationship of AuthN Mapping create object to Role.
1329-
properties:
1330-
role:
1331-
$ref: '#/components/schemas/RelationshipToRole'
1332-
type: object
1328+
description: Relationship of AuthN Mapping create object to a Role or Team.
1329+
oneOf:
1330+
- $ref: '#/components/schemas/AuthNMappingRelationshipToRole'
1331+
- $ref: '#/components/schemas/AuthNMappingRelationshipToTeam'
13331332
AuthNMappingCreateRequest:
13341333
description: Request for creating an AuthN Mapping.
13351334
properties:
@@ -1343,13 +1342,32 @@ components:
13431342
oneOf:
13441343
- $ref: '#/components/schemas/SAMLAssertionAttribute'
13451344
- $ref: '#/components/schemas/Role'
1345+
- $ref: '#/components/schemas/AuthNMappingTeam'
1346+
AuthNMappingRelationshipToRole:
1347+
description: Relationship of AuthN Mapping to a Role.
1348+
properties:
1349+
role:
1350+
$ref: '#/components/schemas/RelationshipToRole'
1351+
required:
1352+
- role
1353+
type: object
1354+
AuthNMappingRelationshipToTeam:
1355+
description: Relationship of AuthN Mapping to a Team.
1356+
properties:
1357+
team:
1358+
$ref: '#/components/schemas/RelationshipToTeam'
1359+
required:
1360+
- team
1361+
type: object
13461362
AuthNMappingRelationships:
13471363
description: All relationships associated with AuthN Mapping.
13481364
properties:
13491365
role:
13501366
$ref: '#/components/schemas/RelationshipToRole'
13511367
saml_assertion_attribute:
13521368
$ref: '#/components/schemas/RelationshipToSAMLAssertionAttribute'
1369+
team:
1370+
$ref: '#/components/schemas/RelationshipToTeam'
13531371
type: object
13541372
AuthNMappingResponse:
13551373
description: AuthN Mapping response from the API.
@@ -1362,6 +1380,60 @@ components:
13621380
$ref: '#/components/schemas/AuthNMappingIncluded'
13631381
type: array
13641382
type: object
1383+
AuthNMappingTeam:
1384+
description: Team.
1385+
properties:
1386+
attributes:
1387+
$ref: '#/components/schemas/AuthNMappingTeamAttributes'
1388+
id:
1389+
description: The ID of the Team.
1390+
example: f9bb8444-af7f-11ec-ac2c-da7ad0900001
1391+
type: string
1392+
type:
1393+
$ref: '#/components/schemas/TeamType'
1394+
type: object
1395+
AuthNMappingTeamAttributes:
1396+
description: Team attributes.
1397+
properties:
1398+
avatar:
1399+
description: Unicode representation of the avatar for the team, limited
1400+
to a single grapheme
1401+
example: "\U0001F951"
1402+
nullable: true
1403+
type: string
1404+
banner:
1405+
description: Banner selection for the team
1406+
format: int64
1407+
nullable: true
1408+
type: integer
1409+
handle:
1410+
description: The team's identifier
1411+
example: example-team
1412+
maxLength: 195
1413+
type: string
1414+
link_count:
1415+
description: The number of links belonging to the team
1416+
format: int32
1417+
maximum: 2147483647
1418+
readOnly: true
1419+
type: integer
1420+
name:
1421+
description: The name of the team
1422+
example: Example Team
1423+
maxLength: 200
1424+
type: string
1425+
summary:
1426+
description: A brief summary of the team, derived from the `description`
1427+
maxLength: 120
1428+
nullable: true
1429+
type: string
1430+
user_count:
1431+
description: The number of users belonging to the team
1432+
format: int32
1433+
maximum: 2147483647
1434+
readOnly: true
1435+
type: integer
1436+
type: object
13651437
AuthNMappingUpdateAttributes:
13661438
description: Key/Value pair of attributes used for update request.
13671439
properties:
@@ -1394,11 +1466,10 @@ components:
13941466
- type
13951467
type: object
13961468
AuthNMappingUpdateRelationships:
1397-
description: Relationship of AuthN Mapping update object to Role.
1398-
properties:
1399-
role:
1400-
$ref: '#/components/schemas/RelationshipToRole'
1401-
type: object
1469+
description: Relationship of AuthN Mapping update object to a Role or Team.
1470+
oneOf:
1471+
- $ref: '#/components/schemas/AuthNMappingRelationshipToRole'
1472+
- $ref: '#/components/schemas/AuthNMappingRelationshipToTeam'
14021473
AuthNMappingUpdateRequest:
14031474
description: Request to update an AuthN Mapping.
14041475
properties:
@@ -15667,6 +15738,22 @@ components:
1566715738
- id
1566815739
- type
1566915740
type: object
15741+
RelationshipToTeam:
15742+
description: Relationship to team.
15743+
properties:
15744+
data:
15745+
$ref: '#/components/schemas/RelationshipToTeamData'
15746+
type: object
15747+
RelationshipToTeamData:
15748+
description: Relationship to Team object.
15749+
properties:
15750+
id:
15751+
description: The unique identifier of the team.
15752+
example: f9bb8444-af7f-11ec-ac2c-da7ad0900001
15753+
type: string
15754+
type:
15755+
$ref: '#/components/schemas/TeamType'
15756+
type: object
1567015757
RelationshipToTeamLinkData:
1567115758
description: Relationship between a link and a team
1567215759
properties:

docs/datadog_api_client.v2.model.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,20 @@ authn\_mapping\_included
379379
:members:
380380
:show-inheritance:
381381

382+
authn\_mapping\_relationship\_to\_role
383+
--------------------------------------
384+
385+
.. automodule:: datadog_api_client.v2.model.authn_mapping_relationship_to_role
386+
:members:
387+
:show-inheritance:
388+
389+
authn\_mapping\_relationship\_to\_team
390+
--------------------------------------
391+
392+
.. automodule:: datadog_api_client.v2.model.authn_mapping_relationship_to_team
393+
:members:
394+
:show-inheritance:
395+
382396
authn\_mapping\_relationships
383397
-----------------------------
384398

@@ -393,6 +407,20 @@ authn\_mapping\_response
393407
:members:
394408
:show-inheritance:
395409

410+
authn\_mapping\_team
411+
--------------------
412+
413+
.. automodule:: datadog_api_client.v2.model.authn_mapping_team
414+
:members:
415+
:show-inheritance:
416+
417+
authn\_mapping\_team\_attributes
418+
--------------------------------
419+
420+
.. automodule:: datadog_api_client.v2.model.authn_mapping_team_attributes
421+
:members:
422+
:show-inheritance:
423+
396424
authn\_mapping\_update\_attributes
397425
----------------------------------
398426

@@ -6707,6 +6735,20 @@ relationship\_to\_saml\_assertion\_attribute\_data
67076735
:members:
67086736
:show-inheritance:
67096737

6738+
relationship\_to\_team
6739+
----------------------
6740+
6741+
.. automodule:: datadog_api_client.v2.model.relationship_to_team
6742+
:members:
6743+
:show-inheritance:
6744+
6745+
relationship\_to\_team\_data
6746+
----------------------------
6747+
6748+
.. automodule:: datadog_api_client.v2.model.relationship_to_team_data
6749+
:members:
6750+
:show-inheritance:
6751+
67106752
relationship\_to\_team\_link\_data
67116753
----------------------------------
67126754

examples/v2/authn-mappings/CreateAuthNMapping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from datadog_api_client.v2.api.authn_mappings_api import AuthNMappingsApi
88
from datadog_api_client.v2.model.authn_mapping_create_attributes import AuthNMappingCreateAttributes
99
from datadog_api_client.v2.model.authn_mapping_create_data import AuthNMappingCreateData
10-
from datadog_api_client.v2.model.authn_mapping_create_relationships import AuthNMappingCreateRelationships
1110
from datadog_api_client.v2.model.authn_mapping_create_request import AuthNMappingCreateRequest
11+
from datadog_api_client.v2.model.authn_mapping_relationship_to_role import AuthNMappingRelationshipToRole
1212
from datadog_api_client.v2.model.authn_mappings_type import AuthNMappingsType
1313
from datadog_api_client.v2.model.relationship_to_role import RelationshipToRole
1414
from datadog_api_client.v2.model.relationship_to_role_data import RelationshipToRoleData
@@ -23,7 +23,7 @@
2323
attribute_key="exampleauthnmapping",
2424
attribute_value="Example-AuthN-Mapping",
2525
),
26-
relationships=AuthNMappingCreateRelationships(
26+
relationships=AuthNMappingRelationshipToRole(
2727
role=RelationshipToRole(
2828
data=RelationshipToRoleData(
2929
id=ROLE_DATA_ID,

examples/v2/authn-mappings/UpdateAuthNMapping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from os import environ
66
from datadog_api_client import ApiClient, Configuration
77
from datadog_api_client.v2.api.authn_mappings_api import AuthNMappingsApi
8+
from datadog_api_client.v2.model.authn_mapping_relationship_to_role import AuthNMappingRelationshipToRole
89
from datadog_api_client.v2.model.authn_mapping_update_attributes import AuthNMappingUpdateAttributes
910
from datadog_api_client.v2.model.authn_mapping_update_data import AuthNMappingUpdateData
10-
from datadog_api_client.v2.model.authn_mapping_update_relationships import AuthNMappingUpdateRelationships
1111
from datadog_api_client.v2.model.authn_mapping_update_request import AuthNMappingUpdateRequest
1212
from datadog_api_client.v2.model.authn_mappings_type import AuthNMappingsType
1313
from datadog_api_client.v2.model.relationship_to_role import RelationshipToRole
@@ -27,7 +27,7 @@
2727
attribute_value="Development",
2828
),
2929
id=AUTHN_MAPPING_DATA_ID,
30-
relationships=AuthNMappingUpdateRelationships(
30+
relationships=AuthNMappingRelationshipToRole(
3131
role=RelationshipToRole(
3232
data=RelationshipToRoleData(
3333
id=ROLE_DATA_ID,

src/datadog_api_client/v2/model/authn_mapping_create_data.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
from datadog_api_client.v2.model.authn_mapping_create_attributes import AuthNMappingCreateAttributes
1818
from datadog_api_client.v2.model.authn_mapping_create_relationships import AuthNMappingCreateRelationships
1919
from datadog_api_client.v2.model.authn_mappings_type import AuthNMappingsType
20+
from datadog_api_client.v2.model.authn_mapping_relationship_to_role import AuthNMappingRelationshipToRole
21+
from datadog_api_client.v2.model.authn_mapping_relationship_to_team import AuthNMappingRelationshipToTeam
2022

2123

2224
class AuthNMappingCreateData(ModelNormal):
@@ -42,7 +44,9 @@ def __init__(
4244
self_,
4345
type: AuthNMappingsType,
4446
attributes: Union[AuthNMappingCreateAttributes, UnsetType] = unset,
45-
relationships: Union[AuthNMappingCreateRelationships, UnsetType] = unset,
47+
relationships: Union[
48+
AuthNMappingCreateRelationships, AuthNMappingRelationshipToRole, AuthNMappingRelationshipToTeam, UnsetType
49+
] = unset,
4650
**kwargs,
4751
):
4852
"""
@@ -51,7 +55,7 @@ def __init__(
5155
:param attributes: Key/Value pair of attributes used for create request.
5256
:type attributes: AuthNMappingCreateAttributes, optional
5357
54-
:param relationships: Relationship of AuthN Mapping create object to Role.
58+
:param relationships: Relationship of AuthN Mapping create object to a Role or Team.
5559
:type relationships: AuthNMappingCreateRelationships, optional
5660
5761
:param type: AuthN Mappings resource type.

src/datadog_api_client/v2/model/authn_mapping_create_relationships.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,41 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Union, TYPE_CHECKING
76

87
from datadog_api_client.model_utils import (
9-
ModelNormal,
8+
ModelComposed,
109
cached_property,
11-
unset,
12-
UnsetType,
1310
)
1411

1512

16-
if TYPE_CHECKING:
17-
from datadog_api_client.v2.model.relationship_to_role import RelationshipToRole
13+
class AuthNMappingCreateRelationships(ModelComposed):
14+
def __init__(self, **kwargs):
15+
"""
16+
Relationship of AuthN Mapping create object to a Role or Team.
17+
18+
:param role: Relationship to role.
19+
:type role: RelationshipToRole
1820
21+
:param team: Relationship to team.
22+
:type team: RelationshipToTeam
23+
"""
24+
super().__init__(kwargs)
1925

20-
class AuthNMappingCreateRelationships(ModelNormal):
2126
@cached_property
22-
def openapi_types(_):
23-
from datadog_api_client.v2.model.relationship_to_role import RelationshipToRole
27+
def _composed_schemas(_):
28+
# we need this here to make our import statements work
29+
# we must store _composed_schemas in here so the code is only run
30+
# when we invoke this method. If we kept this at the class
31+
# level we would get an error because the class level
32+
# code would be run when this module is imported, and these composed
33+
# classes don't exist yet because their module has not finished
34+
# loading
35+
from datadog_api_client.v2.model.authn_mapping_relationship_to_role import AuthNMappingRelationshipToRole
36+
from datadog_api_client.v2.model.authn_mapping_relationship_to_team import AuthNMappingRelationshipToTeam
2437

2538
return {
26-
"role": (RelationshipToRole,),
39+
"oneOf": [
40+
AuthNMappingRelationshipToRole,
41+
AuthNMappingRelationshipToTeam,
42+
],
2743
}
28-
29-
attribute_map = {
30-
"role": "role",
31-
}
32-
33-
def __init__(self_, role: Union[RelationshipToRole, UnsetType] = unset, **kwargs):
34-
"""
35-
Relationship of AuthN Mapping create object to Role.
36-
37-
:param role: Relationship to role.
38-
:type role: RelationshipToRole, optional
39-
"""
40-
if role is not unset:
41-
kwargs["role"] = role
42-
super().__init__(kwargs)

src/datadog_api_client/v2/model/authn_mapping_included.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ def _composed_schemas(_):
4040
# loading
4141
from datadog_api_client.v2.model.saml_assertion_attribute import SAMLAssertionAttribute
4242
from datadog_api_client.v2.model.role import Role
43+
from datadog_api_client.v2.model.authn_mapping_team import AuthNMappingTeam
4344

4445
return {
4546
"oneOf": [
4647
SAMLAssertionAttribute,
4748
Role,
49+
AuthNMappingTeam,
4850
],
4951
}

0 commit comments

Comments
 (0)