stackit-scf 0.1.0__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.
Files changed (52) hide show
  1. stackit/scf/__init__.py +158 -0
  2. stackit/scf/api/__init__.py +4 -0
  3. stackit/scf/api/default_api.py +6710 -0
  4. stackit/scf/api_client.py +640 -0
  5. stackit/scf/api_response.py +23 -0
  6. stackit/scf/configuration.py +164 -0
  7. stackit/scf/exceptions.py +218 -0
  8. stackit/scf/models/__init__.py +56 -0
  9. stackit/scf/models/apply_organization_quota_payload.py +82 -0
  10. stackit/scf/models/create_org_role_payload.py +88 -0
  11. stackit/scf/models/create_organization_payload.py +83 -0
  12. stackit/scf/models/create_space_payload.py +82 -0
  13. stackit/scf/models/create_space_role_payload.py +88 -0
  14. stackit/scf/models/error_response.py +83 -0
  15. stackit/scf/models/org_manager.py +107 -0
  16. stackit/scf/models/org_manager_delete_response.py +90 -0
  17. stackit/scf/models/org_manager_response.py +113 -0
  18. stackit/scf/models/org_role_create_bff_request.py +84 -0
  19. stackit/scf/models/org_role_response.py +98 -0
  20. stackit/scf/models/org_role_type.py +39 -0
  21. stackit/scf/models/organization.py +118 -0
  22. stackit/scf/models/organization_create_response.py +92 -0
  23. stackit/scf/models/organization_delete_response.py +92 -0
  24. stackit/scf/models/organization_quota.py +94 -0
  25. stackit/scf/models/organization_usage_summary.py +101 -0
  26. stackit/scf/models/organizations_list.py +105 -0
  27. stackit/scf/models/organizations_list_item.py +118 -0
  28. stackit/scf/models/pagination.py +83 -0
  29. stackit/scf/models/platform_list.py +105 -0
  30. stackit/scf/models/platforms.py +96 -0
  31. stackit/scf/models/quota.py +139 -0
  32. stackit/scf/models/quota_apps.py +138 -0
  33. stackit/scf/models/quota_domains.py +89 -0
  34. stackit/scf/models/quota_routes.py +99 -0
  35. stackit/scf/models/quota_services.py +104 -0
  36. stackit/scf/models/space.py +110 -0
  37. stackit/scf/models/space_delete_response.py +90 -0
  38. stackit/scf/models/space_role_create_bff_request.py +84 -0
  39. stackit/scf/models/space_role_create_bff_response.py +99 -0
  40. stackit/scf/models/space_role_create_response.py +100 -0
  41. stackit/scf/models/space_role_type.py +39 -0
  42. stackit/scf/models/spaces_list.py +103 -0
  43. stackit/scf/models/update_organization_payload.py +85 -0
  44. stackit/scf/models/update_space_payload.py +82 -0
  45. stackit/scf/models/usage_summary.py +109 -0
  46. stackit/scf/py.typed +0 -0
  47. stackit/scf/rest.py +149 -0
  48. stackit_scf-0.1.0.dist-info/LICENSE.md +201 -0
  49. stackit_scf-0.1.0.dist-info/METADATA +46 -0
  50. stackit_scf-0.1.0.dist-info/NOTICE.txt +2 -0
  51. stackit_scf-0.1.0.dist-info/RECORD +52 -0
  52. stackit_scf-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,84 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Cloud Foundry API
