huaweicloud-sdk-python-v3/huaweicloud-sdk-cdn/huaweicloudsdkcdn/v2/model/show_domain_stats_request.py

326 lines
14 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 ShowDomainStatsRequest:
"""
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 = {
'action': 'str',
'start_time': 'int',
'end_time': 'int',
'domain_name': 'str',
'stat_type': 'str',
'interval': 'int',
'group_by': 'str',
'service_area': 'str',
'enterprise_project_id': 'str'
}
attribute_map = {
'action': 'action',
'start_time': 'start_time',
'end_time': 'end_time',
'domain_name': 'domain_name',
'stat_type': 'stat_type',
'interval': 'interval',
'group_by': 'group_by',
'service_area': 'service_area',
'enterprise_project_id': 'enterprise_project_id'
}
def __init__(self, action=None, start_time=None, end_time=None, domain_name=None, stat_type=None, interval=None, group_by=None, service_area=None, enterprise_project_id=None):
"""ShowDomainStatsRequest - a model defined in huaweicloud sdk"""
self._action = None
self._start_time = None
self._end_time = None
self._domain_name = None
self._stat_type = None
self._interval = None
self._group_by = None
self._service_area = None
self._enterprise_project_id = None
self.discriminator = None
self.action = action
self.start_time = start_time
self.end_time = end_time
self.domain_name = domain_name
self.stat_type = stat_type
if interval is not None:
self.interval = interval
if group_by is not None:
self.group_by = group_by
if service_area is not None:
self.service_area = service_area
if enterprise_project_id is not None:
self.enterprise_project_id = enterprise_project_id
@property
def action(self):
"""Gets the action of this ShowDomainStatsRequest.
- 动作名称可选summary、detail。 - summary查询汇总数据 - detail查询数据详情。
:return: The action of this ShowDomainStatsRequest.
:rtype: str
"""
return self._action
@action.setter
def action(self, action):
"""Sets the action of this ShowDomainStatsRequest.
- 动作名称可选summary、detail。 - summary查询汇总数据 - detail查询数据详情。
:param action: The action of this ShowDomainStatsRequest.
:type: str
"""
self._action = action
@property
def start_time(self):
"""Gets the start_time of this ShowDomainStatsRequest.
- 查询起始时间戳时间戳应设置需为整5分钟设置方式如下 - interval为300时start_time设置为整5分钟时刻点1631240100000(对应2021-09-10 10:15:00) - interval为3600时start_time设置为整小时时刻点1631239200000(对应2021-09-10 10:00:00) - interval为86400时start_time设置为东8区零点时刻点1631203200000(对应2021-09-10 00:00:00)
:return: The start_time of this ShowDomainStatsRequest.
:rtype: int
"""
return self._start_time
@start_time.setter
def start_time(self, start_time):
"""Sets the start_time of this ShowDomainStatsRequest.
- 查询起始时间戳时间戳应设置需为整5分钟设置方式如下 - interval为300时start_time设置为整5分钟时刻点1631240100000(对应2021-09-10 10:15:00) - interval为3600时start_time设置为整小时时刻点1631239200000(对应2021-09-10 10:00:00) - interval为86400时start_time设置为东8区零点时刻点1631203200000(对应2021-09-10 00:00:00)
:param start_time: The start_time of this ShowDomainStatsRequest.
:type: int
"""
self._start_time = start_time
@property
def end_time(self):
"""Gets the end_time of this ShowDomainStatsRequest.
- 查询结束时间戳时间戳应设置需为整5分钟设置方式如下 - interval为300时end_time设置为整5分钟时刻点1631243700000(对应2021-09-10 11:15:00) - interval为3600时end_time设置为整小时时刻点1631325600000(对应2021-09-11 10:00:00) - interval为86400时end_time设置为东8区零点时刻点1631376000000(对应2021-09-12 00:00:00)
:return: The end_time of this ShowDomainStatsRequest.
:rtype: int
"""
return self._end_time
@end_time.setter
def end_time(self, end_time):
"""Sets the end_time of this ShowDomainStatsRequest.
- 查询结束时间戳时间戳应设置需为整5分钟设置方式如下 - interval为300时end_time设置为整5分钟时刻点1631243700000(对应2021-09-10 11:15:00) - interval为3600时end_time设置为整小时时刻点1631325600000(对应2021-09-11 10:00:00) - interval为86400时end_time设置为东8区零点时刻点1631376000000(对应2021-09-12 00:00:00)
:param end_time: The end_time of this ShowDomainStatsRequest.
:type: int
"""
self._end_time = end_time
@property
def domain_name(self):
"""Gets the domain_name of this ShowDomainStatsRequest.
域名列表多个域名以逗号半角分隔www.test1.com,www.test2.com all表示查询名下全部域名
:return: The domain_name of this ShowDomainStatsRequest.
:rtype: str
"""
return self._domain_name
@domain_name.setter
def domain_name(self, domain_name):
"""Sets the domain_name of this ShowDomainStatsRequest.
域名列表多个域名以逗号半角分隔www.test1.com,www.test2.com all表示查询名下全部域名
:param domain_name: The domain_name of this ShowDomainStatsRequest.
:type: str
"""
self._domain_name = domain_name
@property
def stat_type(self):
"""Gets the stat_type of this ShowDomainStatsRequest.
- 网络资源消耗: - bw带宽 - flux流量 - bs_bw回源带宽 - bs_flux回源流量 - 访问情况 - req_num请求总数 - hit_num请求命中次数 - bs_num回源总数 - bs_fail_num回源失败数 - hit_flux命中流量 - HTTP状态码组合指标 - http_code_2xx状态码汇总2xx - http_code_3xx状态码汇总3xx - http_code_4xx状态码汇总4xx - http_code_5xx状态码汇总5xx - bs_http_code_2xx回源状态码汇总2xx - bs_http_code_3xx回源状态码汇总3xx - bs_http_code_4xx回源状态码汇总4xx - bs_http_code_5xx回源状态码汇总5xx - status_code_2xx状态码详情2xx - status_code_3xx状态码详情3xx - status_code_4xx状态码详情4xx - status_code_5xx状态码详情5xx - bs_status_code_2xx回源状态码详情2xx - bs_status_code_3xx回源状态码详情3xx - bs_status_code_4xx回源状态码详情4xx - bs_status_code_5xx回源状态码详情5xx - status_code和bs_status_code不能一起查询
:return: The stat_type of this ShowDomainStatsRequest.
:rtype: str
"""
return self._stat_type
@stat_type.setter
def stat_type(self, stat_type):
"""Sets the stat_type of this ShowDomainStatsRequest.
- 网络资源消耗: - bw带宽 - flux流量 - bs_bw回源带宽 - bs_flux回源流量 - 访问情况 - req_num请求总数 - hit_num请求命中次数 - bs_num回源总数 - bs_fail_num回源失败数 - hit_flux命中流量 - HTTP状态码组合指标 - http_code_2xx状态码汇总2xx - http_code_3xx状态码汇总3xx - http_code_4xx状态码汇总4xx - http_code_5xx状态码汇总5xx - bs_http_code_2xx回源状态码汇总2xx - bs_http_code_3xx回源状态码汇总3xx - bs_http_code_4xx回源状态码汇总4xx - bs_http_code_5xx回源状态码汇总5xx - status_code_2xx状态码详情2xx - status_code_3xx状态码详情3xx - status_code_4xx状态码详情4xx - status_code_5xx状态码详情5xx - bs_status_code_2xx回源状态码详情2xx - bs_status_code_3xx回源状态码详情3xx - bs_status_code_4xx回源状态码详情4xx - bs_status_code_5xx回源状态码详情5xx - status_code和bs_status_code不能一起查询
:param stat_type: The stat_type of this ShowDomainStatsRequest.
:type: str
"""
self._stat_type = stat_type
@property
def interval(self):
"""Gets the interval of this ShowDomainStatsRequest.
查询时间间隔单位为秒可设置值300(5分钟),3600(1小时),86400(1天)等。
:return: The interval of this ShowDomainStatsRequest.
:rtype: int
"""
return self._interval
@interval.setter
def interval(self, interval):
"""Sets the interval of this ShowDomainStatsRequest.
查询时间间隔单位为秒可设置值300(5分钟),3600(1小时),86400(1天)等。
:param interval: The interval of this ShowDomainStatsRequest.
:type: int
"""
self._interval = interval
@property
def group_by(self):
"""Gets the group_by of this ShowDomainStatsRequest.
数据分组方式可选domain默认不分组
:return: The group_by of this ShowDomainStatsRequest.
:rtype: str
"""
return self._group_by
@group_by.setter
def group_by(self, group_by):
"""Sets the group_by of this ShowDomainStatsRequest.
数据分组方式可选domain默认不分组
:param group_by: The group_by of this ShowDomainStatsRequest.
:type: str
"""
self._group_by = group_by
@property
def service_area(self):
"""Gets the service_area of this ShowDomainStatsRequest.
服务区域mainland_china默认、outside_mainland_china当查询回源类指标时该参数无效。
:return: The service_area of this ShowDomainStatsRequest.
:rtype: str
"""
return self._service_area
@service_area.setter
def service_area(self, service_area):
"""Sets the service_area of this ShowDomainStatsRequest.
服务区域mainland_china默认、outside_mainland_china当查询回源类指标时该参数无效。
:param service_area: The service_area of this ShowDomainStatsRequest.
:type: str
"""
self._service_area = service_area
@property
def enterprise_project_id(self):
"""Gets the enterprise_project_id of this ShowDomainStatsRequest.
当用户开启企业项目功能时,该参数生效,表示查询资源所属项目,不传表示查询默认项目。注意:当使用子账号调用接口时,该参数必传。
:return: The enterprise_project_id of this ShowDomainStatsRequest.
:rtype: str
"""
return self._enterprise_project_id
@enterprise_project_id.setter
def enterprise_project_id(self, enterprise_project_id):
"""Sets the enterprise_project_id of this ShowDomainStatsRequest.
当用户开启企业项目功能时,该参数生效,表示查询资源所属项目,不传表示查询默认项目。注意:当使用子账号调用接口时,该参数必传。
:param enterprise_project_id: The enterprise_project_id of this ShowDomainStatsRequest.
:type: str
"""
self._enterprise_project_id = enterprise_project_id
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, ShowDomainStatsRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other