Skip to content

Commit 31790d8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 77f8c067 of spec repo
1 parent 4566cc5 commit 31790d8

12 files changed

+304
-19
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.5",
7-
"regenerated": "2023-08-17 19:37:36.120280",
8-
"spec_repo_commit": "bb17cef0"
7+
"regenerated": "2023-08-21 14:22:17.422870",
8+
"spec_repo_commit": "77f8c067"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-08-17 19:37:36.141484",
13-
"spec_repo_commit": "bb17cef0"
12+
"regenerated": "2023-08-21 14:22:17.439772",
13+
"spec_repo_commit": "77f8c067"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16002,6 +16002,17 @@ components:
1600216002
TeamAttributes:
1600316003
description: Team attributes
1600416004
properties:
16005+
avatar:
16006+
description: Unicode representation of the avatar for the team, limited
16007+
to a single grapheme
16008+
example: "\U0001F951"
16009+
nullable: true
16010+
type: string
16011+
banner:
16012+
description: Banner selection for the team
16013+
format: int64
16014+
nullable: true
16015+
type: integer
1600516016
created_at:
1600616017
description: Creation date of the team
1600716018
format: date-time
@@ -16015,6 +16026,12 @@ components:
1601516026
example: example-team
1601616027
maxLength: 195
1601716028
type: string
16029+
hidden_modules:
16030+
description: Collection of hidden modules for the team
16031+
items:
16032+
description: String identifier of the module
16033+
type: string
16034+
type: array
1601816035
link_count:
1601916036
description: The number of links belonging to the team
1602016037
format: int32
@@ -16041,6 +16058,12 @@ components:
1604116058
maximum: 2147483647
1604216059
readOnly: true
1604316060
type: integer
16061+
visible_modules:
16062+
description: Collection of visible modules for the team
16063+
items:
16064+
description: String identifier of the module
16065+
type: string
16066+
type: array
1604416067
required:
1604516068
- handle
1604616069
- name
@@ -16061,6 +16084,17 @@ components:
1606116084
TeamCreateAttributes:
1606216085
description: Team creation attributes
1606316086
properties:
16087+
avatar:
16088+
description: Unicode representation of the avatar for the team, limited
16089+
to a single grapheme
16090+
example: "\U0001F951"
16091+
nullable: true
16092+
type: string
16093+
banner:
16094+
description: Banner selection for the team
16095+
format: int64
16096+
nullable: true
16097+
type: integer
1606416098
description:
1606516099
description: Free-form markdown description/content for the team's homepage
1606616100
type: string
@@ -16069,11 +16103,23 @@ components:
1606916103
example: example-team
1607016104
maxLength: 195
1607116105
type: string
16106+
hidden_modules:
16107+
description: Collection of hidden modules for the team
16108+
items:
16109+
description: String identifier of the module
16110+
type: string
16111+
type: array
1607216112
name:
1607316113
description: The name of the team
1607416114
example: Example Team
1607516115
maxLength: 200
1607616116
type: string
16117+
visible_modules:
16118+
description: Collection of visible modules for the team
16119+
items:
16120+
description: String identifier of the module
16121+
type: string
16122+
type: array
1607716123
required:
1607816124
- handle
1607916125
- name
@@ -16344,6 +16390,17 @@ components:
1634416390
TeamUpdateAttributes:
1634516391
description: Team update attributes
1634616392
properties:
16393+
avatar:
16394+
description: Unicode representation of the avatar for the team, limited
16395+
to a single grapheme
16396+
example: "\U0001F951"
16397+
nullable: true
16398+
type: string
16399+
banner:
16400+
description: Banner selection for the team
16401+
format: int64
16402+
nullable: true
16403+
type: integer
1634716404
color:
1634816405
description: An identifier for the color representing the team
1634916406
format: int32
@@ -16358,11 +16415,23 @@ components:
1635816415
example: example-team
1635916416
maxLength: 195
1636016417
type: string
16418+
hidden_modules:
16419+
description: Collection of hidden modules for the team
16420+
items:
16421+
description: String identifier of the module
16422+
type: string
16423+
type: array
1636116424
name:
1636216425
description: The name of the team
1636316426
example: Example Team
1636416427
maxLength: 200
1636516428
type: string
16429+
visible_modules:
16430+
description: Collection of visible modules for the team
16431+
items:
16432+
description: String identifier of the module
16433+
type: string
16434+
type: array
1636616435
required:
1636716436
- handle
1636816437
- name
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""
2+
Create a team with V2 fields returns "CREATED" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.teams_api import TeamsApi
7+
from datadog_api_client.v2.model.team_create import TeamCreate
8+
from datadog_api_client.v2.model.team_create_attributes import TeamCreateAttributes
9+
from datadog_api_client.v2.model.team_create_request import TeamCreateRequest
10+
from datadog_api_client.v2.model.team_type import TeamType
11+
12+
body = TeamCreateRequest(
13+
data=TeamCreate(
14+
attributes=TeamCreateAttributes(
15+
handle="handle-a0fc0297eb519635",
16+
name="name-a0fc0297eb519635",
17+
avatar="🥑",
18+
banner=7,
19+
visible_modules=[
20+
"m1",
21+
"m2",
22+
],
23+
hidden_modules=[
24+
"m3",
25+
],
26+
),
27+
type=TeamType.TEAM,
28+
),
29+
)
30+
31+
configuration = Configuration()
32+
with ApiClient(configuration) as api_client:
33+
api_instance = TeamsApi(api_client)
34+
response = api_instance.create_team(body=body)
35+
36+
print(response)

