# autogenerated module
from typing import List, Optional, TYPE_CHECKING

from ._schema import dataclass, field, DictMixin

if TYPE_CHECKING:   # Fix for pycharm autocompletion https://youtrack.jetbrains.com/issue/PY-54560
    from dataclasses import dataclass, field

from . import meta_v1
from . import core_v1


@dataclass
class Event(DictMixin):
    """Event is a report of an event somewhere in the cluster. It generally denotes
      some state change in the system.

      **parameters**

      * **eventTime** ``meta_v1.MicroTime`` - Required. Time when this Event was first observed.
      * **action** ``Optional[str]`` - What action was taken/failed regarding to the regarding object.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **deprecatedCount** ``Optional[int]`` - Deprecated field assuring backward compatibility with core.v1 Event type
      * **deprecatedFirstTimestamp** ``Optional[meta_v1.Time]`` - Deprecated field assuring backward compatibility with core.v1 Event type
      * **deprecatedLastTimestamp** ``Optional[meta_v1.Time]`` - Deprecated field assuring backward compatibility with core.v1 Event type
      * **deprecatedSource** ``Optional[core_v1.EventSource]`` - Deprecated field assuring backward compatibility with core.v1 Event type
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ObjectMeta]`` - 
      * **note** ``Optional[str]`` - Optional. A human-readable description of the status of this operation.
        Maximal length of the note is 1kB, but libraries should be prepared to handle
        values up to 64kB.
      * **reason** ``Optional[str]`` - Why the action was taken.
      * **regarding** ``Optional[core_v1.ObjectReference]`` - The object this Event is about. In most cases it's an Object reporting
        controller implements. E.g. ReplicaSetController implements ReplicaSets and
        this event is emitted because it acts on some changes in a ReplicaSet object.
      * **related** ``Optional[core_v1.ObjectReference]`` - Optional secondary object for more complex actions. E.g. when regarding object
        triggers a creation or deletion of related object.
      * **reportingController** ``Optional[str]`` - Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
      * **reportingInstance** ``Optional[str]`` - ID of the controller instance, e.g. `kubelet-xyzf`.
      * **series** ``Optional[EventSeries]`` - Data about the Event series this event represents or nil if it's a singleton
        Event.
      * **type** ``Optional[str]`` - Type of this event (Normal, Warning), new types could be added in the future.
    """
    eventTime: 'meta_v1.MicroTime'
    action: 'Optional[str]' = None
    apiVersion: 'Optional[str]' = None
    deprecatedCount: 'Optional[int]' = None
    deprecatedFirstTimestamp: 'Optional[meta_v1.Time]' = None
    deprecatedLastTimestamp: 'Optional[meta_v1.Time]' = None
    deprecatedSource: 'Optional[core_v1.EventSource]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ObjectMeta]' = None
    note: 'Optional[str]' = None
    reason: 'Optional[str]' = None
    regarding: 'Optional[core_v1.ObjectReference]' = None
    related: 'Optional[core_v1.ObjectReference]' = None
    reportingController: 'Optional[str]' = None
    reportingInstance: 'Optional[str]' = None
    series: 'Optional[EventSeries]' = None
    type: 'Optional[str]' = None


@dataclass
class EventList(DictMixin):
    """EventList is a list of Event objects.

      **parameters**

      * **items** ``List[Event]`` - Items is a list of schema objects.
      * **apiVersion** ``Optional[str]`` - APIVersion defines the versioned schema of this representation of an object.
        Servers should convert recognized schemas to the latest internal value, and
        may reject unrecognized values. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      * **kind** ``Optional[str]`` - Kind is a string value representing the REST resource this object represents.
        Servers may infer this from the endpoint the client submits requests to.
        Cannot be updated. In CamelCase. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      * **metadata** ``Optional[meta_v1.ListMeta]`` - Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """
    items: 'List[Event]'
    apiVersion: 'Optional[str]' = None
    kind: 'Optional[str]' = None
    metadata: 'Optional[meta_v1.ListMeta]' = None


@dataclass
class EventSeries(DictMixin):
    """EventSeries contain information on series of events, i.e. thing that was/is
      happening continuously for some time.

      **parameters**

      * **count** ``int`` - Number of occurrences in this series up to the last heartbeat time
      * **lastObservedTime** ``meta_v1.MicroTime`` - Time when last Event from the series was seen before last heartbeat.
      * **state** ``str`` - Information whether this series is ongoing or finished. Deprecated. Planned
        removal for 1.18
    """
    count: 'int'
    lastObservedTime: 'meta_v1.MicroTime'
    state: 'str'


