huaweicloudsdkworkspace 3.1.89__py2.py3-none-any.whl → 3.1.90__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.

@@ -0,0 +1,348 @@
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 ShowDesktopRemoteAssistanceInfoResponse(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
+ 'share_space_id': 'str',
22
+ 'invitation_code': 'str',
23
+ 'share_space_name': 'str',
24
+ 'share_space_passwd': 'str',
25
+ 'private_share_link': 'str',
26
+ 'internet_share_link': 'str',
27
+ 'create_time': 'str',
28
+ 'status': 'str',
29
+ 'failed_reason': 'str'
30
+ }
31
+
32
+ attribute_map = {
33
+ 'share_space_id': 'share_space_id',
34
+ 'invitation_code': 'invitation_code',
35
+ 'share_space_name': 'share_space_name',
36
+ 'share_space_passwd': 'share_space_passwd',
37
+ 'private_share_link': 'private_share_link',
38
+ 'internet_share_link': 'internet_share_link',
39
+ 'create_time': 'create_time',
40
+ 'status': 'status',
41
+ 'failed_reason': 'failed_reason'
42
+ }
43
+
44
+ def __init__(self, share_space_id=None, invitation_code=None, share_space_name=None, share_space_passwd=None, private_share_link=None, internet_share_link=None, create_time=None, status=None, failed_reason=None):
45
+ """ShowDesktopRemoteAssistanceInfoResponse
46
+
47
+ The model defined in huaweicloud sdk
48
+
49
+ :param share_space_id: 协同空间ID
50
+ :type share_space_id: str
51
+ :param invitation_code: 协同空间邀请码(大写英文+数字,共8位)
52
+ :type invitation_code: str
53
+ :param share_space_name: 协同空间名称
54
+ :type share_space_name: str
55
+ :param share_space_passwd: 协同空间密码
56
+ :type share_space_passwd: str
57
+ :param private_share_link: 专线分享链接
58
+ :type private_share_link: str
59
+ :param internet_share_link: 互联网分享链接
60
+ :type internet_share_link: str
61
+ :param create_time: 创建时间 UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z'。
62
+ :type create_time: str
63
+ :param status: 协同空间状态 - OPEN 协同空间已创建 - CLOSE 协同空间已关闭 - WAIT_USER_CONFIRM 等待用户确认进入远程协助 - WAIT_USER_ACCESS 等待用户进入远程协助
64
+ :type status: str
65
+ :param failed_reason: 失败原因
66
+ :type failed_reason: str
67
+ """
68
+
69
+ super(ShowDesktopRemoteAssistanceInfoResponse, self).__init__()
70
+
71
+ self._share_space_id = None
72
+ self._invitation_code = None
73
+ self._share_space_name = None
74
+ self._share_space_passwd = None
75
+ self._private_share_link = None
76
+ self._internet_share_link = None
77
+ self._create_time = None
78
+ self._status = None
79
+ self._failed_reason = None
80
+ self.discriminator = None
81
+
82
+ if share_space_id is not None:
83
+ self.share_space_id = share_space_id
84
+ if invitation_code is not None:
85
+ self.invitation_code = invitation_code
86
+ if share_space_name is not None:
87
+ self.share_space_name = share_space_name
88
+ if share_space_passwd is not None:
89
+ self.share_space_passwd = share_space_passwd
90
+ if private_share_link is not None:
91
+ self.private_share_link = private_share_link
92
+ if internet_share_link is not None:
93
+ self.internet_share_link = internet_share_link
94
+ if create_time is not None:
95
+ self.create_time = create_time
96
+ if status is not None:
97
+ self.status = status
98
+ if failed_reason is not None:
99
+ self.failed_reason = failed_reason
100
+
101
+ @property
102
+ def share_space_id(self):
103
+ """Gets the share_space_id of this ShowDesktopRemoteAssistanceInfoResponse.
104
+
105
+ 协同空间ID
106
+
107
+ :return: The share_space_id of this ShowDesktopRemoteAssistanceInfoResponse.
108
+ :rtype: str
109
+ """
110
+ return self._share_space_id
111
+
112
+ @share_space_id.setter
113
+ def share_space_id(self, share_space_id):
114
+ """Sets the share_space_id of this ShowDesktopRemoteAssistanceInfoResponse.
115
+
116
+ 协同空间ID
117
+
118
+ :param share_space_id: The share_space_id of this ShowDesktopRemoteAssistanceInfoResponse.
119
+ :type share_space_id: str
120
+ """
121
+ self._share_space_id = share_space_id
122
+
123
+ @property
124
+ def invitation_code(self):
125
+ """Gets the invitation_code of this ShowDesktopRemoteAssistanceInfoResponse.
126
+
127
+ 协同空间邀请码(大写英文+数字,共8位)
128
+
129
+ :return: The invitation_code of this ShowDesktopRemoteAssistanceInfoResponse.
130
+ :rtype: str
131
+ """
132
+ return self._invitation_code
133
+
134
+ @invitation_code.setter
135
+ def invitation_code(self, invitation_code):
136
+ """Sets the invitation_code of this ShowDesktopRemoteAssistanceInfoResponse.
137
+
138
+ 协同空间邀请码(大写英文+数字,共8位)
139
+
140
+ :param invitation_code: The invitation_code of this ShowDesktopRemoteAssistanceInfoResponse.
141
+ :type invitation_code: str
142
+ """
143
+ self._invitation_code = invitation_code
144
+
145
+ @property
146
+ def share_space_name(self):
147
+ """Gets the share_space_name of this ShowDesktopRemoteAssistanceInfoResponse.
148
+
149
+ 协同空间名称
150
+
151
+ :return: The share_space_name of this ShowDesktopRemoteAssistanceInfoResponse.
152
+ :rtype: str
153
+ """
154
+ return self._share_space_name
155
+
156
+ @share_space_name.setter
157
+ def share_space_name(self, share_space_name):
158
+ """Sets the share_space_name of this ShowDesktopRemoteAssistanceInfoResponse.
159
+
160
+ 协同空间名称
161
+
162
+ :param share_space_name: The share_space_name of this ShowDesktopRemoteAssistanceInfoResponse.
163
+ :type share_space_name: str
164
+ """
165
+ self._share_space_name = share_space_name
166
+
167
+ @property
168
+ def share_space_passwd(self):
169
+ """Gets the share_space_passwd of this ShowDesktopRemoteAssistanceInfoResponse.
170
+
171
+ 协同空间密码
172
+
173
+ :return: The share_space_passwd of this ShowDesktopRemoteAssistanceInfoResponse.
174
+ :rtype: str
175
+ """
176
+ return self._share_space_passwd
177
+
178
+ @share_space_passwd.setter
179
+ def share_space_passwd(self, share_space_passwd):
180
+ """Sets the share_space_passwd of this ShowDesktopRemoteAssistanceInfoResponse.
181
+
182
+ 协同空间密码
183
+
184
+ :param share_space_passwd: The share_space_passwd of this ShowDesktopRemoteAssistanceInfoResponse.
185
+ :type share_space_passwd: str
186
+ """
187
+ self._share_space_passwd = share_space_passwd
188
+
189
+ @property
190
+ def private_share_link(self):
191
+ """Gets the private_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
192
+
193
+ 专线分享链接
194
+
195
+ :return: The private_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
196
+ :rtype: str
197
+ """
198
+ return self._private_share_link
199
+
200
+ @private_share_link.setter
201
+ def private_share_link(self, private_share_link):
202
+ """Sets the private_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
203
+
204
+ 专线分享链接
205
+
206
+ :param private_share_link: The private_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
207
+ :type private_share_link: str
208
+ """
209
+ self._private_share_link = private_share_link
210
+
211
+ @property
212
+ def internet_share_link(self):
213
+ """Gets the internet_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
214
+
215
+ 互联网分享链接
216
+
217
+ :return: The internet_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
218
+ :rtype: str
219
+ """
220
+ return self._internet_share_link
221
+
222
+ @internet_share_link.setter
223
+ def internet_share_link(self, internet_share_link):
224
+ """Sets the internet_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
225
+
226
+ 互联网分享链接
227
+
228
+ :param internet_share_link: The internet_share_link of this ShowDesktopRemoteAssistanceInfoResponse.
229
+ :type internet_share_link: str
230
+ """
231
+ self._internet_share_link = internet_share_link
232
+
233
+ @property
234
+ def create_time(self):
235
+ """Gets the create_time of this ShowDesktopRemoteAssistanceInfoResponse.
236
+
237
+ 创建时间 UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z'。
238
+
239
+ :return: The create_time of this ShowDesktopRemoteAssistanceInfoResponse.
240
+ :rtype: str
241
+ """
242
+ return self._create_time
243
+
244
+ @create_time.setter
245
+ def create_time(self, create_time):
246
+ """Sets the create_time of this ShowDesktopRemoteAssistanceInfoResponse.
247
+
248
+ 创建时间 UTC时间,格式为:yyyy-MM-dd'T'HH:mm:ss'Z'。
249
+
250
+ :param create_time: The create_time of this ShowDesktopRemoteAssistanceInfoResponse.
251
+ :type create_time: str
252
+ """
253
+ self._create_time = create_time
254
+
255
+ @property
256
+ def status(self):
257
+ """Gets the status of this ShowDesktopRemoteAssistanceInfoResponse.
258
+
259
+ 协同空间状态 - OPEN 协同空间已创建 - CLOSE 协同空间已关闭 - WAIT_USER_CONFIRM 等待用户确认进入远程协助 - WAIT_USER_ACCESS 等待用户进入远程协助
260
+
261
+ :return: The status of this ShowDesktopRemoteAssistanceInfoResponse.
262
+ :rtype: str
263
+ """
264
+ return self._status
265
+
266
+ @status.setter
267
+ def status(self, status):
268
+ """Sets the status of this ShowDesktopRemoteAssistanceInfoResponse.
269
+
270
+ 协同空间状态 - OPEN 协同空间已创建 - CLOSE 协同空间已关闭 - WAIT_USER_CONFIRM 等待用户确认进入远程协助 - WAIT_USER_ACCESS 等待用户进入远程协助
271
+
272
+ :param status: The status of this ShowDesktopRemoteAssistanceInfoResponse.
273
+ :type status: str
274
+ """
275
+ self._status = status
276
+
277
+ @property
278
+ def failed_reason(self):
279
+ """Gets the failed_reason of this ShowDesktopRemoteAssistanceInfoResponse.
280
+
281
+ 失败原因
282
+
283
+ :return: The failed_reason of this ShowDesktopRemoteAssistanceInfoResponse.
284
+ :rtype: str
285
+ """
286
+ return self._failed_reason
287
+
288
+ @failed_reason.setter
289
+ def failed_reason(self, failed_reason):
290
+ """Sets the failed_reason of this ShowDesktopRemoteAssistanceInfoResponse.
291
+
292
+ 失败原因
293
+
294
+ :param failed_reason: The failed_reason of this ShowDesktopRemoteAssistanceInfoResponse.
295
+ :type failed_reason: str
296
+ """
297
+ self._failed_reason = failed_reason
298
+
299
+ def to_dict(self):
300
+ """Returns the model properties as a dict"""
301
+ result = {}
302
+
303
+ for attr, _ in six.iteritems(self.openapi_types):
304
+ value = getattr(self, attr)
305
+ if isinstance(value, list):
306
+ result[attr] = list(map(
307
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
308
+ value
309
+ ))
310
+ elif hasattr(value, "to_dict"):
311
+ result[attr] = value.to_dict()
312
+ elif isinstance(value, dict):
313
+ result[attr] = dict(map(
314
+ lambda item: (item[0], item[1].to_dict())
315
+ if hasattr(item[1], "to_dict") else item,
316
+ value.items()
317
+ ))
318
+ else:
319
+ if attr in self.sensitive_list:
320
+ result[attr] = "****"
321
+ else:
322
+ result[attr] = value
323
+
324
+ return result
325
+
326
+ def to_str(self):
327
+ """Returns the string representation of the model"""
328
+ import simplejson as json
329
+ if six.PY2:
330
+ import sys
331
+ reload(sys)
332
+ sys.setdefaultencoding("utf-8")
333
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
334
+
335
+ def __repr__(self):
336
+ """For `print`"""
337
+ return self.to_str()
338
+
339
+ def __eq__(self, other):
340
+ """Returns true if both objects are equal"""
341
+ if not isinstance(other, ShowDesktopRemoteAssistanceInfoResponse):
342
+ return False
343
+
344
+ return self.__dict__ == other.__dict__
345
+
346
+ def __ne__(self, other):
347
+ """Returns true if both objects are not equal"""
348
+ return not self == other
@@ -1230,6 +1230,71 @@ class WorkspaceAsyncClient(Client):
1230
1230
 
