huaweicloud-sdk-python-v3/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/model/create_tracker_response.py

460 lines
14 KiB
Python
Raw Normal View History

2020-05-18 07:34:40 +00:00
# coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
2021-07-26 11:24:08 +00:00
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class CreateTrackerResponse(SdkResponse):
2020-05-18 07:34:40 +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 = []
2020-05-18 07:34:40 +00:00
openapi_types = {
'id': 'str',
'create_time': 'int',
'kms_id': 'str',
'is_support_validate': 'bool',
'lts': 'Lts',
'tracker_type': 'str',
2020-05-18 07:34:40 +00:00
'domain_id': 'str',
'project_id': 'str',
'tracker_name': 'str',
'status': 'str',
'detail': 'str',
2020-05-18 07:34:40 +00:00
'is_support_trace_files_encryption': 'bool',
'obs_info': 'ObsInfo',
'data_bucket': 'DataBucketQuery'
2020-05-18 07:34:40 +00:00
}
attribute_map = {
'id': 'id',
'create_time': 'create_time',
'kms_id': 'kms_id',
'is_support_validate': 'is_support_validate',
'lts': 'lts',
'tracker_type': 'tracker_type',
2020-05-18 07:34:40 +00:00
'domain_id': 'domain_id',
'project_id': 'project_id',
'tracker_name': 'tracker_name',
'status': 'status',
'detail': 'detail',
2020-05-18 07:34:40 +00:00
'is_support_trace_files_encryption': 'is_support_trace_files_encryption',
'obs_info': 'obs_info',
'data_bucket': 'data_bucket'
2020-05-18 07:34:40 +00:00
}
def __init__(self, id=None, create_time=None, kms_id=None, is_support_validate=None, lts=None, tracker_type=None, domain_id=None, project_id=None, tracker_name=None, status=None, detail=None, is_support_trace_files_encryption=None, obs_info=None, data_bucket=None):
2020-05-18 07:34:40 +00:00
"""CreateTrackerResponse - a model defined in huaweicloud sdk"""
super(CreateTrackerResponse, self).__init__()
2020-05-18 07:34:40 +00:00
self._id = None
self._create_time = None
self._kms_id = None
self._is_support_validate = None
self._lts = None
self._tracker_type = None
2020-05-18 07:34:40 +00:00
self._domain_id = None
self._project_id = None
self._tracker_name = None
self._status = None
self._detail = None
2020-05-18 07:34:40 +00:00
self._is_support_trace_files_encryption = None
self._obs_info = None
self._data_bucket = None
2020-05-18 07:34:40 +00:00
self.discriminator = None
if id is not None:
self.id = id
if create_time is not None:
self.create_time = create_time
if kms_id is not None:
self.kms_id = kms_id
if is_support_validate is not None:
self.is_support_validate = is_support_validate
if lts is not None:
self.lts = lts
if tracker_type is not None:
self.tracker_type = tracker_type
2020-05-18 07:34:40 +00:00
if domain_id is not None:
self.domain_id = domain_id
if project_id is not None:
self.project_id = project_id
if tracker_name is not None:
self.tracker_name = tracker_name
if status is not None:
self.status = status
if detail is not None:
self.detail = detail
2020-05-18 07:34:40 +00:00
if is_support_trace_files_encryption is not None:
self.is_support_trace_files_encryption = is_support_trace_files_encryption
if obs_info is not None:
self.obs_info = obs_info
if data_bucket is not None:
self.data_bucket = data_bucket
2020-05-18 07:34:40 +00:00
@property
def id(self):
"""Gets the id of this CreateTrackerResponse.
追踪器唯一标识
:return: The id of this CreateTrackerResponse.
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this CreateTrackerResponse.
追踪器唯一标识
:param id: The id of this CreateTrackerResponse.
:type: str
"""
self._id = id
@property
def create_time(self):
"""Gets the create_time of this CreateTrackerResponse.
追踪器创建时间戳
:return: The create_time of this CreateTrackerResponse.
:rtype: int
"""
return self._create_time
@create_time.setter
def create_time(self, create_time):
"""Sets the create_time of this CreateTrackerResponse.
追踪器创建时间戳
:param create_time: The create_time of this CreateTrackerResponse.
:type: int
"""
self._create_time = create_time
@property
def kms_id(self):
"""Gets the kms_id of this CreateTrackerResponse.
事件文件转储加密所采用的秘钥id从KMS获取 \"tracker_type\"参数值为\"system\"\"is_support_trace_files_encryption\"参数值为“是”时,此参数为必选项。
:return: The kms_id of this CreateTrackerResponse.
:rtype: str
"""
return self._kms_id
@kms_id.setter
def kms_id(self, kms_id):
"""Sets the kms_id of this CreateTrackerResponse.
事件文件转储加密所采用的秘钥id从KMS获取 \"tracker_type\"参数值为\"system\"\"is_support_trace_files_encryption\"参数值为“是”时,此参数为必选项。
:param kms_id: The kms_id of this CreateTrackerResponse.
:type: str
"""
self._kms_id = kms_id
@property
def is_support_validate(self):
"""Gets the is_support_validate of this CreateTrackerResponse.
是否打开事件文件校验当前环境仅\"tracker_type\"参数值为\"system\"时支持该功能。
:return: The is_support_validate of this CreateTrackerResponse.
:rtype: bool
"""
return self._is_support_validate
@is_support_validate.setter
def is_support_validate(self, is_support_validate):
"""Sets the is_support_validate of this CreateTrackerResponse.
是否打开事件文件校验当前环境仅\"tracker_type\"参数值为\"system\"时支持该功能。
:param is_support_validate: The is_support_validate of this CreateTrackerResponse.
:type: bool
"""
self._is_support_validate = is_support_validate
@property
def lts(self):
"""Gets the lts of this CreateTrackerResponse.
:return: The lts of this CreateTrackerResponse.
:rtype: Lts
"""
return self._lts
@lts.setter
def lts(self, lts):
"""Sets the lts of this CreateTrackerResponse.
:param lts: The lts of this CreateTrackerResponse.
:type: Lts
"""
self._lts = lts
@property
def tracker_type(self):
"""Gets the tracker_type of this CreateTrackerResponse.
标识追踪器类型 目前支持系统追踪器类型有管理类追踪器system和数据类追踪器data
:return: The tracker_type of this CreateTrackerResponse.
:rtype: str
"""
return self._tracker_type
@tracker_type.setter
def tracker_type(self, tracker_type):
"""Sets the tracker_type of this CreateTrackerResponse.
标识追踪器类型 目前支持系统追踪器类型有管理类追踪器system和数据类追踪器data
:param tracker_type: The tracker_type of this CreateTrackerResponse.
:type: str
"""
self._tracker_type = tracker_type
2020-05-18 07:34:40 +00:00
@property
def domain_id(self):
"""Gets the domain_id of this CreateTrackerResponse.
账号ID参见云审计服务API参考获取账号ID和项目ID章节
:return: The domain_id of this CreateTrackerResponse.
:rtype: str
"""
return self._domain_id
@domain_id.setter
def domain_id(self, domain_id):
"""Sets the domain_id of this CreateTrackerResponse.
账号ID参见云审计服务API参考获取账号ID和项目ID章节
:param domain_id: The domain_id of this CreateTrackerResponse.
:type: str
"""
self._domain_id = domain_id
@property
def project_id(self):
"""Gets the project_id of this CreateTrackerResponse.
项目ID
:return: The project_id of this CreateTrackerResponse.
:rtype: str
"""
return self._project_id
@project_id.setter
def project_id(self, project_id):
"""Sets the project_id of this CreateTrackerResponse.
项目ID
:param project_id: The project_id of this CreateTrackerResponse.
:type: str
"""
self._project_id = project_id
@property
def tracker_name(self):
"""Gets the tracker_name of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
标识追踪器名称当前版本默认为system
2020-05-18 07:34:40 +00:00
:return: The tracker_name of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:rtype: str
"""
return self._tracker_name
2020-05-18 07:34:40 +00:00
@tracker_name.setter
def tracker_name(self, tracker_name):
"""Sets the tracker_name of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
标识追踪器名称当前版本默认为system
2020-05-18 07:34:40 +00:00
:param tracker_name: The tracker_name of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:type: str
"""
self._tracker_name = tracker_name
2020-05-18 07:34:40 +00:00
@property
def status(self):
"""Gets the status of this CreateTrackerResponse.
标识追踪器状态包括正常enabled停止disabled和异常error三种状态状态为异常时需通过明细detail字段说明错误来源
2020-05-18 07:34:40 +00:00
:return: The status of this CreateTrackerResponse.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this CreateTrackerResponse.
标识追踪器状态包括正常enabled停止disabled和异常error三种状态状态为异常时需通过明细detail字段说明错误来源
2020-05-18 07:34:40 +00:00
:param status: The status of this CreateTrackerResponse.
:type: str
"""
self._status = status
@property
def detail(self):
"""Gets the detail of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
该参数仅在追踪器状态异常时返回用于标识追踪器异常的原因包括桶策略异常bucketPolicyError桶不存在noBucket和欠费或冻结arrears三种原因
2020-05-18 07:34:40 +00:00
:return: The detail of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:rtype: str
"""
return self._detail
2020-05-18 07:34:40 +00:00
@detail.setter
def detail(self, detail):
"""Sets the detail of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
该参数仅在追踪器状态异常时返回用于标识追踪器异常的原因包括桶策略异常bucketPolicyError桶不存在noBucket和欠费或冻结arrears三种原因
2020-05-18 07:34:40 +00:00
:param detail: The detail of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:type: str
"""
self._detail = detail
2020-05-18 07:34:40 +00:00
@property
def is_support_trace_files_encryption(self):
"""Gets the is_support_trace_files_encryption of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
事件文件转储加密功能开关 该参数必须与kms_id参数同时使用 当前环境仅\"tracker_type\"参数值为\"system\"时支持该功能。
2020-05-18 07:34:40 +00:00
:return: The is_support_trace_files_encryption of this CreateTrackerResponse.
:rtype: bool
2020-05-18 07:34:40 +00:00
"""
return self._is_support_trace_files_encryption
2020-05-18 07:34:40 +00:00
@is_support_trace_files_encryption.setter
def is_support_trace_files_encryption(self, is_support_trace_files_encryption):
"""Sets the is_support_trace_files_encryption of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
事件文件转储加密功能开关 该参数必须与kms_id参数同时使用 当前环境仅\"tracker_type\"参数值为\"system\"时支持该功能。
2020-05-18 07:34:40 +00:00
:param is_support_trace_files_encryption: The is_support_trace_files_encryption of this CreateTrackerResponse.
:type: bool
2020-05-18 07:34:40 +00:00
"""
self._is_support_trace_files_encryption = is_support_trace_files_encryption
2020-05-18 07:34:40 +00:00
@property
def obs_info(self):
"""Gets the obs_info of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:return: The obs_info of this CreateTrackerResponse.
:rtype: ObsInfo
2020-05-18 07:34:40 +00:00
"""
return self._obs_info
2020-05-18 07:34:40 +00:00
@obs_info.setter
def obs_info(self, obs_info):
"""Sets the obs_info of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:param obs_info: The obs_info of this CreateTrackerResponse.
:type: ObsInfo
2020-05-18 07:34:40 +00:00
"""
self._obs_info = obs_info
2020-05-18 07:34:40 +00:00
@property
def data_bucket(self):
"""Gets the data_bucket of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:return: The data_bucket of this CreateTrackerResponse.
:rtype: DataBucketQuery
2020-05-18 07:34:40 +00:00
"""
return self._data_bucket
2020-05-18 07:34:40 +00:00
@data_bucket.setter
def data_bucket(self, data_bucket):
"""Sets the data_bucket of this CreateTrackerResponse.
2020-05-18 07:34:40 +00:00
:param data_bucket: The data_bucket of this CreateTrackerResponse.
:type: DataBucketQuery
2020-05-18 07:34:40 +00:00
"""
self._data_bucket = data_bucket
2020-05-18 07:34:40 +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
2020-05-18 07:34:40 +00:00
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-05-18 07:34:40 +00:00
def __repr__(self):
2021-08-10 12:26:18 +00:00
"""For `print`"""
2020-05-18 07:34:40 +00:00
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, CreateTrackerResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other