# This file is @generated by `scripts/codegen.py namespaces`. Do not edit.

from __future__ import annotations

from typing import TYPE_CHECKING, Literal, NoReturn, final

from monalisten._errors import MonalistenSetupError
from monalisten._namespace import HookNamespace, build_registrar

if TYPE_CHECKING:
    from monalisten import events
    from monalisten._namespace import HookWrapper


class EventNamespace:
    def __call__(self, _: object) -> NoReturn:
        msg = (
            "bare @Monalisten.event is not allowed; to create a hook for all events,"
            " use @Monalisten.event.any"
        )
        raise MonalistenSetupError(msg)

    def __getitem__(self, name: str) -> HookNamespace[NoReturn, events.Any]:
        return getattr(self, name)

    def __init__(self) -> None:  # noqa: PLR0915
        self.any = HookNamespace[Literal["*"], "events.Any"]()
        self.branch_protection_configuration = BranchProtectionConfigurationNamespace()
        self.branch_protection_rule = BranchProtectionRuleNamespace()
        self.check_run = CheckRunNamespace()
        self.check_suite = CheckSuiteNamespace()
        self.code_scanning_alert = CodeScanningAlertNamespace()
        self.commit_comment = CommitCommentNamespace()
        self.create = CreateNamespace()
        self.custom_property = CustomPropertyNamespace()
        self.custom_property_values = CustomPropertyValuesNamespace()
        self.delete = DeleteNamespace()
        self.dependabot_alert = DependabotAlertNamespace()
        self.deploy_key = DeployKeyNamespace()
        self.deployment = DeploymentNamespace()
        self.deployment_protection_rule = DeploymentProtectionRuleNamespace()
        self.deployment_review = DeploymentReviewNamespace()
        self.deployment_status = DeploymentStatusNamespace()
        self.discussion = DiscussionNamespace()
        self.discussion_comment = DiscussionCommentNamespace()
        self.fork = ForkNamespace()
        self.github_app_authorization = GithubAppAuthorizationNamespace()
        self.gollum = GollumNamespace()
        self.installation = InstallationNamespace()
        self.installation_repositories = InstallationRepositoriesNamespace()
        self.installation_target = InstallationTargetNamespace()
        self.issue_comment = IssueCommentNamespace()
        self.issue_dependencies = IssueDependenciesNamespace()
        self.issues = IssuesNamespace()
        self.label = LabelNamespace()
        self.marketplace_purchase = MarketplacePurchaseNamespace()
        self.member = MemberNamespace()
        self.membership = MembershipNamespace()
        self.merge_group = MergeGroupNamespace()
        self.meta = MetaNamespace()
        self.milestone = MilestoneNamespace()
        self.org_block = OrgBlockNamespace()
        self.organization = OrganizationNamespace()
        self.package = PackageNamespace()
        self.page_build = PageBuildNamespace()
        self.personal_access_token_request = PersonalAccessTokenRequestNamespace()
        self.ping = PingNamespace()
        self.project_card = ProjectCardNamespace()
        self.project = ProjectNamespace()
        self.project_column = ProjectColumnNamespace()
        self.projects_v2 = ProjectsV2Namespace()
        self.projects_v2_item = ProjectsV2ItemNamespace()
        self.projects_v2_status_update = ProjectsV2StatusUpdateNamespace()
        self.public = PublicNamespace()
        self.pull_request = PullRequestNamespace()
        self.pull_request_review_comment = PullRequestReviewCommentNamespace()
        self.pull_request_review = PullRequestReviewNamespace()
        self.pull_request_review_thread = PullRequestReviewThreadNamespace()
        self.push = PushNamespace()
        self.registry_package = RegistryPackageNamespace()
        self.release = ReleaseNamespace()
        self.repository_advisory = RepositoryAdvisoryNamespace()
        self.repository = RepositoryNamespace()
        self.repository_dispatch = RepositoryDispatchNamespace()
        self.repository_import = RepositoryImportNamespace()
        self.repository_ruleset = RepositoryRulesetNamespace()
        self.repository_vulnerability_alert = RepositoryVulnerabilityAlertNamespace()
        self.secret_scanning_alert = SecretScanningAlertNamespace()
        self.secret_scanning_alert_location = SecretScanningAlertLocationNamespace()
        self.secret_scanning_scan = SecretScanningScanNamespace()
        self.security_advisory = SecurityAdvisoryNamespace()
        self.security_and_analysis = SecurityAndAnalysisNamespace()
        self.sponsorship = SponsorshipNamespace()
        self.star = StarNamespace()
        self.status = StatusNamespace()
        self.sub_issues = SubIssuesNamespace()
        self.team_add = TeamAddNamespace()
        self.team = TeamNamespace()
        self.watch = WatchNamespace()
        self.workflow_dispatch = WorkflowDispatchNamespace()
        self.workflow_job = WorkflowJobNamespace()
        self.workflow_run = WorkflowRunNamespace()


BranchProtectionConfigurationActions = Literal["disabled", "enabled"]


@final
class BranchProtectionConfigurationNamespace(
    HookNamespace[
        BranchProtectionConfigurationActions, "events.BranchProtectionConfiguration"
    ]
):
    disabled: HookWrapper[[events.BranchProtectionConfigurationDisabled]] = (
        build_registrar("disabled")
    )
    enabled: HookWrapper[[events.BranchProtectionConfigurationEnabled]] = (
        build_registrar("enabled")
    )


BranchProtectionRuleActions = Literal["created", "deleted", "edited"]


