# Generated by ariadne-codegen
# Source: ./documents

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    ArcadeProviders,
    AuthenticationServiceTypes,
    ConnectorTypes,
    EntityState,
    IntegrationServiceTypes,
    MCPServerTypes,
    OAuthProviders,
    UserTypes,
)


class GetUserByIdentifier(BaseModel):
    user_by_identifier: Optional["GetUserByIdentifierUserByIdentifier"] = Field(
        alias="userByIdentifier"
    )


class GetUserByIdentifierUserByIdentifier(BaseModel):
    id: str
    name: str
    creation_date: Any = Field(alias="creationDate")
    relevance: Optional[float]
    owner: "GetUserByIdentifierUserByIdentifierOwner"
    state: EntityState
    type: Optional[UserTypes]
    identifier: str
    description: Optional[str]
    connectors: Optional[
        List[Optional["GetUserByIdentifierUserByIdentifierConnectors"]]
    ]


class GetUserByIdentifierUserByIdentifierOwner(BaseModel):
    id: str


class GetUserByIdentifierUserByIdentifierConnectors(BaseModel):
    id: str
    name: str
    state: EntityState
    type: Optional[ConnectorTypes]
    authentication: Optional[
        "GetUserByIdentifierUserByIdentifierConnectorsAuthentication"
    ]
    integration: Optional["GetUserByIdentifierUserByIdentifierConnectorsIntegration"]


class GetUserByIdentifierUserByIdentifierConnectorsAuthentication(BaseModel):
    type: AuthenticationServiceTypes
    microsoft: Optional[
        "GetUserByIdentifierUserByIdentifierConnectorsAuthenticationMicrosoft"
    ]
    google: Optional[
        "GetUserByIdentifierUserByIdentifierConnectorsAuthenticationGoogle"
    ]
    oauth: Optional["GetUserByIdentifierUserByIdentifierConnectorsAuthenticationOauth"]
    arcade: Optional[
        "GetUserByIdentifierUserByIdentifierConnectorsAuthenticationArcade"
    ]


class GetUserByIdentifierUserByIdentifierConnectorsAuthenticationMicrosoft(BaseModel):
    tenant_id: str = Field(alias="tenantId")
    client_id: str = Field(alias="clientId")
    client_secret: str = Field(alias="clientSecret")


class GetUserByIdentifierUserByIdentifierConnectorsAuthenticationGoogle(BaseModel):
    client_id: str = Field(alias="clientId")
    client_secret: str = Field(alias="clientSecret")


class GetUserByIdentifierUserByIdentifierConnectorsAuthenticationOauth(BaseModel):
    refresh_token: str = Field(alias="refreshToken")
    provider: OAuthProviders
    metadata: Optional[str]


class GetUserByIdentifierUserByIdentifierConnectorsAuthenticationArcade(BaseModel):
    authorization_id: str = Field(alias="authorizationId")
    provider: ArcadeProviders
    metadata: Optional[str]


class GetUserByIdentifierUserByIdentifierConnectorsIntegration(BaseModel):
    type: IntegrationServiceTypes
    uri: Optional[str]
    slack: Optional["GetUserByIdentifierUserByIdentifierConnectorsIntegrationSlack"]
    email: Optional["GetUserByIdentifierUserByIdentifierConnectorsIntegrationEmail"]
    twitter: Optional["GetUserByIdentifierUserByIdentifierConnectorsIntegrationTwitter"]
    mcp: Optional["GetUserByIdentifierUserByIdentifierConnectorsIntegrationMcp"]


class GetUserByIdentifierUserByIdentifierConnectorsIntegrationSlack(BaseModel):
    token: str
    channel: str


class GetUserByIdentifierUserByIdentifierConnectorsIntegrationEmail(BaseModel):
    from_: str = Field(alias="from")
    subject: str
    to: List[str]


class GetUserByIdentifierUserByIdentifierConnectorsIntegrationTwitter(BaseModel):
    consumer_key: str = Field(alias="consumerKey")
    consumer_secret: str = Field(alias="consumerSecret")
    access_token_key: str = Field(alias="accessTokenKey")
    access_token_secret: str = Field(alias="accessTokenSecret")


class GetUserByIdentifierUserByIdentifierConnectorsIntegrationMcp(BaseModel):
    token: Optional[str]
    type: MCPServerTypes


GetUserByIdentifier.model_rebuild()
GetUserByIdentifierUserByIdentifier.model_rebuild()
GetUserByIdentifierUserByIdentifierConnectors.model_rebuild()
GetUserByIdentifierUserByIdentifierConnectorsAuthentication.model_rebuild()
GetUserByIdentifierUserByIdentifierConnectorsIntegration.model_rebuild()
