Module aiogithubapi.models.rate_limit
GitHub rate limit data class.
Expand source code
"""GitHub rate limit data class."""
from __future__ import annotations
from typing import Any, Dict
from .base import GitHubDataModelBase
class GitHubRateLimitResourceModel(GitHubDataModelBase):
"""GitHub rate limit resource data class."""
limit: int | None = None
used: int | None = None
remaining: int | None = None
reset: int | None = None
class GitHubRateLimitResourcesModel(GitHubDataModelBase):
"""GitHub rate limit resources data class."""
core: GitHubRateLimitResourceModel | None = None
search: GitHubRateLimitResourceModel | None = None
graphql: GitHubRateLimitResourceModel | None = None
integration_manifest: GitHubRateLimitResourceModel | None = None
source_import: GitHubRateLimitResourceModel | None = None
code_scanning_upload: GitHubRateLimitResourceModel | None = None
actions_runner_registration: GitHubRateLimitResourceModel | None = None
scim: GitHubRateLimitResourceModel | None = None
def _generate_core(self, data: Any) -> GitHubRateLimitResourceModel:
return GitHubRateLimitResourceModel(data) if data else None
def _generate_search(self, data: Any) -> GitHubRateLimitResourceModel:
return GitHubRateLimitResourceModel(data) if data else None
def _generate_graphql(self, data: Any) -> GitHubRateLimitResourceModel:
return GitHubRateLimitResourceModel(data) if data else None
def _generate_integration_manifest(self, data: Any) -> GitHubRateLimitResourceModel:
return GitHubRateLimitResourceModel(data) if data else None
def _generate_source_import(self, data: Any) -> GitHubRateLimitResourceModel:
return GitHubRateLimitResourceModel(data) if data else None
def _generate_code_scanning_upload(self, data: Any) -> GitHubRateLimitResourceModel:
return GitHubRateLimitResourceModel(data) if data else None
class GitHubRateLimitModel(GitHubDataModelBase):
"""GitHub rate limit data class."""
rate: GitHubRateLimitResourceModel | None = None
resources: GitHubRateLimitResourcesModel | None = None
def _generate_rate(self, data: Dict[str, Any]) -> GitHubRateLimitResourceModel:
"""Generate rate limit resource model."""
return GitHubRateLimitResourceModel(data) if data else None
def _generate_resources(self, data: Dict[str, Any]) -> GitHubRateLimitResourcesModel:
"""Generate rate limit resources model."""
return GitHubRateLimitResourcesModel(data) if data else None
Classes
class GitHubRateLimitModel (data: Dict[str, Any])
-
GitHub rate limit data class.
Init.
Expand source code
class GitHubRateLimitModel(GitHubDataModelBase): """GitHub rate limit data class.""" rate: GitHubRateLimitResourceModel | None = None resources: GitHubRateLimitResourcesModel | None = None def _generate_rate(self, data: Dict[str, Any]) -> GitHubRateLimitResourceModel: """Generate rate limit resource model.""" return GitHubRateLimitResourceModel(data) if data else None def _generate_resources(self, data: Dict[str, Any]) -> GitHubRateLimitResourcesModel: """Generate rate limit resources model.""" return GitHubRateLimitResourcesModel(data) if data else None
Ancestors
Class variables
var rate : GitHubRateLimitResourceModel | None
var resources : GitHubRateLimitResourcesModel | None
Inherited members
class GitHubRateLimitResourceModel (data: Dict[str, Any])
-
GitHub rate limit resource data class.
Init.
Expand source code
class GitHubRateLimitResourceModel(GitHubDataModelBase): """GitHub rate limit resource data class.""" limit: int | None = None used: int | None = None remaining: int | None = None reset: int | None = None
Ancestors
Class variables
var limit : int | None
var remaining : int | None
var reset : int | None
var used : int | None
Inherited members
class GitHubRateLimitResourcesModel (data: Dict[str, Any])
-
GitHub rate limit resources data class.
Init.
Expand source code
class GitHubRateLimitResourcesModel(GitHubDataModelBase): """GitHub rate limit resources data class.""" core: GitHubRateLimitResourceModel | None = None search: GitHubRateLimitResourceModel | None = None graphql: GitHubRateLimitResourceModel | None = None integration_manifest: GitHubRateLimitResourceModel | None = None source_import: GitHubRateLimitResourceModel | None = None code_scanning_upload: GitHubRateLimitResourceModel | None = None actions_runner_registration: GitHubRateLimitResourceModel | None = None scim: GitHubRateLimitResourceModel | None = None def _generate_core(self, data: Any) -> GitHubRateLimitResourceModel: return GitHubRateLimitResourceModel(data) if data else None def _generate_search(self, data: Any) -> GitHubRateLimitResourceModel: return GitHubRateLimitResourceModel(data) if data else None def _generate_graphql(self, data: Any) -> GitHubRateLimitResourceModel: return GitHubRateLimitResourceModel(data) if data else None def _generate_integration_manifest(self, data: Any) -> GitHubRateLimitResourceModel: return GitHubRateLimitResourceModel(data) if data else None def _generate_source_import(self, data: Any) -> GitHubRateLimitResourceModel: return GitHubRateLimitResourceModel(data) if data else None def _generate_code_scanning_upload(self, data: Any) -> GitHubRateLimitResourceModel: return GitHubRateLimitResourceModel(data) if data else None
Ancestors
Class variables
var actions_runner_registration : GitHubRateLimitResourceModel | None
var code_scanning_upload : GitHubRateLimitResourceModel | None
var core : GitHubRateLimitResourceModel | None
var graphql : GitHubRateLimitResourceModel | None
var integration_manifest : GitHubRateLimitResourceModel | None
var scim : GitHubRateLimitResourceModel | None
var search : GitHubRateLimitResourceModel | None
var source_import : GitHubRateLimitResourceModel | None
Inherited members