@final
class BranchProtectionRuleNamespace(
    HookNamespace[BranchProtectionRuleActions, "events.BranchProtectionRule"]
):
    created: HookWrapper[[events.BranchProtectionRuleCreated]] = build_registrar(
        "created"
    )
    deleted: HookWrapper[[events.BranchProtectionRuleDeleted]] = build_registrar(
        "deleted"
    )
    edited: HookWrapper[[events.BranchProtectionRuleEdited]] = build_registrar("edited")


CheckRunActions = Literal["completed", "created", "requested_action", "rerequested"]


@final
class CheckRunNamespace(HookNamespace[CheckRunActions, "events.CheckRun"]):
    completed: HookWrapper[[events.CheckRunCompleted]] = build_registrar("completed")
    created: HookWrapper[[events.CheckRunCreated]] = build_registrar("created")
    requested_action: HookWrapper[[events.CheckRunRequestedAction]] = build_registrar(
        "requested_action"
    )
    rerequested: HookWrapper[[events.CheckRunRerequested]] = build_registrar(
        "rerequested"
    )


CheckSuiteActions = Literal["completed", "requested", "rerequested"]


@final
class CheckSuiteNamespace(HookNamespace[CheckSuiteActions, "events.CheckSuite"]):
    completed: HookWrapper[[events.CheckSuiteCompleted]] = build_registrar("completed")
    requested: HookWrapper[[events.CheckSuiteRequested]] = build_registrar("requested")
    rerequested: HookWrapper[[events.CheckSuiteRerequested]] = build_registrar(
        "rerequested"
    )


CodeScanningAlertActions = Literal[
    "appeared_in_branch",
    "closed_by_user",
    "created",
    "fixed",
    "reopened",
    "reopened_by_user",
    "updated_assignment",
]


@final
class CodeScanningAlertNamespace(
    HookNamespace[CodeScanningAlertActions, "events.CodeScanningAlert"]
):
    appeared_in_branch: HookWrapper[[events.CodeScanningAlertAppearedInBranch]] = (
        build_registrar("appeared_in_branch")
    )
    closed_by_user: HookWrapper[[events.CodeScanningAlertClosedByUser]] = (
        build_registrar("closed_by_user")
    )
    created: HookWrapper[[events.CodeScanningAlertCreated]] = build_registrar("created")
    fixed: HookWrapper[[events.CodeScanningAlertFixed]] = build_registrar("fixed")
    reopened: HookWrapper[[events.CodeScanningAlertReopened]] = build_registrar(
        "reopened"
    )
    reopened_by_user: HookWrapper[[events.CodeScanningAlertReopenedByUser]] = (
        build_registrar("reopened_by_user")
    )
    updated_assignment: HookWrapper[[events.CodeScanningAlertUpdatedAssignment]] = (
        build_registrar("updated_assignment")
    )


CommitCommentActions = Literal["created"]


@final
class CommitCommentNamespace(
    HookNamespace[CommitCommentActions, "events.CommitComment"]
):
    created: HookWrapper[[events.CommitCommentCreated]] = build_registrar("created")


@final
class CreateNamespace(HookNamespace[NoReturn, "events.Create"]):
    pass


CustomPropertyActions = Literal[
    "created", "deleted", "promote_to_enterprise", "updated"
]


@final
class CustomPropertyNamespace(
    HookNamespace[CustomPropertyActions, "events.CustomProperty"]
):
    created: HookWrapper[[events.CustomPropertyCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.CustomPropertyDeleted]] = build_registrar("deleted")
    promote_to_enterprise: HookWrapper[[events.CustomPropertyPromoteToEnterprise]] = (
        build_registrar("promote_to_enterprise")
    )
    updated: HookWrapper[[events.CustomPropertyUpdated]] = build_registrar("updated")


CustomPropertyValuesActions = Literal["updated"]


@final
class CustomPropertyValuesNamespace(
    HookNamespace[CustomPropertyValuesActions, "events.CustomPropertyValues"]
):
    updated: HookWrapper[[events.CustomPropertyValuesUpdated]] = build_registrar(
        "updated"
    )


@final
class DeleteNamespace(HookNamespace[NoReturn, "events.Delete"]):
    pass


DependabotAlertActions = Literal[
    "assignees_changed",
    "auto_dismissed",
    "auto_reopened",
    "created",
    "dismissed",
    "fixed",
    "reintroduced",
    "reopened",
]


@final
class DependabotAlertNamespace(
    HookNamespace[DependabotAlertActions, "events.DependabotAlert"]
):
    assignees_changed: HookWrapper[[events.DependabotAlertAssigneesChanged]] = (
        build_registrar("assignees_changed")
    )
    auto_dismissed: HookWrapper[[events.DependabotAlertAutoDismissed]] = (
        build_registrar("auto_dismissed")
    )
    auto_reopened: HookWrapper[[events.DependabotAlertAutoReopened]] = build_registrar(
        "auto_reopened"
    )
    created: HookWrapper[[events.DependabotAlertCreated]] = build_registrar("created")
    dismissed: HookWrapper[[events.DependabotAlertDismissed]] = build_registrar(
        "dismissed"
    )
    fixed: HookWrapper[[events.DependabotAlertFixed]] = build_registrar("fixed")
    reintroduced: HookWrapper[[events.DependabotAlertReintroduced]] = build_registrar(
        "reintroduced"
    )
    reopened: HookWrapper[[events.DependabotAlertReopened]] = build_registrar(
        "reopened"
    )


DeployKeyActions = Literal["created", "deleted"]


@final
class DeployKeyNamespace(HookNamespace[DeployKeyActions, "events.DeployKey"]):
    created: HookWrapper[[events.DeployKeyCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.DeployKeyDeleted]] = build_registrar("deleted")


