Skip to content

Chore: re-generate models #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions githubkit/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def __init__(self, github: "GitHubCore"):
def meta(self) -> MetaClient:
return MetaClient(self._github)

@cached_property
def security_advisories(self) -> SecurityAdvisoriesClient:
return SecurityAdvisoriesClient(self._github)

@cached_property
def apps(self) -> AppsClient:
return AppsClient(self._github)
Expand Down Expand Up @@ -106,10 +110,6 @@ def markdown(self) -> MarkdownClient:
def orgs(self) -> OrgsClient:
return OrgsClient(self._github)

@cached_property
def copilot(self) -> CopilotClient:
return CopilotClient(self._github)

@cached_property
def actions(self) -> ActionsClient:
return ActionsClient(self._github)
Expand All @@ -126,6 +126,10 @@ def code_scanning(self) -> CodeScanningClient:
def codespaces(self) -> CodespacesClient:
return CodespacesClient(self._github)

@cached_property
def copilot(self) -> CopilotClient:
return CopilotClient(self._github)

@cached_property
def packages(self) -> PackagesClient:
return PackagesClient(self._github)
Expand Down Expand Up @@ -178,10 +182,6 @@ def git(self) -> GitClient:
def pulls(self) -> PullsClient:
return PullsClient(self._github)

@cached_property
def security_advisories(self) -> SecurityAdvisoriesClient:
return SecurityAdvisoriesClient(self._github)

