hyperstack 1.46.2a0__py3-none-any.whl → 1.47.0a0__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 (28) hide show
  1. hyperstack/__init__.py +18 -1
  2. hyperstack/api/__init__.py +4 -0
  3. hyperstack/api/access_keys_api.py +885 -0
  4. hyperstack/api/api_key_api.py +1 -0
  5. hyperstack/api/buckets_api.py +865 -0
  6. hyperstack/api/health_api.py +282 -0
  7. hyperstack/api/partner_config_api.py +2 -0
  8. hyperstack/api/regions_api.py +282 -0
  9. hyperstack/api_client.py +1 -1
  10. hyperstack/configuration.py +1 -1
  11. hyperstack/models/__init__.py +13 -0
  12. hyperstack/models/object_storage_access_key_create_request.py +90 -0
  13. hyperstack/models/object_storage_access_key_create_response.py +101 -0
  14. hyperstack/models/object_storage_access_key_list_response.py +101 -0
  15. hyperstack/models/object_storage_access_key_response.py +99 -0
  16. hyperstack/models/object_storage_bucket_list_response.py +97 -0
  17. hyperstack/models/object_storage_bucket_response.py +101 -0
  18. hyperstack/models/object_storage_delete_response.py +87 -0
  19. hyperstack/models/object_storage_error_response.py +91 -0
  20. hyperstack/models/object_storage_health_response.py +87 -0
  21. hyperstack/models/object_storage_pagination_meta.py +91 -0
  22. hyperstack/models/object_storage_region_list_response.py +95 -0
  23. hyperstack/models/object_storage_region_response.py +87 -0
  24. hyperstack/models/object_storage_regions_enum.py +36 -0
  25. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/METADATA +1 -1
  26. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/RECORD +28 -11
  27. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/WHEEL +0 -0
  28. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from ..models.object_storage_regions_enum import ObjectStorageRegionsEnum
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ObjectStorageAccessKeyCreateRequest(BaseModel):
27
+ """
28
+ ObjectStorageAccessKeyCreateRequest
29
+ """ # noqa: E501
30
+ description: Optional[Dict[str, Any]] = None
31
+ region: ObjectStorageRegionsEnum
32
+ __properties: ClassVar[List[str]] = ["description", "region"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
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 ObjectStorageAccessKeyCreateRequest 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
+
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 ObjectStorageAccessKeyCreateRequest 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({
85
+ "description": obj.get("description"),
86
+ "region": obj.get("region")
87
+ })
88
+ return _obj
89
+
90
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from ..models.object_storage_regions_enum import ObjectStorageRegionsEnum
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ObjectStorageAccessKeyCreateResponse(BaseModel):
28
+ """
29
+ ObjectStorageAccessKeyCreateResponse
30
+ """ # noqa: E501
31
+ access_key: StrictStr
32
+ created_at: datetime
33
+ description: Optional[Dict[str, Any]] = None
34
+ id: StrictInt
35
+ region: ObjectStorageRegionsEnum
36
+ secret_key: StrictStr
37
+ user_id: StrictInt
38
+ __properties: ClassVar[List[str]] = ["access_key", "created_at", "description", "id", "region", "secret_key", "user_id"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
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 ObjectStorageAccessKeyCreateResponse 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
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of ObjectStorageAccessKeyCreateResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "access_key": obj.get("access_key"),
92
+ "created_at": obj.get("created_at"),
93
+ "description": obj.get("description"),
94
+ "id": obj.get("id"),
95
+ "region": obj.get("region"),
96
+ "secret_key": obj.get("secret_key"),
97
+ "user_id": obj.get("user_id")
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List
22
+ from ..models.object_storage_access_key_response import ObjectStorageAccessKeyResponse
23
+ from ..models.object_storage_pagination_meta import ObjectStoragePaginationMeta
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ObjectStorageAccessKeyListResponse(BaseModel):
28
+ """
29
+ ObjectStorageAccessKeyListResponse
30
+ """ # noqa: E501
31
+ access_keys: List[ObjectStorageAccessKeyResponse]
32
+ meta: ObjectStoragePaginationMeta
33
+ __properties: ClassVar[List[str]] = ["access_keys", "meta"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
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 ObjectStorageAccessKeyListResponse 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
+
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 each item in access_keys (list)
75
+ _items = []
76
+ if self.access_keys:
77
+ for _item_access_keys in self.access_keys:
78
+ if _item_access_keys:
79
+ _items.append(_item_access_keys.to_dict())
80
+ _dict['access_keys'] = _items
81
+ # override the default output from pydantic by calling `to_dict()` of meta
82
+ if self.meta:
83
+ _dict['meta'] = self.meta.to_dict()
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of ObjectStorageAccessKeyListResponse 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
+ "access_keys": [ObjectStorageAccessKeyResponse.from_dict(_item) for _item in obj["access_keys"]] if obj.get("access_keys") is not None else None,
97
+ "meta": ObjectStoragePaginationMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from ..models.object_storage_regions_enum import ObjectStorageRegionsEnum
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ObjectStorageAccessKeyResponse(BaseModel):
28
+ """
29
+ ObjectStorageAccessKeyResponse
30
+ """ # noqa: E501
31
+ access_key: StrictStr
32
+ created_at: datetime
33
+ description: Optional[Dict[str, Any]] = None
34
+ id: StrictInt
35
+ region: ObjectStorageRegionsEnum
36
+ user_id: StrictInt
37
+ __properties: ClassVar[List[str]] = ["access_key", "created_at", "description", "id", "region", "user_id"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of ObjectStorageAccessKeyResponse from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
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 ObjectStorageAccessKeyResponse 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
+ "access_key": obj.get("access_key"),
91
+ "created_at": obj.get("created_at"),
92
+ "description": obj.get("description"),
93
+ "id": obj.get("id"),
94
+ "region": obj.get("region"),
95
+ "user_id": obj.get("user_id")
96
+ })
97
+ return _obj
98
+
99
+
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from ..models.object_storage_bucket_response import ObjectStorageBucketResponse
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ObjectStorageBucketListResponse(BaseModel):
27
+ """
28
+ ObjectStorageBucketListResponse
29
+ """ # noqa: E501
30
+ buckets: List[ObjectStorageBucketResponse]
31
+ failed_regions: Optional[List[StrictStr]] = None
32
+ __properties: ClassVar[List[str]] = ["buckets", "failed_regions"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
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 ObjectStorageBucketListResponse 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
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ # override the default output from pydantic by calling `to_dict()` of each item in buckets (list)
74
+ _items = []
75
+ if self.buckets:
76
+ for _item_buckets in self.buckets:
77
+ if _item_buckets:
78
+ _items.append(_item_buckets.to_dict())
79
+ _dict['buckets'] = _items
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of ObjectStorageBucketListResponse 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
+ "buckets": [ObjectStorageBucketResponse.from_dict(_item) for _item in obj["buckets"]] if obj.get("buckets") is not None else None,
93
+ "failed_regions": obj.get("failed_regions")
94
+ })
95
+ return _obj
96
+
97
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from ..models.object_storage_regions_enum import ObjectStorageRegionsEnum
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ObjectStorageBucketResponse(BaseModel):
28
+ """
29
+ ObjectStorageBucketResponse
30
+ """ # noqa: E501
31
+ created_at: datetime
32
+ endpoint: StrictStr
33
+ name: StrictStr
34
+ num_objects: StrictInt = Field(description="Number of objects")
35
+ region: ObjectStorageRegionsEnum
36
+ size_bytes: StrictInt = Field(description="Accumulated size in bytes")
37
+ size_bytes_actual: StrictInt = Field(description="Size utilized in bytes")
38
+ __properties: ClassVar[List[str]] = ["created_at", "endpoint", "name", "num_objects", "region", "size_bytes", "size_bytes_actual"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
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 ObjectStorageBucketResponse 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
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of ObjectStorageBucketResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "created_at": obj.get("created_at"),
92
+ "endpoint": obj.get("endpoint"),
93
+ "name": obj.get("name"),
94
+ "num_objects": obj.get("num_objects"),
95
+ "region": obj.get("region"),
96
+ "size_bytes": obj.get("size_bytes"),
97
+ "size_bytes_actual": obj.get("size_bytes_actual")
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ObjectStorageDeleteResponse(BaseModel):
26
+ """
27
+ ObjectStorageDeleteResponse
28
+ """ # noqa: E501
29
+ message: StrictStr
30
+ __properties: ClassVar[List[str]] = ["message"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
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 ObjectStorageDeleteResponse 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
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of ObjectStorageDeleteResponse from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "message": obj.get("message")
84
+ })
85
+ return _obj
86
+
87
+