DeploymentActions = Literal["created"]


@final
class DeploymentNamespace(HookNamespace[DeploymentActions, "events.Deployment"]):
    created: HookWrapper[[events.DeploymentCreated]] = build_registrar("created")


DeploymentProtectionRuleActions = Literal["requested"]


@final
class DeploymentProtectionRuleNamespace(
    HookNamespace[DeploymentProtectionRuleActions, "events.DeploymentProtectionRule"]
):
    requested: HookWrapper[[events.DeploymentProtectionRuleRequested]] = (
        build_registrar("requested")
    )


DeploymentReviewActions = Literal["approved", "rejected", "requested"]


@final
class DeploymentReviewNamespace(
    HookNamespace[DeploymentReviewActions, "events.DeploymentReview"]
):
    approved: HookWrapper[[events.DeploymentReviewApproved]] = build_registrar(
        "approved"
    )
    rejected: HookWrapper[[events.DeploymentReviewRejected]] = build_registrar(
        "rejected"
    )
    requested: HookWrapper[[events.DeploymentReviewRequested]] = build_registrar(
        "requested"
    )


DeploymentStatusActions = Literal["created"]


@final
class DeploymentStatusNamespace(
    HookNamespace[DeploymentStatusActions, "events.DeploymentStatus"]
):
    created: HookWrapper[[events.DeploymentStatusCreated]] = build_registrar("created")


DiscussionActions = Literal[
    "answered",
    "category_changed",
    "closed",
    "created",
    "deleted",
    "edited",
    "labeled",
    "locked",
    "pinned",
    "reopened",
    "transferred",
    "unanswered",
    "unlabeled",
    "unlocked",
    "unpinned",
]


@final
class DiscussionNamespace(HookNamespace[DiscussionActions, "events.Discussion"]):
    answered: HookWrapper[[events.DiscussionAnswered]] = build_registrar("answered")
    category_changed: HookWrapper[[events.DiscussionCategoryChanged]] = build_registrar(
        "category_changed"
    )
    closed: HookWrapper[[events.DiscussionClosed]] = build_registrar("closed")
    created: HookWrapper[[events.DiscussionCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.DiscussionDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.DiscussionEdited]] = build_registrar("edited")
    labeled: HookWrapper[[events.DiscussionLabeled]] = build_registrar("labeled")
    locked: HookWrapper[[events.DiscussionLocked]] = build_registrar("locked")
    pinned: HookWrapper[[events.DiscussionPinned]] = build_registrar("pinned")
    reopened: HookWrapper[[events.DiscussionReopened]] = build_registrar("reopened")
    transferred: HookWrapper[[events.DiscussionTransferred]] = build_registrar(
        "transferred"
    )
    unanswered: HookWrapper[[events.DiscussionUnanswered]] = build_registrar(
        "unanswered"
    )
    unlabeled: HookWrapper[[events.DiscussionUnlabeled]] = build_registrar("unlabeled")
    unlocked: HookWrapper[[events.DiscussionUnlocked]] = build_registrar("unlocked")
    unpinned: HookWrapper[[events.DiscussionUnpinned]] = build_registrar("unpinned")


DiscussionCommentActions = Literal["created", "deleted", "edited"]


@final
class DiscussionCommentNamespace(
    HookNamespace[DiscussionCommentActions, "events.DiscussionComment"]
):
    created: HookWrapper[[events.DiscussionCommentCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.DiscussionCommentDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.DiscussionCommentEdited]] = build_registrar("edited")


@final
class ForkNamespace(HookNamespace[NoReturn, "events.Fork"]):
    pass


GithubAppAuthorizationActions = Literal["revoked"]


@final
class GithubAppAuthorizationNamespace(
    HookNamespace[GithubAppAuthorizationActions, "events.GithubAppAuthorization"]
):
    revoked: HookWrapper[[events.GithubAppAuthorizationRevoked]] = build_registrar(
        "revoked"
    )


@final
class GollumNamespace(HookNamespace[NoReturn, "events.Gollum"]):
    pass


InstallationActions = Literal[
    "created", "deleted", "new_permissions_accepted", "suspend", "unsuspend"
]


@final
class InstallationNamespace(HookNamespace[InstallationActions, "events.Installation"]):
    created: HookWrapper[[events.InstallationCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.InstallationDeleted]] = build_registrar("deleted")
    new_permissions_accepted: HookWrapper[
        [events.InstallationNewPermissionsAccepted]
    ] = build_registrar("new_permissions_accepted")
    suspend: HookWrapper[[events.InstallationSuspend]] = build_registrar("suspend")
    unsuspend: HookWrapper[[events.InstallationUnsuspend]] = build_registrar(
        "unsuspend"
    )


InstallationRepositoriesActions = Literal["added", "removed"]


@final
class InstallationRepositoriesNamespace(
    HookNamespace[InstallationRepositoriesActions, "events.InstallationRepositories"]
):
    added: HookWrapper[[events.InstallationRepositoriesAdded]] = build_registrar(
        "added"
    )
    removed: HookWrapper[[events.InstallationRepositoriesRemoved]] = build_registrar(
        "removed"
    )


InstallationTargetActions = Literal["renamed"]


@final
class InstallationTargetNamespace(
    HookNamespace[InstallationTargetActions, "events.InstallationTarget"]
):
    renamed: HookWrapper[[events.InstallationTargetRenamed]] = build_registrar(
        "renamed"
    )


IssueCommentActions = Literal["created", "deleted", "edited", "pinned", "unpinned"]


