cdn_stats_param.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright 2019 Baidu, Inc.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
  4. # except in compliance with the License. You may obtain a copy of the License at
  5. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software distributed under the
  9. # License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  10. # either express or implied. See the License for the specific language governing permissions
  11. # and limitations under the License.
  12. """
  13. This module defines a common param class for CDN stats query.
  14. """
  15. class CdnStatsParam(object):
  16. """Param of Cdn stats query."""
  17. def __init__(self, metric=None, start_time=None, end_time=None, period=None, key_type=None, key=None, groupBy=None,
  18. prov=None, isp=None, level=None, protocol=None, extra=None):
  19. self.metric = metric
  20. self.startTime = start_time
  21. self.endTime = end_time
  22. self.period = period
  23. self.key_type = key_type
  24. self.key = key
  25. self.groupBy = groupBy
  26. self.prov = prov
  27. self.isp = isp
  28. self.level = level
  29. self.protocol = protocol
  30. self.extra = extra