"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from enum import Enum
from polar_sdk.types import BaseModel
from typing_extensions import TypedDict


class BenefitGitHubRepositoryCreatePropertiesPermission(str, Enum):
    r"""The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."""

    PULL = "pull"
    TRIAGE = "triage"
    PUSH = "push"
    MAINTAIN = "maintain"
    ADMIN = "admin"


class BenefitGitHubRepositoryCreatePropertiesTypedDict(TypedDict):
    r"""Properties to create a benefit of type `github_repository`."""

    repository_owner: str
    r"""The owner of the repository."""
    repository_name: str
    r"""The name of the repository."""
    permission: BenefitGitHubRepositoryCreatePropertiesPermission
    r"""The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."""


class BenefitGitHubRepositoryCreateProperties(BaseModel):
    r"""Properties to create a benefit of type `github_repository`."""

    repository_owner: str
    r"""The owner of the repository."""

    repository_name: str
    r"""The name of the repository."""

    permission: BenefitGitHubRepositoryCreatePropertiesPermission
    r"""The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role)."""
