2020-08-15 09:41:31 +00:00
|
|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
|
|
import re
|
|
|
|
|
import six
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-26 11:24:08 +00:00
|
|
|
|
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
class TemplateCddl:
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
Attributes:
|
|
|
|
|
openapi_types (dict): The key is attribute name
|
|
|
|
|
and the value is attribute type.
|
|
|
|
|
attribute_map (dict): The key is attribute name
|
|
|
|
|
and the value is json key in definition.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
sensitive_list = []
|
|
|
|
|
|
|
|
|
|
openapi_types = {
|
2021-06-21 14:35:39 +00:00
|
|
|
|
'flow': 'dict(str, dict(str, str))',
|
2021-07-26 11:24:08 +00:00
|
|
|
|
'states': 'dict(str, TemplateState)',
|
2020-08-28 10:16:33 +00:00
|
|
|
|
'workflow': 'Workflow'
|
2020-08-15 09:41:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
attribute_map = {
|
2020-08-28 10:16:33 +00:00
|
|
|
|
'flow': 'flow',
|
|
|
|
|
'states': 'states',
|
|
|
|
|
'workflow': 'workflow'
|
2020-08-15 09:41:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
def __init__(self, flow=None, states=None, workflow=None):
|
|
|
|
|
"""TemplateCddl - a model defined in huaweicloud sdk"""
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
self._flow = None
|
|
|
|
|
self._states = None
|
|
|
|
|
self._workflow = None
|
2020-08-15 09:41:31 +00:00
|
|
|
|
self.discriminator = None
|
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
self.flow = flow
|
|
|
|
|
self.states = states
|
|
|
|
|
self.workflow = workflow
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
@property
|
2020-08-28 10:16:33 +00:00
|
|
|
|
def flow(self):
|
|
|
|
|
"""Gets the flow of this TemplateCddl.
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2021-06-21 14:35:39 +00:00
|
|
|
|
编排flow详情,描述流水线内各阶段任务的串并行关系。map类型数据,key为阶段名字,默认第一阶段initial,最后阶段为final,其余名字以'state_数字'标识。value为该阶段内任务(以'Task_数字'标识)以及后续阶段的标识。本字段为描述流水线基础编排数据之一,建议可通过流水线真实界面基于模板创建接口中获取
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
:return: The flow of this TemplateCddl.
|
2021-06-21 14:35:39 +00:00
|
|
|
|
:rtype: dict(str, dict(str, str))
|
2020-08-15 09:41:31 +00:00
|
|
|
|
"""
|
2020-08-28 10:16:33 +00:00
|
|
|
|
return self._flow
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
@flow.setter
|
|
|
|
|
def flow(self, flow):
|
|
|
|
|
"""Sets the flow of this TemplateCddl.
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2021-06-21 14:35:39 +00:00
|
|
|
|
编排flow详情,描述流水线内各阶段任务的串并行关系。map类型数据,key为阶段名字,默认第一阶段initial,最后阶段为final,其余名字以'state_数字'标识。value为该阶段内任务(以'Task_数字'标识)以及后续阶段的标识。本字段为描述流水线基础编排数据之一,建议可通过流水线真实界面基于模板创建接口中获取
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
:param flow: The flow of this TemplateCddl.
|
2021-06-21 14:35:39 +00:00
|
|
|
|
:type: dict(str, dict(str, str))
|
2020-08-15 09:41:31 +00:00
|
|
|
|
"""
|
2020-08-28 10:16:33 +00:00
|
|
|
|
self._flow = flow
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
@property
|
2020-08-28 10:16:33 +00:00
|
|
|
|
def states(self):
|
|
|
|
|
"""Gets the states of this TemplateCddl.
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2021-06-21 14:35:39 +00:00
|
|
|
|
编排State详情,map类型数据。本字段为描述流水线基础编排数据之一,建议可通过流水线真实界面基于模板创建接口中获取
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
:return: The states of this TemplateCddl.
|
2021-07-26 11:24:08 +00:00
|
|
|
|
:rtype: dict(str, TemplateState)
|
2020-08-15 09:41:31 +00:00
|
|
|
|
"""
|
2020-08-28 10:16:33 +00:00
|
|
|
|
return self._states
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
@states.setter
|
|
|
|
|
def states(self, states):
|
|
|
|
|
"""Sets the states of this TemplateCddl.
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2021-06-21 14:35:39 +00:00
|
|
|
|
编排State详情,map类型数据。本字段为描述流水线基础编排数据之一,建议可通过流水线真实界面基于模板创建接口中获取
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
:param states: The states of this TemplateCddl.
|
2021-07-26 11:24:08 +00:00
|
|
|
|
:type: dict(str, TemplateState)
|
2020-08-15 09:41:31 +00:00
|
|
|
|
"""
|
2020-08-28 10:16:33 +00:00
|
|
|
|
self._states = states
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
@property
|
2020-08-28 10:16:33 +00:00
|
|
|
|
def workflow(self):
|
|
|
|
|
"""Gets the workflow of this TemplateCddl.
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
:return: The workflow of this TemplateCddl.
|
|
|
|
|
:rtype: Workflow
|
2020-08-15 09:41:31 +00:00
|
|
|
|
"""
|
2020-08-28 10:16:33 +00:00
|
|
|
|
return self._workflow
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
@workflow.setter
|
|
|
|
|
def workflow(self, workflow):
|
|
|
|
|
"""Sets the workflow of this TemplateCddl.
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
|
2020-08-28 10:16:33 +00:00
|
|
|
|
:param workflow: The workflow of this TemplateCddl.
|
|
|
|
|
:type: Workflow
|
2020-08-15 09:41:31 +00:00
|
|
|
|
"""
|
2020-08-28 10:16:33 +00:00
|
|
|
|
self._workflow = workflow
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
def to_dict(self):
|
|
|
|
|
"""Returns the model properties as a dict"""
|
|
|
|
|
result = {}
|
|
|
|
|
|
|
|
|
|
for attr, _ in six.iteritems(self.openapi_types):
|
|
|
|
|
value = getattr(self, attr)
|
|
|
|
|
if isinstance(value, list):
|
|
|
|
|
result[attr] = list(map(
|
|
|
|
|
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
|
|
|
value
|
|
|
|
|
))
|
|
|
|
|
elif hasattr(value, "to_dict"):
|
|
|
|
|
result[attr] = value.to_dict()
|
|
|
|
|
elif isinstance(value, dict):
|
|
|
|
|
result[attr] = dict(map(
|
|
|
|
|
lambda item: (item[0], item[1].to_dict())
|
|
|
|
|
if hasattr(item[1], "to_dict") else item,
|
|
|
|
|
value.items()
|
|
|
|
|
))
|
|
|
|
|
else:
|
|
|
|
|
if attr in self.sensitive_list:
|
|
|
|
|
result[attr] = "****"
|
|
|
|
|
else:
|
|
|
|
|
result[attr] = value
|
|
|
|
|
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
def to_str(self):
|
2021-08-10 12:26:18 +00:00
|
|
|
|
"""Returns the string representation of the model"""
|
2021-07-09 10:57:08 +00:00
|
|
|
|
import simplejson as json
|
2021-08-10 12:26:18 +00:00
|
|
|
|
if six.PY2:
|
|
|
|
|
import sys
|
|
|
|
|
reload(sys)
|
|
|
|
|
sys.setdefaultencoding("utf-8")
|
|
|
|
|
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
2020-08-15 09:41:31 +00:00
|
|
|
|
|
|
|
|
|
def __repr__(self):
|
2021-08-10 12:26:18 +00:00
|
|
|
|
"""For `print`"""
|
2020-08-15 09:41:31 +00:00
|
|
|
|
return self.to_str()
|
|
|
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
|
"""Returns true if both objects are equal"""
|
2020-08-28 10:16:33 +00:00
|
|
|
|
if not isinstance(other, TemplateCddl):
|
2020-08-15 09:41:31 +00:00
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
return self.__dict__ == other.__dict__
|
|
|
|
|
|
|
|
|
|
def __ne__(self, other):
|
|
|
|
|
"""Returns true if both objects are not equal"""
|
|
|
|
|
return not self == other
|