1231
1231
  return http_info
1232
1232
 
1233
+ def cancel_remote_assistance_async(self, request):
1234
+ """取消远程协助
1235
+
1236
+ 取消远程协助。
1237
+
1238
+ Please refer to HUAWEI cloud API Explorer for details.
1239
+
1240
+
1241
+ :param request: Request instance for CancelRemoteAssistance
1242
+ :type request: :class:`huaweicloudsdkworkspace.v2.CancelRemoteAssistanceRequest`
1243
+ :rtype: :class:`huaweicloudsdkworkspace.v2.CancelRemoteAssistanceResponse`
1244
+ """
1245
+ http_info = self._cancel_remote_assistance_http_info(request)
1246
+ return self._call_api(**http_info)
1247
+
1248
+ def cancel_remote_assistance_async_invoker(self, request):
1249
+ http_info = self._cancel_remote_assistance_http_info(request)
1250
+ return AsyncInvoker(self, http_info)
1251
+
1252
+ def _cancel_remote_assistance_http_info(self, request):
1253
+ http_info = {
1254
+ "method": "DELETE",
1255
+ "resource_path": "/v2/{project_id}/desktops/{desktop_id}/remote-assistance",
1256
+ "request_type": request.__class__.__name__,
1257
+ "response_type": "CancelRemoteAssistanceResponse"
1258
+ }
1259
+
1260
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1261
+
1262
+ cname = None
1263
+
1264
+ collection_formats = {}
1265
+
1266
+ path_params = {}
1267
+ if 'desktop_id' in local_var_params:
1268
+ path_params['desktop_id'] = local_var_params['desktop_id']
1269
+
1270
+ query_params = []
1271
+
1272
+ header_params = {}
1273
+
1274
+ form_params = {}
1275
+
1276
+ body = None
1277
+ if isinstance(request, SdkStreamRequest):
1278
+ body = request.get_file_stream()
1279
+
1280
+ response_headers = []
1281
+
1282
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1283
+ ['application/json'])
1284
+
1285
+ auth_settings = []
1286
+
1287
+ http_info["cname"] = cname
1288
+ http_info["collection_formats"] = collection_formats
1289
+ http_info["path_params"] = path_params
1290
+ http_info["query_params"] = query_params
1291
+ http_info["header_params"] = header_params
1292
+ http_info["post_params"] = form_params
1293
+ http_info["body"] = body
1294
+ http_info["response_headers"] = response_headers
1295
+
1296
+ return http_info
1297
+
1233
1298
  def change_desktop_network_async(self, request):
