# Generated by ariadne-codegen
# Source: openhexa/graphql/schema.generated.graphql

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    AccessmodAccessibilityAnalysisAlgorithm,
    ConnectionType,
    MembershipRole,
    MessagePriority,
    ParameterWidget,
    PermissionMode,
    PipelineNotificationLevel,
    WorkspaceMembershipRole,
)


class AddPipelineOutputInput(BaseModel):
    name: Optional[str] = None
    type: str
    uri: str


class AddToFavoritesInput(BaseModel):
    webapp_id: str = Field(alias="webappId")


class ApproveAccessmodAccessRequestInput(BaseModel):
    id: str


class ArchiveWorkspaceInput(BaseModel):
    slug: str


class ConnectionFieldInput(BaseModel):
    code: str
    secret: bool
    value: Optional[str] = None


class CountryInput(BaseModel):
    alpha_3: Optional[str] = Field(alias="alpha3", default=None)
    code: str
    flag: Optional[str] = None
    name: Optional[str] = None


class CreateAccessmodAccessibilityAnalysisInput(BaseModel):
    name: str
    project_id: str = Field(alias="projectId")


class CreateAccessmodFileInput(BaseModel):
    fileset_id: str = Field(alias="filesetId")
    mime_type: str = Field(alias="mimeType")
    uri: str


class CreateAccessmodFilesetInput(BaseModel):
    automatic: Optional[bool] = None
    metadata: Optional[Any] = None
    name: str
    project_id: str = Field(alias="projectId")
    role_id: str = Field(alias="roleId")


class CreateAccessmodProjectInput(BaseModel):
    country: "CountryInput"
    crs: int
    description: Optional[str] = None
    extent: Optional[List[List[float]]] = None
    name: str
    spatial_resolution: int = Field(alias="spatialResolution")


class CreateAccessmodProjectMemberInput(BaseModel):
    mode: PermissionMode
    project_id: str = Field(alias="projectId")
    team_id: Optional[str] = Field(alias="teamId", default=None)
    user_id: Optional[str] = Field(alias="userId", default=None)


class CreateAccessmodZonalStatisticsInput(BaseModel):
    name: str
    project_id: str = Field(alias="projectId")


class CreateBucketFolderInput(BaseModel):
    folder_key: str = Field(alias="folderKey")
    workspace_slug: str = Field(alias="workspaceSlug")


class CreateConnectionInput(BaseModel):
    description: Optional[str] = None
    fields: Optional[List["ConnectionFieldInput"]] = None
    name: str
    slug: Optional[str] = None
    type: ConnectionType
    workspace_slug: str = Field(alias="workspaceSlug")


class CreateDatasetInput(BaseModel):
    description: Optional[str] = None
    name: str
    workspace_slug: str = Field(alias="workspaceSlug")


class CreateDatasetVersionFileInput(BaseModel):
    content_type: str = Field(alias="contentType")
    uri: str
    version_id: str = Field(alias="versionId")


class CreateDatasetVersionInput(BaseModel):
    changelog: Optional[str] = None
    dataset_id: str = Field(alias="datasetId")
    name: str


class CreateMembershipInput(BaseModel):
    role: MembershipRole
    team_id: Any = Field(alias="teamId")
    user_email: str = Field(alias="userEmail")


class CreatePipelineFromTemplateVersionInput(BaseModel):
    pipeline_template_version_id: Any = Field(alias="pipelineTemplateVersionId")
    workspace_slug: str = Field(alias="workspaceSlug")


class CreatePipelineInput(BaseModel):
    code: Optional[str] = None
    name: str
    notebook_path: Optional[str] = Field(alias="notebookPath", default=None)
    workspace_slug: str = Field(alias="workspaceSlug")


class CreatePipelineRecipientInput(BaseModel):
    notification_level: PipelineNotificationLevel = Field(alias="notificationLevel")
    pipeline_id: Any = Field(alias="pipelineId")
    user_id: Any = Field(alias="userId")


class CreatePipelineTemplateVersionInput(BaseModel):
    changelog: Optional[str] = None
    code: Optional[str] = None
    config: Optional[str] = None
    description: Optional[str] = None
    name: Optional[str] = None
    pipeline_id: Any = Field(alias="pipelineId")
    pipeline_version_id: Any = Field(alias="pipelineVersionId")
    workspace_slug: str = Field(alias="workspaceSlug")


class CreateTeamInput(BaseModel):
    name: str


