stackit-authorization 0.7.1__tar.gz → 0.9.0__tar.gz
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_authorization-0.7.1 → stackit_authorization-0.9.0}/PKG-INFO +3 -4
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/pyproject.toml +7 -7
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/__init__.py +5 -6
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/api/default_api.py +5 -5
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/api_client.py +20 -23
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/api_response.py +0 -1
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/configuration.py +5 -6
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/exceptions.py +5 -5
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/__init__.py +5 -5
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/add_custom_role_response.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/add_members_payload.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/add_role_payload.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/delete_role_response.py +9 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/error_response.py +9 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/existing_permission.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/get_role_response.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/list_members_response.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/list_permissions_response.py +9 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/list_user_memberships_response.py +9 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/list_user_permissions_response.py +9 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/member.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/members_response.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/permission.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/permission_request.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/remove_members_payload.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/role.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/roles_response.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/update_role_payload.py +12 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/update_role_response.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/user_membership.py +18 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/user_permission.py +15 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/models/zookie.py +9 -8
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/rest.py +5 -6
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/.gitignore +0 -0
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/LICENSE.md +0 -0
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/NOTICE.txt +0 -0
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/README.md +0 -0
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/api/__init__.py +0 -0
- {stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stackit-authorization
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: STACKIT Membership API
|
|
5
5
|
Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
|
|
6
6
|
Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
|
|
@@ -10,16 +10,15 @@ License-File: NOTICE.txt
|
|
|
10
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
-
Requires-Python: <4.0,>=3.
|
|
18
|
+
Requires-Python: <4.0,>=3.10
|
|
20
19
|
Requires-Dist: pydantic>=2.9.2
|
|
21
20
|
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
22
|
-
Requires-Dist: requests>=2.
|
|
21
|
+
Requires-Dist: requests>=2.33.0
|
|
23
22
|
Requires-Dist: stackit-core>=0.0.1a
|
|
24
23
|
Description-Content-Type: text/markdown
|
|
25
24
|
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "stackit-authorization"
|
|
3
|
-
version = "v0.
|
|
3
|
+
version = "v0.9.0"
|
|
4
4
|
description = "STACKIT Membership API"
|
|
5
5
|
authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.10,<4.0"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
classifiers = [
|
|
9
9
|
"Programming Language :: Python :: 3",
|
|
10
10
|
"License :: OSI Approved :: Apache Software License",
|
|
11
11
|
"Operating System :: OS Independent",
|
|
12
|
-
"Programming Language :: Python :: 3.9",
|
|
13
12
|
"Programming Language :: Python :: 3.10",
|
|
14
13
|
"Programming Language :: Python :: 3.11",
|
|
15
14
|
"Programming Language :: Python :: 3.12",
|
|
@@ -18,7 +17,7 @@ classifiers = [
|
|
|
18
17
|
]
|
|
19
18
|
dependencies = [
|
|
20
19
|
"stackit-core>=0.0.1a",
|
|
21
|
-
"requests>=2.
|
|
20
|
+
"requests>=2.33.0",
|
|
22
21
|
"pydantic>=2.9.2",
|
|
23
22
|
"python-dateutil>=2.9.0.post0",
|
|
24
23
|
]
|
|
@@ -29,8 +28,8 @@ Issues = "https://github.com/stackitcloud/stackit-sdk-python/issues"
|
|
|
29
28
|
|
|
30
29
|
[dependency-groups]
|
|
31
30
|
dev = [
|
|
32
|
-
"black>=
|
|
33
|
-
"pytest>=
|
|
31
|
+
"black>=26.3.1",
|
|
32
|
+
"pytest>=9.1.1",
|
|
34
33
|
"flake8>=5.0.3 ; python_full_version < '3.12'",
|
|
35
34
|
"flake8>=6.0.1 ; python_full_version >= '3.12'",
|
|
36
35
|
"flake8-black>=0.3.6",
|
|
@@ -102,7 +101,8 @@ show-source = false
|
|
|
102
101
|
max-line-length = 120
|
|
103
102
|
# E203,W503 and E704 are incompatible with the formatter black
|
|
104
103
|
# W291 needs to be disabled because some doc-strings get generated with trailing whitespace but black won't re-format comments
|
|
105
|
-
|
|
104
|
+
# fixing B042 in upstream exceptions.mustache would be a breaking change
|
|
105
|
+
ignore = ["E203", "W503", "E704", "W291", "B042"]
|
|
106
106
|
inline-quotes = '"'
|
|
107
107
|
docstring-quotes = '"""'
|
|
108
108
|
multiline-quotes = '"""'
|
{stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/__init__.py
RENAMED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
# flake8: noqa
|
|
4
4
|
|
|
5
5
|
"""
|
|
6
|
-
|
|
6
|
+
STACKIT Membership API
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
The version of the OpenAPI document: 2.0
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Do not edit the class manually.
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
__version__ = "1.0.0"
|
|
18
17
|
|
|
19
18
|
# Define package exports
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
{stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/api_client.py
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
import datetime
|
|
@@ -36,7 +36,6 @@ from stackit.authorization.exceptions import (
|
|
|
36
36
|
ApiException,
|
|
37
37
|
)
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
|
|
41
40
|
|
|
42
41
|
|
|
@@ -66,6 +65,7 @@ class ApiClient:
|
|
|
66
65
|
"date": datetime.date,
|
|
67
66
|
"datetime": datetime.datetime,
|
|
68
67
|
"decimal": decimal.Decimal,
|
|
68
|
+
"UUID": uuid.UUID,
|
|
69
69
|
"object": object,
|
|
70
70
|
}
|
|
71
71
|
_pool = None
|
|
@@ -265,7 +265,7 @@ class ApiClient:
|
|
|
265
265
|
response_text = None
|
|
266
266
|
return_data = None
|
|
267
267
|
try:
|
|
268
|
-
if response_type
|
|
268
|
+
if response_type in ("bytearray", "bytes"):
|
|
269
269
|
return_data = response_data.data
|
|
270
270
|
elif response_type == "file":
|
|
271
271
|
return_data = self.__deserialize_file(response_data)
|
|
@@ -326,25 +326,20 @@ class ApiClient:
|
|
|
326
326
|
return obj.isoformat()
|
|
327
327
|
elif isinstance(obj, decimal.Decimal):
|
|
328
328
|
return str(obj)
|
|
329
|
-
|
|
330
329
|
elif isinstance(obj, dict):
|
|
331
|
-
|
|
330
|
+
return {key: self.sanitize_for_serialization(val) for key, val in obj.items()}
|
|
331
|
+
|
|
332
|
+
# Convert model obj to dict except
|
|
333
|
+
# attributes `openapi_types`, `attribute_map`
|
|
334
|
+
# and attributes which value is not None.
|
|
335
|
+
# Convert attribute name to json key in
|
|
336
|
+
# model definition for request.
|
|
337
|
+
if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
|
|
338
|
+
obj_dict = obj.to_dict()
|
|
332
339
|
else:
|
|
333
|
-
|
|
334
|
-
# attributes `openapi_types`, `attribute_map`
|
|
335
|
-
# and attributes which value is not None.
|
|
336
|
-
# Convert attribute name to json key in
|
|
337
|
-
# model definition for request.
|
|
338
|
-
if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
|
|
339
|
-
obj_dict = obj.to_dict()
|
|
340
|
-
else:
|
|
341
|
-
obj_dict = obj.__dict__
|
|
342
|
-
|
|
343
|
-
if isinstance(obj_dict, list):
|
|
344
|
-
# here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() # noqa: E501
|
|
345
|
-
return self.sanitize_for_serialization(obj_dict)
|
|
340
|
+
obj_dict = obj.__dict__
|
|
346
341
|
|
|
347
|
-
return
|
|
342
|
+
return self.sanitize_for_serialization(obj_dict)
|
|
348
343
|
|
|
349
344
|
def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
|
|
350
345
|
"""Deserializes response into an object.
|
|
@@ -417,6 +412,8 @@ class ApiClient:
|
|
|
417
412
|
return self.__deserialize_datetime(data)
|
|
418
413
|
elif klass is decimal.Decimal:
|
|
419
414
|
return decimal.Decimal(data)
|
|
415
|
+
elif klass is uuid.UUID:
|
|
416
|
+
return uuid.UUID(data)
|
|
420
417
|
elif issubclass(klass, Enum):
|
|
421
418
|
return self.__deserialize_enum(data, klass)
|
|
422
419
|
else:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
import sys
|
|
@@ -18,7 +18,6 @@ from typing_extensions import NotRequired
|
|
|
18
18
|
|
|
19
19
|
import os
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
ServerVariablesT = Dict[str, str]
|
|
23
22
|
|
|
24
23
|
|
{stackit_authorization-0.7.1 → stackit_authorization-0.9.0}/src/stackit/authorization/exceptions.py
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from typing import Any, Optional
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# flake8: noqa
|
|
4
4
|
"""
|
|
5
|
-
|
|
5
|
+
STACKIT Membership API
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
The version of the OpenAPI document: 2.0
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
# import models into model package
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
@@ -19,6 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
from stackit.authorization.models.role import Role
|
|
@@ -37,6 +38,9 @@ class AddCustomRoleResponse(BaseModel):
|
|
|
37
38
|
@field_validator("resource_id")
|
|
38
39
|
def resource_id_validate_regular_expression(cls, value):
|
|
39
40
|
"""Validates the regular expression"""
|
|
41
|
+
if not isinstance(value, str):
|
|
42
|
+
value = str(value)
|
|
43
|
+
|
|
40
44
|
if not re.match(r"^([a-zA-Z0-9\/_|\-=+@.]{1,})$", value):
|
|
41
45
|
raise ValueError(r"must validate the regular expression /^([a-zA-Z0-9\/_|\-=+@.]{1,})$/")
|
|
42
46
|
return value
|
|
@@ -44,12 +48,16 @@ class AddCustomRoleResponse(BaseModel):
|
|
|
44
48
|
@field_validator("resource_type")
|
|
45
49
|
def resource_type_validate_regular_expression(cls, value):
|
|
46
50
|
"""Validates the regular expression"""
|
|
51
|
+
if not isinstance(value, str):
|
|
52
|
+
value = str(value)
|
|
53
|
+
|
|
47
54
|
if not re.match(r"^[a-z](?:-?[a-z]){1,63}$", value):
|
|
48
55
|
raise ValueError(r"must validate the regular expression /^[a-z](?:-?[a-z]){1,63}$/")
|
|
49
56
|
return value
|
|
50
57
|
|
|
51
58
|
model_config = ConfigDict(
|
|
52
|
-
|
|
59
|
+
validate_by_name=True,
|
|
60
|
+
validate_by_alias=True,
|
|
53
61
|
validate_assignment=True,
|
|
54
62
|
protected_namespaces=(),
|
|
55
63
|
)
|
|
@@ -60,8 +68,7 @@ class AddCustomRoleResponse(BaseModel):
|
|
|
60
68
|
|
|
61
69
|
def to_json(self) -> str:
|
|
62
70
|
"""Returns the JSON representation of the model using alias"""
|
|
63
|
-
|
|
64
|
-
return json.dumps(self.to_dict())
|
|
71
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
65
72
|
|
|
66
73
|
@classmethod
|
|
67
74
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
@@ -19,6 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
from stackit.authorization.models.member import Member
|
|
@@ -36,12 +37,16 @@ class AddMembersPayload(BaseModel):
|
|
|
36
37
|
@field_validator("resource_type")
|
|
37
38
|
def resource_type_validate_regular_expression(cls, value):
|
|
38
39
|
"""Validates the regular expression"""
|
|
40
|
+
if not isinstance(value, str):
|
|
41
|
+
value = str(value)
|
|
42
|
+
|
|
39
43
|
if not re.match(r"^[a-z](?:-?[a-z]){1,63}$", value):
|
|
40
44
|
raise ValueError(r"must validate the regular expression /^[a-z](?:-?[a-z]){1,63}$/")
|
|
41
45
|
return value
|
|
42
46
|
|
|
43
47
|
model_config = ConfigDict(
|
|
44
|
-
|
|
48
|
+
validate_by_name=True,
|
|
49
|
+
validate_by_alias=True,
|
|
45
50
|
validate_assignment=True,
|
|
46
51
|
protected_namespaces=(),
|
|
47
52
|
)
|
|
@@ -52,8 +57,7 @@ class AddMembersPayload(BaseModel):
|
|
|
52
57
|
|
|
53
58
|
def to_json(self) -> str:
|
|
54
59
|
"""Returns the JSON representation of the model using alias"""
|
|
55
|
-
|
|
56
|
-
return json.dumps(self.to_dict())
|
|
60
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
57
61
|
|
|
58
62
|
@classmethod
|
|
59
63
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
@@ -19,6 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
from stackit.authorization.models.permission_request import PermissionRequest
|
|
@@ -37,12 +38,16 @@ class AddRolePayload(BaseModel):
|
|
|
37
38
|
@field_validator("name")
|
|
38
39
|
def name_validate_regular_expression(cls, value):
|
|
39
40
|
"""Validates the regular expression"""
|
|
41
|
+
if not isinstance(value, str):
|
|
42
|
+
value = str(value)
|
|
43
|
+
|
|
40
44
|
if not re.match(r"^[a-z](?:[-.]?[a-z]){1,63}$", value):
|
|
41
45
|
raise ValueError(r"must validate the regular expression /^[a-z](?:[-.]?[a-z]){1,63}$/")
|
|
42
46
|
return value
|
|
43
47
|
|
|
44
48
|
model_config = ConfigDict(
|
|
45
|
-
|
|
49
|
+
validate_by_name=True,
|
|
50
|
+
validate_by_alias=True,
|
|
46
51
|
validate_assignment=True,
|
|
47
52
|
protected_namespaces=(),
|
|
48
53
|
)
|
|
@@ -53,8 +58,7 @@ class AddRolePayload(BaseModel):
|
|
|
53
58
|
|
|
54
59
|
def to_json(self) -> str:
|
|
55
60
|
"""Returns the JSON representation of the model using alias"""
|
|
56
|
-
|
|
57
|
-
return json.dumps(self.to_dict())
|
|
61
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
58
62
|
|
|
59
63
|
@classmethod
|
|
60
64
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
@@ -18,6 +18,7 @@ import pprint
|
|
|
18
18
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
21
22
|
from typing_extensions import Self
|
|
22
23
|
|
|
23
24
|
from stackit.authorization.models.zookie import Zookie
|
|
@@ -32,7 +33,8 @@ class DeleteRoleResponse(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["writtenAt"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class DeleteRoleResponse(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
@@ -20,6 +20,7 @@ from datetime import datetime
|
|
|
20
20
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
21
21
|
|
|
22
22
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
23
|
+
from pydantic_core import to_jsonable_python
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
25
26
|
|
|
@@ -49,7 +50,8 @@ class ErrorResponse(BaseModel):
|
|
|
49
50
|
return value
|
|
50
51
|
|
|
51
52
|
model_config = ConfigDict(
|
|
52
|
-
|
|
53
|
+
validate_by_name=True,
|
|
54
|
+
validate_by_alias=True,
|
|
53
55
|
validate_assignment=True,
|
|
54
56
|
protected_namespaces=(),
|
|
55
57
|
)
|
|
@@ -60,8 +62,7 @@ class ErrorResponse(BaseModel):
|
|
|
60
62
|
|
|
61
63
|
def to_json(self) -> str:
|
|
62
64
|
"""Returns the JSON representation of the model using alias"""
|
|
63
|
-
|
|
64
|
-
return json.dumps(self.to_dict())
|
|
65
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
65
66
|
|
|
66
67
|
@classmethod
|
|
67
68
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT Membership API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
The Membership API is used to manage memberships, roles and permissions of STACKIT resources, like projects, folders, organizations and other resources.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The version of the OpenAPI document: 2.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
@@ -19,6 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Annotated, Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -34,12 +35,16 @@ class ExistingPermission(BaseModel):
|
|
|
34
35
|
@field_validator("name")
|
|
35
36
|
def name_validate_regular_expression(cls, value):
|
|
36
37
|
"""Validates the regular expression"""
|
|
38
|
+
if not isinstance(value, str):
|
|
39
|
+
value = str(value)
|
|
40
|
+
|
|
37
41
|
if not re.match(r"^[a-z](?:[-.]?[a-z]){1,63}$", value):
|
|
38
42
|
raise ValueError(r"must validate the regular expression /^[a-z](?:[-.]?[a-z]){1,63}$/")
|
|
39
43
|
return value
|
|
40
44
|
|
|
41
45
|
model_config = ConfigDict(
|
|
42
|
-
|
|
46
|
+
validate_by_name=True,
|
|
47
|
+
validate_by_alias=True,
|
|
43
48
|
validate_assignment=True,
|
|
44
49
|
protected_namespaces=(),
|
|
45
50
|
)
|
|
@@ -50,8 +55,7 @@ class ExistingPermission(BaseModel):
|
|
|
50
55
|
|
|
51
56
|
def to_json(self) -> str:
|
|
52
57
|
"""Returns the JSON representation of the model using alias"""
|
|
53
|
-
|
|
54
|
-
return json.dumps(self.to_dict())
|
|
58
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
55
59
|
|
|
56
60
|
@classmethod
|
|
57
61
|
def from_json(cls, json_str: str) -> Optional[Self]:
|