@final
class IssueCommentNamespace(HookNamespace[IssueCommentActions, "events.IssueComment"]):
    created: HookWrapper[[events.IssueCommentCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.IssueCommentDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.IssueCommentEdited]] = build_registrar("edited")
    pinned: HookWrapper[[events.IssueCommentPinned]] = build_registrar("pinned")
    unpinned: HookWrapper[[events.IssueCommentUnpinned]] = build_registrar("unpinned")


IssueDependenciesActions = Literal[
    "blocked_by_added", "blocked_by_removed", "blocking_added", "blocking_removed"
]


@final
class IssueDependenciesNamespace(
    HookNamespace[IssueDependenciesActions, "events.IssueDependencies"]
):
    blocked_by_added: HookWrapper[[events.IssueDependenciesBlockedByAdded]] = (
        build_registrar("blocked_by_added")
    )
    blocked_by_removed: HookWrapper[[events.IssueDependenciesBlockedByRemoved]] = (
        build_registrar("blocked_by_removed")
    )
    blocking_added: HookWrapper[[events.IssueDependenciesBlockingAdded]] = (
        build_registrar("blocking_added")
    )
    blocking_removed: HookWrapper[[events.IssueDependenciesBlockingRemoved]] = (
        build_registrar("blocking_removed")
    )


IssuesActions = Literal[
    "assigned",
    "closed",
    "deleted",
    "demilestoned",
    "edited",
    "labeled",
    "locked",
    "milestoned",
    "opened",
    "pinned",
    "reopened",
    "transferred",
    "typed",
    "unassigned",
    "unlabeled",
    "unlocked",
    "unpinned",
    "untyped",
]


@final
class IssuesNamespace(HookNamespace[IssuesActions, "events.Issues"]):
    assigned: HookWrapper[[events.IssuesAssigned]] = build_registrar("assigned")
    closed: HookWrapper[[events.IssuesClosed]] = build_registrar("closed")
    deleted: HookWrapper[[events.IssuesDeleted]] = build_registrar("deleted")
    demilestoned: HookWrapper[[events.IssuesDemilestoned]] = build_registrar(
        "demilestoned"
    )
    edited: HookWrapper[[events.IssuesEdited]] = build_registrar("edited")
    labeled: HookWrapper[[events.IssuesLabeled]] = build_registrar("labeled")
    locked: HookWrapper[[events.IssuesLocked]] = build_registrar("locked")
    milestoned: HookWrapper[[events.IssuesMilestoned]] = build_registrar("milestoned")
    opened: HookWrapper[[events.IssuesOpened]] = build_registrar("opened")
    pinned: HookWrapper[[events.IssuesPinned]] = build_registrar("pinned")
    reopened: HookWrapper[[events.IssuesReopened]] = build_registrar("reopened")
    transferred: HookWrapper[[events.IssuesTransferred]] = build_registrar(
        "transferred"
    )
    typed: HookWrapper[[events.IssuesTyped]] = build_registrar("typed")
    unassigned: HookWrapper[[events.IssuesUnassigned]] = build_registrar("unassigned")
    unlabeled: HookWrapper[[events.IssuesUnlabeled]] = build_registrar("unlabeled")
    unlocked: HookWrapper[[events.IssuesUnlocked]] = build_registrar("unlocked")
    unpinned: HookWrapper[[events.IssuesUnpinned]] = build_registrar("unpinned")
    untyped: HookWrapper[[events.IssuesUntyped]] = build_registrar("untyped")


LabelActions = Literal["created", "deleted", "edited"]


@final
class LabelNamespace(HookNamespace[LabelActions, "events.Label"]):
    created: HookWrapper[[events.LabelCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.LabelDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.LabelEdited]] = build_registrar("edited")


MarketplacePurchaseActions = Literal[
    "cancelled", "changed", "pending_change", "pending_change_cancelled", "purchased"
]


@final
class MarketplacePurchaseNamespace(
    HookNamespace[MarketplacePurchaseActions, "events.MarketplacePurchase"]
):
    cancelled: HookWrapper[[events.MarketplacePurchaseCancelled]] = build_registrar(
        "cancelled"
    )
    changed: HookWrapper[[events.MarketplacePurchaseChanged]] = build_registrar(
        "changed"
    )
    pending_change: HookWrapper[[events.MarketplacePurchasePendingChange]] = (
        build_registrar("pending_change")
    )
    pending_change_cancelled: HookWrapper[
        [events.MarketplacePurchasePendingChangeCancelled]
    ] = build_registrar("pending_change_cancelled")
    purchased: HookWrapper[[events.MarketplacePurchasePurchased]] = build_registrar(
        "purchased"
    )


MemberActions = Literal["added", "edited", "removed"]


@final
class MemberNamespace(HookNamespace[MemberActions, "events.Member"]):
    added: HookWrapper[[events.MemberAdded]] = build_registrar("added")
    edited: HookWrapper[[events.MemberEdited]] = build_registrar("edited")
    removed: HookWrapper[[events.MemberRemoved]] = build_registrar("removed")


MembershipActions = Literal["added", "removed"]


@final
class MembershipNamespace(HookNamespace[MembershipActions, "events.Membership"]):
    added: HookWrapper[[events.MembershipAdded]] = build_registrar("added")
    removed: HookWrapper[[events.MembershipRemoved]] = build_registrar("removed")


MergeGroupActions = Literal["checks_requested", "destroyed"]


@final
class MergeGroupNamespace(HookNamespace[MergeGroupActions, "events.MergeGroup"]):
    checks_requested: HookWrapper[[events.MergeGroupChecksRequested]] = build_registrar(
        "checks_requested"
    )
    destroyed: HookWrapper[[events.MergeGroupDestroyed]] = build_registrar("destroyed")


MetaActions = Literal["deleted"]