class CreateWebappInput(BaseModel):
    description: Optional[str] = None
    icon: Optional[str] = None
    name: str
    url: str
    workspace_slug: str = Field(alias="workspaceSlug")


class CreateWorkspaceInput(BaseModel):
    countries: Optional[List["CountryInput"]] = None
    description: Optional[str] = None
    load_sample_data: Optional[bool] = Field(alias="loadSampleData", default=None)
    name: str
    slug: Optional[str] = None


class DeclineWorkspaceInvitationInput(BaseModel):
    invitation_id: Any = Field(alias="invitationId")


class DeleteAccessmodAnalysisInput(BaseModel):
    id: str


class DeleteAccessmodFilesetInput(BaseModel):
    id: str


class DeleteAccessmodProjectInput(BaseModel):
    id: str


class DeleteAccessmodProjectMemberInput(BaseModel):
    id: str


class DeleteBucketObjectInput(BaseModel):
    object_key: str = Field(alias="objectKey")
    workspace_slug: str = Field(alias="workspaceSlug")


class DeleteConnectionInput(BaseModel):
    id: str


class DeleteDatasetInput(BaseModel):
    id: str


class DeleteDatasetLinkInput(BaseModel):
    id: str


class DeleteDatasetVersionInput(BaseModel):
    version_id: str = Field(alias="versionId")


class DeleteMembershipInput(BaseModel):
    id: Any


class DeleteMetadataAttributeInput(BaseModel):
    key: str
    target_id: Any = Field(alias="targetId")


class DeletePipelineInput(BaseModel):
    id: Any


class DeletePipelineRecipientInput(BaseModel):
    recipient_id: Any = Field(alias="recipientId")


class DeletePipelineTemplateInput(BaseModel):
    id: Any


class DeletePipelineVersionInput(BaseModel):
    id: Any


class DeleteTeamInput(BaseModel):
    id: Any


class DeleteTemplateVersionInput(BaseModel):
    id: Any


class DeleteWebappInput(BaseModel):
    id: Any


class DeleteWorkspaceDatabaseTableInput(BaseModel):
    table: str
    workspace_slug: str = Field(alias="workspaceSlug")


class DeleteWorkspaceInput(BaseModel):
    slug: str


class DeleteWorkspaceInvitationInput(BaseModel):
    invitation_id: Any = Field(alias="invitationId")


class DeleteWorkspaceMemberInput(BaseModel):
    membership_id: Any = Field(alias="membershipId")


class DenyAccessmodAccessRequestInput(BaseModel):
    id: str


class DisableTwoFactorInput(BaseModel):
    token: str


class EnableTwoFactorInput(BaseModel):
    email: Optional[str] = None


class GenerateDatasetUploadUrlInput(BaseModel):
    content_type: str = Field(alias="contentType")
    uri: str
    version_id: str = Field(alias="versionId")


class GenerateNewDatabasePasswordInput(BaseModel):
    workspace_slug: str = Field(alias="workspaceSlug")


class GeneratePipelineWebhookUrlInput(BaseModel):
    id: Any


class GenerateWorkspaceTokenInput(BaseModel):
    slug: str


class IASOQueryFilterInput(BaseModel):
    type: str
    value: List[int]


class InviteWorkspaceMemberInput(BaseModel):
    role: WorkspaceMembershipRole
    user_email: str = Field(alias="userEmail")
    workspace_slug: str = Field(alias="workspaceSlug")


class JoinWorkspaceInput(BaseModel):
    invitation_id: Any = Field(alias="invitationId")


class LaunchAccessmodAnalysisInput(BaseModel):
    id: str


class LaunchNotebookServerInput(BaseModel):
    workspace_slug: str = Field(alias="workspaceSlug")


class LinkDatasetInput(BaseModel):
    dataset_id: str = Field(alias="datasetId")
    workspace_slug: str = Field(alias="workspaceSlug")


class LogPipelineMessageInput(BaseModel):
    message: str
    priority: MessagePriority


class LoginInput(BaseModel):
    email: str
    password: str
    token: Optional[str] = None


class OrganizationInput(BaseModel):
    contact_info: Optional[str] = Field(alias="contactInfo", default=None)
    id: Any
    name: Optional[str] = None
    type: Optional[str] = None
    url: Optional[str] = None


class ParameterInput(BaseModel):
    choices: Optional[List[Any]] = None
    code: str
    connection: Optional[str] = None
    default: Optional[Any] = None
    help: Optional[str] = None
    multiple: Optional[bool] = None
    name: Optional[str] = None
    required: Optional[bool] = None
    type: str
    widget: Optional[ParameterWidget] = None


