# generated by https://github.com/puzl-cloud/kubesdk
#   filename:  apis__authentication.k8s.io__v1beta1_openapi.json

from __future__ import annotations

from dataclasses import dataclass, field
from datetime import datetime, timezone
from typing import ClassVar, Dict, List, Set

from kube_models.const import *
from kube_models.loader import *
from kube_models.loader import LazyLoadModel
from kube_models.resource import *


@dataclass(slots=True, kw_only=True, frozen=True)
class APIResource(LazyLoadModel):
    kind: str
    name: str
    namespaced: bool
    singularName: str
    verbs: List[str]
    categories: List[str] | None = None
    group: str | None = None
    shortNames: List[str] | None = None
    storageVersionHash: str | None = None
    version: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class APIResourceList(LazyLoadModel):
    groupVersion: str
    resources: List[APIResource]
    apiVersion: str = 'v1'
    kind: str = 'APIResourceList'


@dataclass(slots=True, kw_only=True, frozen=True)
class FieldsV1(LazyLoadModel):
    pass


@dataclass(slots=True, kw_only=True, frozen=True)
class OwnerReference(LazyLoadModel):
    apiVersion: str
    kind: str
    name: str
    uid: str
    blockOwnerDeletion: bool | None = None
    controller: bool | None = None


Time = str


@dataclass(slots=True, kw_only=True, frozen=True)
class ManagedFieldsEntry(LazyLoadModel):
    apiVersion: str | None = None
    fieldsType: str | None = None
    fieldsV1: FieldsV1 | None = None
    manager: str | None = None
    operation: str | None = None
    subresource: str | None = None
    time: Time | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ObjectMeta(LazyLoadModel):
    annotations: Dict[str, str] | None = None
    creationTimestamp: Time | None = None
    deletionGracePeriodSeconds: int | None = None
    deletionTimestamp: Time | None = None
    finalizers: List[str] = field(
        default_factory=list, metadata={'x-kubernetes-patch-strategy': 'merge'}
    )
    generateName: str | None = None
    generation: int | None = None
    labels: Dict[str, str] = field(default_factory=dict)
    managedFields: List[ManagedFieldsEntry] | None = None
    name: str | None = None
    namespace: str | None = None
    ownerReferences: List[OwnerReference] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'uid',
        },
    )
    resourceVersion: str | None = None
    selfLink: str | None = None
    uid: str | None = None