@final
class MetaNamespace(HookNamespace[MetaActions, "events.Meta"]):
    deleted: HookWrapper[[events.MetaDeleted]] = build_registrar("deleted")


MilestoneActions = Literal["closed", "created", "deleted", "edited", "opened"]


@final
class MilestoneNamespace(HookNamespace[MilestoneActions, "events.Milestone"]):
    closed: HookWrapper[[events.MilestoneClosed]] = build_registrar("closed")
    created: HookWrapper[[events.MilestoneCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.MilestoneDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.MilestoneEdited]] = build_registrar("edited")
    opened: HookWrapper[[events.MilestoneOpened]] = build_registrar("opened")


OrgBlockActions = Literal["blocked", "unblocked"]


@final
class OrgBlockNamespace(HookNamespace[OrgBlockActions, "events.OrgBlock"]):
    blocked: HookWrapper[[events.OrgBlockBlocked]] = build_registrar("blocked")
    unblocked: HookWrapper[[events.OrgBlockUnblocked]] = build_registrar("unblocked")


OrganizationActions = Literal[
    "deleted", "member_added", "member_invited", "member_removed", "renamed"
]


@final
class OrganizationNamespace(HookNamespace[OrganizationActions, "events.Organization"]):
    deleted: HookWrapper[[events.OrganizationDeleted]] = build_registrar("deleted")
    member_added: HookWrapper[[events.OrganizationMemberAdded]] = build_registrar(
        "member_added"
    )
    member_invited: HookWrapper[[events.OrganizationMemberInvited]] = build_registrar(
        "member_invited"
    )
    member_removed: HookWrapper[[events.OrganizationMemberRemoved]] = build_registrar(
        "member_removed"
    )
    renamed: HookWrapper[[events.OrganizationRenamed]] = build_registrar("renamed")


PackageActions = Literal["published", "updated"]


@final
class PackageNamespace(HookNamespace[PackageActions, "events.Package"]):
    published: HookWrapper[[events.PackagePublished]] = build_registrar("published")
    updated: HookWrapper[[events.PackageUpdated]] = build_registrar("updated")


@final
class PageBuildNamespace(HookNamespace[NoReturn, "events.PageBuild"]):
    pass


PersonalAccessTokenRequestActions = Literal[
    "approved", "cancelled", "created", "denied"
]


@final
class PersonalAccessTokenRequestNamespace(
    HookNamespace[
        PersonalAccessTokenRequestActions, "events.PersonalAccessTokenRequest"
    ]
):
    approved: HookWrapper[[events.PersonalAccessTokenRequestApproved]] = (
        build_registrar("approved")
    )
    cancelled: HookWrapper[[events.PersonalAccessTokenRequestCancelled]] = (
        build_registrar("cancelled")
    )
    created: HookWrapper[[events.PersonalAccessTokenRequestCreated]] = build_registrar(
        "created"
    )
    denied: HookWrapper[[events.PersonalAccessTokenRequestDenied]] = build_registrar(
        "denied"
    )


@final
class PingNamespace(HookNamespace[NoReturn, "events.Ping"]):
    pass


ProjectCardActions = Literal["converted", "created", "deleted", "edited", "moved"]


@final
class ProjectCardNamespace(HookNamespace[ProjectCardActions, "events.ProjectCard"]):
    converted: HookWrapper[[events.ProjectCardConverted]] = build_registrar("converted")
    created: HookWrapper[[events.ProjectCardCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.ProjectCardDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.ProjectCardEdited]] = build_registrar("edited")
    moved: HookWrapper[[events.ProjectCardMoved]] = build_registrar("moved")


ProjectActions = Literal["closed", "created", "deleted", "edited", "reopened"]


@final
class ProjectNamespace(HookNamespace[ProjectActions, "events.Project"]):
    closed: HookWrapper[[events.ProjectClosed]] = build_registrar("closed")
    created: HookWrapper[[events.ProjectCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.ProjectDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.ProjectEdited]] = build_registrar("edited")
    reopened: HookWrapper[[events.ProjectReopened]] = build_registrar("reopened")


ProjectColumnActions = Literal["created", "deleted", "edited", "moved"]


@final
class ProjectColumnNamespace(
    HookNamespace[ProjectColumnActions, "events.ProjectColumn"]
):
    created: HookWrapper[[events.ProjectColumnCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.ProjectColumnDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.ProjectColumnEdited]] = build_registrar("edited")
    moved: HookWrapper[[events.ProjectColumnMoved]] = build_registrar("moved")


ProjectsV2Actions = Literal["closed", "created", "deleted", "edited", "reopened"]


@final
class ProjectsV2Namespace(HookNamespace[ProjectsV2Actions, "events.ProjectsV2"]):
    closed: HookWrapper[[events.ProjectsV2ProjectClosed]] = build_registrar("closed")
    created: HookWrapper[[events.ProjectsV2ProjectCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.ProjectsV2ProjectDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.ProjectsV2ProjectEdited]] = build_registrar("edited")
    reopened: HookWrapper[[events.ProjectsV2ProjectReopened]] = build_registrar(
        "reopened"
    )


ProjectsV2ItemActions = Literal[
    "archived", "converted", "created", "deleted", "edited", "reordered", "restored"
]


@final
class ProjectsV2ItemNamespace(
    HookNamespace[ProjectsV2ItemActions, "events.ProjectsV2Item"]
):
    archived: HookWrapper[[events.ProjectsV2ItemArchived]] = build_registrar("archived")
    converted: HookWrapper[[events.ProjectsV2ItemConverted]] = build_registrar(
        "converted"
    )
    created: HookWrapper[[events.ProjectsV2ItemCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.ProjectsV2ItemDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.ProjectsV2ItemEdited]] = build_registrar("edited")
    reordered: HookWrapper[[events.ProjectsV2ItemReordered]] = build_registrar(
        "reordered"
    )
    restored: HookWrapper[[events.ProjectsV2ItemRestored]] = build_registrar("restored")