class PinDatasetInput(BaseModel):
    link_id: str = Field(alias="linkId")
    pinned: bool


class PipelineTokenInput(BaseModel):
    pipeline_code: str = Field(alias="pipelineCode")
    workspace_slug: str = Field(alias="workspaceSlug")


class PrepareAccessmodFileDownloadInput(BaseModel):
    file_id: str = Field(alias="fileId")


class PrepareAccessmodFileUploadInput(BaseModel):
    fileset_id: str = Field(alias="filesetId")
    mime_type: str = Field(alias="mimeType")


class PrepareAccessmodFilesetVisualizationDownloadInput(BaseModel):
    id: str


class PrepareDownloadURLInput(BaseModel):
    uri: Any


class PrepareObjectDownloadInput(BaseModel):
    object_key: str = Field(alias="objectKey")
    workspace_slug: str = Field(alias="workspaceSlug")


class PrepareObjectUploadInput(BaseModel):
    content_type: Optional[str] = Field(alias="contentType", default=None)
    object_key: str = Field(alias="objectKey")
    workspace_slug: str = Field(alias="workspaceSlug")


class PrepareVersionFileDownloadInput(BaseModel):
    file_id: str = Field(alias="fileId")


class RegisterInput(BaseModel):
    first_name: str = Field(alias="firstName")
    invitation_token: str = Field(alias="invitationToken")
    last_name: str = Field(alias="lastName")
    password_1: str = Field(alias="password1")
    password_2: str = Field(alias="password2")


class RemoveFromFavoritesInput(BaseModel):
    webapp_id: str = Field(alias="webappId")


class RequestAccessmodAccessInput(BaseModel):
    accept_tos: bool = Field(alias="acceptTos")
    email: str
    first_name: str = Field(alias="firstName")
    last_name: str = Field(alias="lastName")


class ResendWorkspaceInvitationInput(BaseModel):
    invitation_id: Any = Field(alias="invitationId")


class ResetPasswordInput(BaseModel):
    email: str


class RunDAGInput(BaseModel):
    config: Any
    dag_id: Any = Field(alias="dagId")


class RunPipelineInput(BaseModel):
    config: Any
    enable_debug_logs: Optional[bool] = Field(alias="enableDebugLogs", default=None)
    id: Any
    send_mail_notifications: Optional[bool] = Field(
        alias="sendMailNotifications", default=None
    )
    version_id: Optional[Any] = Field(alias="versionId", default=None)


class SetDAGRunFavoriteInput(BaseModel):
    id: Any
    is_favorite: bool = Field(alias="isFavorite")
    label: Optional[str] = None


class SetMetadataAttributeInput(BaseModel):
    key: str
    label: Optional[str] = None
    target_id: Any = Field(alias="targetId")
    value: Optional[Any] = None


class SetPasswordInput(BaseModel):
    password_1: str = Field(alias="password1")
    password_2: str = Field(alias="password2")
    token: str
    uidb_64: str = Field(alias="uidb64")


class StopPipelineInput(BaseModel):
    run_id: Any = Field(alias="runId")


class UpdateAccessmodAccessibilityAnalysisInput(BaseModel):
    algorithm: Optional[AccessmodAccessibilityAnalysisAlgorithm] = None
    barrier_id: Optional[str] = Field(alias="barrierId", default=None)
    dem_id: Optional[str] = Field(alias="demId", default=None)
    health_facilities_id: Optional[str] = Field(
        alias="healthFacilitiesId", default=None
    )
    id: str
    invert_direction: Optional[bool] = Field(alias="invertDirection", default=None)
    knight_move: Optional[bool] = Field(alias="knightMove", default=None)
    land_cover_id: Optional[str] = Field(alias="landCoverId", default=None)
    max_travel_time: Optional[int] = Field(alias="maxTravelTime", default=None)
    moving_speeds: Optional[Any] = Field(alias="movingSpeeds", default=None)
    name: Optional[str] = None
    stack_id: Optional[str] = Field(alias="stackId", default=None)
    stack_priorities: Optional[Any] = Field(alias="stackPriorities", default=None)
    transport_network_id: Optional[str] = Field(
        alias="transportNetworkId", default=None
    )
    water_all_touched: Optional[bool] = Field(alias="waterAllTouched", default=None)
    water_id: Optional[str] = Field(alias="waterId", default=None)


class UpdateAccessmodFilesetInput(BaseModel):
    id: str
    metadata: Optional[Any] = None
    name: Optional[str] = None


