huaweicloudsdkvas 3.1.160__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.
- huaweicloudsdkvas/__init__.py +0 -0
- huaweicloudsdkvas/v2/__init__.py +46 -0
- huaweicloudsdkvas/v2/model/__init__.py +43 -0
- huaweicloudsdkvas/v2/model/create_response_body.py +114 -0
- huaweicloudsdkvas/v2/model/create_tasks_request.py +139 -0
- huaweicloudsdkvas/v2/model/create_tasks_request_body.py +327 -0
- huaweicloudsdkvas/v2/model/create_tasks_response.py +112 -0
- huaweicloudsdkvas/v2/model/delete_task_request.py +142 -0
- huaweicloudsdkvas/v2/model/delete_task_response.py +85 -0
- huaweicloudsdkvas/v2/model/list_tasks_details_request.py +375 -0
- huaweicloudsdkvas/v2/model/list_tasks_details_response.py +145 -0
- huaweicloudsdkvas/v2/model/show_task_request.py +142 -0
- huaweicloudsdkvas/v2/model/show_task_response.py +656 -0
- huaweicloudsdkvas/v2/model/start_task_request.py +142 -0
- huaweicloudsdkvas/v2/model/start_task_response.py +85 -0
- huaweicloudsdkvas/v2/model/stop_task_request.py +142 -0
- huaweicloudsdkvas/v2/model/stop_task_response.py +85 -0
- huaweicloudsdkvas/v2/model/task_details.py +630 -0
- huaweicloudsdkvas/v2/model/task_details_error.py +142 -0
- huaweicloudsdkvas/v2/model/task_details_service_title.py +144 -0
- huaweicloudsdkvas/v2/model/task_hosting_result.py +111 -0
- huaweicloudsdkvas/v2/model/task_hosting_result_hosting_result.py +202 -0
- huaweicloudsdkvas/v2/model/task_input.py +167 -0
- huaweicloudsdkvas/v2/model/task_input_data.py +405 -0
- huaweicloudsdkvas/v2/model/task_input_vcn.py +198 -0
- huaweicloudsdkvas/v2/model/task_output.py +211 -0
- huaweicloudsdkvas/v2/model/task_output_dis.py +143 -0
- huaweicloudsdkvas/v2/model/task_output_for_display.py +211 -0
- huaweicloudsdkvas/v2/model/task_output_hosting.py +115 -0
- huaweicloudsdkvas/v2/model/task_output_hosting_for_display.py +173 -0
- huaweicloudsdkvas/v2/model/task_output_hosting_for_display_obs.py +144 -0
- huaweicloudsdkvas/v2/model/task_output_localpath.py +143 -0
- huaweicloudsdkvas/v2/model/task_output_obs.py +171 -0
- huaweicloudsdkvas/v2/model/task_output_webhook.py +171 -0
- huaweicloudsdkvas/v2/model/task_service_config.py +115 -0
- huaweicloudsdkvas/v2/model/task_timing.py +283 -0
- huaweicloudsdkvas/v2/model/task_timing_frequency.py +200 -0
- huaweicloudsdkvas/v2/model/task_timing_periods.py +144 -0
- huaweicloudsdkvas/v2/model/update_task_request.py +167 -0
- huaweicloudsdkvas/v2/model/update_task_request_body.py +244 -0
- huaweicloudsdkvas/v2/model/update_task_response.py +631 -0
- huaweicloudsdkvas/v2/region/__init__.py +0 -0
- huaweicloudsdkvas/v2/region/vas_region.py +52 -0
- huaweicloudsdkvas/v2/vas_async_client.py +570 -0
- huaweicloudsdkvas/v2/vas_client.py +567 -0
- huaweicloudsdkvas-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkvas-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkvas-3.1.160.dist-info/RECORD +50 -0
- huaweicloudsdkvas-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkvas-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,283 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class TaskTiming:
|
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
|
+
'type': 'str',
|
21
|
+
'timezone': 'str',
|
22
|
+
'days_of_week': 'list[int]',
|
23
|
+
'days_of_month': 'list[int]',
|
24
|
+
'date': 'str',
|
25
|
+
'periods': 'list[TaskTimingPeriods]',
|
26
|
+
'frequency': 'TaskTimingFrequency'
|
27
|
+
}
|
28
|
+
|
29
|
+
attribute_map = {
|
30
|
+
'type': 'type',
|
31
|
+
'timezone': 'timezone',
|
32
|
+
'days_of_week': 'days_of_week',
|
33
|
+
'days_of_month': 'days_of_month',
|
34
|
+
'date': 'date',
|
35
|
+
'periods': 'periods',
|
36
|
+
'frequency': 'frequency'
|
37
|
+
}
|
38
|
+
|
39
|
+
def __init__(self, type=None, timezone=None, days_of_week=None, days_of_month=None, date=None, periods=None, frequency=None):
|
40
|
+
r"""TaskTiming
|
41
|
+
|
42
|
+
The model defined in huaweicloud sdk
|
43
|
+
|
44
|
+
:param type: 计划任务的类型,使用计划任务时必填。可选类型分别为once(仅执行一次),daily(每日执行),weekly(每周执行),monthly(每月执行)。
|
45
|
+
:type type: str
|
46
|
+
:param timezone: 用户所处的时区,使用计划任务时必填。精确到分钟。
|
47
|
+
:type timezone: str
|
48
|
+
:param days_of_week: 作业会在一周的哪几天执行,当且仅当计划任务类型为weekly时,该字段需填且必填。1~7分别指代星期一至星期日。
|
49
|
+
:type days_of_week: list[int]
|
50
|
+
:param days_of_month: 作业会在一个月的哪几天执行,当且仅当计划任务类型为monthly时,该字段需填且必填。1~31分别指代一个月中的1日至31日。
|
51
|
+
:type days_of_month: list[int]
|
52
|
+
:param date: 作业的执行日。当且仅当计划任务类型为once且为频率模式时,该字段需填且必填。格式形如yyyy-MM-dd。
|
53
|
+
:type date: str
|
54
|
+
:param periods: 时间段模式配置。和frequency字段二选一,不可共存。时间段模式下,至少需指定一个时间段。
|
55
|
+
:type periods: list[:class:`huaweicloudsdkvas.v2.TaskTimingPeriods`]
|
56
|
+
:param frequency:
|
57
|
+
:type frequency: :class:`huaweicloudsdkvas.v2.TaskTimingFrequency`
|
58
|
+
"""
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
self._type = None
|
63
|
+
self._timezone = None
|
64
|
+
self._days_of_week = None
|
65
|
+
self._days_of_month = None
|
66
|
+
self._date = None
|
67
|
+
self._periods = None
|
68
|
+
self._frequency = None
|
69
|
+
self.discriminator = None
|
70
|
+
|
71
|
+
self.type = type
|
72
|
+
self.timezone = timezone
|
73
|
+
if days_of_week is not None:
|
74
|
+
self.days_of_week = days_of_week
|
75
|
+
if days_of_month is not None:
|
76
|
+
self.days_of_month = days_of_month
|
77
|
+
if date is not None:
|
78
|
+
self.date = date
|
79
|
+
if periods is not None:
|
80
|
+
self.periods = periods
|
81
|
+
if frequency is not None:
|
82
|
+
self.frequency = frequency
|
83
|
+
|
84
|
+
@property
|
85
|
+
def type(self):
|
86
|
+
r"""Gets the type of this TaskTiming.
|
87
|
+
|
88
|
+
计划任务的类型,使用计划任务时必填。可选类型分别为once(仅执行一次),daily(每日执行),weekly(每周执行),monthly(每月执行)。
|
89
|
+
|
90
|
+
:return: The type of this TaskTiming.
|
91
|
+
:rtype: str
|
92
|
+
"""
|
93
|
+
return self._type
|
94
|
+
|
95
|
+
@type.setter
|
96
|
+
def type(self, type):
|
97
|
+
r"""Sets the type of this TaskTiming.
|
98
|
+
|
99
|
+
计划任务的类型,使用计划任务时必填。可选类型分别为once(仅执行一次),daily(每日执行),weekly(每周执行),monthly(每月执行)。
|
100
|
+
|
101
|
+
:param type: The type of this TaskTiming.
|
102
|
+
:type type: str
|
103
|
+
"""
|
104
|
+
self._type = type
|
105
|
+
|
106
|
+
@property
|
107
|
+
def timezone(self):
|
108
|
+
r"""Gets the timezone of this TaskTiming.
|
109
|
+
|
110
|
+
用户所处的时区,使用计划任务时必填。精确到分钟。
|
111
|
+
|
112
|
+
:return: The timezone of this TaskTiming.
|
113
|
+
:rtype: str
|
114
|
+
"""
|
115
|
+
return self._timezone
|
116
|
+
|
117
|
+
@timezone.setter
|
118
|
+
def timezone(self, timezone):
|
119
|
+
r"""Sets the timezone of this TaskTiming.
|
120
|
+
|
121
|
+
用户所处的时区,使用计划任务时必填。精确到分钟。
|
122
|
+
|
123
|
+
:param timezone: The timezone of this TaskTiming.
|
124
|
+
:type timezone: str
|
125
|
+
"""
|
126
|
+
self._timezone = timezone
|
127
|
+
|
128
|
+
@property
|
129
|
+
def days_of_week(self):
|
130
|
+
r"""Gets the days_of_week of this TaskTiming.
|
131
|
+
|
132
|
+
作业会在一周的哪几天执行,当且仅当计划任务类型为weekly时,该字段需填且必填。1~7分别指代星期一至星期日。
|
133
|
+
|
134
|
+
:return: The days_of_week of this TaskTiming.
|
135
|
+
:rtype: list[int]
|
136
|
+
"""
|
137
|
+
return self._days_of_week
|
138
|
+
|
139
|
+
@days_of_week.setter
|
140
|
+
def days_of_week(self, days_of_week):
|
141
|
+
r"""Sets the days_of_week of this TaskTiming.
|
142
|
+
|
143
|
+
作业会在一周的哪几天执行,当且仅当计划任务类型为weekly时,该字段需填且必填。1~7分别指代星期一至星期日。
|
144
|
+
|
145
|
+
:param days_of_week: The days_of_week of this TaskTiming.
|
146
|
+
:type days_of_week: list[int]
|
147
|
+
"""
|
148
|
+
self._days_of_week = days_of_week
|
149
|
+
|
150
|
+
@property
|
151
|
+
def days_of_month(self):
|
152
|
+
r"""Gets the days_of_month of this TaskTiming.
|
153
|
+
|
154
|
+
作业会在一个月的哪几天执行,当且仅当计划任务类型为monthly时,该字段需填且必填。1~31分别指代一个月中的1日至31日。
|
155
|
+
|
156
|
+
:return: The days_of_month of this TaskTiming.
|
157
|
+
:rtype: list[int]
|
158
|
+
"""
|
159
|
+
return self._days_of_month
|
160
|
+
|
161
|
+
@days_of_month.setter
|
162
|
+
def days_of_month(self, days_of_month):
|
163
|
+
r"""Sets the days_of_month of this TaskTiming.
|
164
|
+
|
165
|
+
作业会在一个月的哪几天执行,当且仅当计划任务类型为monthly时,该字段需填且必填。1~31分别指代一个月中的1日至31日。
|
166
|
+
|
167
|
+
:param days_of_month: The days_of_month of this TaskTiming.
|
168
|
+
:type days_of_month: list[int]
|
169
|
+
"""
|
170
|
+
self._days_of_month = days_of_month
|
171
|
+
|
172
|
+
@property
|
173
|
+
def date(self):
|
174
|
+
r"""Gets the date of this TaskTiming.
|
175
|
+
|
176
|
+
作业的执行日。当且仅当计划任务类型为once且为频率模式时,该字段需填且必填。格式形如yyyy-MM-dd。
|
177
|
+
|
178
|
+
:return: The date of this TaskTiming.
|
179
|
+
:rtype: str
|
180
|
+
"""
|
181
|
+
return self._date
|
182
|
+
|
183
|
+
@date.setter
|
184
|
+
def date(self, date):
|
185
|
+
r"""Sets the date of this TaskTiming.
|
186
|
+
|
187
|
+
作业的执行日。当且仅当计划任务类型为once且为频率模式时,该字段需填且必填。格式形如yyyy-MM-dd。
|
188
|
+
|
189
|
+
:param date: The date of this TaskTiming.
|
190
|
+
:type date: str
|
191
|
+
"""
|
192
|
+
self._date = date
|
193
|
+
|
194
|
+
@property
|
195
|
+
def periods(self):
|
196
|
+
r"""Gets the periods of this TaskTiming.
|
197
|
+
|
198
|
+
时间段模式配置。和frequency字段二选一,不可共存。时间段模式下,至少需指定一个时间段。
|
199
|
+
|
200
|
+
:return: The periods of this TaskTiming.
|
201
|
+
:rtype: list[:class:`huaweicloudsdkvas.v2.TaskTimingPeriods`]
|
202
|
+
"""
|
203
|
+
return self._periods
|
204
|
+
|
205
|
+
@periods.setter
|
206
|
+
def periods(self, periods):
|
207
|
+
r"""Sets the periods of this TaskTiming.
|
208
|
+
|
209
|
+
时间段模式配置。和frequency字段二选一,不可共存。时间段模式下,至少需指定一个时间段。
|
210
|
+
|
211
|
+
:param periods: The periods of this TaskTiming.
|
212
|
+
:type periods: list[:class:`huaweicloudsdkvas.v2.TaskTimingPeriods`]
|
213
|
+
"""
|
214
|
+
self._periods = periods
|
215
|
+
|
216
|
+
@property
|
217
|
+
def frequency(self):
|
218
|
+
r"""Gets the frequency of this TaskTiming.
|
219
|
+
|
220
|
+
:return: The frequency of this TaskTiming.
|
221
|
+
:rtype: :class:`huaweicloudsdkvas.v2.TaskTimingFrequency`
|
222
|
+
"""
|
223
|
+
return self._frequency
|
224
|
+
|
225
|
+
@frequency.setter
|
226
|
+
def frequency(self, frequency):
|
227
|
+
r"""Sets the frequency of this TaskTiming.
|
228
|
+
|
229
|
+
:param frequency: The frequency of this TaskTiming.
|
230
|
+
:type frequency: :class:`huaweicloudsdkvas.v2.TaskTimingFrequency`
|
231
|
+
"""
|
232
|
+
self._frequency = frequency
|
233
|
+
|
234
|
+
def to_dict(self):
|
235
|
+
"""Returns the model properties as a dict"""
|
236
|
+
result = {}
|
237
|
+
|
238
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
239
|
+
value = getattr(self, attr)
|
240
|
+
if isinstance(value, list):
|
241
|
+
result[attr] = list(map(
|
242
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
243
|
+
value
|
244
|
+
))
|
245
|
+
elif hasattr(value, "to_dict"):
|
246
|
+
result[attr] = value.to_dict()
|
247
|
+
elif isinstance(value, dict):
|
248
|
+
result[attr] = dict(map(
|
249
|
+
lambda item: (item[0], item[1].to_dict())
|
250
|
+
if hasattr(item[1], "to_dict") else item,
|
251
|
+
value.items()
|
252
|
+
))
|
253
|
+
else:
|
254
|
+
if attr in self.sensitive_list:
|
255
|
+
result[attr] = "****"
|
256
|
+
else:
|
257
|
+
result[attr] = value
|
258
|
+
|
259
|
+
return result
|
260
|
+
|
261
|
+
def to_str(self):
|
262
|
+
"""Returns the string representation of the model"""
|
263
|
+
import simplejson as json
|
264
|
+
if six.PY2:
|
265
|
+
import sys
|
266
|
+
reload(sys)
|
267
|
+
sys.setdefaultencoding("utf-8")
|
268
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
269
|
+
|
270
|
+
def __repr__(self):
|
271
|
+
"""For `print`"""
|
272
|
+
return self.to_str()
|
273
|
+
|
274
|
+
def __eq__(self, other):
|
275
|
+
"""Returns true if both objects are equal"""
|
276
|
+
if not isinstance(other, TaskTiming):
|
277
|
+
return False
|
278
|
+
|
279
|
+
return self.__dict__ == other.__dict__
|
280
|
+
|
281
|
+
def __ne__(self, other):
|
282
|
+
"""Returns true if both objects are not equal"""
|
283
|
+
return not self == other
|
@@ -0,0 +1,200 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class TaskTimingFrequency:
|
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
|
+
'interval': 'int',
|
21
|
+
'duration': 'int',
|
22
|
+
'begin_at': 'str',
|
23
|
+
'end_at': 'str'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'interval': 'interval',
|
28
|
+
'duration': 'duration',
|
29
|
+
'begin_at': 'begin_at',
|
30
|
+
'end_at': 'end_at'
|
31
|
+
}
|
32
|
+
|
33
|
+
def __init__(self, interval=None, duration=None, begin_at=None, end_at=None):
|
34
|
+
r"""TaskTimingFrequency
|
35
|
+
|
36
|
+
The model defined in huaweicloud sdk
|
37
|
+
|
38
|
+
:param interval: 相邻两次执行之间的间隔,频率模式必填。取值范围在5~720之间,单位:分钟。
|
39
|
+
:type interval: int
|
40
|
+
:param duration: 单次执行的运行时长,频率模式必填。取值范围在5~720之间,单位:分钟。
|
41
|
+
:type duration: int
|
42
|
+
:param begin_at: 单日内执行的起始时间,选填。格式形如hh:mm:ss。
|
43
|
+
:type begin_at: str
|
44
|
+
:param end_at: 单日内执行的结束时间,选填。格式形如hh:mm:ss。
|
45
|
+
:type end_at: str
|
46
|
+
"""
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
self._interval = None
|
51
|
+
self._duration = None
|
52
|
+
self._begin_at = None
|
53
|
+
self._end_at = None
|
54
|
+
self.discriminator = None
|
55
|
+
|
56
|
+
self.interval = interval
|
57
|
+
self.duration = duration
|
58
|
+
if begin_at is not None:
|
59
|
+
self.begin_at = begin_at
|
60
|
+
if end_at is not None:
|
61
|
+
self.end_at = end_at
|
62
|
+
|
63
|
+
@property
|
64
|
+
def interval(self):
|
65
|
+
r"""Gets the interval of this TaskTimingFrequency.
|
66
|
+
|
67
|
+
相邻两次执行之间的间隔,频率模式必填。取值范围在5~720之间,单位:分钟。
|
68
|
+
|
69
|
+
:return: The interval of this TaskTimingFrequency.
|
70
|
+
:rtype: int
|
71
|
+
"""
|
72
|
+
return self._interval
|
73
|
+
|
74
|
+
@interval.setter
|
75
|
+
def interval(self, interval):
|
76
|
+
r"""Sets the interval of this TaskTimingFrequency.
|
77
|
+
|
78
|
+
相邻两次执行之间的间隔,频率模式必填。取值范围在5~720之间,单位:分钟。
|
79
|
+
|
80
|
+
:param interval: The interval of this TaskTimingFrequency.
|
81
|
+
:type interval: int
|
82
|
+
"""
|
83
|
+
self._interval = interval
|
84
|
+
|
85
|
+
@property
|
86
|
+
def duration(self):
|
87
|
+
r"""Gets the duration of this TaskTimingFrequency.
|
88
|
+
|
89
|
+
单次执行的运行时长,频率模式必填。取值范围在5~720之间,单位:分钟。
|
90
|
+
|
91
|
+
:return: The duration of this TaskTimingFrequency.
|
92
|
+
:rtype: int
|
93
|
+
"""
|
94
|
+
return self._duration
|
95
|
+
|
96
|
+
@duration.setter
|
97
|
+
def duration(self, duration):
|
98
|
+
r"""Sets the duration of this TaskTimingFrequency.
|
99
|
+
|
100
|
+
单次执行的运行时长,频率模式必填。取值范围在5~720之间,单位:分钟。
|
101
|
+
|
102
|
+
:param duration: The duration of this TaskTimingFrequency.
|
103
|
+
:type duration: int
|
104
|
+
"""
|
105
|
+
self._duration = duration
|
106
|
+
|
107
|
+
@property
|
108
|
+
def begin_at(self):
|
109
|
+
r"""Gets the begin_at of this TaskTimingFrequency.
|
110
|
+
|
111
|
+
单日内执行的起始时间,选填。格式形如hh:mm:ss。
|
112
|
+
|
113
|
+
:return: The begin_at of this TaskTimingFrequency.
|
114
|
+
:rtype: str
|
115
|
+
"""
|
116
|
+
return self._begin_at
|
117
|
+
|
118
|
+
@begin_at.setter
|
119
|
+
def begin_at(self, begin_at):
|
120
|
+
r"""Sets the begin_at of this TaskTimingFrequency.
|
121
|
+
|
122
|
+
单日内执行的起始时间,选填。格式形如hh:mm:ss。
|
123
|
+
|
124
|
+
:param begin_at: The begin_at of this TaskTimingFrequency.
|
125
|
+
:type begin_at: str
|
126
|
+
"""
|
127
|
+
self._begin_at = begin_at
|
128
|
+
|
129
|
+
@property
|
130
|
+
def end_at(self):
|
131
|
+
r"""Gets the end_at of this TaskTimingFrequency.
|
132
|
+
|
133
|
+
单日内执行的结束时间,选填。格式形如hh:mm:ss。
|
134
|
+
|
135
|
+
:return: The end_at of this TaskTimingFrequency.
|
136
|
+
:rtype: str
|
137
|
+
"""
|
138
|
+
return self._end_at
|
139
|
+
|
140
|
+
@end_at.setter
|
141
|
+
def end_at(self, end_at):
|
142
|
+
r"""Sets the end_at of this TaskTimingFrequency.
|
143
|
+
|
144
|
+
单日内执行的结束时间,选填。格式形如hh:mm:ss。
|
145
|
+
|
146
|
+
:param end_at: The end_at of this TaskTimingFrequency.
|
147
|
+
:type end_at: str
|
148
|
+
"""
|
149
|
+
self._end_at = end_at
|
150
|
+
|
151
|
+
def to_dict(self):
|
152
|
+
"""Returns the model properties as a dict"""
|
153
|
+
result = {}
|
154
|
+
|
155
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
156
|
+
value = getattr(self, attr)
|
157
|
+
if isinstance(value, list):
|
158
|
+
result[attr] = list(map(
|
159
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
160
|
+
value
|
161
|
+
))
|
162
|
+
elif hasattr(value, "to_dict"):
|
163
|
+
result[attr] = value.to_dict()
|
164
|
+
elif isinstance(value, dict):
|
165
|
+
result[attr] = dict(map(
|
166
|
+
lambda item: (item[0], item[1].to_dict())
|
167
|
+
if hasattr(item[1], "to_dict") else item,
|
168
|
+
value.items()
|
169
|
+
))
|
170
|
+
else:
|
171
|
+
if attr in self.sensitive_list:
|
172
|
+
result[attr] = "****"
|
173
|
+
else:
|
174
|
+
result[attr] = value
|
175
|
+
|
176
|
+
return result
|
177
|
+
|
178
|
+
def to_str(self):
|
179
|
+
"""Returns the string representation of the model"""
|
180
|
+
import simplejson as json
|
181
|
+
if six.PY2:
|
182
|
+
import sys
|
183
|
+
reload(sys)
|
184
|
+
sys.setdefaultencoding("utf-8")
|
185
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
186
|
+
|
187
|
+
def __repr__(self):
|
188
|
+
"""For `print`"""
|
189
|
+
return self.to_str()
|
190
|
+
|
191
|
+
def __eq__(self, other):
|
192
|
+
"""Returns true if both objects are equal"""
|
193
|
+
if not isinstance(other, TaskTimingFrequency):
|
194
|
+
return False
|
195
|
+
|
196
|
+
return self.__dict__ == other.__dict__
|
197
|
+
|
198
|
+
def __ne__(self, other):
|
199
|
+
"""Returns true if both objects are not equal"""
|
200
|
+
return not self == other
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class TaskTimingPeriods:
|
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
|
+
'begin_at': 'str',
|
21
|
+
'end_at': 'str'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'begin_at': 'begin_at',
|
26
|
+
'end_at': 'end_at'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, begin_at=None, end_at=None):
|
30
|
+
r"""TaskTimingPeriods
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param begin_at: 单个时间段执行的起始时间,和end_at需成对出现。计划任务类型为once时,格式为yyyy-MM-ddThh:mm:ss,其余计划任务类型时,格式为hh:mm:ss。
|
35
|
+
:type begin_at: str
|
36
|
+
:param end_at: 单个时间段执行的结束时间,和begin_at需成对出现。计划任务类型为once时,格式为yyyy-MM-ddThh:mm:ss,其余计划任务类型时,格式为hh:mm:ss。
|
37
|
+
:type end_at: str
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._begin_at = None
|
43
|
+
self._end_at = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
if begin_at is not None:
|
47
|
+
self.begin_at = begin_at
|
48
|
+
if end_at is not None:
|
49
|
+
self.end_at = end_at
|
50
|
+
|
51
|
+
@property
|
52
|
+
def begin_at(self):
|
53
|
+
r"""Gets the begin_at of this TaskTimingPeriods.
|
54
|
+
|
55
|
+
单个时间段执行的起始时间,和end_at需成对出现。计划任务类型为once时,格式为yyyy-MM-ddThh:mm:ss,其余计划任务类型时,格式为hh:mm:ss。
|
56
|
+
|
57
|
+
:return: The begin_at of this TaskTimingPeriods.
|
58
|
+
:rtype: str
|
59
|
+
"""
|
60
|
+
return self._begin_at
|
61
|
+
|
62
|
+
@begin_at.setter
|
63
|
+
def begin_at(self, begin_at):
|
64
|
+
r"""Sets the begin_at of this TaskTimingPeriods.
|
65
|
+
|
66
|
+
单个时间段执行的起始时间,和end_at需成对出现。计划任务类型为once时,格式为yyyy-MM-ddThh:mm:ss,其余计划任务类型时,格式为hh:mm:ss。
|
67
|
+
|
68
|
+
:param begin_at: The begin_at of this TaskTimingPeriods.
|
69
|
+
:type begin_at: str
|
70
|
+
"""
|
71
|
+
self._begin_at = begin_at
|
72
|
+
|
73
|
+
@property
|
74
|
+
def end_at(self):
|
75
|
+
r"""Gets the end_at of this TaskTimingPeriods.
|
76
|
+
|
77
|
+
单个时间段执行的结束时间,和begin_at需成对出现。计划任务类型为once时,格式为yyyy-MM-ddThh:mm:ss,其余计划任务类型时,格式为hh:mm:ss。
|
78
|
+
|
79
|
+
:return: The end_at of this TaskTimingPeriods.
|
80
|
+
:rtype: str
|
81
|
+
"""
|
82
|
+
return self._end_at
|
83
|
+
|
84
|
+
@end_at.setter
|
85
|
+
def end_at(self, end_at):
|
86
|
+
r"""Sets the end_at of this TaskTimingPeriods.
|
87
|
+
|
88
|
+
单个时间段执行的结束时间,和begin_at需成对出现。计划任务类型为once时,格式为yyyy-MM-ddThh:mm:ss,其余计划任务类型时,格式为hh:mm:ss。
|
89
|
+
|
90
|
+
:param end_at: The end_at of this TaskTimingPeriods.
|
91
|
+
:type end_at: str
|
92
|
+
"""
|
93
|
+
self._end_at = end_at
|
94
|
+
|
95
|
+
def to_dict(self):
|
96
|
+
"""Returns the model properties as a dict"""
|
97
|
+
result = {}
|
98
|
+
|
99
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
100
|
+
value = getattr(self, attr)
|
101
|
+
if isinstance(value, list):
|
102
|
+
result[attr] = list(map(
|
103
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
104
|
+
value
|
105
|
+
))
|
106
|
+
elif hasattr(value, "to_dict"):
|
107
|
+
result[attr] = value.to_dict()
|
108
|
+
elif isinstance(value, dict):
|
109
|
+
result[attr] = dict(map(
|
110
|
+
lambda item: (item[0], item[1].to_dict())
|
111
|
+
if hasattr(item[1], "to_dict") else item,
|
112
|
+
value.items()
|
113
|
+
))
|
114
|
+
else:
|
115
|
+
if attr in self.sensitive_list:
|
116
|
+
result[attr] = "****"
|
117
|
+
else:
|
118
|
+
result[attr] = value
|
119
|
+
|
120
|
+
return result
|
121
|
+
|
122
|
+
def to_str(self):
|
123
|
+
"""Returns the string representation of the model"""
|
124
|
+
import simplejson as json
|
125
|
+
if six.PY2:
|
126
|
+
import sys
|
127
|
+
reload(sys)
|
128
|
+
sys.setdefaultencoding("utf-8")
|
129
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
130
|
+
|
131
|
+
def __repr__(self):
|
132
|
+
"""For `print`"""
|
133
|
+
return self.to_str()
|
134
|
+
|
135
|
+
def __eq__(self, other):
|
136
|
+
"""Returns true if both objects are equal"""
|
137
|
+
if not isinstance(other, TaskTimingPeriods):
|
138
|
+
return False
|
139
|
+
|
140
|
+
return self.__dict__ == other.__dict__
|
141
|
+
|
142
|
+
def __ne__(self, other):
|
143
|
+
"""Returns true if both objects are not equal"""
|
144
|
+
return not self == other
|