"""
Class object for AIOGitHubAPIReposTrafficPageviews
Documentation: https://docs.github.com/en/rest/reference/repos#get-page-views

Generated by generate/generate.py - 2020-08-02 12:25:07.157407
"""

from ...base import AIOGitHubAPIBase


class Views(AIOGitHubAPIBase):
    @property
    def timestamp(self):
        return self.attributes.get("timestamp", "")

    @property
    def count(self):
        return self.attributes.get("count", None)

    @property
    def uniques(self):
        return self.attributes.get("uniques", None)


class AIOGitHubAPIReposTrafficPageviews(AIOGitHubAPIBase):
    @property
    def count(self):
        return self.attributes.get("count", None)

    @property
    def uniques(self):
        return self.attributes.get("uniques", None)

    @property
    def views(self):
        return [Views(x) for x in self.attributes.get("views", [])]
