# generated by datamodel-codegen:
#   filename:  argo-workflows-3.6.2.json

from __future__ import annotations

from typing import Annotated, Optional

from hera.shared._pydantic import BaseModel, Field

from .io.argoproj.events import v1alpha1
from .io.k8s.apimachinery.pkg.apis.meta import v1


class EventSourceDeletedResponse(BaseModel):
    pass


class LogEntry(BaseModel):
    event_name: Annotated[
        Optional[str],
        Field(alias="eventName", title="optional - the event name (e.g. `example`)"),
    ] = None
    event_source_name: Annotated[Optional[str], Field(alias="eventSourceName")] = None
    event_source_type: Annotated[
        Optional[str],
        Field(
            alias="eventSourceType",
            title="optional - the event source type (e.g. `webhook`)",
        ),
    ] = None
    level: Optional[str] = None
    msg: Optional[str] = None
    namespace: Optional[str] = None
    time: Optional[v1.Time] = None


class CreateEventSourceRequest(BaseModel):
    event_source: Annotated[Optional[v1alpha1.EventSource], Field(alias="eventSource")] = None
    namespace: Optional[str] = None


class EventSourceWatchEvent(BaseModel):
    object: Optional[v1alpha1.EventSource] = None
    type: Optional[str] = None


class UpdateEventSourceRequest(BaseModel):
    event_source: Annotated[Optional[v1alpha1.EventSource], Field(alias="eventSource")] = None
    name: Optional[str] = None
    namespace: Optional[str] = None