5
+
6
+ API endpoints for managing STACKIT Cloud Foundry
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing_extensions import Self
23
+
24
+ from stackit.scf.models.space_role_type import SpaceRoleType
25
+
26
+
27
+ class SpaceRoleCreateBffRequest(BaseModel):
28
+ """
29
+ SpaceRoleCreateBffRequest
30
+ """ # noqa: E501
31
+
32
+ type: SpaceRoleType
33
+ __properties: ClassVar[List[str]] = ["type"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of SpaceRoleCreateBffRequest from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of SpaceRoleCreateBffRequest from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({"type": obj.get("type")})
84
+ return _obj
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Cloud Foundry API
5
+
6
+ API endpoints for managing STACKIT Cloud Foundry
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field
22
+ from typing_extensions import Self
23
+
24
+ from stackit.scf.models.org_role_response import OrgRoleResponse
25
+ from stackit.scf.models.space_role_create_response import SpaceRoleCreateResponse
26
+
27
+
28
+ class SpaceRoleCreateBffResponse(BaseModel):
29
+ """
30
+ SpaceRoleCreateBffResponse
31
+ """ # noqa: E501
32
+
33
+ org_role: Optional[OrgRoleResponse] = Field(default=None, alias="orgRole")
34
+ space_role: SpaceRoleCreateResponse = Field(alias="spaceRole")
35
+ __properties: ClassVar[List[str]] = ["orgRole", "spaceRole"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of SpaceRoleCreateBffResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of org_role
75
+ if self.org_role:
76
+ _dict["orgRole"] = self.org_role.to_dict()
77
+ # override the default output from pydantic by calling `to_dict()` of space_role
78
+ if self.space_role:
79
+ _dict["spaceRole"] = self.space_role.to_dict()
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of SpaceRoleCreateBffResponse from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate(
92
+ {
93
+ "orgRole": OrgRoleResponse.from_dict(obj["orgRole"]) if obj.get("orgRole") is not None else None,
94
+ "spaceRole": (
95
+ SpaceRoleCreateResponse.from_dict(obj["spaceRole"]) if obj.get("spaceRole") is not None else None
96
+ ),
97
+ }
98
+ )
99
+ return _obj
@@ -0,0 +1,100 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Cloud Foundry API
5
+
6
+ API endpoints for managing STACKIT Cloud Foundry
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing_extensions import Self
23
+
24
+ from stackit.scf.models.space_role_type import SpaceRoleType
25
+
26
+
27
+ class SpaceRoleCreateResponse(BaseModel):
28
+ """
29
+ SpaceRoleCreateResponse
30
+ """ # noqa: E501
31
+
32
+ guid: StrictStr
33
+ org_id: StrictStr = Field(alias="orgId")
34
+ platform_id: StrictStr = Field(alias="platformId")
35
+ project_id: StrictStr = Field(alias="projectId")
36
+ region: StrictStr
37
+ space_id: StrictStr = Field(alias="spaceId")
38
+ type: SpaceRoleType
39
+ __properties: ClassVar[List[str]] = ["guid", "orgId", "platformId", "projectId", "region", "spaceId", "type"]
40
+
41
+ model_config = ConfigDict(
42
+ populate_by_name=True,
43
+ validate_assignment=True,
44
+ protected_namespaces=(),
45
+ )
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of SpaceRoleCreateResponse from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ """
71
+ excluded_fields: Set[str] = set([])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of SpaceRoleCreateResponse from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate(
90
+ {
91
+ "guid": obj.get("guid"),
92
+ "orgId": obj.get("orgId"),
93
+ "platformId": obj.get("platformId"),
94
+ "projectId": obj.get("projectId"),
95
+ "region": obj.get("region"),
96
+ "spaceId": obj.get("spaceId"),
97
+ "type": obj.get("type"),
98
+ }
99
+ )
100
+ return _obj
@@ -0,0 +1,39 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Cloud Foundry API
5
+
6
+ API endpoints for managing STACKIT Cloud Foundry
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class SpaceRoleType(str, Enum):
24
+ """
25
+ SpaceRoleType
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ SPACE_AUDITOR = "space_auditor"
32
+ SPACE_DEVELOPER = "space_developer"
33
+ SPACE_MANAGER = "space_manager"
34
+ SPACE_SUPPORTER = "space_supporter"
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> Self:
38
+ """Create an instance of SpaceRoleType from a JSON string"""
39
+ return cls(json.loads(json_str))
@@ -0,0 +1,103 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Cloud Foundry API
5
+
6
+ API endpoints for managing STACKIT Cloud Foundry
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing_extensions import Self
23
+
24
+ from stackit.scf.models.pagination import Pagination
25
+ from stackit.scf.models.space import Space
26
+
27
+
28
+ class SpacesList(BaseModel):
29
+ """
30
+ SpacesList
31
+ """ # noqa: E501
32
+
33
+ pagination: Pagination
34
+ resources: List[Space]
35
+ __properties: ClassVar[List[str]] = ["pagination", "resources"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of SpacesList from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of pagination
75
+ if self.pagination:
76
+ _dict["pagination"] = self.pagination.to_dict()
77
+ # override the default output from pydantic by calling `to_dict()` of each item in resources (list)
78
+ _items = []
79
+ if self.resources:
80
+ for _item in self.resources:
81
+ if _item:
82
+ _items.append(_item.to_dict())
83
+ _dict["resources"] = _items
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of SpacesList from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate(
96
+ {
97
+ "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
98
+ "resources": (
99
+ [Space.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None
100
+ ),
101
+ }
102
+ )
103
+ return _obj
@@ -0,0 +1,85 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Cloud Foundry API
5
+
6
+ API endpoints for managing STACKIT Cloud Foundry
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool
22
+ from typing_extensions import Annotated, Self
23
+
24
+
25
+ class UpdateOrganizationPayload(BaseModel):
26
+ """
27
+ UpdateOrganizationPayload
28
+ """ # noqa: E501
29
+
30
+ name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(
31
+ default=None, description="Name of the organization"
32
+ )
33
+ suspended: Optional[StrictBool] = None
34
+ __properties: ClassVar[List[str]] = ["name", "suspended"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of UpdateOrganizationPayload from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of UpdateOrganizationPayload from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({"name": obj.get("name"), "suspended": obj.get("suspended")})
85
+ return _obj
@@ -0,0 +1,82 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Cloud Foundry API
5
+
6
+ API endpoints for managing STACKIT Cloud Foundry
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field
22
+ from typing_extensions import Annotated, Self
23
+
24
+
25
+ class UpdateSpacePayload(BaseModel):
26
+ """
27
+ UpdateSpacePayload
28
+ """ # noqa: E501
29
+
30
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Name of the space")
31
+ __properties: ClassVar[List[str]] = ["name"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of UpdateSpacePayload from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([])
64
+
65
+ _dict = self.model_dump(
66
+ by_alias=True,
67
+ exclude=excluded_fields,
68
+ exclude_none=True,
69
+ )
70
+ return _dict
71
+
72
+ @classmethod
73
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
74
+ """Create an instance of UpdateSpacePayload from a dict"""
75
+ if obj is None:
76
+ return None
77
+
78
+ if not isinstance(obj, dict):
79
+ return cls.model_validate(obj)
80
+
81
+ _obj = cls.model_validate({"name": obj.get("name")})
82
+ return _obj