class UpdateAccessmodProjectInput(BaseModel):
    description: Optional[str] = None
    id: str
    name: Optional[str] = None


class UpdateAccessmodProjectMemberInput(BaseModel):
    id: str
    mode: PermissionMode


class UpdateAccessmodZonalStatisticsInput(BaseModel):
    boundaries_id: Optional[str] = Field(alias="boundariesId", default=None)
    id: str
    name: Optional[str] = None
    population_id: Optional[str] = Field(alias="populationId", default=None)
    time_thresholds: Optional[Any] = Field(alias="timeThresholds", default=None)
    travel_times_id: Optional[str] = Field(alias="travelTimesId", default=None)


class UpdateConnectionInput(BaseModel):
    description: Optional[str] = None
    fields: Optional[List["ConnectionFieldInput"]] = None
    id: str
    name: Optional[str] = None
    slug: Optional[str] = None


class UpdateDAGInput(BaseModel):
    countries: Optional[List["CountryInput"]] = None
    description: Optional[str] = None
    id: Any
    label: Optional[str] = None
    schedule: Optional[str] = None


class UpdateDatasetInput(BaseModel):
    dataset_id: str = Field(alias="datasetId")
    description: Optional[str] = None
    name: Optional[str] = None


class UpdateDatasetVersionInput(BaseModel):
    changelog: Optional[str] = None
    name: Optional[str] = None
    version_id: str = Field(alias="versionId")


class UpdateMembershipInput(BaseModel):
    id: Any
    role: MembershipRole


class UpdatePipelineInput(BaseModel):
    config: Optional[Any] = None
    description: Optional[str] = None
    id: Any
    name: Optional[str] = None
    schedule: Optional[str] = None
    webhook_enabled: Optional[bool] = Field(alias="webhookEnabled", default=None)


class UpdatePipelineProgressInput(BaseModel):
    percent: int


class UpdatePipelineRecipientInput(BaseModel):
    notification_level: PipelineNotificationLevel = Field(alias="notificationLevel")
    recipient_id: Any = Field(alias="recipientId")


class UpdatePipelineVersionInput(BaseModel):
    config: Optional[Any] = None
    description: Optional[str] = None
    external_link: Optional[Any] = Field(alias="externalLink", default=None)
    id: Any
    name: Optional[str] = None


class UpdateTeamInput(BaseModel):
    id: Any
    name: Optional[str] = None


class UpdateTemplateInput(BaseModel):
    config: Optional[Any] = None
    description: Optional[str] = None
    id: Any
    name: Optional[str] = None


class UpdateTemplateVersionInput(BaseModel):
    changelog: Optional[str] = None
    id: Any


class UpdateUserInput(BaseModel):
    first_name: Optional[str] = Field(alias="firstName", default=None)
    language: Optional[str] = None
    last_name: Optional[str] = Field(alias="lastName", default=None)


class UpdateWebappInput(BaseModel):
    description: Optional[str] = None
    icon: Optional[str] = None
    id: Any
    name: Optional[str] = None
    url: Optional[str] = None


class UpdateWorkspaceInput(BaseModel):
    configuration: Optional[Any] = None
    countries: Optional[List["CountryInput"]] = None
    description: Optional[str] = None
    docker_image: Optional[str] = Field(alias="dockerImage", default=None)
    name: Optional[str] = None
    slug: str


class UpdateWorkspaceMemberInput(BaseModel):
    membership_id: Any = Field(alias="membershipId")
    role: WorkspaceMembershipRole


class UpgradePipelineVersionFromTemplateInput(BaseModel):
    pipeline_id: Any = Field(alias="pipelineId")


class UploadPipelineInput(BaseModel):
    code: Optional[str] = None
    config: Optional[Any] = None
    description: Optional[str] = None
    external_link: Optional[Any] = Field(alias="externalLink", default=None)
    name: Optional[str] = None
    parameters: List["ParameterInput"]
    pipeline_code: Optional[str] = Field(alias="pipelineCode", default=None)
    timeout: Optional[int] = None
    workspace_slug: str = Field(alias="workspaceSlug")
    zipfile: str


class VerifyDeviceInput(BaseModel):
    token: Optional[str] = None


CreateAccessmodProjectInput.model_rebuild()
CreateConnectionInput.model_rebuild()
CreateWorkspaceInput.model_rebuild()
UpdateConnectionInput.model_rebuild()
UpdateDAGInput.model_rebuild()
UpdateWorkspaceInput.model_rebuild()
UploadPipelineInput.model_rebuild()
