baiducloud-python-sdk-bcc 0.0.1__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 (49) hide show
  1. baiducloud_python_sdk_bcc/__init__.py +5 -0
  2. baiducloud_python_sdk_bcc/api/__init__.py +0 -0
  3. baiducloud_python_sdk_bcc/api/bcc_client.py +554 -0
  4. baiducloud_python_sdk_bcc/models/__init__.py +44 -0
  5. baiducloud_python_sdk_bcc/models/attach_volume_request.py +82 -0
  6. baiducloud_python_sdk_bcc/models/attach_volume_response.py +70 -0
  7. baiducloud_python_sdk_bcc/models/auto_snapshot_policy_info.py +98 -0
  8. baiducloud_python_sdk_bcc/models/auto_snapshot_policy_model.py +151 -0
  9. baiducloud_python_sdk_bcc/models/billing.py +68 -0
  10. baiducloud_python_sdk_bcc/models/bind_tag_volume_request.py +67 -0
  11. baiducloud_python_sdk_bcc/models/cds_prices.py +90 -0
  12. baiducloud_python_sdk_bcc/models/create_volume_request.py +264 -0
  13. baiducloud_python_sdk_bcc/models/create_volume_response.py +77 -0
  14. baiducloud_python_sdk_bcc/models/detach_volume_request.py +66 -0
  15. baiducloud_python_sdk_bcc/models/disk_info.py +74 -0
  16. baiducloud_python_sdk_bcc/models/get_cds_price_request.py +117 -0
  17. baiducloud_python_sdk_bcc/models/get_cds_price_response.py +62 -0
  18. baiducloud_python_sdk_bcc/models/get_disk_quota_request.py +58 -0
  19. baiducloud_python_sdk_bcc/models/get_disk_quota_response.py +78 -0
  20. baiducloud_python_sdk_bcc/models/get_volume_request.py +58 -0
  21. baiducloud_python_sdk_bcc/models/get_volume_resize_progress_request.py +58 -0
  22. baiducloud_python_sdk_bcc/models/get_volume_resize_progress_response.py +61 -0
  23. baiducloud_python_sdk_bcc/models/get_volume_response.py +62 -0
  24. baiducloud_python_sdk_bcc/models/group_info.py +66 -0
  25. baiducloud_python_sdk_bcc/models/list_volumes_request.py +117 -0
  26. baiducloud_python_sdk_bcc/models/list_volumes_response.py +94 -0
  27. baiducloud_python_sdk_bcc/models/modify_cds_attribute_request.py +90 -0
  28. baiducloud_python_sdk_bcc/models/modify_volume_charge_type_request.py +75 -0
  29. baiducloud_python_sdk_bcc/models/purchase_reserved_volume_request.py +75 -0
  30. baiducloud_python_sdk_bcc/models/purchase_reserved_volume_response.py +61 -0
  31. baiducloud_python_sdk_bcc/models/release_volume_request.py +90 -0
  32. baiducloud_python_sdk_bcc/models/rename_volume_request.py +66 -0
  33. baiducloud_python_sdk_bcc/models/reservation.py +66 -0
  34. baiducloud_python_sdk_bcc/models/resize_volume_request.py +82 -0
  35. baiducloud_python_sdk_bcc/models/resize_volume_response.py +61 -0
  36. baiducloud_python_sdk_bcc/models/rollback_volume_request.py +66 -0
  37. baiducloud_python_sdk_bcc/models/storage_type.py +53 -0
  38. baiducloud_python_sdk_bcc/models/tag_model.py +66 -0
  39. baiducloud_python_sdk_bcc/models/unbind_tag_volume_request.py +67 -0
  40. baiducloud_python_sdk_bcc/models/volume_attachment_model.py +82 -0
  41. baiducloud_python_sdk_bcc/models/volume_model.py +417 -0
  42. baiducloud_python_sdk_bcc/models/volume_multi_attach_info.py +82 -0
  43. baiducloud_python_sdk_bcc/models/volume_status.py +45 -0
  44. baiducloud_python_sdk_bcc/models/volume_type.py +20 -0
  45. baiducloud_python_sdk_bcc-0.0.1.dist-info/LICENSE +177 -0
  46. baiducloud_python_sdk_bcc-0.0.1.dist-info/METADATA +76 -0
  47. baiducloud_python_sdk_bcc-0.0.1.dist-info/RECORD +49 -0
  48. baiducloud_python_sdk_bcc-0.0.1.dist-info/WHEEL +5 -0
  49. baiducloud_python_sdk_bcc-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for GetDiskQuotaRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetDiskQuotaRequest(AbstractModel):