ProjectsV2StatusUpdateActions = Literal["created", "deleted", "edited"]


@final
class ProjectsV2StatusUpdateNamespace(
    HookNamespace[ProjectsV2StatusUpdateActions, "events.ProjectsV2StatusUpdate"]
):
    created: HookWrapper[[events.ProjectsV2StatusUpdateCreated]] = build_registrar(
        "created"
    )
    deleted: HookWrapper[[events.ProjectsV2StatusUpdateDeleted]] = build_registrar(
        "deleted"
    )
    edited: HookWrapper[[events.ProjectsV2StatusUpdateEdited]] = build_registrar(
        "edited"
    )


@final
class PublicNamespace(HookNamespace[NoReturn, "events.Public"]):
    pass


PullRequestActions = Literal[
    "assigned",
    "auto_merge_disabled",
    "auto_merge_enabled",
    "closed",
    "converted_to_draft",
    "demilestoned",
    "dequeued",
    "edited",
    "enqueued",
    "labeled",
    "locked",
    "milestoned",
    "opened",
    "ready_for_review",
    "reopened",
    "review_request_removed",
    "review_requested",
    "synchronize",
    "unassigned",
    "unlabeled",
    "unlocked",
]


@final
class PullRequestNamespace(HookNamespace[PullRequestActions, "events.PullRequest"]):
    assigned: HookWrapper[[events.PullRequestAssigned]] = build_registrar("assigned")
    auto_merge_disabled: HookWrapper[[events.PullRequestAutoMergeDisabled]] = (
        build_registrar("auto_merge_disabled")
    )
    auto_merge_enabled: HookWrapper[[events.PullRequestAutoMergeEnabled]] = (
        build_registrar("auto_merge_enabled")
    )
    closed: HookWrapper[[events.PullRequestClosed]] = build_registrar("closed")
    converted_to_draft: HookWrapper[[events.PullRequestConvertedToDraft]] = (
        build_registrar("converted_to_draft")
    )
    demilestoned: HookWrapper[[events.PullRequestDemilestoned]] = build_registrar(
        "demilestoned"
    )
    dequeued: HookWrapper[[events.PullRequestDequeued]] = build_registrar("dequeued")
    edited: HookWrapper[[events.PullRequestEdited]] = build_registrar("edited")
    enqueued: HookWrapper[[events.PullRequestEnqueued]] = build_registrar("enqueued")
    labeled: HookWrapper[[events.PullRequestLabeled]] = build_registrar("labeled")
    locked: HookWrapper[[events.PullRequestLocked]] = build_registrar("locked")
    milestoned: HookWrapper[[events.PullRequestMilestoned]] = build_registrar(
        "milestoned"
    )
    opened: HookWrapper[[events.PullRequestOpened]] = build_registrar("opened")
    ready_for_review: HookWrapper[[events.PullRequestReadyForReview]] = build_registrar(
        "ready_for_review"
    )
    reopened: HookWrapper[[events.PullRequestReopened]] = build_registrar("reopened")
    review_request_removed: HookWrapper[[events.PullRequestReviewRequestRemoved]] = (
        build_registrar("review_request_removed")
    )
    review_requested: HookWrapper[[events.PullRequestReviewRequested]] = (
        build_registrar("review_requested")
    )
    synchronize: HookWrapper[[events.PullRequestSynchronize]] = build_registrar(
        "synchronize"
    )
    unassigned: HookWrapper[[events.PullRequestUnassigned]] = build_registrar(
        "unassigned"
    )
    unlabeled: HookWrapper[[events.PullRequestUnlabeled]] = build_registrar("unlabeled")
    unlocked: HookWrapper[[events.PullRequestUnlocked]] = build_registrar("unlocked")


PullRequestReviewCommentActions = Literal["created", "deleted", "edited"]


@final
class PullRequestReviewCommentNamespace(
    HookNamespace[PullRequestReviewCommentActions, "events.PullRequestReviewComment"]
):
    created: HookWrapper[[events.PullRequestReviewCommentCreated]] = build_registrar(
        "created"
    )
    deleted: HookWrapper[[events.PullRequestReviewCommentDeleted]] = build_registrar(
        "deleted"
    )
    edited: HookWrapper[[events.PullRequestReviewCommentEdited]] = build_registrar(
        "edited"
    )


PullRequestReviewActions = Literal["dismissed", "edited", "submitted"]


@final
class PullRequestReviewNamespace(
    HookNamespace[PullRequestReviewActions, "events.PullRequestReview"]
):
    dismissed: HookWrapper[[events.PullRequestReviewDismissed]] = build_registrar(
        "dismissed"
    )
    edited: HookWrapper[[events.PullRequestReviewEdited]] = build_registrar("edited")
    submitted: HookWrapper[[events.PullRequestReviewSubmitted]] = build_registrar(
        "submitted"
    )


PullRequestReviewThreadActions = Literal["resolved", "unresolved"]


@final
class PullRequestReviewThreadNamespace(
    HookNamespace[PullRequestReviewThreadActions, "events.PullRequestReviewThread"]
):
    resolved: HookWrapper[[events.PullRequestReviewThreadResolved]] = build_registrar(
        "resolved"
    )
    unresolved: HookWrapper[[events.PullRequestReviewThreadUnresolved]] = (
        build_registrar("unresolved")
    )


