huaweicloudsdkworkspace 3.1.75__py2.py3-none-any.whl → 3.1.77__py2.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.

Potentially problematic release.


This version of huaweicloudsdkworkspace might be problematic. Click here for more details.

Files changed (28) hide show
  1. huaweicloudsdkworkspace/v2/__init__.py +13 -0
  2. huaweicloudsdkworkspace/v2/model/__init__.py +13 -0
  3. huaweicloudsdkworkspace/v2/model/apply_dedicated_standby_network_param.py +173 -0
  4. huaweicloudsdkworkspace/v2/model/batch_delete_desktop_name_policy_req.py +115 -0
  5. huaweicloudsdkworkspace/v2/model/batch_delete_desktop_name_policy_request.py +111 -0
  6. huaweicloudsdkworkspace/v2/model/batch_delete_desktop_name_policy_response.py +85 -0
  7. huaweicloudsdkworkspace/v2/model/create_desktop_name_policy_req.py +255 -0
  8. huaweicloudsdkworkspace/v2/model/create_desktop_name_policy_request.py +111 -0
  9. huaweicloudsdkworkspace/v2/model/create_desktop_name_policy_response.py +116 -0
  10. huaweicloudsdkworkspace/v2/model/create_desktop_req.py +32 -3
  11. huaweicloudsdkworkspace/v2/model/create_user_group_response.py +61 -1
  12. huaweicloudsdkworkspace/v2/model/desktop_name_policy_info.py +318 -0
  13. huaweicloudsdkworkspace/v2/model/list_desktop_name_policy_request.py +231 -0
  14. huaweicloudsdkworkspace/v2/model/list_desktop_name_policy_response.py +145 -0
  15. huaweicloudsdkworkspace/v2/model/list_used_desktop_info_req.py +30 -1
  16. huaweicloudsdkworkspace/v2/model/list_workspaces_response.py +62 -4
  17. huaweicloudsdkworkspace/v2/model/modify_workspace_attributes_req.py +86 -3
  18. huaweicloudsdkworkspace/v2/model/tags_req.py +3 -3
  19. huaweicloudsdkworkspace/v2/model/update_desktop_name_policy_req.py +260 -0
  20. huaweicloudsdkworkspace/v2/model/update_desktop_name_policy_request.py +139 -0
  21. huaweicloudsdkworkspace/v2/model/update_desktop_name_policy_response.py +85 -0
  22. huaweicloudsdkworkspace/v2/workspace_async_client.py +270 -0
  23. huaweicloudsdkworkspace/v2/workspace_client.py +270 -0
  24. {huaweicloudsdkworkspace-3.1.75.dist-info → huaweicloudsdkworkspace-3.1.77.dist-info}/METADATA +2 -2
  25. {huaweicloudsdkworkspace-3.1.75.dist-info → huaweicloudsdkworkspace-3.1.77.dist-info}/RECORD +28 -15
  26. {huaweicloudsdkworkspace-3.1.75.dist-info → huaweicloudsdkworkspace-3.1.77.dist-info}/LICENSE +0 -0
  27. {huaweicloudsdkworkspace-3.1.75.dist-info → huaweicloudsdkworkspace-3.1.77.dist-info}/WHEEL +0 -0
  28. {huaweicloudsdkworkspace-3.1.75.dist-info → huaweicloudsdkworkspace-3.1.77.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,139 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class UpdateDesktopNamePolicyRequest:
9
+
10
+ """
11
+ Attributes:
12
+ openapi_types (dict): The key is attribute name
13
+ and the value is attribute type.
14
+ attribute_map (dict): The key is attribute name
15
+ and the value is json key in definition.
16
+ """
17
+ sensitive_list = []
18
+
19
+ openapi_types = {
20
+ 'policy_id': 'str',
21
+ 'body': 'UpdateDesktopNamePolicyReq'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'policy_id': 'policy_id',
26
+ 'body': 'body'
27
+ }
28
+
29
+ def __init__(self, policy_id=None, body=None):
30
+ """UpdateDesktopNamePolicyRequest
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param policy_id: 策略ID。
35
+ :type policy_id: str
36
+ :param body: Body of the UpdateDesktopNamePolicyRequest
37
+ :type body: :class:`huaweicloudsdkworkspace.v2.UpdateDesktopNamePolicyReq`
38
+ """
39
+
40
+
41
+
42
+ self._policy_id = None
43
+ self._body = None
44
+ self.discriminator = None
45
+
46
+ self.policy_id = policy_id
47
+ if body is not None:
48
+ self.body = body
49
+
50
+ @property
51
+ def policy_id(self):
52
+ """Gets the policy_id of this UpdateDesktopNamePolicyRequest.
53
+
54
+ 策略ID。
55
+
56
+ :return: The policy_id of this UpdateDesktopNamePolicyRequest.
57
+ :rtype: str
58
+ """
59
+ return self._policy_id
60
+
61
+ @policy_id.setter
62
+ def policy_id(self, policy_id):
63
+ """Sets the policy_id of this UpdateDesktopNamePolicyRequest.
64
+
65
+ 策略ID。
66
+
67
+ :param policy_id: The policy_id of this UpdateDesktopNamePolicyRequest.
68
+ :type policy_id: str
69
+ """
70
+ self._policy_id = policy_id
71
+
72
+ @property
73
+ def body(self):
74
+ """Gets the body of this UpdateDesktopNamePolicyRequest.
75
+
76
+ :return: The body of this UpdateDesktopNamePolicyRequest.
77
+ :rtype: :class:`huaweicloudsdkworkspace.v2.UpdateDesktopNamePolicyReq`
78
+ """
79
+ return self._body
80
+
81
+ @body.setter
82
+ def body(self, body):
83
+ """Sets the body of this UpdateDesktopNamePolicyRequest.
84
+
85
+ :param body: The body of this UpdateDesktopNamePolicyRequest.
86
+ :type body: :class:`huaweicloudsdkworkspace.v2.UpdateDesktopNamePolicyReq`
87
+ """
88
+ self._body = body
89
+
90
+ def to_dict(self):
91
+ """Returns the model properties as a dict"""
92
+ result = {}
93
+
94
+ for attr, _ in six.iteritems(self.openapi_types):
95
+ value = getattr(self, attr)
96
+ if isinstance(value, list):
97
+ result[attr] = list(map(
98
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
99
+ value
100
+ ))
101
+ elif hasattr(value, "to_dict"):
102
+ result[attr] = value.to_dict()
103
+ elif isinstance(value, dict):
104
+ result[attr] = dict(map(
105
+ lambda item: (item[0], item[1].to_dict())
106
+ if hasattr(item[1], "to_dict") else item,
107
+ value.items()
108
+ ))
109
+ else:
110
+ if attr in self.sensitive_list:
111
+ result[attr] = "****"
112
+ else:
113
+ result[attr] = value
114
+
115
+ return result
116
+
117
+ def to_str(self):
118
+ """Returns the string representation of the model"""
119
+ import simplejson as json
120
+ if six.PY2:
121
+ import sys
122
+ reload(sys)
123
+ sys.setdefaultencoding("utf-8")
124
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
125
+
126
+ def __repr__(self):
127
+ """For `print`"""
128
+ return self.to_str()
129
+
130
+ def __eq__(self, other):
131
+ """Returns true if both objects are equal"""
132
+ if not isinstance(other, UpdateDesktopNamePolicyRequest):
133
+ return False
134
+
135
+ return self.__dict__ == other.__dict__
136
+
137
+ def __ne__(self, other):
138
+ """Returns true if both objects are not equal"""
139
+ return not self == other
@@ -0,0 +1,85 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.sdk_response import SdkResponse
6
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
7
+
8
+
9
+ class UpdateDesktopNamePolicyResponse(SdkResponse):
10
+
11
+ """
12
+ Attributes:
13
+ openapi_types (dict): The key is attribute name
14
+ and the value is attribute type.
15
+ attribute_map (dict): The key is attribute name
16
+ and the value is json key in definition.
17
+ """
18
+ sensitive_list = []
19
+
20
+ openapi_types = {
21
+ }
22
+
23
+ attribute_map = {
24
+ }
25
+
26
+ def __init__(self):
27
+ """UpdateDesktopNamePolicyResponse
28
+
29
+ The model defined in huaweicloud sdk
30
+
31
+ """
32
+
33
+ super(UpdateDesktopNamePolicyResponse, self).__init__()
34
+ self.discriminator = None
35
+
36
+ def to_dict(self):
37
+ """Returns the model properties as a dict"""
38
+ result = {}
39
+
40
+ for attr, _ in six.iteritems(self.openapi_types):
41
+ value = getattr(self, attr)
42
+ if isinstance(value, list):
43
+ result[attr] = list(map(
44
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
45
+ value
46
+ ))
47
+ elif hasattr(value, "to_dict"):
48
+ result[attr] = value.to_dict()
49
+ elif isinstance(value, dict):
50
+ result[attr] = dict(map(
51
+ lambda item: (item[0], item[1].to_dict())
52
+ if hasattr(item[1], "to_dict") else item,
53
+ value.items()
54
+ ))
55
+ else:
56
+ if attr in self.sensitive_list:
57
+ result[attr] = "****"
58
+ else:
59
+ result[attr] = value
60
+
61
+ return result
62
+
63
+ def to_str(self):
64
+ """Returns the string representation of the model"""
65
+ import simplejson as json
66
+ if six.PY2:
67
+ import sys
68
+ reload(sys)
69
+ sys.setdefaultencoding("utf-8")
70
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
71
+
72
+ def __repr__(self):
73
+ """For `print`"""
74
+ return self.to_str()
75
+
76
+ def __eq__(self, other):
77
+ """Returns true if both objects are equal"""
78
+ if not isinstance(other, UpdateDesktopNamePolicyResponse):
79
+ return False
80
+
81
+ return self.__dict__ == other.__dict__
82
+
83
+ def __ne__(self, other):
84
+ """Returns true if both objects are not equal"""
85
+ return not self == other
@@ -1615,6 +1615,276 @@ class WorkspaceAsyncClient(Client):
1615
1615
 
1616
1616
  return http_info
1617
1617
 
1618
+ def batch_delete_desktop_name_policy_async(self, request):
1619
+ """批量删除桌面名称策略
1620
+
1621
+ 批量删除桌面名称策略。
1622
+
1623
+ Please refer to HUAWEI cloud API Explorer for details.
1624
+
1625
+
1626
+ :param request: Request instance for BatchDeleteDesktopNamePolicy
1627
+ :type request: :class:`huaweicloudsdkworkspace.v2.BatchDeleteDesktopNamePolicyRequest`
1628
+ :rtype: :class:`huaweicloudsdkworkspace.v2.BatchDeleteDesktopNamePolicyResponse`
1629
+ """
1630
+ http_info = self._batch_delete_desktop_name_policy_http_info(request)
1631
+ return self._call_api(**http_info)
1632
+
1633
+ def batch_delete_desktop_name_policy_async_invoker(self, request):
1634
+ http_info = self._batch_delete_desktop_name_policy_http_info(request)
1635
+ return AsyncInvoker(self, http_info)
1636
+
1637
+ def _batch_delete_desktop_name_policy_http_info(self, request):
1638
+ http_info = {
1639
+ "method": "POST",
1640
+ "resource_path": "/v2/{project_id}/desktop-name-policies/batch-delete",
1641
+ "request_type": request.__class__.__name__,
1642
+ "response_type": "BatchDeleteDesktopNamePolicyResponse"
1643
+ }
1644
+
1645
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1646
+
1647
+ cname = None
1648
+
1649
+ collection_formats = {}
1650
+
1651
+ path_params = {}
1652
+
1653
+ query_params = []
1654
+
1655
+ header_params = {}
1656
+
1657
+ form_params = {}
1658
+
1659
+ body = None
1660
+ if 'body' in local_var_params:
1661
+ body = local_var_params['body']
1662
+ if isinstance(request, SdkStreamRequest):
1663
+ body = request.get_file_stream()
1664
+
1665
+ response_headers = []
1666
+
1667
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1668
+ ['application/json'])
1669
+
1670
+ auth_settings = []
1671
+
1672
+ http_info["cname"] = cname
1673
+ http_info["collection_formats"] = collection_formats
1674
+ http_info["path_params"] = path_params
1675
+ http_info["query_params"] = query_params
1676
+ http_info["header_params"] = header_params
1677
+ http_info["post_params"] = form_params
1678
+ http_info["body"] = body
1679
+ http_info["response_headers"] = response_headers
1680
+
1681
+ return http_info
1682
+
1683
+ def create_desktop_name_policy_async(self, request):
1684
+ """创建桌面名称策略
1685
+
1686
+ 创建桌面名称策略,用于自动生成桌面名称,最多允许50个。
1687
+
1688
+ Please refer to HUAWEI cloud API Explorer for details.
1689
+
1690
+
1691
+ :param request: Request instance for CreateDesktopNamePolicy
1692
+ :type request: :class:`huaweicloudsdkworkspace.v2.CreateDesktopNamePolicyRequest`
1693
+ :rtype: :class:`huaweicloudsdkworkspace.v2.CreateDesktopNamePolicyResponse`
1694
+ """
1695
+ http_info = self._create_desktop_name_policy_http_info(request)
1696
+ return self._call_api(**http_info)
1697
+
1698
+ def create_desktop_name_policy_async_invoker(self, request):
1699
+ http_info = self._create_desktop_name_policy_http_info(request)
1700
+ return AsyncInvoker(self, http_info)
1701
+
1702
+ def _create_desktop_name_policy_http_info(self, request):
1703
+ http_info = {
1704
+ "method": "POST",
1705
+ "resource_path": "/v2/{project_id}/desktop-name-policies",
1706
+ "request_type": request.__class__.__name__,
1707
+ "response_type": "CreateDesktopNamePolicyResponse"
1708
+ }
1709
+
1710
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1711
+
1712
+ cname = None
1713
+
1714
+ collection_formats = {}
1715
+
1716
+ path_params = {}
1717
+
1718
+ query_params = []
1719
+
1720
+ header_params = {}
1721
+
1722
+ form_params = {}
1723
+
1724
+ body = None
1725
+ if 'body' in local_var_params:
1726
+ body = local_var_params['body']
1727
+ if isinstance(request, SdkStreamRequest):
1728
+ body = request.get_file_stream()
1729
+
1730
+ response_headers = []
1731
+
1732
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1733
+ ['application/json'])
1734
+
1735
+ auth_settings = []
1736
+
1737
+ http_info["cname"] = cname
1738
+ http_info["collection_formats"] = collection_formats
1739
+ http_info["path_params"] = path_params
1740
+ http_info["query_params"] = query_params
1741
+ http_info["header_params"] = header_params
1742
+ http_info["post_params"] = form_params
1743
+ http_info["body"] = body
1744
+ http_info["response_headers"] = response_headers
1745
+
1746
+ return http_info
1747
+
1748
+ def list_desktop_name_policy_async(self, request):
1749
+ """获取桌面名称策略
1750
+
1751
+ 获取桌面名称策略,用于自动生成桌面名称。
1752
+
1753
+ Please refer to HUAWEI cloud API Explorer for details.
1754
+
1755
+
1756
+ :param request: Request instance for ListDesktopNamePolicy
1757
+ :type request: :class:`huaweicloudsdkworkspace.v2.ListDesktopNamePolicyRequest`
1758
+ :rtype: :class:`huaweicloudsdkworkspace.v2.ListDesktopNamePolicyResponse`
1759
+ """
1760
+ http_info = self._list_desktop_name_policy_http_info(request)
1761
+ return self._call_api(**http_info)
1762
+
1763
+ def list_desktop_name_policy_async_invoker(self, request):
1764
+ http_info = self._list_desktop_name_policy_http_info(request)
1765
+ return AsyncInvoker(self, http_info)
1766
+
1767
+ def _list_desktop_name_policy_http_info(self, request):
1768
+ http_info = {
1769
+ "method": "GET",
1770
+ "resource_path": "/v2/{project_id}/desktop-name-policies",
1771
+ "request_type": request.__class__.__name__,
1772
+ "response_type": "ListDesktopNamePolicyResponse"
1773
+ }
1774
+
1775
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1776
+
1777
+ cname = None
1778
+
1779
+ collection_formats = {}
1780
+
1781
+ path_params = {}
1782
+
1783
+ query_params = []
1784
+ if 'is_contain_user' in local_var_params:
1785
+ query_params.append(('is_contain_user', local_var_params['is_contain_user']))
1786
+ if 'policy_name' in local_var_params:
1787
+ query_params.append(('policy_name', local_var_params['policy_name']))
1788
+ if 'policy_id' in local_var_params:
1789
+ query_params.append(('policy_id', local_var_params['policy_id']))
1790
+ if 'offset' in local_var_params:
1791
+ query_params.append(('offset', local_var_params['offset']))
1792
+ if 'limit' in local_var_params:
1793
+ query_params.append(('limit', local_var_params['limit']))
1794
+
1795
+ header_params = {}
1796
+
1797
+ form_params = {}
1798
+
1799
+ body = None
1800
+ if isinstance(request, SdkStreamRequest):
1801
+ body = request.get_file_stream()
1802
+
1803
+ response_headers = []
1804
+
1805
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1806
+ ['application/json'])
1807
+
1808
+ auth_settings = []
1809
+
1810
+ http_info["cname"] = cname
1811
+ http_info["collection_formats"] = collection_formats
1812
+ http_info["path_params"] = path_params
1813
+ http_info["query_params"] = query_params
1814
+ http_info["header_params"] = header_params
1815
+ http_info["post_params"] = form_params
1816
+ http_info["body"] = body
1817
+ http_info["response_headers"] = response_headers
1818
+
1819
+ return http_info
1820
+
1821
+ def update_desktop_name_policy_async(self, request):
1822
+ """更新桌面名称策略
1823
+
1824
+ 更新桌面名称策略,用于自动生成桌面名称。
1825
+
1826
+ Please refer to HUAWEI cloud API Explorer for details.
1827
+
1828
+
1829
+ :param request: Request instance for UpdateDesktopNamePolicy
1830
+ :type request: :class:`huaweicloudsdkworkspace.v2.UpdateDesktopNamePolicyRequest`
1831
+ :rtype: :class:`huaweicloudsdkworkspace.v2.UpdateDesktopNamePolicyResponse`
1832
+ """
1833
+ http_info = self._update_desktop_name_policy_http_info(request)
1834
+ return self._call_api(**http_info)
1835
+
1836
+ def update_desktop_name_policy_async_invoker(self, request):
1837
+ http_info = self._update_desktop_name_policy_http_info(request)
1838
+ return AsyncInvoker(self, http_info)
1839
+
1840
+ def _update_desktop_name_policy_http_info(self, request):
1841
+ http_info = {
1842
+ "method": "PUT",
1843
+ "resource_path": "/v2/{project_id}/desktop-name-policies/{policy_id}",
1844
+ "request_type": request.__class__.__name__,
1845
+ "response_type": "UpdateDesktopNamePolicyResponse"
1846
+ }
1847
+
1848
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1849
+
1850
+ cname = None
1851
+
1852
+ collection_formats = {}
1853
+
1854
+ path_params = {}
1855
+ if 'policy_id' in local_var_params:
1856
+ path_params['policy_id'] = local_var_params['policy_id']
1857
+
1858
+ query_params = []
1859
+
1860
+ header_params = {}
1861
+
1862
+ form_params = {}
1863
+
1864
+ body = None
1865
+ if 'body' in local_var_params:
1866
+ body = local_var_params['body']
1867
+ if isinstance(request, SdkStreamRequest):
1868
+ body = request.get_file_stream()
1869
+
1870
+ response_headers = []
1871
+
1872
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1873
+ ['application/json'])
1874
+
1875
+ auth_settings = []
1876
+
1877
+ http_info["cname"] = cname
1878
+ http_info["collection_formats"] = collection_formats
1879
+ http_info["path_params"] = path_params
1880
+ http_info["query_params"] = query_params
1881
+ http_info["header_params"] = header_params
1882
+ http_info["post_params"] = form_params
1883
+ http_info["body"] = body
1884
+ http_info["response_headers"] = response_headers
1885
+
1886
+ return http_info
1887
+
1618
1888
  def list_unused_desktops_async(self, request):
1619
1889
  """查询在指定时间段未使用的桌面
1620
1890