1234
1299
  """切换桌面网络
1235
1300
 
@@ -1362,6 +1427,71 @@ class WorkspaceAsyncClient(Client):
1362
1427
 
1363
1428
  return http_info
1364
1429
 
1430
+ def create_remote_assistance_async(self, request):
1431
+ """创建远程协助
1432
+
1433
+ 创建远程协助。
1434
+
1435
+ Please refer to HUAWEI cloud API Explorer for details.
1436
+
1437
+
1438
+ :param request: Request instance for CreateRemoteAssistance
1439
+ :type request: :class:`huaweicloudsdkworkspace.v2.CreateRemoteAssistanceRequest`
1440
+ :rtype: :class:`huaweicloudsdkworkspace.v2.CreateRemoteAssistanceResponse`
1441
+ """
1442
+ http_info = self._create_remote_assistance_http_info(request)
1443
+ return self._call_api(**http_info)
1444
+
1445
+ def create_remote_assistance_async_invoker(self, request):
1446
+ http_info = self._create_remote_assistance_http_info(request)
1447
+ return AsyncInvoker(self, http_info)
1448
+
1449
+ def _create_remote_assistance_http_info(self, request):
1450
+ http_info = {
1451
+ "method": "POST",
1452
+ "resource_path": "/v2/{project_id}/desktops/{desktop_id}/remote-assistance",
1453
+ "request_type": request.__class__.__name__,
1454
+ "response_type": "CreateRemoteAssistanceResponse"
1455
+ }
1456
+
1457
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1458
+
1459
+ cname = None
1460
+
1461
+ collection_formats = {}
1462
+
1463
+ path_params = {}
1464
+ if 'desktop_id' in local_var_params:
1465
+ path_params['desktop_id'] = local_var_params['desktop_id']
1466
+
1467
+ query_params = []
1468
+
1469
+ header_params = {}
1470
+
1471
+ form_params = {}
1472
+
1473
+ body = None
1474
+ if isinstance(request, SdkStreamRequest):
1475
+ body = request.get_file_stream()
1476
+
1477
+ response_headers = []
1478
+
1479
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1480
+ ['application/json'])
1481
+
1482
+ auth_settings = []
1483
+
1484
+ http_info["cname"] = cname
1485
+ http_info["collection_formats"] = collection_formats
1486
+ http_info["path_params"] = path_params
1487
+ http_info["query_params"] = query_params
1488
+ http_info["header_params"] = header_params
1489
+ http_info["post_params"] = form_params
1490
+ http_info["body"] = body
1491
+ http_info["response_headers"] = response_headers
1492
+
1493
+ return http_info
1494
+
1365
1495
  def delete_desktop_async(self, request):
1366
1496
  """删除单个桌面
