huaweicloud-sdk-python-v3/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/model/create_report_response.py

225 lines
6.5 KiB
Python
Raw Normal View History

2022-11-17 12:13:53 +00:00
# coding: utf-8
import six
2024-06-27 11:16:10 +00:00
from huaweicloudsdkcore.sdk_response import SdkResponse
2022-11-17 12:13:53 +00:00
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
2024-06-27 11:16:10 +00:00
class CreateReportResponse(SdkResponse):
2022-11-17 12:13:53 +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 = {
2024-09-26 08:17:59 +00:00
'status': 'str',
'result': 'ResultValueString',
'error': 'ApiError',
'request_id': 'str',
'server_address': 'str'
2022-11-17 12:13:53 +00:00
}
attribute_map = {
2024-09-26 08:17:59 +00:00
'status': 'status',
'result': 'result',
'error': 'error',
'request_id': 'request_id',
'server_address': 'server_address'
2022-11-17 12:13:53 +00:00
}
2024-09-26 08:17:59 +00:00
def __init__(self, status=None, result=None, error=None, request_id=None, server_address=None):
2024-06-27 11:16:10 +00:00
"""CreateReportResponse
2022-11-17 12:13:53 +00:00
The model defined in huaweicloud sdk
2024-09-26 08:17:59 +00:00
:param status: success|error
:type status: str
:param result:
:type result: :class:`huaweicloudsdkcloudtest.v1.ResultValueString`
:param error:
:type error: :class:`huaweicloudsdkcloudtest.v1.ApiError`
:param request_id: 由接口调用方传入建议使用UUID保证请求的唯一性
:type request_id: str
:param server_address: 对内接口才有此属性
:type server_address: str
2022-11-17 12:13:53 +00:00
"""
2024-06-27 11:16:10 +00:00
super(CreateReportResponse, self).__init__()
2022-11-17 12:13:53 +00:00
2024-09-26 08:17:59 +00:00
self._status = None
self._result = None
self._error = None
self._request_id = None
self._server_address = None
2022-11-17 12:13:53 +00:00
self.discriminator = None
2024-09-26 08:17:59 +00:00
if status is not None:
self.status = status
if result is not None:
self.result = result
if error is not None:
self.error = error
if request_id is not None:
self.request_id = request_id
if server_address is not None:
self.server_address = server_address
2022-11-17 12:13:53 +00:00
@property
2024-09-26 08:17:59 +00:00
def status(self):
"""Gets the status of this CreateReportResponse.
2022-11-17 12:13:53 +00:00
2024-09-26 08:17:59 +00:00
success|error
:return: The status of this CreateReportResponse.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this CreateReportResponse.
success|error
:param status: The status of this CreateReportResponse.
:type status: str
"""
self._status = status
@property
def result(self):
"""Gets the result of this CreateReportResponse.
:return: The result of this CreateReportResponse.
:rtype: :class:`huaweicloudsdkcloudtest.v1.ResultValueString`
"""
return self._result
@result.setter
def result(self, result):
"""Sets the result of this CreateReportResponse.
:param result: The result of this CreateReportResponse.
:type result: :class:`huaweicloudsdkcloudtest.v1.ResultValueString`
"""
self._result = result
@property
def error(self):
"""Gets the error of this CreateReportResponse.
:return: The error of this CreateReportResponse.
:rtype: :class:`huaweicloudsdkcloudtest.v1.ApiError`
"""
return self._error
@error.setter
def error(self, error):
"""Sets the error of this CreateReportResponse.
:param error: The error of this CreateReportResponse.
:type error: :class:`huaweicloudsdkcloudtest.v1.ApiError`
"""
self._error = error
@property
def request_id(self):
"""Gets the request_id of this CreateReportResponse.
由接口调用方传入建议使用UUID保证请求的唯一性
:return: The request_id of this CreateReportResponse.
:rtype: str
"""
return self._request_id
@request_id.setter
def request_id(self, request_id):
"""Sets the request_id of this CreateReportResponse.
由接口调用方传入建议使用UUID保证请求的唯一性
:param request_id: The request_id of this CreateReportResponse.
:type request_id: str
"""
self._request_id = request_id
@property
def server_address(self):
"""Gets the server_address of this CreateReportResponse.
对内接口才有此属性
:return: The server_address of this CreateReportResponse.
2022-11-17 12:13:53 +00:00
:rtype: str
"""
2024-09-26 08:17:59 +00:00
return self._server_address
@server_address.setter
def server_address(self, server_address):
"""Sets the server_address of this CreateReportResponse.
2022-11-17 12:13:53 +00:00
2024-09-26 08:17:59 +00:00
对内接口才有此属性
2022-11-17 12:13:53 +00:00
2024-09-26 08:17:59 +00:00
:param server_address: The server_address of this CreateReportResponse.
:type server_address: str
2022-11-17 12:13:53 +00:00
"""
2024-09-26 08:17:59 +00:00
self._server_address = server_address
2022-11-17 12:13:53 +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):
"""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"""
2024-06-27 11:16:10 +00:00
if not isinstance(other, CreateReportResponse):
2022-11-17 12:13:53 +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