Skip to content

Commit 83ad6b1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Document new api/app key schemas (#1755)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 6a6ac2f commit 83ad6b1

10 files changed

+280
-4
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": "2023-11-17 12:18:28.002474",
8-
"spec_repo_commit": "d2efeed9"
7+
"regenerated": "2023-11-17 18:13:33.996478",
8+
"spec_repo_commit": "46090fc1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-11-17 12:18:28.020826",
13-
"spec_repo_commit": "d2efeed9"
12+
"regenerated": "2023-11-17 18:13:34.052011",
13+
"spec_repo_commit": "46090fc1"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,26 @@ components:
689689
items:
690690
$ref: '#/components/schemas/APIKeyResponseIncludedItem'
691691
type: array
692+
meta:
693+
$ref: '#/components/schemas/APIKeysResponseMeta'
694+
type: object
695+
APIKeysResponseMeta:
696+
description: Additional information related to api keys response.
697+
properties:
698+
max_allowed:
699+
description: Max allowed number of API keys.
700+
format: int64
701+
type: integer
702+
page:
703+
$ref: '#/components/schemas/APIKeysResponseMetaPage'
704+
type: object
705+
APIKeysResponseMetaPage:
706+
description: Additional information related to the API keys response.
707+
properties:
708+
total_filtered_count:
709+
description: Total filtered application key count.
710+
format: int64
711+
type: integer
692712
type: object
693713
APIKeysSort:
694714
default: name
@@ -833,6 +853,24 @@ components:
833853
oneOf:
834854
- $ref: '#/components/schemas/User'
835855
- $ref: '#/components/schemas/Role'
856+
ApplicationKeyResponseMeta:
857+
description: Additional information related to the application key response.
858+
properties:
859+
max_allowed_per_user:
860+
description: Max allowed number of application keys per user.
861+
format: int64
862+
type: integer
863+
page:
864+
$ref: '#/components/schemas/ApplicationKeyResponseMetaPage'
865+
type: object
866+
ApplicationKeyResponseMetaPage:
867+
description: Additional information related to the application key response.
868+
properties:
869+
total_filtered_count:
870+
description: Total filtered application key count.
871+
format: int64
872+
type: integer
873+
type: object
836874
ApplicationKeyUpdateAttributes:
837875
description: Attributes used to update an application Key.
838876
properties:
@@ -8667,6 +8705,8 @@ components:
86678705
items:
86688706
$ref: '#/components/schemas/ApplicationKeyResponseIncludedItem'
86698707
type: array
8708+
meta:
8709+
$ref: '#/components/schemas/ApplicationKeyResponseMeta'
86708710
type: object
86718711
ListDowntimesResponse:
86728712
description: Response for retrieving all downtimes.

docs/datadog_api_client.v2.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,20 @@ api\_keys\_response
106106
:members:
107107
:show-inheritance:
108108

109+
api\_keys\_response\_meta
110+
-------------------------
111+
112+
.. automodule:: datadog_api_client.v2.model.api_keys_response_meta
113+
:members:
114+
:show-inheritance:
115+
116+
api\_keys\_response\_meta\_page
117+
-------------------------------
118+
119+
.. automodule:: datadog_api_client.v2.model.api_keys_response_meta_page
120+
:members:
121+
:show-inheritance:
122+
109123
api\_keys\_sort
110124
---------------
111125

@@ -169,6 +183,20 @@ application\_key\_response\_included\_item
169183
:members:
170184
:show-inheritance:
171185

186+
application\_key\_response\_meta
187+
--------------------------------
188+
189+
.. automodule:: datadog_api_client.v2.model.application_key_response_meta
190+
:members:
191+
:show-inheritance:
192+
193+
application\_key\_response\_meta\_page
194+
--------------------------------------
195+
196+
.. automodule:: datadog_api_client.v2.model.application_key_response_meta_page
197+
:members:
198+
:show-inheritance:
199+
172200
application\_key\_update\_attributes
173201
------------------------------------
174202

src/datadog_api_client/v2/model/api_keys_response.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
if TYPE_CHECKING:
1717
from datadog_api_client.v2.model.partial_api_key import PartialAPIKey
1818
from datadog_api_client.v2.model.api_key_response_included_item import APIKeyResponseIncludedItem
19+
from datadog_api_client.v2.model.api_keys_response_meta import APIKeysResponseMeta
1920
from datadog_api_client.v2.model.user import User
2021

2122

@@ -24,21 +25,25 @@ class APIKeysResponse(ModelNormal):
2425
def openapi_types(_):
2526
from datadog_api_client.v2.model.partial_api_key import PartialAPIKey
2627
from datadog_api_client.v2.model.api_key_response_included_item import APIKeyResponseIncludedItem
28+
from datadog_api_client.v2.model.api_keys_response_meta import APIKeysResponseMeta
2729

2830
return {
2931
"data": ([PartialAPIKey],),
3032
"included": ([APIKeyResponseIncludedItem],),
33+
"meta": (APIKeysResponseMeta,),
3134
}
3235

3336
attribute_map = {
3437
"data": "data",
3538
"included": "included",
39+
"meta": "meta",
3640
}
3741

3842
def __init__(
3943
self_,
4044
data: Union[List[PartialAPIKey], UnsetType] = unset,
4145
included: Union[List[Union[APIKeyResponseIncludedItem, User]], UnsetType] = unset,
46+
meta: Union[APIKeysResponseMeta, UnsetType] = unset,
4247
**kwargs,
4348
):
4449
"""
@@ -49,9 +54,14 @@ def __init__(
4954
5055
:param included: Array of objects related to the API key.
5156
:type included: [APIKeyResponseIncludedItem], optional
57+
58+
:param meta: Additional information related to api keys response.
59+
:type meta: APIKeysResponseMeta, optional
5260
"""
5361
if data is not unset:
5462
kwargs["data"] = data
5563
if included is not unset:
5664
kwargs["included"] = included
65+
if meta is not unset:
66+
kwargs["meta"] = meta
5767
super().__init__(kwargs)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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.v2.model.api_keys_response_meta_page import APIKeysResponseMetaPage
18+
19+
20+
class APIKeysResponseMeta(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.api_keys_response_meta_page import APIKeysResponseMetaPage
24+
25+
return {
26+
"max_allowed": (int,),
27+
"page": (APIKeysResponseMetaPage,),
28+
}
29+
30+
attribute_map = {
31+
"max_allowed": "max_allowed",
32+
"page": "page",
33+
}
34+
35+
def __init__(
36+
self_,
37+
max_allowed: Union[int, UnsetType] = unset,
38+
page: Union[APIKeysResponseMetaPage, UnsetType] = unset,
39+
**kwargs,
40+
):
41+
"""
42+
Additional information related to api keys response.
43+
44+
:param max_allowed: Max allowed number of API keys.
45+
:type max_allowed: int, optional
46+
47+
:param page: Additional information related to the API keys response.
48+
:type page: APIKeysResponseMetaPage, optional
49+
"""
50+
if max_allowed is not unset:
51+
kwargs["max_allowed"] = max_allowed
52+
if page is not unset:
53+
kwargs["page"] = page
54+
super().__init__(kwargs)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 APIKeysResponseMetaPage(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"total_filtered_count": (int,),
21+
}
22+
23+
attribute_map = {
24+
"total_filtered_count": "total_filtered_count",
25+
}
26+
27+
def __init__(self_, total_filtered_count: Union[int, UnsetType] = unset, **kwargs):
28+
"""
29+
Additional information related to the API keys response.
30+
31+
:param total_filtered_count: Total filtered application key count.
32+
:type total_filtered_count: int, optional
33+
"""
34+
if total_filtered_count is not unset:
35+
kwargs["total_filtered_count"] = total_filtered_count
36+
super().__init__(kwargs)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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.v2.model.application_key_response_meta_page import ApplicationKeyResponseMetaPage
18+
19+
20+
class ApplicationKeyResponseMeta(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.application_key_response_meta_page import ApplicationKeyResponseMetaPage
24+
25+
return {
26+
"max_allowed_per_user": (int,),
27+
"page": (ApplicationKeyResponseMetaPage,),
28+
}
29+
30+
attribute_map = {
31+
"max_allowed_per_user": "max_allowed_per_user",
32+
"page": "page",
33+
}
34+
35+
def __init__(
36+
self_,
37+
max_allowed_per_user: Union[int, UnsetType] = unset,
38+
page: Union[ApplicationKeyResponseMetaPage, UnsetType] = unset,
39+
**kwargs,
40+
):
41+
"""
42+
Additional information related to the application key response.
43+
44+
:param max_allowed_per_user: Max allowed number of application keys per user.
45+
:type max_allowed_per_user: int, optional
46+
47+
:param page: Additional information related to the application key response.
48+
:type page: ApplicationKeyResponseMetaPage, optional
49+
"""
50+
if max_allowed_per_user is not unset:
51+
kwargs["max_allowed_per_user"] = max_allowed_per_user
52+
if page is not unset:
53+
kwargs["page"] = page
54+
super().__init__(kwargs)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 ApplicationKeyResponseMetaPage(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"total_filtered_count": (int,),
21+
}
22+
23+
attribute_map = {
24+
"total_filtered_count": "total_filtered_count",
25+
}
26+
27+
def __init__(self_, total_filtered_count: Union[int, UnsetType] = unset, **kwargs):
28+
"""
29+
Additional information related to the application key response.
30+
31+
:param total_filtered_count: Total filtered application key count.
32+
:type total_filtered_count: int, optional
33+
"""
34+
if total_filtered_count is not unset:
35+
kwargs["total_filtered_count"] = total_filtered_count
36+
super().__init__(kwargs)

0 commit comments

Comments
 (0)