1367
1497
 
@@ -1877,6 +2007,71 @@ class WorkspaceAsyncClient(Client):
1877
2007
 
1878
2008
  return http_info
1879
2009
 
2010
+ def show_desktop_remote_assistance_info_async(self, request):
2011
+ """根据桌面id查询远程协助信息
2012
+
2013
+ 根据桌面id查询远程协助信息。
2014
+
2015
+ Please refer to HUAWEI cloud API Explorer for details.
2016
+
2017
+
2018
+ :param request: Request instance for ShowDesktopRemoteAssistanceInfo
2019
+ :type request: :class:`huaweicloudsdkworkspace.v2.ShowDesktopRemoteAssistanceInfoRequest`
2020
+ :rtype: :class:`huaweicloudsdkworkspace.v2.ShowDesktopRemoteAssistanceInfoResponse`
2021
+ """
2022
+ http_info = self._show_desktop_remote_assistance_info_http_info(request)
2023
+ return self._call_api(**http_info)
2024
+
2025
+ def show_desktop_remote_assistance_info_async_invoker(self, request):
2026
+ http_info = self._show_desktop_remote_assistance_info_http_info(request)
2027
+ return AsyncInvoker(self, http_info)
2028
+
2029
+ def _show_desktop_remote_assistance_info_http_info(self, request):
2030
+ http_info = {
2031
+ "method": "GET",
2032
+ "resource_path": "/v2/{project_id}/desktops/{desktop_id}/remote-assistance",
2033
+ "request_type": request.__class__.__name__,
2034
+ "response_type": "ShowDesktopRemoteAssistanceInfoResponse"
2035
+ }
2036
+
2037
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
2038
+
2039
+ cname = None
2040
+
2041
+ collection_formats = {}
2042
+
2043
+ path_params = {}
2044
+ if 'desktop_id' in local_var_params:
2045
+ path_params['desktop_id'] = local_var_params['desktop_id']
2046
+
2047
+ query_params = []
2048
+
2049
+ header_params = {}
2050
+
2051
+ form_params = {}
2052
+
2053
+ body = None
2054
+ if isinstance(request, SdkStreamRequest):
2055
+ body = request.get_file_stream()
2056
+
2057
+ response_headers = []
2058
+
2059
+ header_params['Content-Type'] = http_utils.select_header_content_type(
2060
+ ['application/json'])
2061
+
2062
+ auth_settings = []
2063
+
2064
+ http_info["cname"] = cname
2065
+ http_info["collection_formats"] = collection_formats
2066
+ http_info["path_params"] = path_params
2067
+ http_info["query_params"] = query_params
2068
+ http_info["header_params"] = header_params
2069
+ http_info["post_params"] = form_params
2070
+ http_info["body"] = body
2071
+ http_info["response_headers"] = response_headers
2072
+
2073
+ return http_info
2074
+
1880
2075
  def batch_delete_desktop_name_policy_async(self, request):
1881
2076
  """批量删除桌面名称策略
1882
2077