huaweicloud-sdk-python-v3/huaweicloud-sdk-cdm/huaweicloudsdkcdm/v1/model/links.py

299 lines
9.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class Links:
"""
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 = {
'link_config_values': 'LinksLinkconfigvalues',
'creation_user': 'str',
'name': 'str',
'creation_date': 'int',
'connector_name': 'str',
'update_date': 'int',
'enabled': 'bool',
'update_user': 'str'
}
attribute_map = {
'link_config_values': 'link-config-values',
'creation_user': 'creation-user',
'name': 'name',
'creation_date': 'creation-date',
'connector_name': 'connector-name',
'update_date': 'update-date',
'enabled': 'enabled',
'update_user': 'update-user'
}
def __init__(self, link_config_values=None, creation_user=None, name=None, creation_date=None, connector_name=None, update_date=None, enabled=None, update_user=None):
"""Links - a model defined in huaweicloud sdk"""
self._link_config_values = None
self._creation_user = None
self._name = None
self._creation_date = None
self._connector_name = None
self._update_date = None
self._enabled = None
self._update_user = None
self.discriminator = None
self.link_config_values = link_config_values
if creation_user is not None:
self.creation_user = creation_user
self.name = name
if creation_date is not None:
self.creation_date = creation_date
self.connector_name = connector_name
if update_date is not None:
self.update_date = update_date
if enabled is not None:
self.enabled = enabled
if update_user is not None:
self.update_user = update_user
@property
def link_config_values(self):
"""Gets the link_config_values of this Links.
:return: The link_config_values of this Links.
:rtype: LinksLinkconfigvalues
"""
return self._link_config_values
@link_config_values.setter
def link_config_values(self, link_config_values):
"""Sets the link_config_values of this Links.
:param link_config_values: The link_config_values of this Links.
:type: LinksLinkconfigvalues
"""
self._link_config_values = link_config_values
@property
def creation_user(self):
"""Gets the creation_user of this Links.
创建连接的用户
:return: The creation_user of this Links.
:rtype: str
"""
return self._creation_user
@creation_user.setter
def creation_user(self, creation_user):
"""Sets the creation_user of this Links.
创建连接的用户
:param creation_user: The creation_user of this Links.
:type: str
"""
self._creation_user = creation_user
@property
def name(self):
"""Gets the name of this Links.
连接名称
:return: The name of this Links.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this Links.
连接名称
:param name: The name of this Links.
:type: str
"""
self._name = name
@property
def creation_date(self):
"""Gets the creation_date of this Links.
创建连接的时间
:return: The creation_date of this Links.
:rtype: int
"""
return self._creation_date
@creation_date.setter
def creation_date(self, creation_date):
"""Sets the creation_date of this Links.
创建连接的时间
:param creation_date: The creation_date of this Links.
:type: int
"""
self._creation_date = creation_date
@property
def connector_name(self):
"""Gets the connector_name of this Links.
连接器名称对应的连接参数如下generic-jdbc-connector关系数据库连接。obs-connectorOBS连接、阿里云OSS连接。hdfs-connectorHDFS连接。hbase-connectorHBase连接、CloudTable连接。hive-connectorHive连接。ftp-connector/sftp-connectorFTP/SFTP连接。mongodb-connectorMongoDB连接。redis-connectorRedis/DCS连接。nas-connectorNAS/SFS连接。kafka-connectorKafka连接。dis-connectorDIS连接。elasticsearch-connectorElasticsearch/云搜索服务连接。dli-connectorDLI连接。opentsdb-connectorCloudTable OpenTSDB连接。http-connectorHTTP/HTTPS连接该连接暂无连接参数。thirdparty-obs-connector七牛云KODO/腾讯云COS连接、亚马逊对象存储连接。dms-kafka-connectorDMS Kafka连接
:return: The connector_name of this Links.
:rtype: str
"""
return self._connector_name
@connector_name.setter
def connector_name(self, connector_name):
"""Sets the connector_name of this Links.
连接器名称对应的连接参数如下generic-jdbc-connector关系数据库连接。obs-connectorOBS连接、阿里云OSS连接。hdfs-connectorHDFS连接。hbase-connectorHBase连接、CloudTable连接。hive-connectorHive连接。ftp-connector/sftp-connectorFTP/SFTP连接。mongodb-connectorMongoDB连接。redis-connectorRedis/DCS连接。nas-connectorNAS/SFS连接。kafka-connectorKafka连接。dis-connectorDIS连接。elasticsearch-connectorElasticsearch/云搜索服务连接。dli-connectorDLI连接。opentsdb-connectorCloudTable OpenTSDB连接。http-connectorHTTP/HTTPS连接该连接暂无连接参数。thirdparty-obs-connector七牛云KODO/腾讯云COS连接、亚马逊对象存储连接。dms-kafka-connectorDMS Kafka连接
:param connector_name: The connector_name of this Links.
:type: str
"""
self._connector_name = connector_name
@property
def update_date(self):
"""Gets the update_date of this Links.
更新连接的时间
:return: The update_date of this Links.
:rtype: int
"""
return self._update_date
@update_date.setter
def update_date(self, update_date):
"""Sets the update_date of this Links.
更新连接的时间
:param update_date: The update_date of this Links.
:type: int
"""
self._update_date = update_date
@property
def enabled(self):
"""Gets the enabled of this Links.
是否激活连接默认为“true”
:return: The enabled of this Links.
:rtype: bool
"""
return self._enabled
@enabled.setter
def enabled(self, enabled):
"""Sets the enabled of this Links.
是否激活连接默认为“true”
:param enabled: The enabled of this Links.
:type: bool
"""
self._enabled = enabled
@property
def update_user(self):
"""Gets the update_user of this Links.
更新连接的用户
:return: The update_user of this Links.
:rtype: str
"""
return self._update_user
@update_user.setter
def update_user(self, update_user):
"""Sets the update_user of this Links.
更新连接的用户
:param update_user: The update_user of this Links.
:type: str
"""
self._update_user = update_user
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"""
import simplejson as json
if six.PY2:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
def __repr__(self):
"""For `print`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Links):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other