240 lines
5.8 KiB
Python
240 lines
5.8 KiB
Python
# coding: utf-8
|
|
|
|
import pprint
|
|
import re
|
|
|
|
import six
|
|
|
|
|
|
|
|
|
|
|
|
class PipelineParam:
|
|
|
|
|
|
"""
|
|
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 = {
|
|
'name': 'str',
|
|
'value': 'str',
|
|
'description': 'str',
|
|
'paramtype': 'str',
|
|
'is_static': 'bool',
|
|
'is_default': 'bool'
|
|
}
|
|
|
|
attribute_map = {
|
|
'name': 'name',
|
|
'value': 'value',
|
|
'description': 'description',
|
|
'paramtype': 'paramtype',
|
|
'is_static': 'is_static',
|
|
'is_default': 'is_default'
|
|
}
|
|
|
|
def __init__(self, name=None, value=None, description=None, paramtype=None, is_static=None, is_default=None):
|
|
"""PipelineParam - a model defined in huaweicloud sdk"""
|
|
|
|
|
|
|
|
self._name = None
|
|
self._value = None
|
|
self._description = None
|
|
self._paramtype = None
|
|
self._is_static = None
|
|
self._is_default = None
|
|
self.discriminator = None
|
|
|
|
self.name = name
|
|
self.value = value
|
|
self.description = description
|
|
self.paramtype = paramtype
|
|
self.is_static = is_static
|
|
self.is_default = is_default
|
|
|
|
@property
|
|
def name(self):
|
|
"""Gets the name of this PipelineParam.
|
|
|
|
流水线参数名字
|
|
|
|
:return: The name of this PipelineParam.
|
|
:rtype: str
|
|
"""
|
|
return self._name
|
|
|
|
@name.setter
|
|
def name(self, name):
|
|
"""Sets the name of this PipelineParam.
|
|
|
|
流水线参数名字
|
|
|
|
:param name: The name of this PipelineParam.
|
|
:type: str
|
|
"""
|
|
self._name = name
|
|
|
|
@property
|
|
def value(self):
|
|
"""Gets the value of this PipelineParam.
|
|
|
|
流水线参数值
|
|
|
|
:return: The value of this PipelineParam.
|
|
:rtype: str
|
|
"""
|
|
return self._value
|
|
|
|
@value.setter
|
|
def value(self, value):
|
|
"""Sets the value of this PipelineParam.
|
|
|
|
流水线参数值
|
|
|
|
:param value: The value of this PipelineParam.
|
|
:type: str
|
|
"""
|
|
self._value = value
|
|
|
|
@property
|
|
def description(self):
|
|
"""Gets the description of this PipelineParam.
|
|
|
|
流水线参数描述
|
|
|
|
:return: The description of this PipelineParam.
|
|
:rtype: str
|
|
"""
|
|
return self._description
|
|
|
|
@description.setter
|
|
def description(self, description):
|
|
"""Sets the description of this PipelineParam.
|
|
|
|
流水线参数描述
|
|
|
|
:param description: The description of this PipelineParam.
|
|
:type: str
|
|
"""
|
|
self._description = description
|
|
|
|
@property
|
|
def paramtype(self):
|
|
"""Gets the paramtype of this PipelineParam.
|
|
|
|
流水线参数类型
|
|
|
|
:return: The paramtype of this PipelineParam.
|
|
:rtype: str
|
|
"""
|
|
return self._paramtype
|
|
|
|
@paramtype.setter
|
|
def paramtype(self, paramtype):
|
|
"""Sets the paramtype of this PipelineParam.
|
|
|
|
流水线参数类型
|
|
|
|
:param paramtype: The paramtype of this PipelineParam.
|
|
:type: str
|
|
"""
|
|
self._paramtype = paramtype
|
|
|
|
@property
|
|
def is_static(self):
|
|
"""Gets the is_static of this PipelineParam.
|
|
|
|
是否静态参数
|
|
|
|
:return: The is_static of this PipelineParam.
|
|
:rtype: bool
|
|
"""
|
|
return self._is_static
|
|
|
|
@is_static.setter
|
|
def is_static(self, is_static):
|
|
"""Sets the is_static of this PipelineParam.
|
|
|
|
是否静态参数
|
|
|
|
:param is_static: The is_static of this PipelineParam.
|
|
:type: bool
|
|
"""
|
|
self._is_static = is_static
|
|
|
|
@property
|
|
def is_default(self):
|
|
"""Gets the is_default of this PipelineParam.
|
|
|
|
是否默认参数
|
|
|
|
:return: The is_default of this PipelineParam.
|
|
:rtype: bool
|
|
"""
|
|
return self._is_default
|
|
|
|
@is_default.setter
|
|
def is_default(self, is_default):
|
|
"""Sets the is_default of this PipelineParam.
|
|
|
|
是否默认参数
|
|
|
|
:param is_default: The is_default of this PipelineParam.
|
|
:type: bool
|
|
"""
|
|
self._is_default = is_default
|
|
|
|
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):
|
|
"""Returns the string representation of the model"""
|
|
return pprint.pformat(self.to_dict())
|
|
|
|
def __repr__(self):
|
|
"""For `print` and `pprint`"""
|
|
return self.to_str()
|
|
|
|
def __eq__(self, other):
|
|
"""Returns true if both objects are equal"""
|
|
if not isinstance(other, PipelineParam):
|
|
return False
|
|
|
|
return self.__dict__ == other.__dict__
|
|
|
|
def __ne__(self, other):
|
|
"""Returns true if both objects are not equal"""
|
|
return not self == other
|