@final
class PushNamespace(HookNamespace[NoReturn, "events.Push"]):
    pass


RegistryPackageActions = Literal["published", "updated"]


@final
class RegistryPackageNamespace(
    HookNamespace[RegistryPackageActions, "events.RegistryPackage"]
):
    published: HookWrapper[[events.RegistryPackagePublished]] = build_registrar(
        "published"
    )
    updated: HookWrapper[[events.RegistryPackageUpdated]] = build_registrar("updated")


ReleaseActions = Literal[
    "created",
    "deleted",
    "edited",
    "prereleased",
    "published",
    "released",
    "unpublished",
]


@final
class ReleaseNamespace(HookNamespace[ReleaseActions, "events.Release"]):
    created: HookWrapper[[events.ReleaseCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.ReleaseDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.ReleaseEdited]] = build_registrar("edited")
    prereleased: HookWrapper[[events.ReleasePrereleased]] = build_registrar(
        "prereleased"
    )
    published: HookWrapper[[events.ReleasePublished]] = build_registrar("published")
    released: HookWrapper[[events.ReleaseReleased]] = build_registrar("released")
    unpublished: HookWrapper[[events.ReleaseUnpublished]] = build_registrar(
        "unpublished"
    )


RepositoryAdvisoryActions = Literal["published", "reported"]


@final
class RepositoryAdvisoryNamespace(
    HookNamespace[RepositoryAdvisoryActions, "events.RepositoryAdvisory"]
):
    published: HookWrapper[[events.RepositoryAdvisoryPublished]] = build_registrar(
        "published"
    )
    reported: HookWrapper[[events.RepositoryAdvisoryReported]] = build_registrar(
        "reported"
    )


RepositoryActions = Literal[
    "archived",
    "created",
    "deleted",
    "edited",
    "privatized",
    "publicized",
    "renamed",
    "transferred",
    "unarchived",
]


@final
class RepositoryNamespace(HookNamespace[RepositoryActions, "events.Repository"]):
    archived: HookWrapper[[events.RepositoryArchived]] = build_registrar("archived")
    created: HookWrapper[[events.RepositoryCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.RepositoryDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.RepositoryEdited]] = build_registrar("edited")
    privatized: HookWrapper[[events.RepositoryPrivatized]] = build_registrar(
        "privatized"
    )
    publicized: HookWrapper[[events.RepositoryPublicized]] = build_registrar(
        "publicized"
    )
    renamed: HookWrapper[[events.RepositoryRenamed]] = build_registrar("renamed")
    transferred: HookWrapper[[events.RepositoryTransferred]] = build_registrar(
        "transferred"
    )
    unarchived: HookWrapper[[events.RepositoryUnarchived]] = build_registrar(
        "unarchived"
    )


RepositoryDispatchActions = Literal["sample"]


@final
class RepositoryDispatchNamespace(
    HookNamespace[RepositoryDispatchActions, "events.RepositoryDispatch"]
):
    sample: HookWrapper[[events.RepositoryDispatchSample]] = build_registrar("sample")


@final
class RepositoryImportNamespace(HookNamespace[NoReturn, "events.RepositoryImport"]):
    pass


RepositoryRulesetActions = Literal["created", "deleted", "edited"]


@final
class RepositoryRulesetNamespace(
    HookNamespace[RepositoryRulesetActions, "events.RepositoryRuleset"]
):
    created: HookWrapper[[events.RepositoryRulesetCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.RepositoryRulesetDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.RepositoryRulesetEdited]] = build_registrar("edited")


RepositoryVulnerabilityAlertActions = Literal["create", "dismiss", "reopen", "resolve"]


@final
class RepositoryVulnerabilityAlertNamespace(
    HookNamespace[
        RepositoryVulnerabilityAlertActions, "events.RepositoryVulnerabilityAlert"
    ]
):
    create: HookWrapper[[events.RepositoryVulnerabilityAlertCreate]] = build_registrar(
        "create"
    )
    dismiss: HookWrapper[[events.RepositoryVulnerabilityAlertDismiss]] = (
        build_registrar("dismiss")
    )
    reopen: HookWrapper[[events.RepositoryVulnerabilityAlertReopen]] = build_registrar(
        "reopen"
    )
    resolve: HookWrapper[[events.RepositoryVulnerabilityAlertResolve]] = (
        build_registrar("resolve")
    )


SecretScanningAlertActions = Literal[
    "assigned",
    "created",
    "publicly_leaked",
    "reopened",
    "resolved",
    "unassigned",
    "validated",
]


@final
class SecretScanningAlertNamespace(
    HookNamespace[SecretScanningAlertActions, "events.SecretScanningAlert"]
):
    assigned: HookWrapper[[events.SecretScanningAlertAssigned]] = build_registrar(
        "assigned"
    )
    created: HookWrapper[[events.SecretScanningAlertCreated]] = build_registrar(
        "created"
    )
    publicly_leaked: HookWrapper[[events.SecretScanningAlertPubliclyLeaked]] = (
        build_registrar("publicly_leaked")
    )
    reopened: HookWrapper[[events.SecretScanningAlertReopened]] = build_registrar(
        "reopened"
    )
    resolved: HookWrapper[[events.SecretScanningAlertResolved]] = build_registrar(
        "resolved"
    )
    unassigned: HookWrapper[[events.SecretScanningAlertUnassigned]] = build_registrar(
        "unassigned"
    )
    validated: HookWrapper[[events.SecretScanningAlertValidated]] = build_registrar(
        "validated"
    )


SecretScanningAlertLocationActions = Literal["created"]