@cached_property
def search(self) -> SearchClient:
return SearchClient(self._github)
Expand Down
96 changes: 48 additions & 48 deletions githubkit/rest/codespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
from .types import (
UserCodespacesPostBodyOneof0Type,
UserCodespacesPostBodyOneof1Type,
OrgsOrgCodespacesBillingPutBodyType,
OrgsOrgCodespacesAccessPutBodyType,
ReposOwnerRepoCodespacesPostBodyType,
UserCodespacesCodespaceNamePatchBodyType,
UserCodespacesSecretsSecretNamePutBodyType,
OrgsOrgCodespacesSecretsSecretNamePutBodyType,
UserCodespacesCodespaceNamePublishPostBodyType,
UserCodespacesPostBodyOneof1PropPullRequestType,
OrgsOrgCodespacesBillingSelectedUsersPostBodyType,
OrgsOrgCodespacesBillingSelectedUsersDeleteBodyType,
OrgsOrgCodespacesAccessSelectedUsersPostBodyType,
OrgsOrgCodespacesAccessSelectedUsersDeleteBodyType,
ReposOwnerRepoPullsPullNumberCodespacesPostBodyType,
ReposOwnerRepoCodespacesSecretsSecretNamePutBodyType,
UserCodespacesSecretsSecretNameRepositoriesPutBodyType,
Expand All @@ -46,7 +46,7 @@
UserCodespacesGetResponse200,
UserCodespacesPostBodyOneof0,
UserCodespacesPostBodyOneof1,
OrgsOrgCodespacesBillingPutBody,
OrgsOrgCodespacesAccessPutBody,
OrgsOrgCodespacesGetResponse200,
ReposOwnerRepoCodespacesPostBody,
UserCodespacesSecretsGetResponse200,
Expand All @@ -57,11 +57,11 @@
OrgsOrgCodespacesSecretsSecretNamePutBody,
ReposOwnerRepoCodespacesNewGetResponse200,
UserCodespacesCodespaceNamePublishPostBody,
OrgsOrgCodespacesBillingSelectedUsersPostBody,
OrgsOrgCodespacesAccessSelectedUsersPostBody,
ReposOwnerRepoCodespacesSecretsGetResponse200,
OrgsOrgCodespacesAccessSelectedUsersDeleteBody,
OrgsOrgMembersUsernameCodespacesGetResponse200,
ReposOwnerRepoCodespacesMachinesGetResponse200,
OrgsOrgCodespacesBillingSelectedUsersDeleteBody,
ReposOwnerRepoPullsPullNumberCodespacesPostBody,
ReposOwnerRepoCodespacesSecretsSecretNamePutBody,
UserCodespacesCodespaceNameMachinesGetResponse200,
Expand Down Expand Up @@ -148,17 +148,17 @@ async def async_list_in_organization(
)

@overload
def set_codespaces_billing(
def set_codespaces_access(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: OrgsOrgCodespacesBillingPutBodyType,
data: OrgsOrgCodespacesAccessPutBodyType,
) -> "Response":
...

@overload
def set_codespaces_billing(
def set_codespaces_access(
self,
org: str,
*,
Expand All @@ -174,23 +174,23 @@ def set_codespaces_billing(
) -> "Response":
...

def set_codespaces_billing(
def set_codespaces_access(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: Missing[OrgsOrgCodespacesBillingPutBodyType] = UNSET,
data: Missing[OrgsOrgCodespacesAccessPutBodyType] = UNSET,
**kwargs,
) -> "Response":
url = f"/orgs/{org}/codespaces/billing"
url = f"/orgs/{org}/codespaces/access"

headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}

if not kwargs:
kwargs = UNSET

json = kwargs if data is UNSET else data
json = parse_obj_as(OrgsOrgCodespacesBillingPutBody, json)
json = parse_obj_as(OrgsOrgCodespacesAccessPutBody, json)
json = json.dict(by_alias=True) if isinstance(json, BaseModel) else json

return self._github.request(
Expand All @@ -206,17 +206,17 @@ def set_codespaces_billing(
)

@overload
async def async_set_codespaces_billing(
async def async_set_codespaces_access(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: OrgsOrgCodespacesBillingPutBodyType,
data: OrgsOrgCodespacesAccessPutBodyType,
) -> "Response":
...

@overload
async def async_set_codespaces_billing(
async def async_set_codespaces_access(
self,
org: str,
*,
Expand All @@ -232,23 +232,23 @@ async def async_set_codespaces_billing(
) -> "Response":
...

async def async_set_codespaces_billing(
async def async_set_codespaces_access(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: Missing[OrgsOrgCodespacesBillingPutBodyType] = UNSET,
data: Missing[OrgsOrgCodespacesAccessPutBodyType] = UNSET,
**kwargs,
) -> "Response":
url = f"/orgs/{org}/codespaces/billing"
url = f"/orgs/{org}/codespaces/access"

headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}

if not kwargs:
kwargs = UNSET

json = kwargs if data is UNSET else data
json = parse_obj_as(OrgsOrgCodespacesBillingPutBody, json)
json = parse_obj_as(OrgsOrgCodespacesAccessPutBody, json)
json = json.dict(by_alias=True) if isinstance(json, BaseModel) else json

return await self._github.arequest(
Expand All @@ -264,17 +264,17 @@ async def async_set_codespaces_billing(
)

@overload
def set_codespaces_billing_users(
def set_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: OrgsOrgCodespacesBillingSelectedUsersPostBodyType,
data: OrgsOrgCodespacesAccessSelectedUsersPostBodyType,
) -> "Response":
...

@overload
def set_codespaces_billing_users(
def set_codespaces_access_users(
self,
org: str,
*,
Expand All @@ -284,23 +284,23 @@ def set_codespaces_billing_users(
) -> "Response":
...

def set_codespaces_billing_users(
def set_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: Missing[OrgsOrgCodespacesBillingSelectedUsersPostBodyType] = UNSET,
data: Missing[OrgsOrgCodespacesAccessSelectedUsersPostBodyType] = UNSET,
**kwargs,
) -> "Response":
url = f"/orgs/{org}/codespaces/billing/selected_users"
url = f"/orgs/{org}/codespaces/access/selected_users"

headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}

if not kwargs:
kwargs = UNSET

json = kwargs if data is UNSET else data
json = parse_obj_as(OrgsOrgCodespacesBillingSelectedUsersPostBody, json)
json = parse_obj_as(OrgsOrgCodespacesAccessSelectedUsersPostBody, json)
json = json.dict(by_alias=True) if isinstance(json, BaseModel) else json

return self._github.request(
Expand All @@ -316,17 +316,17 @@ def set_codespaces_billing_users(
)

@overload
async def async_set_codespaces_billing_users(
async def async_set_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: OrgsOrgCodespacesBillingSelectedUsersPostBodyType,
data: OrgsOrgCodespacesAccessSelectedUsersPostBodyType,
) -> "Response":
...

@overload
async def async_set_codespaces_billing_users(
async def async_set_codespaces_access_users(
self,
org: str,
*,
Expand All @@ -336,23 +336,23 @@ async def async_set_codespaces_billing_users(
) -> "Response":
...

async def async_set_codespaces_billing_users(
async def async_set_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: Missing[OrgsOrgCodespacesBillingSelectedUsersPostBodyType] = UNSET,
data: Missing[OrgsOrgCodespacesAccessSelectedUsersPostBodyType] = UNSET,
**kwargs,
) -> "Response":
url = f"/orgs/{org}/codespaces/billing/selected_users"
url = f"/orgs/{org}/codespaces/access/selected_users"

headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}

if not kwargs:
kwargs = UNSET

json = kwargs if data is UNSET else data
json = parse_obj_as(OrgsOrgCodespacesBillingSelectedUsersPostBody, json)
json = parse_obj_as(OrgsOrgCodespacesAccessSelectedUsersPostBody, json)
json = json.dict(by_alias=True) if isinstance(json, BaseModel) else json

return await self._github.arequest(
Expand All @@ -368,17 +368,17 @@ async def async_set_codespaces_billing_users(
)

@overload
def delete_codespaces_billing_users(
def delete_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: OrgsOrgCodespacesBillingSelectedUsersDeleteBodyType,
data: OrgsOrgCodespacesAccessSelectedUsersDeleteBodyType,
) -> "Response":
...

@overload
def delete_codespaces_billing_users(
def delete_codespaces_access_users(
self,
org: str,
*,
Expand All @@ -388,23 +388,23 @@ def delete_codespaces_billing_users(
) -> "Response":
...

def delete_codespaces_billing_users(
def delete_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: Missing[OrgsOrgCodespacesBillingSelectedUsersDeleteBodyType] = UNSET,
data: Missing[OrgsOrgCodespacesAccessSelectedUsersDeleteBodyType] = UNSET,
**kwargs,
) -> "Response":
url = f"/orgs/{org}/codespaces/billing/selected_users"
url = f"/orgs/{org}/codespaces/access/selected_users"

headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}

if not kwargs:
kwargs = UNSET

json = kwargs if data is UNSET else data
json = parse_obj_as(OrgsOrgCodespacesBillingSelectedUsersDeleteBody, json)
json = parse_obj_as(OrgsOrgCodespacesAccessSelectedUsersDeleteBody, json)
json = json.dict(by_alias=True) if isinstance(json, BaseModel) else json

return self._github.request(
Expand All @@ -420,17 +420,17 @@ def delete_codespaces_billing_users(
)

@overload
async def async_delete_codespaces_billing_users(
async def async_delete_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: OrgsOrgCodespacesBillingSelectedUsersDeleteBodyType,
data: OrgsOrgCodespacesAccessSelectedUsersDeleteBodyType,
) -> "Response":
...

@overload
async def async_delete_codespaces_billing_users(
async def async_delete_codespaces_access_users(
self,
org: str,
*,
Expand All @@ -440,23 +440,23 @@ async def async_delete_codespaces_billing_users(
) -> "Response":
...

async def async_delete_codespaces_billing_users(
async def async_delete_codespaces_access_users(
self,
org: str,
*,
headers: Optional[Dict[str, str]] = None,
data: Missing[OrgsOrgCodespacesBillingSelectedUsersDeleteBodyType] = UNSET,
data: Missing[OrgsOrgCodespacesAccessSelectedUsersDeleteBodyType] = UNSET,
**kwargs,
) -> "Response":
url = f"/orgs/{org}/codespaces/billing/selected_users"
url = f"/orgs/{org}/codespaces/access/selected_users"

headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}

if not kwargs:
kwargs = UNSET

json = kwargs if data is UNSET else data
json = parse_obj_as(OrgsOrgCodespacesBillingSelectedUsersDeleteBody, json)
json = parse_obj_as(OrgsOrgCodespacesAccessSelectedUsersDeleteBody, json)
json = json.dict(by_alias=True) if isinstance(json, BaseModel) else json

return await self._github.arequest(
Expand Down
Loading