9
+ """
10
+ Request entity for GetDiskQuotaRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, zone_name):
16
+ """
17
+ Initialize GetDiskQuotaRequest request entity.
18
+
19
+ :param zone_name: zone_name parameter
20
+ :type zone_name: str (required)
21
+ """
22
+ super().__init__()
23
+ self.zone_name = zone_name
24
+
25
+ def to_dict(self):
26
+ """
27
+ Convert the request entity to a dictionary representation.
28
+
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the request
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the request entity from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing request data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: GetDiskQuotaRequest
51
+
52
+ :raises TypeError: If input is not a dictionary or field type mismatch
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('zoneName') is not None:
57
+ self.zone_name = m.get('zoneName')
58
+ return self
@@ -0,0 +1,78 @@
1
+ """
2
+ Request entity for GetDiskQuotaResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_bcc.models.disk_info import DiskInfo
7
+
8
+
9
+ class GetDiskQuotaResponse(BceResponse):
10
+ """
11
+ GetDiskQuotaResponse
12
+ """
13
+
14
+ def __init__(self, cds_total_capacity_gb=None, cds_used_capacity_gb=None, disk_infos=None):
15
+ """
16
+ Initialize GetDiskQuotaResponse response.
17
+
18
+ :param cds_total_capacity_gb: 磁盘总容量上限(GB)
19
+ :type cds_total_capacity_gb: str (optional)
20
+
21
+ :param cds_used_capacity_gb: 磁盘已使用总容量(GB)
22
+ :type cds_used_capacity_gb: str (optional)
23
+
24
+ :param disk_infos: 可用区可创建的磁盘信息
25
+ :type disk_infos: List[DiskInfo] (optional)
26
+ """
27
+ super().__init__()
28
+ self.cds_total_capacity_gb = cds_total_capacity_gb
29
+ self.cds_used_capacity_gb = cds_used_capacity_gb
30
+ self.disk_infos = disk_infos
31
+
32
+ def to_dict(self):
33
+ """
34
+ Convert the response instance to a dictionary representation.
35
+
36
+ Includes metadata from the parent BceResponse class.
37
+ Nested model objects are recursively converted to dictionaries.
38
+
39
+ :return: Dictionary representation of the response
40
+ :rtype: dict
41
+ """
42
+ _map = super().to_dict()
43
+ if _map is not None:
44
+ return _map
45
+ result = dict()
46
+ if self.metadata is not None:
47
+ result['metadata'] = dict(self.metadata)
48
+ if self.cds_total_capacity_gb is not None:
49
+ result['cdsTotalCapacityGB'] = self.cds_total_capacity_gb
50
+ if self.cds_used_capacity_gb is not None:
51
+ result['cdsUsedCapacityGB'] = self.cds_used_capacity_gb
52
+ if self.disk_infos is not None:
53
+ result['diskInfos'] = [i.to_dict() for i in self.disk_infos]
54
+ return result
55
+
56
+ def from_dict(self, m):
57
+ """
58
+ Populate the response instance from a dictionary.
59
+
60
+ Nested dictionaries are recursively converted to model objects.
61
+
62
+ :param m: Dictionary containing response data
63
+ :type m: dict
64
+
65
+ :return: Self reference for method chaining
66
+ :rtype: GetDiskQuotaResponse
67
+
68
+ :raises TypeError: If input is not a dictionary or field type mismatch
69
+ :raises ValueError: If nested model conversion fails
70
+ """
71
+ m = m or dict()
72
+ if m.get('cdsTotalCapacityGB') is not None:
73
+ self.cds_total_capacity_gb = m.get('cdsTotalCapacityGB')
74
+ if m.get('cdsUsedCapacityGB') is not None:
75
+ self.cds_used_capacity_gb = m.get('cdsUsedCapacityGB')
76
+ if m.get('diskInfos') is not None:
77
+ self.disk_infos = [DiskInfo().from_dict(i) for i in m.get('diskInfos')]
78
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for GetVolumeRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetVolumeRequest(AbstractModel):
9
+ """
10
+ Request entity for GetVolumeRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, volume_id):
16
+ """
17
+ Initialize GetVolumeRequest request entity.
18
+
19
+ :param volume_id: volume_id parameter
20
+ :type volume_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.volume_id = volume_id
24
+
25
+ def to_dict(self):
26
+ """
27
+ Convert the request entity to a dictionary representation.
28
+
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the request
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the request entity from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing request data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: GetVolumeRequest
51
+
52
+ :raises TypeError: If input is not a dictionary or field type mismatch
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('volumeId') is not None:
57
+ self.volume_id = m.get('volumeId')
58
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for GetVolumeResizeProgressRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetVolumeResizeProgressRequest(AbstractModel):
9
+ """
10
+ Request entity for GetVolumeResizeProgressRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, volume_id):
16
+ """
17
+ Initialize GetVolumeResizeProgressRequest request entity.
18
+
19
+ :param volume_id: volume_id parameter
20
+ :type volume_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.volume_id = volume_id
24
+
25
+ def to_dict(self):
26
+ """
27
+ Convert the request entity to a dictionary representation.
28
+
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the request
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the request entity from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing request data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: GetVolumeResizeProgressRequest
51
+
52
+ :raises TypeError: If input is not a dictionary or field type mismatch
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('volumeId') is not None:
57
+ self.volume_id = m.get('volumeId')
58
+ return self
@@ -0,0 +1,61 @@
1
+ """
2
+ Request entity for GetVolumeResizeProgressResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class GetVolumeResizeProgressResponse(BceResponse):
9
+ """
10
+ GetVolumeResizeProgressResponse
11
+ """
12
+
13
+ def __init__(self, progress=None):
14
+ """
15
+ Initialize GetVolumeResizeProgressResponse response.
16
+
17
+ :param progress: 磁盘变配进度
18
+ :type progress: int (optional)
19
+ """
20
+ super().__init__()
21
+ self.progress = progress
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the response instance to a dictionary representation.
26
+
27
+ Includes metadata from the parent BceResponse class.
28
+ Nested model objects are recursively converted to dictionaries.
29
+
30
+ :return: Dictionary representation of the response
31
+ :rtype: dict
32
+ """
33
+ _map = super().to_dict()
34
+ if _map is not None:
35
+ return _map
36
+ result = dict()
37
+ if self.metadata is not None:
38
+ result['metadata'] = dict(self.metadata)
39
+ if self.progress is not None:
40
+ result['progress'] = self.progress
41
+ return result
42
+
43
+ def from_dict(self, m):
44
+ """
45
+ Populate the response instance from a dictionary.
46
+
47
+ Nested dictionaries are recursively converted to model objects.
48
+
49
+ :param m: Dictionary containing response data
50
+ :type m: dict
51
+
52
+ :return: Self reference for method chaining
53
+ :rtype: GetVolumeResizeProgressResponse
54
+
55
+ :raises TypeError: If input is not a dictionary or field type mismatch
56
+ :raises ValueError: If nested model conversion fails
57
+ """
58
+ m = m or dict()
59
+ if m.get('progress') is not None:
60
+ self.progress = m.get('progress')
61
+ return self
@@ -0,0 +1,62 @@
1
+ """
2
+ Request entity for GetVolumeResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_bcc.models.volume_model import VolumeModel
7
+
8
+
9
+ class GetVolumeResponse(BceResponse):
10
+ """
11
+ GetVolumeResponse
12
+ """
13
+
14
+ def __init__(self, volume=None):
15
+ """
16
+ Initialize GetVolumeResponse response.
17
+
18
+ :param volume: volume field
19
+ :type volume: VolumeModel (optional)
20
+ """
21
+ super().__init__()
22
+ self.volume = volume
23
+
24
+ def to_dict(self):
25
+ """
26
+ Convert the response instance to a dictionary representation.
27
+
28
+ Includes metadata from the parent BceResponse class.
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the response
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ if self.metadata is not None:
39
+ result['metadata'] = dict(self.metadata)
40
+ if self.volume is not None:
41
+ result['volume'] = self.volume.to_dict()
42
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the response instance from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing response data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: GetVolumeResponse
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('volume') is not None:
61
+ self.volume = VolumeModel().from_dict(m.get('volume'))
62
+ return self
@@ -0,0 +1,66 @@
1
+ """
2
+ GroupInfo information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GroupInfo(AbstractModel):
9
+ """
10
+ GroupInfo
11
+ """
12
+
13
+ def __init__(self, group_id=None, group_name=None):
14
+ """
15
+ Initialize GroupInfo instance.
16
+
17
+ :param group_id: 资源组id
18
+ :type group_id: str (optional)
19
+
20
+ :param group_name: 资源组名称
21
+ :type group_name: str (optional)
22
+ """
23
+ super().__init__()
24
+ self.group_id = group_id
25
+ self.group_name = group_name
26
+
27
+ def to_dict(self):
28
+ """
29
+ Convert the model instance to a dictionary representation.
30
+
31
+ Nested model objects are recursively converted to dictionaries.
32
+
33
+ :return: Dictionary representation of the model
34
+ :rtype: dict
35
+ """
36
+ _map = super().to_dict()
37
+ if _map is not None:
38
+ return _map
39
+ result = dict()
40
+ if self.group_id is not None:
41
+ result['groupId'] = self.group_id
42
+ if self.group_name is not None:
43
+ result['groupName'] = self.group_name
44
+ return result
45
+
46
+ def from_dict(self, m):
47
+ """
48
+ Populate the model instance from a dictionary.
49
+
50
+ Nested dictionaries are recursively converted to model objects.
51
+
52
+ :param m: Dictionary containing model data
53
+ :type m: dict
54
+
55
+ :return: Self reference for method chaining
56
+ :rtype: GroupInfo
57
+
58
+ :raises TypeError: If input is not a dictionary type
59
+ :raises ValueError: If nested model conversion fails
60
+ """
61
+ m = m or dict()
62
+ if m.get('groupId') is not None:
63
+ self.group_id = m.get('groupId')
64
+ if m.get('groupName') is not None:
65
+ self.group_name = m.get('groupName')
66
+ return self
@@ -0,0 +1,117 @@
1
+ """
2
+ Request entity for ListVolumesRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class ListVolumesRequest(AbstractModel):
9
+ """
10
+ Request entity for ListVolumesRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(
16
+ self,
17
+ marker=None,
18
+ max_keys=None,
19
+ instance_id=None,
20
+ zone_name=None,
21
+ cluster_id=None,
22
+ charge_filter=None,
23
+ usage_filter=None,
24
+ name=None,
25
+ product_category=None,
26
+ ):
27
+ """
28
+ Initialize ListVolumesRequest request entity.
29
+
30
+ :param marker: marker parameter
31
+ :type marker: str (optional)
32
+
33
+ :param max_keys: max_keys parameter
34
+ :type max_keys: int (optional)
35
+
36
+ :param instance_id: instance_id parameter
37
+ :type instance_id: str (optional)
38
+
39
+ :param zone_name: zone_name parameter
40
+ :type zone_name: str (optional)
41
+
42
+ :param cluster_id: cluster_id parameter
43
+ :type cluster_id: str (optional)
44
+
45
+ :param charge_filter: charge_filter parameter
46
+ :type charge_filter: str (optional)
47
+
48
+ :param usage_filter: usage_filter parameter
49
+ :type usage_filter: str (optional)
50
+
51
+ :param name: name parameter
52
+ :type name: str (optional)
53
+
54
+ :param product_category: product_category parameter
55
+ :type product_category: str (optional)
56
+ """
57
+ super().__init__()
58
+ self.marker = marker
59
+ self.max_keys = max_keys
60
+ self.instance_id = instance_id
61
+ self.zone_name = zone_name
62
+ self.cluster_id = cluster_id
63
+ self.charge_filter = charge_filter
64
+ self.usage_filter = usage_filter
65
+ self.name = name
66
+ self.product_category = product_category
67
+
68
+ def to_dict(self):
69
+ """
70
+ Convert the request entity to a dictionary representation.
71
+
72
+ Nested model objects are recursively converted to dictionaries.
73
+
74
+ :return: Dictionary representation of the request
75
+ :rtype: dict
76
+ """
77
+ _map = super().to_dict()
78
+ if _map is not None:
79
+ return _map
80
+ result = dict()
81
+ return result
82
+
83
+ def from_dict(self, m):
84
+ """
85
+ Populate the request entity from a dictionary.
86
+
87
+ Nested dictionaries are recursively converted to model objects.
88
+
89
+ :param m: Dictionary containing request data
90
+ :type m: dict
91
+
92
+ :return: Self reference for method chaining
93
+ :rtype: ListVolumesRequest
94
+
95
+ :raises TypeError: If input is not a dictionary or field type mismatch
96
+ :raises ValueError: If nested model conversion fails
97
+ """
98
+ m = m or dict()
99
+ if m.get('marker') is not None:
100
+ self.marker = m.get('marker')
101
+ if m.get('maxKeys') is not None:
102
+ self.max_keys = m.get('maxKeys')
103
+ if m.get('instanceId') is not None:
104
+ self.instance_id = m.get('instanceId')
105
+ if m.get('zoneName') is not None:
106
+ self.zone_name = m.get('zoneName')
107
+ if m.get('clusterId') is not None:
108
+ self.cluster_id = m.get('clusterId')
109
+ if m.get('chargeFilter') is not None:
110
+ self.charge_filter = m.get('chargeFilter')
111
+ if m.get('usageFilter') is not None:
112
+ self.usage_filter = m.get('usageFilter')
113
+ if m.get('name') is not None:
114
+ self.name = m.get('name')
115
+ if m.get('productCategory') is not None:
116
+ self.product_category = m.get('productCategory')
117
+ return self
@@ -0,0 +1,94 @@
1
+ """
2
+ Request entity for ListVolumesResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_bcc.models.volume_model import VolumeModel
7
+
8
+
9
+ class ListVolumesResponse(BceResponse):
10
+ """
11
+ ListVolumesResponse
12
+ """
13
+
14
+ def __init__(self, marker=None, is_truncated=None, next_marker=None, max_keys=None, volumes=None):
15
+ """
16
+ Initialize ListVolumesResponse response.
17
+
18
+ :param marker: 标记查询的起始位置
19
+ :type marker: str (optional)
20
+
21
+ :param is_truncated: true表示后面还有数据,false表示已经是最后一页。
22
+ :type is_truncated: bool (optional)
23
+
24
+ :param next_marker: 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现。
25
+ :type next_marker: str (optional)
26
+
27
+ :param max_keys: 每页包含的最大数量
28
+ :type max_keys: int (optional)
29
+
30
+ :param volumes: 返回的磁盘信息列表
31
+ :type volumes: List[VolumeModel] (optional)
32
+ """
33
+ super().__init__()
34
+ self.marker = marker
35
+ self.is_truncated = is_truncated
36
+ self.next_marker = next_marker
37
+ self.max_keys = max_keys
38
+ self.volumes = volumes
39
+
40
+ def to_dict(self):
41
+ """
42
+ Convert the response instance to a dictionary representation.
43
+
44
+ Includes metadata from the parent BceResponse class.
45
+ Nested model objects are recursively converted to dictionaries.
46
+
47
+ :return: Dictionary representation of the response
48
+ :rtype: dict
49
+ """
50
+ _map = super().to_dict()
51
+ if _map is not None:
52
+ return _map
53
+ result = dict()
54
+ if self.metadata is not None:
55
+ result['metadata'] = dict(self.metadata)
56
+ if self.marker is not None:
57
+ result['marker'] = self.marker
58
+ if self.is_truncated is not None:
59
+ result['isTruncated'] = self.is_truncated
60
+ if self.next_marker is not None:
61
+ result['nextMarker'] = self.next_marker
62
+ if self.max_keys is not None:
63
+ result['maxKeys'] = self.max_keys
64
+ if self.volumes is not None:
65
+ result['volumes'] = [i.to_dict() for i in self.volumes]
66
+ return result
67
+
68
+ def from_dict(self, m):
69
+ """
70
+ Populate the response instance from a dictionary.
71
+
72
+ Nested dictionaries are recursively converted to model objects.
73
+
74
+ :param m: Dictionary containing response data
75
+ :type m: dict
76
+
77
+ :return: Self reference for method chaining
78
+ :rtype: ListVolumesResponse
79
+
80
+ :raises TypeError: If input is not a dictionary or field type mismatch
81
+ :raises ValueError: If nested model conversion fails
82
+ """
83
+ m = m or dict()
84
+ if m.get('marker') is not None:
85
+ self.marker = m.get('marker')
86
+ if m.get('isTruncated') is not None:
87
+ self.is_truncated = m.get('isTruncated')
88
+ if m.get('nextMarker') is not None:
89
+ self.next_marker = m.get('nextMarker')
90
+ if m.get('maxKeys') is not None:
91
+ self.max_keys = m.get('maxKeys')
92
+ if m.get('volumes') is not None:
93
+ self.volumes = [VolumeModel().from_dict(i) for i in m.get('volumes')]
94
+ return self