@final
class SecretScanningAlertLocationNamespace(
    HookNamespace[
        SecretScanningAlertLocationActions, "events.SecretScanningAlertLocation"
    ]
):
    created: HookWrapper[[events.SecretScanningAlertLocationCreated]] = build_registrar(
        "created"
    )


SecretScanningScanActions = Literal["completed"]


@final
class SecretScanningScanNamespace(
    HookNamespace[SecretScanningScanActions, "events.SecretScanningScan"]
):
    completed: HookWrapper[[events.SecretScanningScanCompleted]] = build_registrar(
        "completed"
    )


SecurityAdvisoryActions = Literal["published", "updated", "withdrawn"]


@final
class SecurityAdvisoryNamespace(
    HookNamespace[SecurityAdvisoryActions, "events.SecurityAdvisory"]
):
    published: HookWrapper[[events.SecurityAdvisoryPublished]] = build_registrar(
        "published"
    )
    updated: HookWrapper[[events.SecurityAdvisoryUpdated]] = build_registrar("updated")
    withdrawn: HookWrapper[[events.SecurityAdvisoryWithdrawn]] = build_registrar(
        "withdrawn"
    )


@final
class SecurityAndAnalysisNamespace(
    HookNamespace[NoReturn, "events.SecurityAndAnalysis"]
):
    pass


SponsorshipActions = Literal[
    "cancelled",
    "created",
    "edited",
    "pending_cancellation",
    "pending_tier_change",
    "tier_changed",
]


@final
class SponsorshipNamespace(HookNamespace[SponsorshipActions, "events.Sponsorship"]):
    cancelled: HookWrapper[[events.SponsorshipCancelled]] = build_registrar("cancelled")
    created: HookWrapper[[events.SponsorshipCreated]] = build_registrar("created")
    edited: HookWrapper[[events.SponsorshipEdited]] = build_registrar("edited")
    pending_cancellation: HookWrapper[[events.SponsorshipPendingCancellation]] = (
        build_registrar("pending_cancellation")
    )
    pending_tier_change: HookWrapper[[events.SponsorshipPendingTierChange]] = (
        build_registrar("pending_tier_change")
    )
    tier_changed: HookWrapper[[events.SponsorshipTierChanged]] = build_registrar(
        "tier_changed"
    )


StarActions = Literal["created", "deleted"]


@final
class StarNamespace(HookNamespace[StarActions, "events.Star"]):
    created: HookWrapper[[events.StarCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.StarDeleted]] = build_registrar("deleted")


@final
class StatusNamespace(HookNamespace[NoReturn, "events.Status"]):
    pass


SubIssuesActions = Literal[
    "parent_issue_added", "parent_issue_removed", "sub_issue_added", "sub_issue_removed"
]


@final
class SubIssuesNamespace(HookNamespace[SubIssuesActions, "events.SubIssues"]):
    parent_issue_added: HookWrapper[[events.SubIssuesParentIssueAdded]] = (
        build_registrar("parent_issue_added")
    )
    parent_issue_removed: HookWrapper[[events.SubIssuesParentIssueRemoved]] = (
        build_registrar("parent_issue_removed")
    )
    sub_issue_added: HookWrapper[[events.SubIssuesSubIssueAdded]] = build_registrar(
        "sub_issue_added"
    )
    sub_issue_removed: HookWrapper[[events.SubIssuesSubIssueRemoved]] = build_registrar(
        "sub_issue_removed"
    )


@final
class TeamAddNamespace(HookNamespace[NoReturn, "events.TeamAdd"]):
    pass


TeamActions = Literal[
    "added_to_repository", "created", "deleted", "edited", "removed_from_repository"
]


@final
class TeamNamespace(HookNamespace[TeamActions, "events.Team"]):
    added_to_repository: HookWrapper[[events.TeamAddedToRepository]] = build_registrar(
        "added_to_repository"
    )
    created: HookWrapper[[events.TeamCreated]] = build_registrar("created")
    deleted: HookWrapper[[events.TeamDeleted]] = build_registrar("deleted")
    edited: HookWrapper[[events.TeamEdited]] = build_registrar("edited")
    removed_from_repository: HookWrapper[[events.TeamRemovedFromRepository]] = (
        build_registrar("removed_from_repository")
    )


WatchActions = Literal["started"]


@final
class WatchNamespace(HookNamespace[WatchActions, "events.Watch"]):
    started: HookWrapper[[events.WatchStarted]] = build_registrar("started")


@final
class WorkflowDispatchNamespace(HookNamespace[NoReturn, "events.WorkflowDispatch"]):
    pass


WorkflowJobActions = Literal["completed", "in_progress", "queued", "waiting"]


@final
class WorkflowJobNamespace(HookNamespace[WorkflowJobActions, "events.WorkflowJob"]):
    completed: HookWrapper[[events.WorkflowJobCompleted]] = build_registrar("completed")
    in_progress: HookWrapper[[events.WorkflowJobInProgress]] = build_registrar(
        "in_progress"
    )
    queued: HookWrapper[[events.WorkflowJobQueued]] = build_registrar("queued")
    waiting: HookWrapper[[events.WorkflowJobWaiting]] = build_registrar("waiting")


WorkflowRunActions = Literal["completed", "in_progress", "requested"]


@final
class WorkflowRunNamespace(HookNamespace[WorkflowRunActions, "events.WorkflowRun"]):
    completed: HookWrapper[[events.WorkflowRunCompleted]] = build_registrar("completed")
    in_progress: HookWrapper[[events.WorkflowRunInProgress]] = build_registrar(
        "in_progress"
    )
    requested: HookWrapper[[events.WorkflowRunRequested]] = build_registrar("requested")
