stackit-resourcemanager 0.0.1a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stackit/resourcemanager/__init__.py +67 -0
- stackit/resourcemanager/api/__init__.py +4 -0
- stackit/resourcemanager/api/default_api.py +2703 -0
- stackit/resourcemanager/api_client.py +626 -0
- stackit/resourcemanager/api_response.py +23 -0
- stackit/resourcemanager/configuration.py +110 -0
- stackit/resourcemanager/exceptions.py +198 -0
- stackit/resourcemanager/models/__init__.py +48 -0
- stackit/resourcemanager/models/create_project_payload.py +122 -0
- stackit/resourcemanager/models/error_response.py +94 -0
- stackit/resourcemanager/models/folder_response.py +114 -0
- stackit/resourcemanager/models/get_project_response.py +133 -0
- stackit/resourcemanager/models/lifecycle_state.py +38 -0
- stackit/resourcemanager/models/list_organization_containers_response.py +110 -0
- stackit/resourcemanager/models/list_organization_containers_response_items_inner.py +164 -0
- stackit/resourcemanager/models/list_organization_containers_response_items_inner_any_of.py +99 -0
- stackit/resourcemanager/models/list_organization_containers_response_items_inner_any_of1.py +96 -0
- stackit/resourcemanager/models/list_organizations_response.py +110 -0
- stackit/resourcemanager/models/list_organizations_response_items_inner.py +115 -0
- stackit/resourcemanager/models/list_projects_response.py +104 -0
- stackit/resourcemanager/models/member.py +82 -0
- stackit/resourcemanager/models/organization_response.py +115 -0
- stackit/resourcemanager/models/parent.py +92 -0
- stackit/resourcemanager/models/parent_list_inner.py +107 -0
- stackit/resourcemanager/models/partial_update_project_payload.py +108 -0
- stackit/resourcemanager/models/project.py +118 -0
- stackit/resourcemanager/py.typed +0 -0
- stackit/resourcemanager/rest.py +148 -0
- stackit_resourcemanager-0.0.1a0.dist-info/METADATA +65 -0
- stackit_resourcemanager-0.0.1a0.dist-info/RECORD +31 -0
- stackit_resourcemanager-0.0.1a0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,2703 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Resource Manager API
|
|
5
|
+
|
|
6
|
+
API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
|
|
17
|
+
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call
|
|
18
|
+
from stackit.core.configuration import Configuration
|
|
19
|
+
from typing_extensions import Annotated
|
|
20
|
+
|
|
21
|
+
from stackit.resourcemanager.api_client import ApiClient, RequestSerialized
|
|
22
|
+
from stackit.resourcemanager.api_response import ApiResponse
|
|
23
|
+
from stackit.resourcemanager.models.create_project_payload import CreateProjectPayload
|
|
24
|
+
from stackit.resourcemanager.models.get_project_response import GetProjectResponse
|
|
25
|
+
from stackit.resourcemanager.models.list_organization_containers_response import (
|
|
26
|
+
ListOrganizationContainersResponse,
|
|
27
|
+
)
|
|
28
|
+
from stackit.resourcemanager.models.list_organizations_response import (
|
|
29
|
+
ListOrganizationsResponse,
|
|
30
|
+
)
|
|
31
|
+
from stackit.resourcemanager.models.list_projects_response import ListProjectsResponse
|
|
32
|
+
from stackit.resourcemanager.models.organization_response import OrganizationResponse
|
|
33
|
+
from stackit.resourcemanager.models.partial_update_project_payload import (
|
|
34
|
+
PartialUpdateProjectPayload,
|
|
35
|
+
)
|
|
36
|
+
from stackit.resourcemanager.models.project import Project
|
|
37
|
+
from stackit.resourcemanager.rest import RESTResponseType
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class DefaultApi:
|
|
41
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
42
|
+
Ref: https://openapi-generator.tech
|
|
43
|
+
|
|
44
|
+
Do not edit the class manually.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, configuration: Configuration = None) -> None:
|
|
48
|
+
if configuration is None:
|
|
49
|
+
configuration = Configuration()
|
|
50
|
+
self.configuration = configuration
|
|
51
|
+
self.api_client = ApiClient(self.configuration)
|
|
52
|
+
|
|
53
|
+
@validate_call
|
|
54
|
+
def bff_get_containers_of_a_folder(
|
|
55
|
+
self,
|
|
56
|
+
id: Annotated[
|
|
57
|
+
StrictStr,
|
|
58
|
+
Field(description="Folder identifier - UUID identifier is preferred; containerId is also supported."),
|
|
59
|
+
],
|
|
60
|
+
limit: Annotated[
|
|
61
|
+
Optional[
|
|
62
|
+
Union[
|
|
63
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
64
|
+
]
|
|
65
|
+
],
|
|
66
|
+
Field(
|
|
67
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
68
|
+
),
|
|
69
|
+
] = None,
|
|
70
|
+
cursor: Annotated[
|
|
71
|
+
Optional[StrictStr],
|
|
72
|
+
Field(
|
|
73
|
+
description="A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started."
|
|
74
|
+
),
|
|
75
|
+
] = None,
|
|
76
|
+
_request_timeout: Union[
|
|
77
|
+
None,
|
|
78
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
79
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
80
|
+
] = None,
|
|
81
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
82
|
+
_content_type: Optional[StrictStr] = None,
|
|
83
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
84
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
85
|
+
) -> ListOrganizationContainersResponse:
|
|
86
|
+
"""Get Containers Of A Folder
|
|
87
|
+
|
|
88
|
+
Returns all direct resource container under this folder including their metadata. - Response items will contain all folders first, followed by all projects - If a folder does not have any containers, an empty items list will be returned **Note:** Recursion is not supported - meaning only the next level in hierarchy tree is considered!
|
|
89
|
+
|
|
90
|
+
:param id: Folder identifier - UUID identifier is preferred; containerId is also supported. (required)
|
|
91
|
+
:type id: str
|
|
92
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
93
|
+
:type limit: float
|
|
94
|
+
:param cursor: A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started.
|
|
95
|
+
:type cursor: str
|
|
96
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
97
|
+
number provided, it will be total request
|
|
98
|
+
timeout. It can also be a pair (tuple) of
|
|
99
|
+
(connection, read) timeouts.
|
|
100
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
101
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
102
|
+
request; this effectively ignores the
|
|
103
|
+
authentication in the spec for a single request.
|
|
104
|
+
:type _request_auth: dict, optional
|
|
105
|
+
:param _content_type: force content-type for the request.
|
|
106
|
+
:type _content_type: str, Optional
|
|
107
|
+
:param _headers: set to override the headers for a single
|
|
108
|
+
request; this effectively ignores the headers
|
|
109
|
+
in the spec for a single request.
|
|
110
|
+
:type _headers: dict, optional
|
|
111
|
+
:param _host_index: set to override the host_index for a single
|
|
112
|
+
request; this effectively ignores the host_index
|
|
113
|
+
in the spec for a single request.
|
|
114
|
+
:type _host_index: int, optional
|
|
115
|
+
:return: Returns the result object.
|
|
116
|
+
""" # noqa: E501 docstring might be too long
|
|
117
|
+
|
|
118
|
+
_param = self._bff_get_containers_of_a_folder_serialize(
|
|
119
|
+
id=id,
|
|
120
|
+
limit=limit,
|
|
121
|
+
cursor=cursor,
|
|
122
|
+
_request_auth=_request_auth,
|
|
123
|
+
_content_type=_content_type,
|
|
124
|
+
_headers=_headers,
|
|
125
|
+
_host_index=_host_index,
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
129
|
+
"200": "ListOrganizationContainersResponse",
|
|
130
|
+
"400": "ErrorResponse",
|
|
131
|
+
"401": "ErrorResponse",
|
|
132
|
+
}
|
|
133
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
134
|
+
response_data.read()
|
|
135
|
+
return self.api_client.response_deserialize(
|
|
136
|
+
response_data=response_data,
|
|
137
|
+
response_types_map=_response_types_map,
|
|
138
|
+
).data
|
|
139
|
+
|
|
140
|
+
@validate_call
|
|
141
|
+
def bff_get_containers_of_a_folder_with_http_info(
|
|
142
|
+
self,
|
|
143
|
+
id: Annotated[
|
|
144
|
+
StrictStr,
|
|
145
|
+
Field(description="Folder identifier - UUID identifier is preferred; containerId is also supported."),
|
|
146
|
+
],
|
|
147
|
+
limit: Annotated[
|
|
148
|
+
Optional[
|
|
149
|
+
Union[
|
|
150
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
151
|
+
]
|
|
152
|
+
],
|
|
153
|
+
Field(
|
|
154
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
155
|
+
),
|
|
156
|
+
] = None,
|
|
157
|
+
cursor: Annotated[
|
|
158
|
+
Optional[StrictStr],
|
|
159
|
+
Field(
|
|
160
|
+
description="A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started."
|
|
161
|
+
),
|
|
162
|
+
] = None,
|
|
163
|
+
_request_timeout: Union[
|
|
164
|
+
None,
|
|
165
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
166
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
167
|
+
] = None,
|
|
168
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
169
|
+
_content_type: Optional[StrictStr] = None,
|
|
170
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
171
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
172
|
+
) -> ApiResponse[ListOrganizationContainersResponse]:
|
|
173
|
+
"""Get Containers Of A Folder
|
|
174
|
+
|
|
175
|
+
Returns all direct resource container under this folder including their metadata. - Response items will contain all folders first, followed by all projects - If a folder does not have any containers, an empty items list will be returned **Note:** Recursion is not supported - meaning only the next level in hierarchy tree is considered!
|
|
176
|
+
|
|
177
|
+
:param id: Folder identifier - UUID identifier is preferred; containerId is also supported. (required)
|
|
178
|
+
:type id: str
|
|
179
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
180
|
+
:type limit: float
|
|
181
|
+
:param cursor: A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started.
|
|
182
|
+
:type cursor: str
|
|
183
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
184
|
+
number provided, it will be total request
|
|
185
|
+
timeout. It can also be a pair (tuple) of
|
|
186
|
+
(connection, read) timeouts.
|
|
187
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
188
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
189
|
+
request; this effectively ignores the
|
|
190
|
+
authentication in the spec for a single request.
|
|
191
|
+
:type _request_auth: dict, optional
|
|
192
|
+
:param _content_type: force content-type for the request.
|
|
193
|
+
:type _content_type: str, Optional
|
|
194
|
+
:param _headers: set to override the headers for a single
|
|
195
|
+
request; this effectively ignores the headers
|
|
196
|
+
in the spec for a single request.
|
|
197
|
+
:type _headers: dict, optional
|
|
198
|
+
:param _host_index: set to override the host_index for a single
|
|
199
|
+
request; this effectively ignores the host_index
|
|
200
|
+
in the spec for a single request.
|
|
201
|
+
:type _host_index: int, optional
|
|
202
|
+
:return: Returns the result object.
|
|
203
|
+
""" # noqa: E501 docstring might be too long
|
|
204
|
+
|
|
205
|
+
_param = self._bff_get_containers_of_a_folder_serialize(
|
|
206
|
+
id=id,
|
|
207
|
+
limit=limit,
|
|
208
|
+
cursor=cursor,
|
|
209
|
+
_request_auth=_request_auth,
|
|
210
|
+
_content_type=_content_type,
|
|
211
|
+
_headers=_headers,
|
|
212
|
+
_host_index=_host_index,
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
216
|
+
"200": "ListOrganizationContainersResponse",
|
|
217
|
+
"400": "ErrorResponse",
|
|
218
|
+
"401": "ErrorResponse",
|
|
219
|
+
}
|
|
220
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
221
|
+
response_data.read()
|
|
222
|
+
return self.api_client.response_deserialize(
|
|
223
|
+
response_data=response_data,
|
|
224
|
+
response_types_map=_response_types_map,
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
@validate_call
|
|
228
|
+
def bff_get_containers_of_a_folder_without_preload_content(
|
|
229
|
+
self,
|
|
230
|
+
id: Annotated[
|
|
231
|
+
StrictStr,
|
|
232
|
+
Field(description="Folder identifier - UUID identifier is preferred; containerId is also supported."),
|
|
233
|
+
],
|
|
234
|
+
limit: Annotated[
|
|
235
|
+
Optional[
|
|
236
|
+
Union[
|
|
237
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
238
|
+
]
|
|
239
|
+
],
|
|
240
|
+
Field(
|
|
241
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
242
|
+
),
|
|
243
|
+
] = None,
|
|
244
|
+
cursor: Annotated[
|
|
245
|
+
Optional[StrictStr],
|
|
246
|
+
Field(
|
|
247
|
+
description="A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started."
|
|
248
|
+
),
|
|
249
|
+
] = None,
|
|
250
|
+
_request_timeout: Union[
|
|
251
|
+
None,
|
|
252
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
253
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
254
|
+
] = None,
|
|
255
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
256
|
+
_content_type: Optional[StrictStr] = None,
|
|
257
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
258
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
259
|
+
) -> RESTResponseType:
|
|
260
|
+
"""Get Containers Of A Folder
|
|
261
|
+
|
|
262
|
+
Returns all direct resource container under this folder including their metadata. - Response items will contain all folders first, followed by all projects - If a folder does not have any containers, an empty items list will be returned **Note:** Recursion is not supported - meaning only the next level in hierarchy tree is considered!
|
|
263
|
+
|
|
264
|
+
:param id: Folder identifier - UUID identifier is preferred; containerId is also supported. (required)
|
|
265
|
+
:type id: str
|
|
266
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
267
|
+
:type limit: float
|
|
268
|
+
:param cursor: A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started.
|
|
269
|
+
:type cursor: str
|
|
270
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
271
|
+
number provided, it will be total request
|
|
272
|
+
timeout. It can also be a pair (tuple) of
|
|
273
|
+
(connection, read) timeouts.
|
|
274
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
275
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
276
|
+
request; this effectively ignores the
|
|
277
|
+
authentication in the spec for a single request.
|
|
278
|
+
:type _request_auth: dict, optional
|
|
279
|
+
:param _content_type: force content-type for the request.
|
|
280
|
+
:type _content_type: str, Optional
|
|
281
|
+
:param _headers: set to override the headers for a single
|
|
282
|
+
request; this effectively ignores the headers
|
|
283
|
+
in the spec for a single request.
|
|
284
|
+
:type _headers: dict, optional
|
|
285
|
+
:param _host_index: set to override the host_index for a single
|
|
286
|
+
request; this effectively ignores the host_index
|
|
287
|
+
in the spec for a single request.
|
|
288
|
+
:type _host_index: int, optional
|
|
289
|
+
:return: Returns the result object.
|
|
290
|
+
""" # noqa: E501 docstring might be too long
|
|
291
|
+
|
|
292
|
+
_param = self._bff_get_containers_of_a_folder_serialize(
|
|
293
|
+
id=id,
|
|
294
|
+
limit=limit,
|
|
295
|
+
cursor=cursor,
|
|
296
|
+
_request_auth=_request_auth,
|
|
297
|
+
_content_type=_content_type,
|
|
298
|
+
_headers=_headers,
|
|
299
|
+
_host_index=_host_index,
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
303
|
+
"200": "ListOrganizationContainersResponse",
|
|
304
|
+
"400": "ErrorResponse",
|
|
305
|
+
"401": "ErrorResponse",
|
|
306
|
+
}
|
|
307
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
308
|
+
return response_data.response
|
|
309
|
+
|
|
310
|
+
def _bff_get_containers_of_a_folder_serialize(
|
|
311
|
+
self,
|
|
312
|
+
id,
|
|
313
|
+
limit,
|
|
314
|
+
cursor,
|
|
315
|
+
_request_auth,
|
|
316
|
+
_content_type,
|
|
317
|
+
_headers,
|
|
318
|
+
_host_index,
|
|
319
|
+
) -> RequestSerialized:
|
|
320
|
+
|
|
321
|
+
_host = None
|
|
322
|
+
|
|
323
|
+
_collection_formats: Dict[str, str] = {}
|
|
324
|
+
|
|
325
|
+
_path_params: Dict[str, str] = {}
|
|
326
|
+
_query_params: List[Tuple[str, str]] = []
|
|
327
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
328
|
+
_form_params: List[Tuple[str, str]] = []
|
|
329
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
330
|
+
_body_params: Optional[bytes] = None
|
|
331
|
+
|
|
332
|
+
# process the path parameters
|
|
333
|
+
if id is not None:
|
|
334
|
+
_path_params["id"] = id
|
|
335
|
+
# process the query parameters
|
|
336
|
+
if limit is not None:
|
|
337
|
+
|
|
338
|
+
_query_params.append(("limit", limit))
|
|
339
|
+
|
|
340
|
+
if cursor is not None:
|
|
341
|
+
|
|
342
|
+
_query_params.append(("cursor", cursor))
|
|
343
|
+
|
|
344
|
+
# process the header parameters
|
|
345
|
+
# process the form parameters
|
|
346
|
+
# process the body parameter
|
|
347
|
+
|
|
348
|
+
# set the HTTP header `Accept`
|
|
349
|
+
if "Accept" not in _header_params:
|
|
350
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
351
|
+
|
|
352
|
+
# authentication setting
|
|
353
|
+
_auth_settings: List[str] = []
|
|
354
|
+
|
|
355
|
+
return self.api_client.param_serialize(
|
|
356
|
+
method="GET",
|
|
357
|
+
resource_path="/bff/folders/{id}/containers",
|
|
358
|
+
path_params=_path_params,
|
|
359
|
+
query_params=_query_params,
|
|
360
|
+
header_params=_header_params,
|
|
361
|
+
body=_body_params,
|
|
362
|
+
post_params=_form_params,
|
|
363
|
+
files=_files,
|
|
364
|
+
auth_settings=_auth_settings,
|
|
365
|
+
collection_formats=_collection_formats,
|
|
366
|
+
_host=_host,
|
|
367
|
+
_request_auth=_request_auth,
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
@validate_call
|
|
371
|
+
def bff_get_containers_of_an_organization(
|
|
372
|
+
self,
|
|
373
|
+
id: Annotated[
|
|
374
|
+
StrictStr,
|
|
375
|
+
Field(description="Organization identifier - UUID identifier is preferred; containerId is also supported."),
|
|
376
|
+
],
|
|
377
|
+
limit: Annotated[
|
|
378
|
+
Optional[
|
|
379
|
+
Union[
|
|
380
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
381
|
+
]
|
|
382
|
+
],
|
|
383
|
+
Field(
|
|
384
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
385
|
+
),
|
|
386
|
+
] = None,
|
|
387
|
+
cursor: Annotated[
|
|
388
|
+
Optional[StrictStr],
|
|
389
|
+
Field(
|
|
390
|
+
description="A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started."
|
|
391
|
+
),
|
|
392
|
+
] = None,
|
|
393
|
+
_request_timeout: Union[
|
|
394
|
+
None,
|
|
395
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
396
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
397
|
+
] = None,
|
|
398
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
399
|
+
_content_type: Optional[StrictStr] = None,
|
|
400
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
401
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
402
|
+
) -> ListOrganizationContainersResponse:
|
|
403
|
+
"""Get Containers Of An Organization
|
|
404
|
+
|
|
405
|
+
Returns all direct resource container under this organization including their metadata. - Response items will contain all folders first, followed by all projects - If organization does not have any containers, an empty items list will be returned
|
|
406
|
+
|
|
407
|
+
:param id: Organization identifier - UUID identifier is preferred; containerId is also supported. (required)
|
|
408
|
+
:type id: str
|
|
409
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
410
|
+
:type limit: float
|
|
411
|
+
:param cursor: A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started.
|
|
412
|
+
:type cursor: str
|
|
413
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
414
|
+
number provided, it will be total request
|
|
415
|
+
timeout. It can also be a pair (tuple) of
|
|
416
|
+
(connection, read) timeouts.
|
|
417
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
418
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
419
|
+
request; this effectively ignores the
|
|
420
|
+
authentication in the spec for a single request.
|
|
421
|
+
:type _request_auth: dict, optional
|
|
422
|
+
:param _content_type: force content-type for the request.
|
|
423
|
+
:type _content_type: str, Optional
|
|
424
|
+
:param _headers: set to override the headers for a single
|
|
425
|
+
request; this effectively ignores the headers
|
|
426
|
+
in the spec for a single request.
|
|
427
|
+
:type _headers: dict, optional
|
|
428
|
+
:param _host_index: set to override the host_index for a single
|
|
429
|
+
request; this effectively ignores the host_index
|
|
430
|
+
in the spec for a single request.
|
|
431
|
+
:type _host_index: int, optional
|
|
432
|
+
:return: Returns the result object.
|
|
433
|
+
""" # noqa: E501 docstring might be too long
|
|
434
|
+
|
|
435
|
+
_param = self._bff_get_containers_of_an_organization_serialize(
|
|
436
|
+
id=id,
|
|
437
|
+
limit=limit,
|
|
438
|
+
cursor=cursor,
|
|
439
|
+
_request_auth=_request_auth,
|
|
440
|
+
_content_type=_content_type,
|
|
441
|
+
_headers=_headers,
|
|
442
|
+
_host_index=_host_index,
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
446
|
+
"200": "ListOrganizationContainersResponse",
|
|
447
|
+
"400": "ErrorResponse",
|
|
448
|
+
"401": "ErrorResponse",
|
|
449
|
+
"404": "ErrorResponse",
|
|
450
|
+
}
|
|
451
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
452
|
+
response_data.read()
|
|
453
|
+
return self.api_client.response_deserialize(
|
|
454
|
+
response_data=response_data,
|
|
455
|
+
response_types_map=_response_types_map,
|
|
456
|
+
).data
|
|
457
|
+
|
|
458
|
+
@validate_call
|
|
459
|
+
def bff_get_containers_of_an_organization_with_http_info(
|
|
460
|
+
self,
|
|
461
|
+
id: Annotated[
|
|
462
|
+
StrictStr,
|
|
463
|
+
Field(description="Organization identifier - UUID identifier is preferred; containerId is also supported."),
|
|
464
|
+
],
|
|
465
|
+
limit: Annotated[
|
|
466
|
+
Optional[
|
|
467
|
+
Union[
|
|
468
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
469
|
+
]
|
|
470
|
+
],
|
|
471
|
+
Field(
|
|
472
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
473
|
+
),
|
|
474
|
+
] = None,
|
|
475
|
+
cursor: Annotated[
|
|
476
|
+
Optional[StrictStr],
|
|
477
|
+
Field(
|
|
478
|
+
description="A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started."
|
|
479
|
+
),
|
|
480
|
+
] = None,
|
|
481
|
+
_request_timeout: Union[
|
|
482
|
+
None,
|
|
483
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
484
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
485
|
+
] = None,
|
|
486
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
487
|
+
_content_type: Optional[StrictStr] = None,
|
|
488
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
489
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
490
|
+
) -> ApiResponse[ListOrganizationContainersResponse]:
|
|
491
|
+
"""Get Containers Of An Organization
|
|
492
|
+
|
|
493
|
+
Returns all direct resource container under this organization including their metadata. - Response items will contain all folders first, followed by all projects - If organization does not have any containers, an empty items list will be returned
|
|
494
|
+
|
|
495
|
+
:param id: Organization identifier - UUID identifier is preferred; containerId is also supported. (required)
|
|
496
|
+
:type id: str
|
|
497
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
498
|
+
:type limit: float
|
|
499
|
+
:param cursor: A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started.
|
|
500
|
+
:type cursor: str
|
|
501
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
502
|
+
number provided, it will be total request
|
|
503
|
+
timeout. It can also be a pair (tuple) of
|
|
504
|
+
(connection, read) timeouts.
|
|
505
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
506
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
507
|
+
request; this effectively ignores the
|
|
508
|
+
authentication in the spec for a single request.
|
|
509
|
+
:type _request_auth: dict, optional
|
|
510
|
+
:param _content_type: force content-type for the request.
|
|
511
|
+
:type _content_type: str, Optional
|
|
512
|
+
:param _headers: set to override the headers for a single
|
|
513
|
+
request; this effectively ignores the headers
|
|
514
|
+
in the spec for a single request.
|
|
515
|
+
:type _headers: dict, optional
|
|
516
|
+
:param _host_index: set to override the host_index for a single
|
|
517
|
+
request; this effectively ignores the host_index
|
|
518
|
+
in the spec for a single request.
|
|
519
|
+
:type _host_index: int, optional
|
|
520
|
+
:return: Returns the result object.
|
|
521
|
+
""" # noqa: E501 docstring might be too long
|
|
522
|
+
|
|
523
|
+
_param = self._bff_get_containers_of_an_organization_serialize(
|
|
524
|
+
id=id,
|
|
525
|
+
limit=limit,
|
|
526
|
+
cursor=cursor,
|
|
527
|
+
_request_auth=_request_auth,
|
|
528
|
+
_content_type=_content_type,
|
|
529
|
+
_headers=_headers,
|
|
530
|
+
_host_index=_host_index,
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
534
|
+
"200": "ListOrganizationContainersResponse",
|
|
535
|
+
"400": "ErrorResponse",
|
|
536
|
+
"401": "ErrorResponse",
|
|
537
|
+
"404": "ErrorResponse",
|
|
538
|
+
}
|
|
539
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
540
|
+
response_data.read()
|
|
541
|
+
return self.api_client.response_deserialize(
|
|
542
|
+
response_data=response_data,
|
|
543
|
+
response_types_map=_response_types_map,
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
@validate_call
|
|
547
|
+
def bff_get_containers_of_an_organization_without_preload_content(
|
|
548
|
+
self,
|
|
549
|
+
id: Annotated[
|
|
550
|
+
StrictStr,
|
|
551
|
+
Field(description="Organization identifier - UUID identifier is preferred; containerId is also supported."),
|
|
552
|
+
],
|
|
553
|
+
limit: Annotated[
|
|
554
|
+
Optional[
|
|
555
|
+
Union[
|
|
556
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
557
|
+
]
|
|
558
|
+
],
|
|
559
|
+
Field(
|
|
560
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
561
|
+
),
|
|
562
|
+
] = None,
|
|
563
|
+
cursor: Annotated[
|
|
564
|
+
Optional[StrictStr],
|
|
565
|
+
Field(
|
|
566
|
+
description="A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started."
|
|
567
|
+
),
|
|
568
|
+
] = None,
|
|
569
|
+
_request_timeout: Union[
|
|
570
|
+
None,
|
|
571
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
572
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
573
|
+
] = None,
|
|
574
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
575
|
+
_content_type: Optional[StrictStr] = None,
|
|
576
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
577
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
578
|
+
) -> RESTResponseType:
|
|
579
|
+
"""Get Containers Of An Organization
|
|
580
|
+
|
|
581
|
+
Returns all direct resource container under this organization including their metadata. - Response items will contain all folders first, followed by all projects - If organization does not have any containers, an empty items list will be returned
|
|
582
|
+
|
|
583
|
+
:param id: Organization identifier - UUID identifier is preferred; containerId is also supported. (required)
|
|
584
|
+
:type id: str
|
|
585
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
586
|
+
:type limit: float
|
|
587
|
+
:param cursor: A pagination cursor is returned on the first call of the pagination process. If given, it will start from the end of the previous position. If not given, a new pagination is started.
|
|
588
|
+
:type cursor: str
|
|
589
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
590
|
+
number provided, it will be total request
|
|
591
|
+
timeout. It can also be a pair (tuple) of
|
|
592
|
+
(connection, read) timeouts.
|
|
593
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
594
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
595
|
+
request; this effectively ignores the
|
|
596
|
+
authentication in the spec for a single request.
|
|
597
|
+
:type _request_auth: dict, optional
|
|
598
|
+
:param _content_type: force content-type for the request.
|
|
599
|
+
:type _content_type: str, Optional
|
|
600
|
+
:param _headers: set to override the headers for a single
|
|
601
|
+
request; this effectively ignores the headers
|
|
602
|
+
in the spec for a single request.
|
|
603
|
+
:type _headers: dict, optional
|
|
604
|
+
:param _host_index: set to override the host_index for a single
|
|
605
|
+
request; this effectively ignores the host_index
|
|
606
|
+
in the spec for a single request.
|
|
607
|
+
:type _host_index: int, optional
|
|
608
|
+
:return: Returns the result object.
|
|
609
|
+
""" # noqa: E501 docstring might be too long
|
|
610
|
+
|
|
611
|
+
_param = self._bff_get_containers_of_an_organization_serialize(
|
|
612
|
+
id=id,
|
|
613
|
+
limit=limit,
|
|
614
|
+
cursor=cursor,
|
|
615
|
+
_request_auth=_request_auth,
|
|
616
|
+
_content_type=_content_type,
|
|
617
|
+
_headers=_headers,
|
|
618
|
+
_host_index=_host_index,
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
622
|
+
"200": "ListOrganizationContainersResponse",
|
|
623
|
+
"400": "ErrorResponse",
|
|
624
|
+
"401": "ErrorResponse",
|
|
625
|
+
"404": "ErrorResponse",
|
|
626
|
+
}
|
|
627
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
628
|
+
return response_data.response
|
|
629
|
+
|
|
630
|
+
def _bff_get_containers_of_an_organization_serialize(
|
|
631
|
+
self,
|
|
632
|
+
id,
|
|
633
|
+
limit,
|
|
634
|
+
cursor,
|
|
635
|
+
_request_auth,
|
|
636
|
+
_content_type,
|
|
637
|
+
_headers,
|
|
638
|
+
_host_index,
|
|
639
|
+
) -> RequestSerialized:
|
|
640
|
+
|
|
641
|
+
_host = None
|
|
642
|
+
|
|
643
|
+
_collection_formats: Dict[str, str] = {}
|
|
644
|
+
|
|
645
|
+
_path_params: Dict[str, str] = {}
|
|
646
|
+
_query_params: List[Tuple[str, str]] = []
|
|
647
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
648
|
+
_form_params: List[Tuple[str, str]] = []
|
|
649
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
650
|
+
_body_params: Optional[bytes] = None
|
|
651
|
+
|
|
652
|
+
# process the path parameters
|
|
653
|
+
if id is not None:
|
|
654
|
+
_path_params["id"] = id
|
|
655
|
+
# process the query parameters
|
|
656
|
+
if limit is not None:
|
|
657
|
+
|
|
658
|
+
_query_params.append(("limit", limit))
|
|
659
|
+
|
|
660
|
+
if cursor is not None:
|
|
661
|
+
|
|
662
|
+
_query_params.append(("cursor", cursor))
|
|
663
|
+
|
|
664
|
+
# process the header parameters
|
|
665
|
+
# process the form parameters
|
|
666
|
+
# process the body parameter
|
|
667
|
+
|
|
668
|
+
# set the HTTP header `Accept`
|
|
669
|
+
if "Accept" not in _header_params:
|
|
670
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
671
|
+
|
|
672
|
+
# authentication setting
|
|
673
|
+
_auth_settings: List[str] = []
|
|
674
|
+
|
|
675
|
+
return self.api_client.param_serialize(
|
|
676
|
+
method="GET",
|
|
677
|
+
resource_path="/bff/organizations/{id}/containers",
|
|
678
|
+
path_params=_path_params,
|
|
679
|
+
query_params=_query_params,
|
|
680
|
+
header_params=_header_params,
|
|
681
|
+
body=_body_params,
|
|
682
|
+
post_params=_form_params,
|
|
683
|
+
files=_files,
|
|
684
|
+
auth_settings=_auth_settings,
|
|
685
|
+
collection_formats=_collection_formats,
|
|
686
|
+
_host=_host,
|
|
687
|
+
_request_auth=_request_auth,
|
|
688
|
+
)
|
|
689
|
+
|
|
690
|
+
@validate_call
|
|
691
|
+
def create_project(
|
|
692
|
+
self,
|
|
693
|
+
create_project_payload: Optional[CreateProjectPayload] = None,
|
|
694
|
+
_request_timeout: Union[
|
|
695
|
+
None,
|
|
696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
697
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
698
|
+
] = None,
|
|
699
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
700
|
+
_content_type: Optional[StrictStr] = None,
|
|
701
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
702
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
703
|
+
) -> Project:
|
|
704
|
+
"""Create Project
|
|
705
|
+
|
|
706
|
+
Create a new project. - The request is synchronous, but the workflow-based creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes
|
|
707
|
+
|
|
708
|
+
:param create_project_payload:
|
|
709
|
+
:type create_project_payload: CreateProjectPayload
|
|
710
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
711
|
+
number provided, it will be total request
|
|
712
|
+
timeout. It can also be a pair (tuple) of
|
|
713
|
+
(connection, read) timeouts.
|
|
714
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
715
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
716
|
+
request; this effectively ignores the
|
|
717
|
+
authentication in the spec for a single request.
|
|
718
|
+
:type _request_auth: dict, optional
|
|
719
|
+
:param _content_type: force content-type for the request.
|
|
720
|
+
:type _content_type: str, Optional
|
|
721
|
+
:param _headers: set to override the headers for a single
|
|
722
|
+
request; this effectively ignores the headers
|
|
723
|
+
in the spec for a single request.
|
|
724
|
+
:type _headers: dict, optional
|
|
725
|
+
:param _host_index: set to override the host_index for a single
|
|
726
|
+
request; this effectively ignores the host_index
|
|
727
|
+
in the spec for a single request.
|
|
728
|
+
:type _host_index: int, optional
|
|
729
|
+
:return: Returns the result object.
|
|
730
|
+
""" # noqa: E501 docstring might be too long
|
|
731
|
+
|
|
732
|
+
_param = self._create_project_serialize(
|
|
733
|
+
create_project_payload=create_project_payload,
|
|
734
|
+
_request_auth=_request_auth,
|
|
735
|
+
_content_type=_content_type,
|
|
736
|
+
_headers=_headers,
|
|
737
|
+
_host_index=_host_index,
|
|
738
|
+
)
|
|
739
|
+
|
|
740
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
741
|
+
"201": "Project",
|
|
742
|
+
"400": "ErrorResponse",
|
|
743
|
+
"403": "ErrorResponse",
|
|
744
|
+
"409": "ErrorResponse",
|
|
745
|
+
}
|
|
746
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
747
|
+
response_data.read()
|
|
748
|
+
return self.api_client.response_deserialize(
|
|
749
|
+
response_data=response_data,
|
|
750
|
+
response_types_map=_response_types_map,
|
|
751
|
+
).data
|
|
752
|
+
|
|
753
|
+
@validate_call
|
|
754
|
+
def create_project_with_http_info(
|
|
755
|
+
self,
|
|
756
|
+
create_project_payload: Optional[CreateProjectPayload] = None,
|
|
757
|
+
_request_timeout: Union[
|
|
758
|
+
None,
|
|
759
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
760
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
761
|
+
] = None,
|
|
762
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
763
|
+
_content_type: Optional[StrictStr] = None,
|
|
764
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
765
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
766
|
+
) -> ApiResponse[Project]:
|
|
767
|
+
"""Create Project
|
|
768
|
+
|
|
769
|
+
Create a new project. - The request is synchronous, but the workflow-based creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes
|
|
770
|
+
|
|
771
|
+
:param create_project_payload:
|
|
772
|
+
:type create_project_payload: CreateProjectPayload
|
|
773
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
774
|
+
number provided, it will be total request
|
|
775
|
+
timeout. It can also be a pair (tuple) of
|
|
776
|
+
(connection, read) timeouts.
|
|
777
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
778
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
779
|
+
request; this effectively ignores the
|
|
780
|
+
authentication in the spec for a single request.
|
|
781
|
+
:type _request_auth: dict, optional
|
|
782
|
+
:param _content_type: force content-type for the request.
|
|
783
|
+
:type _content_type: str, Optional
|
|
784
|
+
:param _headers: set to override the headers for a single
|
|
785
|
+
request; this effectively ignores the headers
|
|
786
|
+
in the spec for a single request.
|
|
787
|
+
:type _headers: dict, optional
|
|
788
|
+
:param _host_index: set to override the host_index for a single
|
|
789
|
+
request; this effectively ignores the host_index
|
|
790
|
+
in the spec for a single request.
|
|
791
|
+
:type _host_index: int, optional
|
|
792
|
+
:return: Returns the result object.
|
|
793
|
+
""" # noqa: E501 docstring might be too long
|
|
794
|
+
|
|
795
|
+
_param = self._create_project_serialize(
|
|
796
|
+
create_project_payload=create_project_payload,
|
|
797
|
+
_request_auth=_request_auth,
|
|
798
|
+
_content_type=_content_type,
|
|
799
|
+
_headers=_headers,
|
|
800
|
+
_host_index=_host_index,
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
804
|
+
"201": "Project",
|
|
805
|
+
"400": "ErrorResponse",
|
|
806
|
+
"403": "ErrorResponse",
|
|
807
|
+
"409": "ErrorResponse",
|
|
808
|
+
}
|
|
809
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
810
|
+
response_data.read()
|
|
811
|
+
return self.api_client.response_deserialize(
|
|
812
|
+
response_data=response_data,
|
|
813
|
+
response_types_map=_response_types_map,
|
|
814
|
+
)
|
|
815
|
+
|
|
816
|
+
@validate_call
|
|
817
|
+
def create_project_without_preload_content(
|
|
818
|
+
self,
|
|
819
|
+
create_project_payload: Optional[CreateProjectPayload] = None,
|
|
820
|
+
_request_timeout: Union[
|
|
821
|
+
None,
|
|
822
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
823
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
824
|
+
] = None,
|
|
825
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
826
|
+
_content_type: Optional[StrictStr] = None,
|
|
827
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
828
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
829
|
+
) -> RESTResponseType:
|
|
830
|
+
"""Create Project
|
|
831
|
+
|
|
832
|
+
Create a new project. - The request is synchronous, but the workflow-based creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes
|
|
833
|
+
|
|
834
|
+
:param create_project_payload:
|
|
835
|
+
:type create_project_payload: CreateProjectPayload
|
|
836
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
837
|
+
number provided, it will be total request
|
|
838
|
+
timeout. It can also be a pair (tuple) of
|
|
839
|
+
(connection, read) timeouts.
|
|
840
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
841
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
842
|
+
request; this effectively ignores the
|
|
843
|
+
authentication in the spec for a single request.
|
|
844
|
+
:type _request_auth: dict, optional
|
|
845
|
+
:param _content_type: force content-type for the request.
|
|
846
|
+
:type _content_type: str, Optional
|
|
847
|
+
:param _headers: set to override the headers for a single
|
|
848
|
+
request; this effectively ignores the headers
|
|
849
|
+
in the spec for a single request.
|
|
850
|
+
:type _headers: dict, optional
|
|
851
|
+
:param _host_index: set to override the host_index for a single
|
|
852
|
+
request; this effectively ignores the host_index
|
|
853
|
+
in the spec for a single request.
|
|
854
|
+
:type _host_index: int, optional
|
|
855
|
+
:return: Returns the result object.
|
|
856
|
+
""" # noqa: E501 docstring might be too long
|
|
857
|
+
|
|
858
|
+
_param = self._create_project_serialize(
|
|
859
|
+
create_project_payload=create_project_payload,
|
|
860
|
+
_request_auth=_request_auth,
|
|
861
|
+
_content_type=_content_type,
|
|
862
|
+
_headers=_headers,
|
|
863
|
+
_host_index=_host_index,
|
|
864
|
+
)
|
|
865
|
+
|
|
866
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
867
|
+
"201": "Project",
|
|
868
|
+
"400": "ErrorResponse",
|
|
869
|
+
"403": "ErrorResponse",
|
|
870
|
+
"409": "ErrorResponse",
|
|
871
|
+
}
|
|
872
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
873
|
+
return response_data.response
|
|
874
|
+
|
|
875
|
+
def _create_project_serialize(
|
|
876
|
+
self,
|
|
877
|
+
create_project_payload,
|
|
878
|
+
_request_auth,
|
|
879
|
+
_content_type,
|
|
880
|
+
_headers,
|
|
881
|
+
_host_index,
|
|
882
|
+
) -> RequestSerialized:
|
|
883
|
+
|
|
884
|
+
_host = None
|
|
885
|
+
|
|
886
|
+
_collection_formats: Dict[str, str] = {}
|
|
887
|
+
|
|
888
|
+
_path_params: Dict[str, str] = {}
|
|
889
|
+
_query_params: List[Tuple[str, str]] = []
|
|
890
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
891
|
+
_form_params: List[Tuple[str, str]] = []
|
|
892
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
893
|
+
_body_params: Optional[bytes] = None
|
|
894
|
+
|
|
895
|
+
# process the path parameters
|
|
896
|
+
# process the query parameters
|
|
897
|
+
# process the header parameters
|
|
898
|
+
# process the form parameters
|
|
899
|
+
# process the body parameter
|
|
900
|
+
if create_project_payload is not None:
|
|
901
|
+
_body_params = create_project_payload
|
|
902
|
+
|
|
903
|
+
# set the HTTP header `Accept`
|
|
904
|
+
if "Accept" not in _header_params:
|
|
905
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
906
|
+
|
|
907
|
+
# set the HTTP header `Content-Type`
|
|
908
|
+
if _content_type:
|
|
909
|
+
_header_params["Content-Type"] = _content_type
|
|
910
|
+
else:
|
|
911
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
912
|
+
if _default_content_type is not None:
|
|
913
|
+
_header_params["Content-Type"] = _default_content_type
|
|
914
|
+
|
|
915
|
+
# authentication setting
|
|
916
|
+
_auth_settings: List[str] = []
|
|
917
|
+
|
|
918
|
+
return self.api_client.param_serialize(
|
|
919
|
+
method="POST",
|
|
920
|
+
resource_path="/v2/projects",
|
|
921
|
+
path_params=_path_params,
|
|
922
|
+
query_params=_query_params,
|
|
923
|
+
header_params=_header_params,
|
|
924
|
+
body=_body_params,
|
|
925
|
+
post_params=_form_params,
|
|
926
|
+
files=_files,
|
|
927
|
+
auth_settings=_auth_settings,
|
|
928
|
+
collection_formats=_collection_formats,
|
|
929
|
+
_host=_host,
|
|
930
|
+
_request_auth=_request_auth,
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
@validate_call
|
|
934
|
+
def delete_project(
|
|
935
|
+
self,
|
|
936
|
+
id: Annotated[
|
|
937
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
938
|
+
],
|
|
939
|
+
_request_timeout: Union[
|
|
940
|
+
None,
|
|
941
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
942
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
943
|
+
] = None,
|
|
944
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
945
|
+
_content_type: Optional[StrictStr] = None,
|
|
946
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
947
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
948
|
+
) -> None:
|
|
949
|
+
"""Delete Project
|
|
950
|
+
|
|
951
|
+
Triggers the deletion of a project. - The request is synchronous, but the workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow completes
|
|
952
|
+
|
|
953
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
954
|
+
:type id: str
|
|
955
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
956
|
+
number provided, it will be total request
|
|
957
|
+
timeout. It can also be a pair (tuple) of
|
|
958
|
+
(connection, read) timeouts.
|
|
959
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
960
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
961
|
+
request; this effectively ignores the
|
|
962
|
+
authentication in the spec for a single request.
|
|
963
|
+
:type _request_auth: dict, optional
|
|
964
|
+
:param _content_type: force content-type for the request.
|
|
965
|
+
:type _content_type: str, Optional
|
|
966
|
+
:param _headers: set to override the headers for a single
|
|
967
|
+
request; this effectively ignores the headers
|
|
968
|
+
in the spec for a single request.
|
|
969
|
+
:type _headers: dict, optional
|
|
970
|
+
:param _host_index: set to override the host_index for a single
|
|
971
|
+
request; this effectively ignores the host_index
|
|
972
|
+
in the spec for a single request.
|
|
973
|
+
:type _host_index: int, optional
|
|
974
|
+
:return: Returns the result object.
|
|
975
|
+
""" # noqa: E501 docstring might be too long
|
|
976
|
+
|
|
977
|
+
_param = self._delete_project_serialize(
|
|
978
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
979
|
+
)
|
|
980
|
+
|
|
981
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
982
|
+
"202": None,
|
|
983
|
+
"409": "ErrorResponse",
|
|
984
|
+
}
|
|
985
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
986
|
+
response_data.read()
|
|
987
|
+
return self.api_client.response_deserialize(
|
|
988
|
+
response_data=response_data,
|
|
989
|
+
response_types_map=_response_types_map,
|
|
990
|
+
).data
|
|
991
|
+
|
|
992
|
+
@validate_call
|
|
993
|
+
def delete_project_with_http_info(
|
|
994
|
+
self,
|
|
995
|
+
id: Annotated[
|
|
996
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
997
|
+
],
|
|
998
|
+
_request_timeout: Union[
|
|
999
|
+
None,
|
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1001
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1002
|
+
] = None,
|
|
1003
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1004
|
+
_content_type: Optional[StrictStr] = None,
|
|
1005
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1006
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1007
|
+
) -> ApiResponse[None]:
|
|
1008
|
+
"""Delete Project
|
|
1009
|
+
|
|
1010
|
+
Triggers the deletion of a project. - The request is synchronous, but the workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow completes
|
|
1011
|
+
|
|
1012
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
1013
|
+
:type id: str
|
|
1014
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1015
|
+
number provided, it will be total request
|
|
1016
|
+
timeout. It can also be a pair (tuple) of
|
|
1017
|
+
(connection, read) timeouts.
|
|
1018
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1019
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1020
|
+
request; this effectively ignores the
|
|
1021
|
+
authentication in the spec for a single request.
|
|
1022
|
+
:type _request_auth: dict, optional
|
|
1023
|
+
:param _content_type: force content-type for the request.
|
|
1024
|
+
:type _content_type: str, Optional
|
|
1025
|
+
:param _headers: set to override the headers for a single
|
|
1026
|
+
request; this effectively ignores the headers
|
|
1027
|
+
in the spec for a single request.
|
|
1028
|
+
:type _headers: dict, optional
|
|
1029
|
+
:param _host_index: set to override the host_index for a single
|
|
1030
|
+
request; this effectively ignores the host_index
|
|
1031
|
+
in the spec for a single request.
|
|
1032
|
+
:type _host_index: int, optional
|
|
1033
|
+
:return: Returns the result object.
|
|
1034
|
+
""" # noqa: E501 docstring might be too long
|
|
1035
|
+
|
|
1036
|
+
_param = self._delete_project_serialize(
|
|
1037
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1041
|
+
"202": None,
|
|
1042
|
+
"409": "ErrorResponse",
|
|
1043
|
+
}
|
|
1044
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1045
|
+
response_data.read()
|
|
1046
|
+
return self.api_client.response_deserialize(
|
|
1047
|
+
response_data=response_data,
|
|
1048
|
+
response_types_map=_response_types_map,
|
|
1049
|
+
)
|
|
1050
|
+
|
|
1051
|
+
@validate_call
|
|
1052
|
+
def delete_project_without_preload_content(
|
|
1053
|
+
self,
|
|
1054
|
+
id: Annotated[
|
|
1055
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
1056
|
+
],
|
|
1057
|
+
_request_timeout: Union[
|
|
1058
|
+
None,
|
|
1059
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1060
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1061
|
+
] = None,
|
|
1062
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1063
|
+
_content_type: Optional[StrictStr] = None,
|
|
1064
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1065
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1066
|
+
) -> RESTResponseType:
|
|
1067
|
+
"""Delete Project
|
|
1068
|
+
|
|
1069
|
+
Triggers the deletion of a project. - The request is synchronous, but the workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow completes
|
|
1070
|
+
|
|
1071
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
1072
|
+
:type id: str
|
|
1073
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1074
|
+
number provided, it will be total request
|
|
1075
|
+
timeout. It can also be a pair (tuple) of
|
|
1076
|
+
(connection, read) timeouts.
|
|
1077
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1078
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1079
|
+
request; this effectively ignores the
|
|
1080
|
+
authentication in the spec for a single request.
|
|
1081
|
+
:type _request_auth: dict, optional
|
|
1082
|
+
:param _content_type: force content-type for the request.
|
|
1083
|
+
:type _content_type: str, Optional
|
|
1084
|
+
:param _headers: set to override the headers for a single
|
|
1085
|
+
request; this effectively ignores the headers
|
|
1086
|
+
in the spec for a single request.
|
|
1087
|
+
:type _headers: dict, optional
|
|
1088
|
+
:param _host_index: set to override the host_index for a single
|
|
1089
|
+
request; this effectively ignores the host_index
|
|
1090
|
+
in the spec for a single request.
|
|
1091
|
+
:type _host_index: int, optional
|
|
1092
|
+
:return: Returns the result object.
|
|
1093
|
+
""" # noqa: E501 docstring might be too long
|
|
1094
|
+
|
|
1095
|
+
_param = self._delete_project_serialize(
|
|
1096
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1097
|
+
)
|
|
1098
|
+
|
|
1099
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1100
|
+
"202": None,
|
|
1101
|
+
"409": "ErrorResponse",
|
|
1102
|
+
}
|
|
1103
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1104
|
+
return response_data.response
|
|
1105
|
+
|
|
1106
|
+
def _delete_project_serialize(
|
|
1107
|
+
self,
|
|
1108
|
+
id,
|
|
1109
|
+
_request_auth,
|
|
1110
|
+
_content_type,
|
|
1111
|
+
_headers,
|
|
1112
|
+
_host_index,
|
|
1113
|
+
) -> RequestSerialized:
|
|
1114
|
+
|
|
1115
|
+
_host = None
|
|
1116
|
+
|
|
1117
|
+
_collection_formats: Dict[str, str] = {}
|
|
1118
|
+
|
|
1119
|
+
_path_params: Dict[str, str] = {}
|
|
1120
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1121
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1122
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1123
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1124
|
+
_body_params: Optional[bytes] = None
|
|
1125
|
+
|
|
1126
|
+
# process the path parameters
|
|
1127
|
+
if id is not None:
|
|
1128
|
+
_path_params["id"] = id
|
|
1129
|
+
# process the query parameters
|
|
1130
|
+
# process the header parameters
|
|
1131
|
+
# process the form parameters
|
|
1132
|
+
# process the body parameter
|
|
1133
|
+
|
|
1134
|
+
# set the HTTP header `Accept`
|
|
1135
|
+
if "Accept" not in _header_params:
|
|
1136
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1137
|
+
|
|
1138
|
+
# authentication setting
|
|
1139
|
+
_auth_settings: List[str] = []
|
|
1140
|
+
|
|
1141
|
+
return self.api_client.param_serialize(
|
|
1142
|
+
method="DELETE",
|
|
1143
|
+
resource_path="/v2/projects/{id}",
|
|
1144
|
+
path_params=_path_params,
|
|
1145
|
+
query_params=_query_params,
|
|
1146
|
+
header_params=_header_params,
|
|
1147
|
+
body=_body_params,
|
|
1148
|
+
post_params=_form_params,
|
|
1149
|
+
files=_files,
|
|
1150
|
+
auth_settings=_auth_settings,
|
|
1151
|
+
collection_formats=_collection_formats,
|
|
1152
|
+
_host=_host,
|
|
1153
|
+
_request_auth=_request_auth,
|
|
1154
|
+
)
|
|
1155
|
+
|
|
1156
|
+
@validate_call
|
|
1157
|
+
def get_organization(
|
|
1158
|
+
self,
|
|
1159
|
+
id: Annotated[
|
|
1160
|
+
StrictStr,
|
|
1161
|
+
Field(description="Organization identifier - containerId as well as UUID identifier is supported."),
|
|
1162
|
+
],
|
|
1163
|
+
_request_timeout: Union[
|
|
1164
|
+
None,
|
|
1165
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1166
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1167
|
+
] = None,
|
|
1168
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1169
|
+
_content_type: Optional[StrictStr] = None,
|
|
1170
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1171
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1172
|
+
) -> OrganizationResponse:
|
|
1173
|
+
"""Get Organization Details
|
|
1174
|
+
|
|
1175
|
+
Returns the organization and its metadata.
|
|
1176
|
+
|
|
1177
|
+
:param id: Organization identifier - containerId as well as UUID identifier is supported. (required)
|
|
1178
|
+
:type id: str
|
|
1179
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1180
|
+
number provided, it will be total request
|
|
1181
|
+
timeout. It can also be a pair (tuple) of
|
|
1182
|
+
(connection, read) timeouts.
|
|
1183
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1184
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1185
|
+
request; this effectively ignores the
|
|
1186
|
+
authentication in the spec for a single request.
|
|
1187
|
+
:type _request_auth: dict, optional
|
|
1188
|
+
:param _content_type: force content-type for the request.
|
|
1189
|
+
:type _content_type: str, Optional
|
|
1190
|
+
:param _headers: set to override the headers for a single
|
|
1191
|
+
request; this effectively ignores the headers
|
|
1192
|
+
in the spec for a single request.
|
|
1193
|
+
:type _headers: dict, optional
|
|
1194
|
+
:param _host_index: set to override the host_index for a single
|
|
1195
|
+
request; this effectively ignores the host_index
|
|
1196
|
+
in the spec for a single request.
|
|
1197
|
+
:type _host_index: int, optional
|
|
1198
|
+
:return: Returns the result object.
|
|
1199
|
+
""" # noqa: E501 docstring might be too long
|
|
1200
|
+
|
|
1201
|
+
_param = self._get_organization_serialize(
|
|
1202
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1206
|
+
"200": "OrganizationResponse",
|
|
1207
|
+
"404": "ErrorResponse",
|
|
1208
|
+
}
|
|
1209
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1210
|
+
response_data.read()
|
|
1211
|
+
return self.api_client.response_deserialize(
|
|
1212
|
+
response_data=response_data,
|
|
1213
|
+
response_types_map=_response_types_map,
|
|
1214
|
+
).data
|
|
1215
|
+
|
|
1216
|
+
@validate_call
|
|
1217
|
+
def get_organization_with_http_info(
|
|
1218
|
+
self,
|
|
1219
|
+
id: Annotated[
|
|
1220
|
+
StrictStr,
|
|
1221
|
+
Field(description="Organization identifier - containerId as well as UUID identifier is supported."),
|
|
1222
|
+
],
|
|
1223
|
+
_request_timeout: Union[
|
|
1224
|
+
None,
|
|
1225
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1226
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1227
|
+
] = None,
|
|
1228
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1229
|
+
_content_type: Optional[StrictStr] = None,
|
|
1230
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1231
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1232
|
+
) -> ApiResponse[OrganizationResponse]:
|
|
1233
|
+
"""Get Organization Details
|
|
1234
|
+
|
|
1235
|
+
Returns the organization and its metadata.
|
|
1236
|
+
|
|
1237
|
+
:param id: Organization identifier - containerId as well as UUID identifier is supported. (required)
|
|
1238
|
+
:type id: str
|
|
1239
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1240
|
+
number provided, it will be total request
|
|
1241
|
+
timeout. It can also be a pair (tuple) of
|
|
1242
|
+
(connection, read) timeouts.
|
|
1243
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1244
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1245
|
+
request; this effectively ignores the
|
|
1246
|
+
authentication in the spec for a single request.
|
|
1247
|
+
:type _request_auth: dict, optional
|
|
1248
|
+
:param _content_type: force content-type for the request.
|
|
1249
|
+
:type _content_type: str, Optional
|
|
1250
|
+
:param _headers: set to override the headers for a single
|
|
1251
|
+
request; this effectively ignores the headers
|
|
1252
|
+
in the spec for a single request.
|
|
1253
|
+
:type _headers: dict, optional
|
|
1254
|
+
:param _host_index: set to override the host_index for a single
|
|
1255
|
+
request; this effectively ignores the host_index
|
|
1256
|
+
in the spec for a single request.
|
|
1257
|
+
:type _host_index: int, optional
|
|
1258
|
+
:return: Returns the result object.
|
|
1259
|
+
""" # noqa: E501 docstring might be too long
|
|
1260
|
+
|
|
1261
|
+
_param = self._get_organization_serialize(
|
|
1262
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1263
|
+
)
|
|
1264
|
+
|
|
1265
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1266
|
+
"200": "OrganizationResponse",
|
|
1267
|
+
"404": "ErrorResponse",
|
|
1268
|
+
}
|
|
1269
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1270
|
+
response_data.read()
|
|
1271
|
+
return self.api_client.response_deserialize(
|
|
1272
|
+
response_data=response_data,
|
|
1273
|
+
response_types_map=_response_types_map,
|
|
1274
|
+
)
|
|
1275
|
+
|
|
1276
|
+
@validate_call
|
|
1277
|
+
def get_organization_without_preload_content(
|
|
1278
|
+
self,
|
|
1279
|
+
id: Annotated[
|
|
1280
|
+
StrictStr,
|
|
1281
|
+
Field(description="Organization identifier - containerId as well as UUID identifier is supported."),
|
|
1282
|
+
],
|
|
1283
|
+
_request_timeout: Union[
|
|
1284
|
+
None,
|
|
1285
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1286
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1287
|
+
] = None,
|
|
1288
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1289
|
+
_content_type: Optional[StrictStr] = None,
|
|
1290
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1291
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1292
|
+
) -> RESTResponseType:
|
|
1293
|
+
"""Get Organization Details
|
|
1294
|
+
|
|
1295
|
+
Returns the organization and its metadata.
|
|
1296
|
+
|
|
1297
|
+
:param id: Organization identifier - containerId as well as UUID identifier is supported. (required)
|
|
1298
|
+
:type id: str
|
|
1299
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1300
|
+
number provided, it will be total request
|
|
1301
|
+
timeout. It can also be a pair (tuple) of
|
|
1302
|
+
(connection, read) timeouts.
|
|
1303
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1304
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1305
|
+
request; this effectively ignores the
|
|
1306
|
+
authentication in the spec for a single request.
|
|
1307
|
+
:type _request_auth: dict, optional
|
|
1308
|
+
:param _content_type: force content-type for the request.
|
|
1309
|
+
:type _content_type: str, Optional
|
|
1310
|
+
:param _headers: set to override the headers for a single
|
|
1311
|
+
request; this effectively ignores the headers
|
|
1312
|
+
in the spec for a single request.
|
|
1313
|
+
:type _headers: dict, optional
|
|
1314
|
+
:param _host_index: set to override the host_index for a single
|
|
1315
|
+
request; this effectively ignores the host_index
|
|
1316
|
+
in the spec for a single request.
|
|
1317
|
+
:type _host_index: int, optional
|
|
1318
|
+
:return: Returns the result object.
|
|
1319
|
+
""" # noqa: E501 docstring might be too long
|
|
1320
|
+
|
|
1321
|
+
_param = self._get_organization_serialize(
|
|
1322
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1323
|
+
)
|
|
1324
|
+
|
|
1325
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1326
|
+
"200": "OrganizationResponse",
|
|
1327
|
+
"404": "ErrorResponse",
|
|
1328
|
+
}
|
|
1329
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1330
|
+
return response_data.response
|
|
1331
|
+
|
|
1332
|
+
def _get_organization_serialize(
|
|
1333
|
+
self,
|
|
1334
|
+
id,
|
|
1335
|
+
_request_auth,
|
|
1336
|
+
_content_type,
|
|
1337
|
+
_headers,
|
|
1338
|
+
_host_index,
|
|
1339
|
+
) -> RequestSerialized:
|
|
1340
|
+
|
|
1341
|
+
_host = None
|
|
1342
|
+
|
|
1343
|
+
_collection_formats: Dict[str, str] = {}
|
|
1344
|
+
|
|
1345
|
+
_path_params: Dict[str, str] = {}
|
|
1346
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1347
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1348
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1349
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1350
|
+
_body_params: Optional[bytes] = None
|
|
1351
|
+
|
|
1352
|
+
# process the path parameters
|
|
1353
|
+
if id is not None:
|
|
1354
|
+
_path_params["id"] = id
|
|
1355
|
+
# process the query parameters
|
|
1356
|
+
# process the header parameters
|
|
1357
|
+
# process the form parameters
|
|
1358
|
+
# process the body parameter
|
|
1359
|
+
|
|
1360
|
+
# set the HTTP header `Accept`
|
|
1361
|
+
if "Accept" not in _header_params:
|
|
1362
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1363
|
+
|
|
1364
|
+
# authentication setting
|
|
1365
|
+
_auth_settings: List[str] = []
|
|
1366
|
+
|
|
1367
|
+
return self.api_client.param_serialize(
|
|
1368
|
+
method="GET",
|
|
1369
|
+
resource_path="/v2/organizations/{id}",
|
|
1370
|
+
path_params=_path_params,
|
|
1371
|
+
query_params=_query_params,
|
|
1372
|
+
header_params=_header_params,
|
|
1373
|
+
body=_body_params,
|
|
1374
|
+
post_params=_form_params,
|
|
1375
|
+
files=_files,
|
|
1376
|
+
auth_settings=_auth_settings,
|
|
1377
|
+
collection_formats=_collection_formats,
|
|
1378
|
+
_host=_host,
|
|
1379
|
+
_request_auth=_request_auth,
|
|
1380
|
+
)
|
|
1381
|
+
|
|
1382
|
+
@validate_call
|
|
1383
|
+
def get_project(
|
|
1384
|
+
self,
|
|
1385
|
+
id: Annotated[
|
|
1386
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
1387
|
+
],
|
|
1388
|
+
include_parents: Optional[StrictBool] = None,
|
|
1389
|
+
_request_timeout: Union[
|
|
1390
|
+
None,
|
|
1391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1392
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1393
|
+
] = None,
|
|
1394
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1395
|
+
_content_type: Optional[StrictStr] = None,
|
|
1396
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1397
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1398
|
+
) -> GetProjectResponse:
|
|
1399
|
+
"""Get Project Details
|
|
1400
|
+
|
|
1401
|
+
Returns the project and its metadata.
|
|
1402
|
+
|
|
1403
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
1404
|
+
:type id: str
|
|
1405
|
+
:param include_parents:
|
|
1406
|
+
:type include_parents: bool
|
|
1407
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1408
|
+
number provided, it will be total request
|
|
1409
|
+
timeout. It can also be a pair (tuple) of
|
|
1410
|
+
(connection, read) timeouts.
|
|
1411
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1412
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1413
|
+
request; this effectively ignores the
|
|
1414
|
+
authentication in the spec for a single request.
|
|
1415
|
+
:type _request_auth: dict, optional
|
|
1416
|
+
:param _content_type: force content-type for the request.
|
|
1417
|
+
:type _content_type: str, Optional
|
|
1418
|
+
:param _headers: set to override the headers for a single
|
|
1419
|
+
request; this effectively ignores the headers
|
|
1420
|
+
in the spec for a single request.
|
|
1421
|
+
:type _headers: dict, optional
|
|
1422
|
+
:param _host_index: set to override the host_index for a single
|
|
1423
|
+
request; this effectively ignores the host_index
|
|
1424
|
+
in the spec for a single request.
|
|
1425
|
+
:type _host_index: int, optional
|
|
1426
|
+
:return: Returns the result object.
|
|
1427
|
+
""" # noqa: E501 docstring might be too long
|
|
1428
|
+
|
|
1429
|
+
_param = self._get_project_serialize(
|
|
1430
|
+
id=id,
|
|
1431
|
+
include_parents=include_parents,
|
|
1432
|
+
_request_auth=_request_auth,
|
|
1433
|
+
_content_type=_content_type,
|
|
1434
|
+
_headers=_headers,
|
|
1435
|
+
_host_index=_host_index,
|
|
1436
|
+
)
|
|
1437
|
+
|
|
1438
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1439
|
+
"200": "GetProjectResponse",
|
|
1440
|
+
"403": "ErrorResponse",
|
|
1441
|
+
"404": "ErrorResponse",
|
|
1442
|
+
}
|
|
1443
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1444
|
+
response_data.read()
|
|
1445
|
+
return self.api_client.response_deserialize(
|
|
1446
|
+
response_data=response_data,
|
|
1447
|
+
response_types_map=_response_types_map,
|
|
1448
|
+
).data
|
|
1449
|
+
|
|
1450
|
+
@validate_call
|
|
1451
|
+
def get_project_with_http_info(
|
|
1452
|
+
self,
|
|
1453
|
+
id: Annotated[
|
|
1454
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
1455
|
+
],
|
|
1456
|
+
include_parents: Optional[StrictBool] = None,
|
|
1457
|
+
_request_timeout: Union[
|
|
1458
|
+
None,
|
|
1459
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1460
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1461
|
+
] = None,
|
|
1462
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1463
|
+
_content_type: Optional[StrictStr] = None,
|
|
1464
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1465
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1466
|
+
) -> ApiResponse[GetProjectResponse]:
|
|
1467
|
+
"""Get Project Details
|
|
1468
|
+
|
|
1469
|
+
Returns the project and its metadata.
|
|
1470
|
+
|
|
1471
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
1472
|
+
:type id: str
|
|
1473
|
+
:param include_parents:
|
|
1474
|
+
:type include_parents: bool
|
|
1475
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1476
|
+
number provided, it will be total request
|
|
1477
|
+
timeout. It can also be a pair (tuple) of
|
|
1478
|
+
(connection, read) timeouts.
|
|
1479
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1480
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1481
|
+
request; this effectively ignores the
|
|
1482
|
+
authentication in the spec for a single request.
|
|
1483
|
+
:type _request_auth: dict, optional
|
|
1484
|
+
:param _content_type: force content-type for the request.
|
|
1485
|
+
:type _content_type: str, Optional
|
|
1486
|
+
:param _headers: set to override the headers for a single
|
|
1487
|
+
request; this effectively ignores the headers
|
|
1488
|
+
in the spec for a single request.
|
|
1489
|
+
:type _headers: dict, optional
|
|
1490
|
+
:param _host_index: set to override the host_index for a single
|
|
1491
|
+
request; this effectively ignores the host_index
|
|
1492
|
+
in the spec for a single request.
|
|
1493
|
+
:type _host_index: int, optional
|
|
1494
|
+
:return: Returns the result object.
|
|
1495
|
+
""" # noqa: E501 docstring might be too long
|
|
1496
|
+
|
|
1497
|
+
_param = self._get_project_serialize(
|
|
1498
|
+
id=id,
|
|
1499
|
+
include_parents=include_parents,
|
|
1500
|
+
_request_auth=_request_auth,
|
|
1501
|
+
_content_type=_content_type,
|
|
1502
|
+
_headers=_headers,
|
|
1503
|
+
_host_index=_host_index,
|
|
1504
|
+
)
|
|
1505
|
+
|
|
1506
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1507
|
+
"200": "GetProjectResponse",
|
|
1508
|
+
"403": "ErrorResponse",
|
|
1509
|
+
"404": "ErrorResponse",
|
|
1510
|
+
}
|
|
1511
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1512
|
+
response_data.read()
|
|
1513
|
+
return self.api_client.response_deserialize(
|
|
1514
|
+
response_data=response_data,
|
|
1515
|
+
response_types_map=_response_types_map,
|
|
1516
|
+
)
|
|
1517
|
+
|
|
1518
|
+
@validate_call
|
|
1519
|
+
def get_project_without_preload_content(
|
|
1520
|
+
self,
|
|
1521
|
+
id: Annotated[
|
|
1522
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
1523
|
+
],
|
|
1524
|
+
include_parents: Optional[StrictBool] = None,
|
|
1525
|
+
_request_timeout: Union[
|
|
1526
|
+
None,
|
|
1527
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1528
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1529
|
+
] = None,
|
|
1530
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1531
|
+
_content_type: Optional[StrictStr] = None,
|
|
1532
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1533
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1534
|
+
) -> RESTResponseType:
|
|
1535
|
+
"""Get Project Details
|
|
1536
|
+
|
|
1537
|
+
Returns the project and its metadata.
|
|
1538
|
+
|
|
1539
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
1540
|
+
:type id: str
|
|
1541
|
+
:param include_parents:
|
|
1542
|
+
:type include_parents: bool
|
|
1543
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1544
|
+
number provided, it will be total request
|
|
1545
|
+
timeout. It can also be a pair (tuple) of
|
|
1546
|
+
(connection, read) timeouts.
|
|
1547
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1548
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1549
|
+
request; this effectively ignores the
|
|
1550
|
+
authentication in the spec for a single request.
|
|
1551
|
+
:type _request_auth: dict, optional
|
|
1552
|
+
:param _content_type: force content-type for the request.
|
|
1553
|
+
:type _content_type: str, Optional
|
|
1554
|
+
:param _headers: set to override the headers for a single
|
|
1555
|
+
request; this effectively ignores the headers
|
|
1556
|
+
in the spec for a single request.
|
|
1557
|
+
:type _headers: dict, optional
|
|
1558
|
+
:param _host_index: set to override the host_index for a single
|
|
1559
|
+
request; this effectively ignores the host_index
|
|
1560
|
+
in the spec for a single request.
|
|
1561
|
+
:type _host_index: int, optional
|
|
1562
|
+
:return: Returns the result object.
|
|
1563
|
+
""" # noqa: E501 docstring might be too long
|
|
1564
|
+
|
|
1565
|
+
_param = self._get_project_serialize(
|
|
1566
|
+
id=id,
|
|
1567
|
+
include_parents=include_parents,
|
|
1568
|
+
_request_auth=_request_auth,
|
|
1569
|
+
_content_type=_content_type,
|
|
1570
|
+
_headers=_headers,
|
|
1571
|
+
_host_index=_host_index,
|
|
1572
|
+
)
|
|
1573
|
+
|
|
1574
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1575
|
+
"200": "GetProjectResponse",
|
|
1576
|
+
"403": "ErrorResponse",
|
|
1577
|
+
"404": "ErrorResponse",
|
|
1578
|
+
}
|
|
1579
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1580
|
+
return response_data.response
|
|
1581
|
+
|
|
1582
|
+
def _get_project_serialize(
|
|
1583
|
+
self,
|
|
1584
|
+
id,
|
|
1585
|
+
include_parents,
|
|
1586
|
+
_request_auth,
|
|
1587
|
+
_content_type,
|
|
1588
|
+
_headers,
|
|
1589
|
+
_host_index,
|
|
1590
|
+
) -> RequestSerialized:
|
|
1591
|
+
|
|
1592
|
+
_host = None
|
|
1593
|
+
|
|
1594
|
+
_collection_formats: Dict[str, str] = {}
|
|
1595
|
+
|
|
1596
|
+
_path_params: Dict[str, str] = {}
|
|
1597
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1598
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1599
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1600
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1601
|
+
_body_params: Optional[bytes] = None
|
|
1602
|
+
|
|
1603
|
+
# process the path parameters
|
|
1604
|
+
if id is not None:
|
|
1605
|
+
_path_params["id"] = id
|
|
1606
|
+
# process the query parameters
|
|
1607
|
+
if include_parents is not None:
|
|
1608
|
+
|
|
1609
|
+
_query_params.append(("includeParents", include_parents))
|
|
1610
|
+
|
|
1611
|
+
# process the header parameters
|
|
1612
|
+
# process the form parameters
|
|
1613
|
+
# process the body parameter
|
|
1614
|
+
|
|
1615
|
+
# set the HTTP header `Accept`
|
|
1616
|
+
if "Accept" not in _header_params:
|
|
1617
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1618
|
+
|
|
1619
|
+
# authentication setting
|
|
1620
|
+
_auth_settings: List[str] = []
|
|
1621
|
+
|
|
1622
|
+
return self.api_client.param_serialize(
|
|
1623
|
+
method="GET",
|
|
1624
|
+
resource_path="/v2/projects/{id}",
|
|
1625
|
+
path_params=_path_params,
|
|
1626
|
+
query_params=_query_params,
|
|
1627
|
+
header_params=_header_params,
|
|
1628
|
+
body=_body_params,
|
|
1629
|
+
post_params=_form_params,
|
|
1630
|
+
files=_files,
|
|
1631
|
+
auth_settings=_auth_settings,
|
|
1632
|
+
collection_formats=_collection_formats,
|
|
1633
|
+
_host=_host,
|
|
1634
|
+
_request_auth=_request_auth,
|
|
1635
|
+
)
|
|
1636
|
+
|
|
1637
|
+
@validate_call
|
|
1638
|
+
def list_organizations(
|
|
1639
|
+
self,
|
|
1640
|
+
container_ids: Annotated[
|
|
1641
|
+
Optional[List[StrictStr]],
|
|
1642
|
+
Field(
|
|
1643
|
+
description="Organization identifiers - containerId as well as UUID identifier is supported. A combination of both is not allowed."
|
|
1644
|
+
),
|
|
1645
|
+
] = None,
|
|
1646
|
+
member: Annotated[
|
|
1647
|
+
Optional[StrictStr],
|
|
1648
|
+
Field(
|
|
1649
|
+
description="E-Mail address of the user for whom the visible resource containers should be filtered."
|
|
1650
|
+
),
|
|
1651
|
+
] = None,
|
|
1652
|
+
limit: Annotated[
|
|
1653
|
+
Optional[
|
|
1654
|
+
Union[
|
|
1655
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
1656
|
+
]
|
|
1657
|
+
],
|
|
1658
|
+
Field(
|
|
1659
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
1660
|
+
),
|
|
1661
|
+
] = None,
|
|
1662
|
+
offset: Annotated[
|
|
1663
|
+
Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]],
|
|
1664
|
+
Field(description="The offset of the first item in the collection to return."),
|
|
1665
|
+
] = None,
|
|
1666
|
+
creation_time_start: Annotated[
|
|
1667
|
+
Optional[datetime],
|
|
1668
|
+
Field(
|
|
1669
|
+
description="A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time."
|
|
1670
|
+
),
|
|
1671
|
+
] = None,
|
|
1672
|
+
_request_timeout: Union[
|
|
1673
|
+
None,
|
|
1674
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1675
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1676
|
+
] = None,
|
|
1677
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1678
|
+
_content_type: Optional[StrictStr] = None,
|
|
1679
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1680
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1681
|
+
) -> ListOrganizationsResponse:
|
|
1682
|
+
"""Get All Organizations
|
|
1683
|
+
|
|
1684
|
+
Returns all organizations and their metadata. - If no containerIds are specified, all organizations are returned, if permitted - ContainerIds may be set to filter - Member may be set to filter - If member and containerIds are given, both are used for filtering
|
|
1685
|
+
|
|
1686
|
+
:param container_ids: Organization identifiers - containerId as well as UUID identifier is supported. A combination of both is not allowed.
|
|
1687
|
+
:type container_ids: List[str]
|
|
1688
|
+
:param member: E-Mail address of the user for whom the visible resource containers should be filtered.
|
|
1689
|
+
:type member: str
|
|
1690
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
1691
|
+
:type limit: float
|
|
1692
|
+
:param offset: The offset of the first item in the collection to return.
|
|
1693
|
+
:type offset: float
|
|
1694
|
+
:param creation_time_start: A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time.
|
|
1695
|
+
:type creation_time_start: datetime
|
|
1696
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1697
|
+
number provided, it will be total request
|
|
1698
|
+
timeout. It can also be a pair (tuple) of
|
|
1699
|
+
(connection, read) timeouts.
|
|
1700
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1701
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1702
|
+
request; this effectively ignores the
|
|
1703
|
+
authentication in the spec for a single request.
|
|
1704
|
+
:type _request_auth: dict, optional
|
|
1705
|
+
:param _content_type: force content-type for the request.
|
|
1706
|
+
:type _content_type: str, Optional
|
|
1707
|
+
:param _headers: set to override the headers for a single
|
|
1708
|
+
request; this effectively ignores the headers
|
|
1709
|
+
in the spec for a single request.
|
|
1710
|
+
:type _headers: dict, optional
|
|
1711
|
+
:param _host_index: set to override the host_index for a single
|
|
1712
|
+
request; this effectively ignores the host_index
|
|
1713
|
+
in the spec for a single request.
|
|
1714
|
+
:type _host_index: int, optional
|
|
1715
|
+
:return: Returns the result object.
|
|
1716
|
+
""" # noqa: E501 docstring might be too long
|
|
1717
|
+
|
|
1718
|
+
_param = self._list_organizations_serialize(
|
|
1719
|
+
container_ids=container_ids,
|
|
1720
|
+
member=member,
|
|
1721
|
+
limit=limit,
|
|
1722
|
+
offset=offset,
|
|
1723
|
+
creation_time_start=creation_time_start,
|
|
1724
|
+
_request_auth=_request_auth,
|
|
1725
|
+
_content_type=_content_type,
|
|
1726
|
+
_headers=_headers,
|
|
1727
|
+
_host_index=_host_index,
|
|
1728
|
+
)
|
|
1729
|
+
|
|
1730
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1731
|
+
"200": "ListOrganizationsResponse",
|
|
1732
|
+
"400": "ErrorResponse",
|
|
1733
|
+
"403": "ErrorResponse",
|
|
1734
|
+
}
|
|
1735
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1736
|
+
response_data.read()
|
|
1737
|
+
return self.api_client.response_deserialize(
|
|
1738
|
+
response_data=response_data,
|
|
1739
|
+
response_types_map=_response_types_map,
|
|
1740
|
+
).data
|
|
1741
|
+
|
|
1742
|
+
@validate_call
|
|
1743
|
+
def list_organizations_with_http_info(
|
|
1744
|
+
self,
|
|
1745
|
+
container_ids: Annotated[
|
|
1746
|
+
Optional[List[StrictStr]],
|
|
1747
|
+
Field(
|
|
1748
|
+
description="Organization identifiers - containerId as well as UUID identifier is supported. A combination of both is not allowed."
|
|
1749
|
+
),
|
|
1750
|
+
] = None,
|
|
1751
|
+
member: Annotated[
|
|
1752
|
+
Optional[StrictStr],
|
|
1753
|
+
Field(
|
|
1754
|
+
description="E-Mail address of the user for whom the visible resource containers should be filtered."
|
|
1755
|
+
),
|
|
1756
|
+
] = None,
|
|
1757
|
+
limit: Annotated[
|
|
1758
|
+
Optional[
|
|
1759
|
+
Union[
|
|
1760
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
1761
|
+
]
|
|
1762
|
+
],
|
|
1763
|
+
Field(
|
|
1764
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
1765
|
+
),
|
|
1766
|
+
] = None,
|
|
1767
|
+
offset: Annotated[
|
|
1768
|
+
Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]],
|
|
1769
|
+
Field(description="The offset of the first item in the collection to return."),
|
|
1770
|
+
] = None,
|
|
1771
|
+
creation_time_start: Annotated[
|
|
1772
|
+
Optional[datetime],
|
|
1773
|
+
Field(
|
|
1774
|
+
description="A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time."
|
|
1775
|
+
),
|
|
1776
|
+
] = None,
|
|
1777
|
+
_request_timeout: Union[
|
|
1778
|
+
None,
|
|
1779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1780
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1781
|
+
] = None,
|
|
1782
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1783
|
+
_content_type: Optional[StrictStr] = None,
|
|
1784
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1785
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1786
|
+
) -> ApiResponse[ListOrganizationsResponse]:
|
|
1787
|
+
"""Get All Organizations
|
|
1788
|
+
|
|
1789
|
+
Returns all organizations and their metadata. - If no containerIds are specified, all organizations are returned, if permitted - ContainerIds may be set to filter - Member may be set to filter - If member and containerIds are given, both are used for filtering
|
|
1790
|
+
|
|
1791
|
+
:param container_ids: Organization identifiers - containerId as well as UUID identifier is supported. A combination of both is not allowed.
|
|
1792
|
+
:type container_ids: List[str]
|
|
1793
|
+
:param member: E-Mail address of the user for whom the visible resource containers should be filtered.
|
|
1794
|
+
:type member: str
|
|
1795
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
1796
|
+
:type limit: float
|
|
1797
|
+
:param offset: The offset of the first item in the collection to return.
|
|
1798
|
+
:type offset: float
|
|
1799
|
+
:param creation_time_start: A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time.
|
|
1800
|
+
:type creation_time_start: datetime
|
|
1801
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1802
|
+
number provided, it will be total request
|
|
1803
|
+
timeout. It can also be a pair (tuple) of
|
|
1804
|
+
(connection, read) timeouts.
|
|
1805
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1806
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1807
|
+
request; this effectively ignores the
|
|
1808
|
+
authentication in the spec for a single request.
|
|
1809
|
+
:type _request_auth: dict, optional
|
|
1810
|
+
:param _content_type: force content-type for the request.
|
|
1811
|
+
:type _content_type: str, Optional
|
|
1812
|
+
:param _headers: set to override the headers for a single
|
|
1813
|
+
request; this effectively ignores the headers
|
|
1814
|
+
in the spec for a single request.
|
|
1815
|
+
:type _headers: dict, optional
|
|
1816
|
+
:param _host_index: set to override the host_index for a single
|
|
1817
|
+
request; this effectively ignores the host_index
|
|
1818
|
+
in the spec for a single request.
|
|
1819
|
+
:type _host_index: int, optional
|
|
1820
|
+
:return: Returns the result object.
|
|
1821
|
+
""" # noqa: E501 docstring might be too long
|
|
1822
|
+
|
|
1823
|
+
_param = self._list_organizations_serialize(
|
|
1824
|
+
container_ids=container_ids,
|
|
1825
|
+
member=member,
|
|
1826
|
+
limit=limit,
|
|
1827
|
+
offset=offset,
|
|
1828
|
+
creation_time_start=creation_time_start,
|
|
1829
|
+
_request_auth=_request_auth,
|
|
1830
|
+
_content_type=_content_type,
|
|
1831
|
+
_headers=_headers,
|
|
1832
|
+
_host_index=_host_index,
|
|
1833
|
+
)
|
|
1834
|
+
|
|
1835
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1836
|
+
"200": "ListOrganizationsResponse",
|
|
1837
|
+
"400": "ErrorResponse",
|
|
1838
|
+
"403": "ErrorResponse",
|
|
1839
|
+
}
|
|
1840
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1841
|
+
response_data.read()
|
|
1842
|
+
return self.api_client.response_deserialize(
|
|
1843
|
+
response_data=response_data,
|
|
1844
|
+
response_types_map=_response_types_map,
|
|
1845
|
+
)
|
|
1846
|
+
|
|
1847
|
+
@validate_call
|
|
1848
|
+
def list_organizations_without_preload_content(
|
|
1849
|
+
self,
|
|
1850
|
+
container_ids: Annotated[
|
|
1851
|
+
Optional[List[StrictStr]],
|
|
1852
|
+
Field(
|
|
1853
|
+
description="Organization identifiers - containerId as well as UUID identifier is supported. A combination of both is not allowed."
|
|
1854
|
+
),
|
|
1855
|
+
] = None,
|
|
1856
|
+
member: Annotated[
|
|
1857
|
+
Optional[StrictStr],
|
|
1858
|
+
Field(
|
|
1859
|
+
description="E-Mail address of the user for whom the visible resource containers should be filtered."
|
|
1860
|
+
),
|
|
1861
|
+
] = None,
|
|
1862
|
+
limit: Annotated[
|
|
1863
|
+
Optional[
|
|
1864
|
+
Union[
|
|
1865
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
1866
|
+
]
|
|
1867
|
+
],
|
|
1868
|
+
Field(
|
|
1869
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
1870
|
+
),
|
|
1871
|
+
] = None,
|
|
1872
|
+
offset: Annotated[
|
|
1873
|
+
Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]],
|
|
1874
|
+
Field(description="The offset of the first item in the collection to return."),
|
|
1875
|
+
] = None,
|
|
1876
|
+
creation_time_start: Annotated[
|
|
1877
|
+
Optional[datetime],
|
|
1878
|
+
Field(
|
|
1879
|
+
description="A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time."
|
|
1880
|
+
),
|
|
1881
|
+
] = None,
|
|
1882
|
+
_request_timeout: Union[
|
|
1883
|
+
None,
|
|
1884
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1885
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1886
|
+
] = None,
|
|
1887
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1888
|
+
_content_type: Optional[StrictStr] = None,
|
|
1889
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1890
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1891
|
+
) -> RESTResponseType:
|
|
1892
|
+
"""Get All Organizations
|
|
1893
|
+
|
|
1894
|
+
Returns all organizations and their metadata. - If no containerIds are specified, all organizations are returned, if permitted - ContainerIds may be set to filter - Member may be set to filter - If member and containerIds are given, both are used for filtering
|
|
1895
|
+
|
|
1896
|
+
:param container_ids: Organization identifiers - containerId as well as UUID identifier is supported. A combination of both is not allowed.
|
|
1897
|
+
:type container_ids: List[str]
|
|
1898
|
+
:param member: E-Mail address of the user for whom the visible resource containers should be filtered.
|
|
1899
|
+
:type member: str
|
|
1900
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
1901
|
+
:type limit: float
|
|
1902
|
+
:param offset: The offset of the first item in the collection to return.
|
|
1903
|
+
:type offset: float
|
|
1904
|
+
:param creation_time_start: A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time.
|
|
1905
|
+
:type creation_time_start: datetime
|
|
1906
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1907
|
+
number provided, it will be total request
|
|
1908
|
+
timeout. It can also be a pair (tuple) of
|
|
1909
|
+
(connection, read) timeouts.
|
|
1910
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1911
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1912
|
+
request; this effectively ignores the
|
|
1913
|
+
authentication in the spec for a single request.
|
|
1914
|
+
:type _request_auth: dict, optional
|
|
1915
|
+
:param _content_type: force content-type for the request.
|
|
1916
|
+
:type _content_type: str, Optional
|
|
1917
|
+
:param _headers: set to override the headers for a single
|
|
1918
|
+
request; this effectively ignores the headers
|
|
1919
|
+
in the spec for a single request.
|
|
1920
|
+
:type _headers: dict, optional
|
|
1921
|
+
:param _host_index: set to override the host_index for a single
|
|
1922
|
+
request; this effectively ignores the host_index
|
|
1923
|
+
in the spec for a single request.
|
|
1924
|
+
:type _host_index: int, optional
|
|
1925
|
+
:return: Returns the result object.
|
|
1926
|
+
""" # noqa: E501 docstring might be too long
|
|
1927
|
+
|
|
1928
|
+
_param = self._list_organizations_serialize(
|
|
1929
|
+
container_ids=container_ids,
|
|
1930
|
+
member=member,
|
|
1931
|
+
limit=limit,
|
|
1932
|
+
offset=offset,
|
|
1933
|
+
creation_time_start=creation_time_start,
|
|
1934
|
+
_request_auth=_request_auth,
|
|
1935
|
+
_content_type=_content_type,
|
|
1936
|
+
_headers=_headers,
|
|
1937
|
+
_host_index=_host_index,
|
|
1938
|
+
)
|
|
1939
|
+
|
|
1940
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1941
|
+
"200": "ListOrganizationsResponse",
|
|
1942
|
+
"400": "ErrorResponse",
|
|
1943
|
+
"403": "ErrorResponse",
|
|
1944
|
+
}
|
|
1945
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1946
|
+
return response_data.response
|
|
1947
|
+
|
|
1948
|
+
def _list_organizations_serialize(
|
|
1949
|
+
self,
|
|
1950
|
+
container_ids,
|
|
1951
|
+
member,
|
|
1952
|
+
limit,
|
|
1953
|
+
offset,
|
|
1954
|
+
creation_time_start,
|
|
1955
|
+
_request_auth,
|
|
1956
|
+
_content_type,
|
|
1957
|
+
_headers,
|
|
1958
|
+
_host_index,
|
|
1959
|
+
) -> RequestSerialized:
|
|
1960
|
+
|
|
1961
|
+
_host = None
|
|
1962
|
+
|
|
1963
|
+
_collection_formats: Dict[str, str] = {
|
|
1964
|
+
"containerIds": "multi",
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
_path_params: Dict[str, str] = {}
|
|
1968
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1969
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1970
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1971
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1972
|
+
_body_params: Optional[bytes] = None
|
|
1973
|
+
|
|
1974
|
+
# process the path parameters
|
|
1975
|
+
# process the query parameters
|
|
1976
|
+
if container_ids is not None:
|
|
1977
|
+
|
|
1978
|
+
_query_params.append(("containerIds", container_ids))
|
|
1979
|
+
|
|
1980
|
+
if member is not None:
|
|
1981
|
+
|
|
1982
|
+
_query_params.append(("member", member))
|
|
1983
|
+
|
|
1984
|
+
if limit is not None:
|
|
1985
|
+
|
|
1986
|
+
_query_params.append(("limit", limit))
|
|
1987
|
+
|
|
1988
|
+
if offset is not None:
|
|
1989
|
+
|
|
1990
|
+
_query_params.append(("offset", offset))
|
|
1991
|
+
|
|
1992
|
+
if creation_time_start is not None:
|
|
1993
|
+
if isinstance(creation_time_start, datetime):
|
|
1994
|
+
_query_params.append(
|
|
1995
|
+
("creation-time-start", creation_time_start.strftime(self.api_client.configuration.datetime_format))
|
|
1996
|
+
)
|
|
1997
|
+
else:
|
|
1998
|
+
_query_params.append(("creation-time-start", creation_time_start))
|
|
1999
|
+
|
|
2000
|
+
# process the header parameters
|
|
2001
|
+
# process the form parameters
|
|
2002
|
+
# process the body parameter
|
|
2003
|
+
|
|
2004
|
+
# set the HTTP header `Accept`
|
|
2005
|
+
if "Accept" not in _header_params:
|
|
2006
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2007
|
+
|
|
2008
|
+
# authentication setting
|
|
2009
|
+
_auth_settings: List[str] = []
|
|
2010
|
+
|
|
2011
|
+
return self.api_client.param_serialize(
|
|
2012
|
+
method="GET",
|
|
2013
|
+
resource_path="/v2/organizations",
|
|
2014
|
+
path_params=_path_params,
|
|
2015
|
+
query_params=_query_params,
|
|
2016
|
+
header_params=_header_params,
|
|
2017
|
+
body=_body_params,
|
|
2018
|
+
post_params=_form_params,
|
|
2019
|
+
files=_files,
|
|
2020
|
+
auth_settings=_auth_settings,
|
|
2021
|
+
collection_formats=_collection_formats,
|
|
2022
|
+
_host=_host,
|
|
2023
|
+
_request_auth=_request_auth,
|
|
2024
|
+
)
|
|
2025
|
+
|
|
2026
|
+
@validate_call
|
|
2027
|
+
def list_projects(
|
|
2028
|
+
self,
|
|
2029
|
+
container_parent_id: Annotated[
|
|
2030
|
+
Optional[StrictStr],
|
|
2031
|
+
Field(
|
|
2032
|
+
description="Identifier of the parent resource container - containerId as well as UUID identifier is supported."
|
|
2033
|
+
),
|
|
2034
|
+
] = None,
|
|
2035
|
+
container_ids: Annotated[
|
|
2036
|
+
Optional[List[StrictStr]],
|
|
2037
|
+
Field(description="List of container identifiers - containerId as well as UUID identifier is supported."),
|
|
2038
|
+
] = None,
|
|
2039
|
+
member: Annotated[
|
|
2040
|
+
Optional[StrictStr],
|
|
2041
|
+
Field(
|
|
2042
|
+
description="E-Mail address of the user for whom the visible resource containers should be filtered."
|
|
2043
|
+
),
|
|
2044
|
+
] = None,
|
|
2045
|
+
offset: Annotated[
|
|
2046
|
+
Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]],
|
|
2047
|
+
Field(description="The offset of the first item in the collection to return."),
|
|
2048
|
+
] = None,
|
|
2049
|
+
limit: Annotated[
|
|
2050
|
+
Optional[
|
|
2051
|
+
Union[
|
|
2052
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
2053
|
+
]
|
|
2054
|
+
],
|
|
2055
|
+
Field(
|
|
2056
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
2057
|
+
),
|
|
2058
|
+
] = None,
|
|
2059
|
+
creation_time_start: Annotated[
|
|
2060
|
+
Optional[datetime],
|
|
2061
|
+
Field(
|
|
2062
|
+
description="A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time."
|
|
2063
|
+
),
|
|
2064
|
+
] = None,
|
|
2065
|
+
_request_timeout: Union[
|
|
2066
|
+
None,
|
|
2067
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2068
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2069
|
+
] = None,
|
|
2070
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2071
|
+
_content_type: Optional[StrictStr] = None,
|
|
2072
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2073
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2074
|
+
) -> ListProjectsResponse:
|
|
2075
|
+
"""Get All Projects
|
|
2076
|
+
|
|
2077
|
+
Returns all projects and their metadata that: - Are children of the specific containerParentId - Match the given containerIds - User is member of Filter: - Either containerParentId OR containerIds OR member must be passed - If containerId and containerParentId are given, both are used for filtering - containers must point to the same parent - If member and containerParentId are given, both are used for filtering - If member is given, containers must not point to the same container parent
|
|
2078
|
+
|
|
2079
|
+
:param container_parent_id: Identifier of the parent resource container - containerId as well as UUID identifier is supported.
|
|
2080
|
+
:type container_parent_id: str
|
|
2081
|
+
:param container_ids: List of container identifiers - containerId as well as UUID identifier is supported.
|
|
2082
|
+
:type container_ids: List[str]
|
|
2083
|
+
:param member: E-Mail address of the user for whom the visible resource containers should be filtered.
|
|
2084
|
+
:type member: str
|
|
2085
|
+
:param offset: The offset of the first item in the collection to return.
|
|
2086
|
+
:type offset: float
|
|
2087
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
2088
|
+
:type limit: float
|
|
2089
|
+
:param creation_time_start: A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time.
|
|
2090
|
+
:type creation_time_start: datetime
|
|
2091
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2092
|
+
number provided, it will be total request
|
|
2093
|
+
timeout. It can also be a pair (tuple) of
|
|
2094
|
+
(connection, read) timeouts.
|
|
2095
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2096
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2097
|
+
request; this effectively ignores the
|
|
2098
|
+
authentication in the spec for a single request.
|
|
2099
|
+
:type _request_auth: dict, optional
|
|
2100
|
+
:param _content_type: force content-type for the request.
|
|
2101
|
+
:type _content_type: str, Optional
|
|
2102
|
+
:param _headers: set to override the headers for a single
|
|
2103
|
+
request; this effectively ignores the headers
|
|
2104
|
+
in the spec for a single request.
|
|
2105
|
+
:type _headers: dict, optional
|
|
2106
|
+
:param _host_index: set to override the host_index for a single
|
|
2107
|
+
request; this effectively ignores the host_index
|
|
2108
|
+
in the spec for a single request.
|
|
2109
|
+
:type _host_index: int, optional
|
|
2110
|
+
:return: Returns the result object.
|
|
2111
|
+
""" # noqa: E501 docstring might be too long
|
|
2112
|
+
|
|
2113
|
+
_param = self._list_projects_serialize(
|
|
2114
|
+
container_parent_id=container_parent_id,
|
|
2115
|
+
container_ids=container_ids,
|
|
2116
|
+
member=member,
|
|
2117
|
+
offset=offset,
|
|
2118
|
+
limit=limit,
|
|
2119
|
+
creation_time_start=creation_time_start,
|
|
2120
|
+
_request_auth=_request_auth,
|
|
2121
|
+
_content_type=_content_type,
|
|
2122
|
+
_headers=_headers,
|
|
2123
|
+
_host_index=_host_index,
|
|
2124
|
+
)
|
|
2125
|
+
|
|
2126
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2127
|
+
"200": "ListProjectsResponse",
|
|
2128
|
+
"400": "ErrorResponse",
|
|
2129
|
+
"403": "ErrorResponse",
|
|
2130
|
+
}
|
|
2131
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2132
|
+
response_data.read()
|
|
2133
|
+
return self.api_client.response_deserialize(
|
|
2134
|
+
response_data=response_data,
|
|
2135
|
+
response_types_map=_response_types_map,
|
|
2136
|
+
).data
|
|
2137
|
+
|
|
2138
|
+
@validate_call
|
|
2139
|
+
def list_projects_with_http_info(
|
|
2140
|
+
self,
|
|
2141
|
+
container_parent_id: Annotated[
|
|
2142
|
+
Optional[StrictStr],
|
|
2143
|
+
Field(
|
|
2144
|
+
description="Identifier of the parent resource container - containerId as well as UUID identifier is supported."
|
|
2145
|
+
),
|
|
2146
|
+
] = None,
|
|
2147
|
+
container_ids: Annotated[
|
|
2148
|
+
Optional[List[StrictStr]],
|
|
2149
|
+
Field(description="List of container identifiers - containerId as well as UUID identifier is supported."),
|
|
2150
|
+
] = None,
|
|
2151
|
+
member: Annotated[
|
|
2152
|
+
Optional[StrictStr],
|
|
2153
|
+
Field(
|
|
2154
|
+
description="E-Mail address of the user for whom the visible resource containers should be filtered."
|
|
2155
|
+
),
|
|
2156
|
+
] = None,
|
|
2157
|
+
offset: Annotated[
|
|
2158
|
+
Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]],
|
|
2159
|
+
Field(description="The offset of the first item in the collection to return."),
|
|
2160
|
+
] = None,
|
|
2161
|
+
limit: Annotated[
|
|
2162
|
+
Optional[
|
|
2163
|
+
Union[
|
|
2164
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
2165
|
+
]
|
|
2166
|
+
],
|
|
2167
|
+
Field(
|
|
2168
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
2169
|
+
),
|
|
2170
|
+
] = None,
|
|
2171
|
+
creation_time_start: Annotated[
|
|
2172
|
+
Optional[datetime],
|
|
2173
|
+
Field(
|
|
2174
|
+
description="A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time."
|
|
2175
|
+
),
|
|
2176
|
+
] = None,
|
|
2177
|
+
_request_timeout: Union[
|
|
2178
|
+
None,
|
|
2179
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2180
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2181
|
+
] = None,
|
|
2182
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2183
|
+
_content_type: Optional[StrictStr] = None,
|
|
2184
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2185
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2186
|
+
) -> ApiResponse[ListProjectsResponse]:
|
|
2187
|
+
"""Get All Projects
|
|
2188
|
+
|
|
2189
|
+
Returns all projects and their metadata that: - Are children of the specific containerParentId - Match the given containerIds - User is member of Filter: - Either containerParentId OR containerIds OR member must be passed - If containerId and containerParentId are given, both are used for filtering - containers must point to the same parent - If member and containerParentId are given, both are used for filtering - If member is given, containers must not point to the same container parent
|
|
2190
|
+
|
|
2191
|
+
:param container_parent_id: Identifier of the parent resource container - containerId as well as UUID identifier is supported.
|
|
2192
|
+
:type container_parent_id: str
|
|
2193
|
+
:param container_ids: List of container identifiers - containerId as well as UUID identifier is supported.
|
|
2194
|
+
:type container_ids: List[str]
|
|
2195
|
+
:param member: E-Mail address of the user for whom the visible resource containers should be filtered.
|
|
2196
|
+
:type member: str
|
|
2197
|
+
:param offset: The offset of the first item in the collection to return.
|
|
2198
|
+
:type offset: float
|
|
2199
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
2200
|
+
:type limit: float
|
|
2201
|
+
:param creation_time_start: A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time.
|
|
2202
|
+
:type creation_time_start: datetime
|
|
2203
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2204
|
+
number provided, it will be total request
|
|
2205
|
+
timeout. It can also be a pair (tuple) of
|
|
2206
|
+
(connection, read) timeouts.
|
|
2207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2209
|
+
request; this effectively ignores the
|
|
2210
|
+
authentication in the spec for a single request.
|
|
2211
|
+
:type _request_auth: dict, optional
|
|
2212
|
+
:param _content_type: force content-type for the request.
|
|
2213
|
+
:type _content_type: str, Optional
|
|
2214
|
+
:param _headers: set to override the headers for a single
|
|
2215
|
+
request; this effectively ignores the headers
|
|
2216
|
+
in the spec for a single request.
|
|
2217
|
+
:type _headers: dict, optional
|
|
2218
|
+
:param _host_index: set to override the host_index for a single
|
|
2219
|
+
request; this effectively ignores the host_index
|
|
2220
|
+
in the spec for a single request.
|
|
2221
|
+
:type _host_index: int, optional
|
|
2222
|
+
:return: Returns the result object.
|
|
2223
|
+
""" # noqa: E501 docstring might be too long
|
|
2224
|
+
|
|
2225
|
+
_param = self._list_projects_serialize(
|
|
2226
|
+
container_parent_id=container_parent_id,
|
|
2227
|
+
container_ids=container_ids,
|
|
2228
|
+
member=member,
|
|
2229
|
+
offset=offset,
|
|
2230
|
+
limit=limit,
|
|
2231
|
+
creation_time_start=creation_time_start,
|
|
2232
|
+
_request_auth=_request_auth,
|
|
2233
|
+
_content_type=_content_type,
|
|
2234
|
+
_headers=_headers,
|
|
2235
|
+
_host_index=_host_index,
|
|
2236
|
+
)
|
|
2237
|
+
|
|
2238
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2239
|
+
"200": "ListProjectsResponse",
|
|
2240
|
+
"400": "ErrorResponse",
|
|
2241
|
+
"403": "ErrorResponse",
|
|
2242
|
+
}
|
|
2243
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2244
|
+
response_data.read()
|
|
2245
|
+
return self.api_client.response_deserialize(
|
|
2246
|
+
response_data=response_data,
|
|
2247
|
+
response_types_map=_response_types_map,
|
|
2248
|
+
)
|
|
2249
|
+
|
|
2250
|
+
@validate_call
|
|
2251
|
+
def list_projects_without_preload_content(
|
|
2252
|
+
self,
|
|
2253
|
+
container_parent_id: Annotated[
|
|
2254
|
+
Optional[StrictStr],
|
|
2255
|
+
Field(
|
|
2256
|
+
description="Identifier of the parent resource container - containerId as well as UUID identifier is supported."
|
|
2257
|
+
),
|
|
2258
|
+
] = None,
|
|
2259
|
+
container_ids: Annotated[
|
|
2260
|
+
Optional[List[StrictStr]],
|
|
2261
|
+
Field(description="List of container identifiers - containerId as well as UUID identifier is supported."),
|
|
2262
|
+
] = None,
|
|
2263
|
+
member: Annotated[
|
|
2264
|
+
Optional[StrictStr],
|
|
2265
|
+
Field(
|
|
2266
|
+
description="E-Mail address of the user for whom the visible resource containers should be filtered."
|
|
2267
|
+
),
|
|
2268
|
+
] = None,
|
|
2269
|
+
offset: Annotated[
|
|
2270
|
+
Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]],
|
|
2271
|
+
Field(description="The offset of the first item in the collection to return."),
|
|
2272
|
+
] = None,
|
|
2273
|
+
limit: Annotated[
|
|
2274
|
+
Optional[
|
|
2275
|
+
Union[
|
|
2276
|
+
Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]
|
|
2277
|
+
]
|
|
2278
|
+
],
|
|
2279
|
+
Field(
|
|
2280
|
+
description="The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used."
|
|
2281
|
+
),
|
|
2282
|
+
] = None,
|
|
2283
|
+
creation_time_start: Annotated[
|
|
2284
|
+
Optional[datetime],
|
|
2285
|
+
Field(
|
|
2286
|
+
description="A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time."
|
|
2287
|
+
),
|
|
2288
|
+
] = None,
|
|
2289
|
+
_request_timeout: Union[
|
|
2290
|
+
None,
|
|
2291
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2292
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2293
|
+
] = None,
|
|
2294
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2295
|
+
_content_type: Optional[StrictStr] = None,
|
|
2296
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2297
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2298
|
+
) -> RESTResponseType:
|
|
2299
|
+
"""Get All Projects
|
|
2300
|
+
|
|
2301
|
+
Returns all projects and their metadata that: - Are children of the specific containerParentId - Match the given containerIds - User is member of Filter: - Either containerParentId OR containerIds OR member must be passed - If containerId and containerParentId are given, both are used for filtering - containers must point to the same parent - If member and containerParentId are given, both are used for filtering - If member is given, containers must not point to the same container parent
|
|
2302
|
+
|
|
2303
|
+
:param container_parent_id: Identifier of the parent resource container - containerId as well as UUID identifier is supported.
|
|
2304
|
+
:type container_parent_id: str
|
|
2305
|
+
:param container_ids: List of container identifiers - containerId as well as UUID identifier is supported.
|
|
2306
|
+
:type container_ids: List[str]
|
|
2307
|
+
:param member: E-Mail address of the user for whom the visible resource containers should be filtered.
|
|
2308
|
+
:type member: str
|
|
2309
|
+
:param offset: The offset of the first item in the collection to return.
|
|
2310
|
+
:type offset: float
|
|
2311
|
+
:param limit: The maximum number of projects to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used.
|
|
2312
|
+
:type limit: float
|
|
2313
|
+
:param creation_time_start: A timestamp to specify the beginning of the creationTime from which entries should be returned. If not given, defaults to the beginning of time.
|
|
2314
|
+
:type creation_time_start: datetime
|
|
2315
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2316
|
+
number provided, it will be total request
|
|
2317
|
+
timeout. It can also be a pair (tuple) of
|
|
2318
|
+
(connection, read) timeouts.
|
|
2319
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2320
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2321
|
+
request; this effectively ignores the
|
|
2322
|
+
authentication in the spec for a single request.
|
|
2323
|
+
:type _request_auth: dict, optional
|
|
2324
|
+
:param _content_type: force content-type for the request.
|
|
2325
|
+
:type _content_type: str, Optional
|
|
2326
|
+
:param _headers: set to override the headers for a single
|
|
2327
|
+
request; this effectively ignores the headers
|
|
2328
|
+
in the spec for a single request.
|
|
2329
|
+
:type _headers: dict, optional
|
|
2330
|
+
:param _host_index: set to override the host_index for a single
|
|
2331
|
+
request; this effectively ignores the host_index
|
|
2332
|
+
in the spec for a single request.
|
|
2333
|
+
:type _host_index: int, optional
|
|
2334
|
+
:return: Returns the result object.
|
|
2335
|
+
""" # noqa: E501 docstring might be too long
|
|
2336
|
+
|
|
2337
|
+
_param = self._list_projects_serialize(
|
|
2338
|
+
container_parent_id=container_parent_id,
|
|
2339
|
+
container_ids=container_ids,
|
|
2340
|
+
member=member,
|
|
2341
|
+
offset=offset,
|
|
2342
|
+
limit=limit,
|
|
2343
|
+
creation_time_start=creation_time_start,
|
|
2344
|
+
_request_auth=_request_auth,
|
|
2345
|
+
_content_type=_content_type,
|
|
2346
|
+
_headers=_headers,
|
|
2347
|
+
_host_index=_host_index,
|
|
2348
|
+
)
|
|
2349
|
+
|
|
2350
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2351
|
+
"200": "ListProjectsResponse",
|
|
2352
|
+
"400": "ErrorResponse",
|
|
2353
|
+
"403": "ErrorResponse",
|
|
2354
|
+
}
|
|
2355
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2356
|
+
return response_data.response
|
|
2357
|
+
|
|
2358
|
+
def _list_projects_serialize(
|
|
2359
|
+
self,
|
|
2360
|
+
container_parent_id,
|
|
2361
|
+
container_ids,
|
|
2362
|
+
member,
|
|
2363
|
+
offset,
|
|
2364
|
+
limit,
|
|
2365
|
+
creation_time_start,
|
|
2366
|
+
_request_auth,
|
|
2367
|
+
_content_type,
|
|
2368
|
+
_headers,
|
|
2369
|
+
_host_index,
|
|
2370
|
+
) -> RequestSerialized:
|
|
2371
|
+
|
|
2372
|
+
_host = None
|
|
2373
|
+
|
|
2374
|
+
_collection_formats: Dict[str, str] = {
|
|
2375
|
+
"containerIds": "multi",
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
_path_params: Dict[str, str] = {}
|
|
2379
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2380
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2381
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2382
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
2383
|
+
_body_params: Optional[bytes] = None
|
|
2384
|
+
|
|
2385
|
+
# process the path parameters
|
|
2386
|
+
# process the query parameters
|
|
2387
|
+
if container_parent_id is not None:
|
|
2388
|
+
|
|
2389
|
+
_query_params.append(("containerParentId", container_parent_id))
|
|
2390
|
+
|
|
2391
|
+
if container_ids is not None:
|
|
2392
|
+
|
|
2393
|
+
_query_params.append(("containerIds", container_ids))
|
|
2394
|
+
|
|
2395
|
+
if member is not None:
|
|
2396
|
+
|
|
2397
|
+
_query_params.append(("member", member))
|
|
2398
|
+
|
|
2399
|
+
if offset is not None:
|
|
2400
|
+
|
|
2401
|
+
_query_params.append(("offset", offset))
|
|
2402
|
+
|
|
2403
|
+
if limit is not None:
|
|
2404
|
+
|
|
2405
|
+
_query_params.append(("limit", limit))
|
|
2406
|
+
|
|
2407
|
+
if creation_time_start is not None:
|
|
2408
|
+
if isinstance(creation_time_start, datetime):
|
|
2409
|
+
_query_params.append(
|
|
2410
|
+
("creation-time-start", creation_time_start.strftime(self.api_client.configuration.datetime_format))
|
|
2411
|
+
)
|
|
2412
|
+
else:
|
|
2413
|
+
_query_params.append(("creation-time-start", creation_time_start))
|
|
2414
|
+
|
|
2415
|
+
# process the header parameters
|
|
2416
|
+
# process the form parameters
|
|
2417
|
+
# process the body parameter
|
|
2418
|
+
|
|
2419
|
+
# set the HTTP header `Accept`
|
|
2420
|
+
if "Accept" not in _header_params:
|
|
2421
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2422
|
+
|
|
2423
|
+
# authentication setting
|
|
2424
|
+
_auth_settings: List[str] = []
|
|
2425
|
+
|
|
2426
|
+
return self.api_client.param_serialize(
|
|
2427
|
+
method="GET",
|
|
2428
|
+
resource_path="/v2/projects",
|
|
2429
|
+
path_params=_path_params,
|
|
2430
|
+
query_params=_query_params,
|
|
2431
|
+
header_params=_header_params,
|
|
2432
|
+
body=_body_params,
|
|
2433
|
+
post_params=_form_params,
|
|
2434
|
+
files=_files,
|
|
2435
|
+
auth_settings=_auth_settings,
|
|
2436
|
+
collection_formats=_collection_formats,
|
|
2437
|
+
_host=_host,
|
|
2438
|
+
_request_auth=_request_auth,
|
|
2439
|
+
)
|
|
2440
|
+
|
|
2441
|
+
@validate_call
|
|
2442
|
+
def partial_update_project(
|
|
2443
|
+
self,
|
|
2444
|
+
id: Annotated[
|
|
2445
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
2446
|
+
],
|
|
2447
|
+
partial_update_project_payload: Optional[PartialUpdateProjectPayload] = None,
|
|
2448
|
+
_request_timeout: Union[
|
|
2449
|
+
None,
|
|
2450
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2451
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2452
|
+
] = None,
|
|
2453
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2454
|
+
_content_type: Optional[StrictStr] = None,
|
|
2455
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2456
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2457
|
+
) -> Project:
|
|
2458
|
+
"""Update Project
|
|
2459
|
+
|
|
2460
|
+
Update the project and its metadata. - Update project name - Update project labels - Update project parent (folder or organization)
|
|
2461
|
+
|
|
2462
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
2463
|
+
:type id: str
|
|
2464
|
+
:param partial_update_project_payload:
|
|
2465
|
+
:type partial_update_project_payload: PartialUpdateProjectPayload
|
|
2466
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2467
|
+
number provided, it will be total request
|
|
2468
|
+
timeout. It can also be a pair (tuple) of
|
|
2469
|
+
(connection, read) timeouts.
|
|
2470
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2471
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2472
|
+
request; this effectively ignores the
|
|
2473
|
+
authentication in the spec for a single request.
|
|
2474
|
+
:type _request_auth: dict, optional
|
|
2475
|
+
:param _content_type: force content-type for the request.
|
|
2476
|
+
:type _content_type: str, Optional
|
|
2477
|
+
:param _headers: set to override the headers for a single
|
|
2478
|
+
request; this effectively ignores the headers
|
|
2479
|
+
in the spec for a single request.
|
|
2480
|
+
:type _headers: dict, optional
|
|
2481
|
+
:param _host_index: set to override the host_index for a single
|
|
2482
|
+
request; this effectively ignores the host_index
|
|
2483
|
+
in the spec for a single request.
|
|
2484
|
+
:type _host_index: int, optional
|
|
2485
|
+
:return: Returns the result object.
|
|
2486
|
+
""" # noqa: E501 docstring might be too long
|
|
2487
|
+
|
|
2488
|
+
_param = self._partial_update_project_serialize(
|
|
2489
|
+
id=id,
|
|
2490
|
+
partial_update_project_payload=partial_update_project_payload,
|
|
2491
|
+
_request_auth=_request_auth,
|
|
2492
|
+
_content_type=_content_type,
|
|
2493
|
+
_headers=_headers,
|
|
2494
|
+
_host_index=_host_index,
|
|
2495
|
+
)
|
|
2496
|
+
|
|
2497
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2498
|
+
"200": "Project",
|
|
2499
|
+
"403": "ErrorResponse",
|
|
2500
|
+
"404": "ErrorResponse",
|
|
2501
|
+
"409": "ErrorResponse",
|
|
2502
|
+
}
|
|
2503
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2504
|
+
response_data.read()
|
|
2505
|
+
return self.api_client.response_deserialize(
|
|
2506
|
+
response_data=response_data,
|
|
2507
|
+
response_types_map=_response_types_map,
|
|
2508
|
+
).data
|
|
2509
|
+
|
|
2510
|
+
@validate_call
|
|
2511
|
+
def partial_update_project_with_http_info(
|
|
2512
|
+
self,
|
|
2513
|
+
id: Annotated[
|
|
2514
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
2515
|
+
],
|
|
2516
|
+
partial_update_project_payload: Optional[PartialUpdateProjectPayload] = None,
|
|
2517
|
+
_request_timeout: Union[
|
|
2518
|
+
None,
|
|
2519
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2520
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2521
|
+
] = None,
|
|
2522
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2523
|
+
_content_type: Optional[StrictStr] = None,
|
|
2524
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2525
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2526
|
+
) -> ApiResponse[Project]:
|
|
2527
|
+
"""Update Project
|
|
2528
|
+
|
|
2529
|
+
Update the project and its metadata. - Update project name - Update project labels - Update project parent (folder or organization)
|
|
2530
|
+
|
|
2531
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
2532
|
+
:type id: str
|
|
2533
|
+
:param partial_update_project_payload:
|
|
2534
|
+
:type partial_update_project_payload: PartialUpdateProjectPayload
|
|
2535
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2536
|
+
number provided, it will be total request
|
|
2537
|
+
timeout. It can also be a pair (tuple) of
|
|
2538
|
+
(connection, read) timeouts.
|
|
2539
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2540
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2541
|
+
request; this effectively ignores the
|
|
2542
|
+
authentication in the spec for a single request.
|
|
2543
|
+
:type _request_auth: dict, optional
|
|
2544
|
+
:param _content_type: force content-type for the request.
|
|
2545
|
+
:type _content_type: str, Optional
|
|
2546
|
+
:param _headers: set to override the headers for a single
|
|
2547
|
+
request; this effectively ignores the headers
|
|
2548
|
+
in the spec for a single request.
|
|
2549
|
+
:type _headers: dict, optional
|
|
2550
|
+
:param _host_index: set to override the host_index for a single
|
|
2551
|
+
request; this effectively ignores the host_index
|
|
2552
|
+
in the spec for a single request.
|
|
2553
|
+
:type _host_index: int, optional
|
|
2554
|
+
:return: Returns the result object.
|
|
2555
|
+
""" # noqa: E501 docstring might be too long
|
|
2556
|
+
|
|
2557
|
+
_param = self._partial_update_project_serialize(
|
|
2558
|
+
id=id,
|
|
2559
|
+
partial_update_project_payload=partial_update_project_payload,
|
|
2560
|
+
_request_auth=_request_auth,
|
|
2561
|
+
_content_type=_content_type,
|
|
2562
|
+
_headers=_headers,
|
|
2563
|
+
_host_index=_host_index,
|
|
2564
|
+
)
|
|
2565
|
+
|
|
2566
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2567
|
+
"200": "Project",
|
|
2568
|
+
"403": "ErrorResponse",
|
|
2569
|
+
"404": "ErrorResponse",
|
|
2570
|
+
"409": "ErrorResponse",
|
|
2571
|
+
}
|
|
2572
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2573
|
+
response_data.read()
|
|
2574
|
+
return self.api_client.response_deserialize(
|
|
2575
|
+
response_data=response_data,
|
|
2576
|
+
response_types_map=_response_types_map,
|
|
2577
|
+
)
|
|
2578
|
+
|
|
2579
|
+
@validate_call
|
|
2580
|
+
def partial_update_project_without_preload_content(
|
|
2581
|
+
self,
|
|
2582
|
+
id: Annotated[
|
|
2583
|
+
StrictStr, Field(description="Project identifier - containerId as well as UUID identifier is supported.")
|
|
2584
|
+
],
|
|
2585
|
+
partial_update_project_payload: Optional[PartialUpdateProjectPayload] = None,
|
|
2586
|
+
_request_timeout: Union[
|
|
2587
|
+
None,
|
|
2588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2589
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2590
|
+
] = None,
|
|
2591
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2592
|
+
_content_type: Optional[StrictStr] = None,
|
|
2593
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2594
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2595
|
+
) -> RESTResponseType:
|
|
2596
|
+
"""Update Project
|
|
2597
|
+
|
|
2598
|
+
Update the project and its metadata. - Update project name - Update project labels - Update project parent (folder or organization)
|
|
2599
|
+
|
|
2600
|
+
:param id: Project identifier - containerId as well as UUID identifier is supported. (required)
|
|
2601
|
+
:type id: str
|
|
2602
|
+
:param partial_update_project_payload:
|
|
2603
|
+
:type partial_update_project_payload: PartialUpdateProjectPayload
|
|
2604
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2605
|
+
number provided, it will be total request
|
|
2606
|
+
timeout. It can also be a pair (tuple) of
|
|
2607
|
+
(connection, read) timeouts.
|
|
2608
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2609
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2610
|
+
request; this effectively ignores the
|
|
2611
|
+
authentication in the spec for a single request.
|
|
2612
|
+
:type _request_auth: dict, optional
|
|
2613
|
+
:param _content_type: force content-type for the request.
|
|
2614
|
+
:type _content_type: str, Optional
|
|
2615
|
+
:param _headers: set to override the headers for a single
|
|
2616
|
+
request; this effectively ignores the headers
|
|
2617
|
+
in the spec for a single request.
|
|
2618
|
+
:type _headers: dict, optional
|
|
2619
|
+
:param _host_index: set to override the host_index for a single
|
|
2620
|
+
request; this effectively ignores the host_index
|
|
2621
|
+
in the spec for a single request.
|
|
2622
|
+
:type _host_index: int, optional
|
|
2623
|
+
:return: Returns the result object.
|
|
2624
|
+
""" # noqa: E501 docstring might be too long
|
|
2625
|
+
|
|
2626
|
+
_param = self._partial_update_project_serialize(
|
|
2627
|
+
id=id,
|
|
2628
|
+
partial_update_project_payload=partial_update_project_payload,
|
|
2629
|
+
_request_auth=_request_auth,
|
|
2630
|
+
_content_type=_content_type,
|
|
2631
|
+
_headers=_headers,
|
|
2632
|
+
_host_index=_host_index,
|
|
2633
|
+
)
|
|
2634
|
+
|
|
2635
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2636
|
+
"200": "Project",
|
|
2637
|
+
"403": "ErrorResponse",
|
|
2638
|
+
"404": "ErrorResponse",
|
|
2639
|
+
"409": "ErrorResponse",
|
|
2640
|
+
}
|
|
2641
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2642
|
+
return response_data.response
|
|
2643
|
+
|
|
2644
|
+
def _partial_update_project_serialize(
|
|
2645
|
+
self,
|
|
2646
|
+
id,
|
|
2647
|
+
partial_update_project_payload,
|
|
2648
|
+
_request_auth,
|
|
2649
|
+
_content_type,
|
|
2650
|
+
_headers,
|
|
2651
|
+
_host_index,
|
|
2652
|
+
) -> RequestSerialized:
|
|
2653
|
+
|
|
2654
|
+
_host = None
|
|
2655
|
+
|
|
2656
|
+
_collection_formats: Dict[str, str] = {}
|
|
2657
|
+
|
|
2658
|
+
_path_params: Dict[str, str] = {}
|
|
2659
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2660
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2661
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2662
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
2663
|
+
_body_params: Optional[bytes] = None
|
|
2664
|
+
|
|
2665
|
+
# process the path parameters
|
|
2666
|
+
if id is not None:
|
|
2667
|
+
_path_params["id"] = id
|
|
2668
|
+
# process the query parameters
|
|
2669
|
+
# process the header parameters
|
|
2670
|
+
# process the form parameters
|
|
2671
|
+
# process the body parameter
|
|
2672
|
+
if partial_update_project_payload is not None:
|
|
2673
|
+
_body_params = partial_update_project_payload
|
|
2674
|
+
|
|
2675
|
+
# set the HTTP header `Accept`
|
|
2676
|
+
if "Accept" not in _header_params:
|
|
2677
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2678
|
+
|
|
2679
|
+
# set the HTTP header `Content-Type`
|
|
2680
|
+
if _content_type:
|
|
2681
|
+
_header_params["Content-Type"] = _content_type
|
|
2682
|
+
else:
|
|
2683
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
2684
|
+
if _default_content_type is not None:
|
|
2685
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2686
|
+
|
|
2687
|
+
# authentication setting
|
|
2688
|
+
_auth_settings: List[str] = []
|
|
2689
|
+
|
|
2690
|
+
return self.api_client.param_serialize(
|
|
2691
|
+
method="PATCH",
|
|
2692
|
+
resource_path="/v2/projects/{id}",
|
|
2693
|
+
path_params=_path_params,
|
|
2694
|
+
query_params=_query_params,
|
|
2695
|
+
header_params=_header_params,
|
|
2696
|
+
body=_body_params,
|
|
2697
|
+
post_params=_form_params,
|
|
2698
|
+
files=_files,
|
|
2699
|
+
auth_settings=_auth_settings,
|
|
2700
|
+
collection_formats=_collection_formats,
|
|
2701
|
+
_host=_host,
|
|
2702
|
+
_request_auth=_request_auth,
|
|
2703
|
+
)
|