# Generated by ariadne-codegen
# Source: /usr/share/sourcehut/hg.sr.ht.graphqls

from typing import Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import Visibility, WebhookEvent


class RepoInput(BaseModel):
    name: Optional[str] = None
    "Omit these fields to leave them unchanged, or set them to null to clear\ntheir value."
    description: Optional[str] = None
    visibility: Optional[Visibility] = None
    readme: Optional[str] = None
    "Updates the custom README associated with this repository. Note that the\nprovided HTML will be sanitized when displayed on the web; see\nhttps://man.sr.ht/markdown/#post-processing"
    non_publishing: Optional[bool] = Field(alias="nonPublishing", default=None)
    "Controls whether this repository is a non-publishing repository."


class UserWebhookInput(BaseModel):
    url: str
    events: list[WebhookEvent]
    query: str
