Skip to content

Commit e007c28

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 12acfbe9 of spec repo
1 parent 02d7f79 commit e007c28

File tree

5 files changed

+118
-7
lines changed

5 files changed

+118
-7
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-03 18:00:20.627837",
8-
"spec_repo_commit": "b1453658"
7+
"regenerated": "2023-08-07 13:02:07.725756",
8+
"spec_repo_commit": "12acfbe9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-08-03 18:00:20.651232",
13-
"spec_repo_commit": "b1453658"
12+
"regenerated": "2023-08-07 13:02:07.738290",
13+
"spec_repo_commit": "12acfbe9"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15997,6 +15997,17 @@ components:
1599715997
TeamAttributes:
1599815998
description: Team attributes
1599915999
properties:
16000+
avatar:
16001+
description: Unicode representation of the avatar for the team, limited
16002+
to a single grapheme
16003+
example: "\U0001F951"
16004+
nullable: true
16005+
type: string
16006+
banner:
16007+
description: Banner selection for the team
16008+
format: int64
16009+
nullable: true
16010+
type: integer
1600016011
created_at:
1600116012
description: Creation date of the team
1600216013
format: date-time
@@ -16010,6 +16021,12 @@ components:
1601016021
example: example-team
1601116022
maxLength: 195
1601216023
type: string
16024+
hidden_modules:
16025+
description: Collection of hidden modules for the team
16026+
items:
16027+
description: String identifier of the module
16028+
type: string
16029+
type: array
1601316030
link_count:
1601416031
description: The number of links belonging to the team
1601516032
format: int32
@@ -16036,6 +16053,12 @@ components:
1603616053
maximum: 2147483647
1603716054
readOnly: true
1603816055
type: integer
16056+
visible_modules:
16057+
description: Collection of visible modules for the team
16058+
items:
16059+
description: String identifier of the module
16060+
type: string
16061+
type: array
1603916062
required:
1604016063
- handle
1604116064
- name
@@ -16339,6 +16362,17 @@ components:
1633916362
TeamUpdateAttributes:
1634016363
description: Team update attributes
1634116364
properties:
16365+
avatar:
16366+
description: Unicode representation of the avatar for the team, limited
16367+
to a single grapheme
16368+
example: "\U0001F951"
16369+
nullable: true
16370+
type: string
16371+
banner:
16372+
description: Banner selection for the team
16373+
format: int64
16374+
nullable: true
16375+
type: integer
1634216376
color:
1634316377
description: An identifier for the color representing the team
1634416378
format: int32
@@ -16353,11 +16387,23 @@ components:
1635316387
example: example-team
1635416388
maxLength: 195
1635516389
type: string
16390+
hidden_modules:
16391+
description: Collection of hidden modules for the team
16392+
items:
16393+
description: String identifier of the module
16394+
type: string
16395+
type: array
1635616396
name:
1635716397
description: The name of the team
1635816398
example: Example Team
1635916399
maxLength: 200
1636016400
type: string
16401+
visible_modules:
16402+
description: Collection of visible modules for the team
16403+
items:
16404+
description: String identifier of the module
16405+
type: string
16406+
type: array
1636116407
required:
1636216408
- handle
1636316409
- name

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_update_attributes.py

Lines changed: 34 additions & 1 deletion
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
)
@@ -30,30 +31,48 @@ class TeamUpdateAttributes(ModelNormal):
3031
@cached_property
3132
def openapi_types(_):
3233
return {
34+
"avatar": (str, none_type),
35+
"banner": (int, none_type),
3336
"color": (int,),
3437
"description": (str,),
3538
"handle": (str,),
39+
"hidden_modules": ([str],),
3640
"name": (str,),
41+
"visible_modules": ([str],),
3742
}
3843

3944
attribute_map = {
45+
"avatar": "avatar",
46+
"banner": "banner",
4047
"color": "color",
4148
"description": "description",
4249
"handle": "handle",
50+
"hidden_modules": "hidden_modules",
4351
"name": "name",
52+
"visible_modules": "visible_modules",
4453
}
4554

4655
def __init__(
4756
self_,
4857
handle: str,
4958
name: str,
59+
avatar: Union[str, none_type, UnsetType] = unset,
60+
banner: Union[int, none_type, UnsetType] = unset,
5061
color: Union[int, UnsetType] = unset,
5162
description: Union[str, UnsetType] = unset,
63+
hidden_modules: Union[List[str], UnsetType] = unset,
64+
visible_modules: Union[List[str], UnsetType] = unset,
5265
**kwargs,
5366
):
5467
"""
5568
Team update attributes
5669
70+
:param avatar: Unicode representation of the avatar for the team, limited to a single grapheme
71+
:type avatar: str, none_type, optional
72+
73+
:param banner: Banner selection for the team
74+
:type banner: int, none_type, optional
75+
5776
:param color: An identifier for the color representing the team
5877
:type color: int, optional
5978
@@ -63,13 +82,27 @@ def __init__(
6382
:param handle: The team's identifier
6483
:type handle: str
6584
85+
:param hidden_modules: Collection of hidden modules for the team
86+
:type hidden_modules: [str], optional
87+
6688
:param name: The name of the team
6789
:type name: str
90+
91+
:param visible_modules: Collection of visible modules for the team
92+
:type visible_modules: [str], optional
6893
"""
94+
if avatar is not unset:
95+
kwargs["avatar"] = avatar
96+
if banner is not unset:
97+
kwargs["banner"] = banner
6998
if color is not unset:
7099
kwargs["color"] = color
71100
if description is not unset:
72101
kwargs["description"] = description
102+
if hidden_modules is not unset:
103+
kwargs["hidden_modules"] = hidden_modules
104+
if visible_modules is not unset:
105+
kwargs["visible_modules"] = visible_modules
73106
super().__init__(kwargs)
74107

75108
self_.handle = handle

tests/v2/features/teams.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Feature: Teams
223223
Scenario: Update a team returns "API error response." response
224224
Given new "UpdateTeam" request
225225
And request contains "team_id" parameter from "REPLACE.ME"
226-
And body with value {"data": {"attributes": {"handle": "example-team", "name": "Example Team"}, "relationships": {"team_links": {"data": [{"id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001", "type": "team_links"}], "links": {"related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"}}}, "type": "team"}}
226+
And body with value {"data": {"attributes": {"avatar": "\ud83e\udd51", "banner": null, "handle": "example-team", "hidden_modules": [], "name": "Example Team", "visible_modules": []}, "relationships": {"team_links": {"data": [{"id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001", "type": "team_links"}], "links": {"related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"}}}, "type": "team"}}
227227
When the request is sent
228228
Then the response status is 409 API error response.
229229

0 commit comments

Comments
 (0)