examples/v2/teams/UpdateTeam.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
attributes=TeamUpdateAttributes(
2121
handle=DD_TEAM_DATA_ATTRIBUTES_HANDLE,
2222
name="Example Team updated",
23+
avatar="🥑",
24+
banner=7,
25+
hidden_modules=[
26+
"m3",
27+
],
28+
visible_modules=[
29+
"m1",
30+
"m2",
31+
],
2332
),
2433
type=TeamType.TEAM,
2534
),

src/datadog_api_client/v2/model/team_attributes.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

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

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -37,25 +37,33 @@ class TeamAttributes(ModelNormal):
3737
@cached_property
3838
def openapi_types(_):
3939
return {
40+
"avatar": (str, none_type),
41+
"banner": (int, none_type),
4042
"created_at": (datetime,),
4143
"description": (str, none_type),
4244
"handle": (str,),
45+
"hidden_modules": ([str],),
4346
"link_count": (int,),
4447
"modified_at": (datetime,),
4548
"name": (str,),
4649
"summary": (str, none_type),
4750
"user_count": (int,),
51+
"visible_modules": ([str],),
4852
}
4953

5054
attribute_map = {
55+
"avatar": "avatar",
56+
"banner": "banner",
5157
"created_at": "created_at",
5258
"description": "description",
5359
"handle": "handle",
60+
"hidden_modules": "hidden_modules",
5461
"link_count": "link_count",
5562
"modified_at": "modified_at",
5663
"name": "name",
5764
"summary": "summary",
5865
"user_count": "user_count",
66+
"visible_modules": "visible_modules",
5967
}
6068
read_only_vars = {
6169
"link_count",
@@ -66,17 +74,27 @@ def __init__(
6674
self_,
6775
handle: str,
6876
name: str,
77+
avatar: Union[str, none_type, UnsetType] = unset,
78+
banner: Union[int, none_type, UnsetType] = unset,
6979
created_at: Union[datetime, UnsetType] = unset,
7080
description: Union[str, none_type, UnsetType] = unset,
81+
hidden_modules: Union[List[str], UnsetType] = unset,
7182
link_count: Union[int, UnsetType] = unset,
7283
modified_at: Union[datetime, UnsetType] = unset,
7384
summary: Union[str, none_type, UnsetType] = unset,
7485
user_count: Union[int, UnsetType] = unset,
86+
visible_modules: Union[List[str], UnsetType] = unset,
7587
**kwargs,
7688
):
7789
"""
7890
Team attributes
7991
92+
:param avatar: Unicode representation of the avatar for the team, limited to a single grapheme
93+
:type avatar: str, none_type, optional
94+
95+
:param banner: Banner selection for the team
96+
:type banner: int, none_type, optional
97+
8098
:param created_at: Creation date of the team
8199
:type created_at: datetime, optional
82100
@@ -86,6 +104,9 @@ def __init__(
86104
:param handle: The team's identifier
87105
:type handle: str
88106
107+
:param hidden_modules: Collection of hidden modules for the team
108+
:type hidden_modules: [str], optional
109+
89110
:param link_count: The number of links belonging to the team
90111
:type link_count: int, optional
91112
@@ -100,11 +121,20 @@ def __init__(
100121
101122
:param user_count: The number of users belonging to the team
102123
:type user_count: int, optional
124+
125+
:param visible_modules: Collection of visible modules for the team
126+
:type visible_modules: [str], optional
103127
"""
128+
if avatar is not unset:
129+
kwargs["avatar"] = avatar
130+
if banner is not unset:
131+
kwargs["banner"] = banner
104132
if created_at is not unset:
105133
kwargs["created_at"] = created_at
106134
if description is not unset:
107135
kwargs["description"] = description
136+
if hidden_modules is not unset:
137+
kwargs["hidden_modules"] = hidden_modules
108138
if link_count is not unset:
109139
kwargs["link_count"] = link_count
110140
if modified_at is not unset:
@@ -113,6 +143,8 @@ def __init__(
113143
kwargs["summary"] = summary
114144
if user_count is not unset:
115145
kwargs["user_count"] = user_count
146+
if visible_modules is not unset:
147+
kwargs["visible_modules"] = visible_modules
116148
super().__init__(kwargs)
117149

118150
self_.handle = handle

src/datadog_api_client/v2/model/team_create_attributes.py

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

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

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
none_type,
1112
unset,
1213
UnsetType,
1314
)
@@ -26,32 +27,70 @@ class TeamCreateAttributes(ModelNormal):
2627
@cached_property
2728
def openapi_types(_):
2829
return {
30+
"avatar": (str, none_type),
31+
"banner": (int, none_type),
2932
"description": (str,),
3033
"handle": (str,),
34+
"hidden_modules": ([str],),
3135
"name": (str,),
36+
"visible_modules": ([str],),
3237
}
3338

3439
attribute_map = {
40+
"avatar": "avatar",
41+
"banner": "banner",
3542
"description": "description",
3643
"handle": "handle",
44+
"hidden_modules": "hidden_modules",
3745
"name": "name",
46+
"visible_modules": "visible_modules",
3847
}
3948

40-
def __init__(self_, handle: str, name: str, description: Union[str, UnsetType] = unset, **kwargs):
49+
def __init__(
50+
self_,
51+
handle: str,
52+
name: str,
53+
avatar: Union[str, none_type, UnsetType] = unset,
54+
banner: Union[int, none_type, UnsetType] = unset,
55+
description: Union[str, UnsetType] = unset,
56+
hidden_modules: Union[List[str], UnsetType] = unset,
57+
visible_modules: Union[List[str], UnsetType] = unset,
58+
**kwargs,
59+
):
4160
"""
4261
Team creation attributes
4362
63+
:param avatar: Unicode representation of the avatar for the team, limited to a single grapheme
64+
:type avatar: str, none_type, optional
65+
66+
:param banner: Banner selection for the team
67+
:type banner: int, none_type, optional
68+
4469
:param description: Free-form markdown description/content for the team's homepage
4570
:type description: str, optional
4671
4772
:param handle: The team's identifier
4873
:type handle: str
4974
75+
:param hidden_modules: Collection of hidden modules for the team
76+
:type hidden_modules: [str], optional
77+
5078
:param name: The name of the team
5179
:type name: str
80+
81+
:param visible_modules: Collection of visible modules for the team
82+
:type visible_modules: [str], optional
5283
"""
84+
if avatar is not unset:
85+
kwargs["avatar"] = avatar
86+
if banner is not unset:
87+
kwargs["banner"] = banner
5388
if description is not unset:
5489
kwargs["description"] = description
90+
if hidden_modules is not unset:
91+
kwargs["hidden_modules"] = hidden_modules
92+
if visible_modules is not unset:
93+
kwargs["visible_modules"] = visible_modules
5594
super().__init__(kwargs)
5695

5796
self_.handle = handle

0 commit comments

Comments
 (0)