# generated by https://github.com/puzl-cloud/kubesdk
#   filename:  apis__node.k8s.io__v1_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 *

from ...apimachinery.pkg.api.resource import Quantity
from ...apimachinery.pkg.apis.meta.v1 import ListMeta, ObjectMeta
from ..core.v1 import Toleration


@dataclass(slots=True, kw_only=True, frozen=True)
class Scheduling(LazyLoadModel):
    nodeSelector: Dict[str, str] | None = None
    tolerations: List[Toleration] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Overhead(LazyLoadModel):
    podFixed: Dict[str, Quantity] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class RuntimeClass(K8sResource):
    handler: str
    apiVersion: ClassVar[str] = 'node.k8s.io/v1'
    kind: ClassVar[str] = 'RuntimeClass'
    metadata: ObjectMeta = field(default_factory=ObjectMeta)
    overhead: Overhead | None = None
    scheduling: Scheduling | None = None
    api_path_: ClassVar[str] = 'apis/node.k8s.io/v1/runtimeclasses'
    plural_: ClassVar[str] = 'runtimeclasses'
    is_namespaced_: ClassVar[bool] = False
    group_: ClassVar[Optional[str]] = 'node.k8s.io'
    patch_strategies_: ClassVar[set[PatchRequestType]] = {
        'application/apply-patch+cbor',
        'application/apply-patch+yaml',
        'application/json-patch+json',
        'application/merge-patch+json',
        'application/strategic-merge-patch+json',
    }


@dataclass(slots=True, kw_only=True, frozen=True)
class RuntimeClassList(LazyLoadModel):
    items: List[RuntimeClass]
    apiVersion: str = 'node.k8s.io/v1'
    kind: str = 'RuntimeClassList'
    metadata: ListMeta = field(default_factory=ObjectMeta)
