huaweicloud-sdk-python-v3/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/official_website_rating_res...

165 lines
5.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 pprint
import re
import six
class OfficialWebsiteRatingResult:
"""
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 = {
'measure_id': 'int',
'official_website_amount': 'float',
'product_rating_results': 'list[PeriodProductOfficialRatingResult]'
}
attribute_map = {
'measure_id': 'measure_id',
'official_website_amount': 'official_website_amount',
'product_rating_results': 'product_rating_results'
}
def __init__(self, measure_id=None, official_website_amount=None, product_rating_results=None):
"""OfficialWebsiteRatingResult - a model defined in huaweicloud sdk"""
self._measure_id = None
self._official_website_amount = None
self._product_rating_results = None
self.discriminator = None
if measure_id is not None:
self.measure_id = measure_id
if official_website_amount is not None:
self.official_website_amount = official_website_amount
if product_rating_results is not None:
self.product_rating_results = product_rating_results
@property
def measure_id(self):
"""Gets the measure_id of this OfficialWebsiteRatingResult.
|参数名称度量单位标识1元|
:return: The measure_id of this OfficialWebsiteRatingResult.
:rtype: int
"""
return self._measure_id
@measure_id.setter
def measure_id(self, measure_id):
"""Sets the measure_id of this OfficialWebsiteRatingResult.
|参数名称度量单位标识1元|
:param measure_id: The measure_id of this OfficialWebsiteRatingResult.
:type: int
"""
self._measure_id = measure_id
@property
def official_website_amount(self):
"""Gets the official_website_amount of this OfficialWebsiteRatingResult.
|参数名称:官网价| |参数约束及描述:官网价|
:return: The official_website_amount of this OfficialWebsiteRatingResult.
:rtype: float
"""
return self._official_website_amount
@official_website_amount.setter
def official_website_amount(self, official_website_amount):
"""Sets the official_website_amount of this OfficialWebsiteRatingResult.
|参数名称:官网价| |参数约束及描述:官网价|
:param official_website_amount: The official_website_amount of this OfficialWebsiteRatingResult.
:type: float
"""
self._official_website_amount = official_website_amount
@property
def product_rating_results(self):
"""Gets the product_rating_results of this OfficialWebsiteRatingResult.
|参数名称:产品询价结果| |参数的约束及描述:产品询价结果|
:return: The product_rating_results of this OfficialWebsiteRatingResult.
:rtype: list[PeriodProductOfficialRatingResult]
"""
return self._product_rating_results
@product_rating_results.setter
def product_rating_results(self, product_rating_results):
"""Sets the product_rating_results of this OfficialWebsiteRatingResult.
|参数名称:产品询价结果| |参数的约束及描述:产品询价结果|
:param product_rating_results: The product_rating_results of this OfficialWebsiteRatingResult.
:type: list[PeriodProductOfficialRatingResult]
"""
self._product_rating_results = product_rating_results
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, OfficialWebsiteRatingResult):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other