# generated by https://github.com/puzl-cloud/kubesdk
#   filename:  apis__apps__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 Loadable
from kube_models.resource import *

from ...apimachinery.pkg.api.resource import Quantity
from ...apimachinery.pkg.apis.meta.v1 import LabelSelector, ObjectMeta, Time
from ...apimachinery.pkg.util.intstr import IntOrString


@dataclass(slots=True, kw_only=True, frozen=True)
class AWSElasticBlockStoreVolumeSource(Loadable):
    volumeID: str
    fsType: str | None = None
    partition: int | None = None
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class AppArmorProfile(Loadable):
    type: str
    localhostProfile: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class AzureDiskVolumeSource(Loadable):
    diskName: str
    diskURI: str
    cachingMode: str | None = 'ReadWrite'
    fsType: str | None = 'ext4'
    kind: str | None = 'Shared'
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class AzureFileVolumeSource(Loadable):
    secretName: str
    shareName: str
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Capabilities(Loadable):
    add: List[str] | None = None
    drop: List[str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ConfigMapEnvSource(Loadable):
    name: str | None = None
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ConfigMapKeySelector(Loadable):
    key: str
    name: str | None = None
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ContainerPort(Loadable):
    containerPort: int
    hostIP: str | None = None
    hostPort: int | None = None
    name: str | None = None
    protocol: str | None = 'TCP'


@dataclass(slots=True, kw_only=True, frozen=True)
class ContainerResizePolicy(Loadable):
    resourceName: str
    restartPolicy: str


@dataclass(slots=True, kw_only=True, frozen=True)
class ContainerRestartRuleOnExitCodes(Loadable):
    operator: str
    values: List[int] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ExecAction(Loadable):
    command: List[str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class FCVolumeSource(Loadable):
    fsType: str | None = None
    lun: int | None = None
    readOnly: bool | None = None
    targetWWNs: List[str] | None = None
    wwids: List[str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class FileKeySelector(Loadable):
    key: str
    path: str
    volumeName: str
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class FlockerVolumeSource(Loadable):
    datasetName: str | None = None
    datasetUUID: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class GCEPersistentDiskVolumeSource(Loadable):
    pdName: str
    fsType: str | None = None
    partition: int | None = None
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class GRPCAction(Loadable):
    port: int
    service: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class GitRepoVolumeSource(Loadable):
    repository: str
    directory: str | None = None
    revision: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class GlusterfsVolumeSource(Loadable):
    endpoints: str
    path: str
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class HTTPHeader(Loadable):
    name: str
    value: str


@dataclass(slots=True, kw_only=True, frozen=True)
class HostAlias(Loadable):
    ip: str
    hostnames: List[str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class HostPathVolumeSource(Loadable):
    path: str
    type: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ImageVolumeSource(Loadable):
    pullPolicy: str | None = None
    reference: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class KeyToPath(Loadable):
    key: str
    path: str
    mode: int | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class LocalObjectReference(Loadable):
    name: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ModifyVolumeStatus(Loadable):
    status: str
    targetVolumeAttributesClassName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class NFSVolumeSource(Loadable):
    path: str
    server: str
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class NodeSelectorRequirement(Loadable):
    key: str
    operator: str
    values: List[str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class NodeSelectorTerm(Loadable):
    matchExpressions: List[NodeSelectorRequirement] | None = None
    matchFields: List[NodeSelectorRequirement] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ObjectFieldSelector(Loadable):
    fieldPath: str
    apiVersion: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PersistentVolumeClaimVolumeSource(Loadable):
    claimName: str
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PhotonPersistentDiskVolumeSource(Loadable):
    pdID: str
    fsType: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodCertificateProjection(Loadable):
    keyType: str
    signerName: str
    certificateChainPath: str | None = None
    credentialBundlePath: str | None = None
    keyPath: str | None = None
    maxExpirationSeconds: int | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodDNSConfigOption(Loadable):
    name: str | None = None
    value: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodOS(Loadable):
    name: str


@dataclass(slots=True, kw_only=True, frozen=True)
class PodReadinessGate(Loadable):
    conditionType: str


@dataclass(slots=True, kw_only=True, frozen=True)
class PodResourceClaim(Loadable):
    name: str
    resourceClaimName: str | None = None
    resourceClaimTemplateName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodSchedulingGate(Loadable):
    name: str


@dataclass(slots=True, kw_only=True, frozen=True)
class PortworxVolumeSource(Loadable):
    volumeID: str
    fsType: str | None = None
    readOnly: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PreferredSchedulingTerm(Loadable):
    preference: NodeSelectorTerm
    weight: int


@dataclass(slots=True, kw_only=True, frozen=True)
class QuobyteVolumeSource(Loadable):
    registry: str
    volume: str
    group: str | None = None
    readOnly: bool | None = None
    tenant: str | None = None
    user: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class RBDVolumeSource(Loadable):
    image: str
    monitors: List[str]
    fsType: str | None = None
    keyring: str | None = '/etc/ceph/keyring'
    pool: str | None = 'rbd'
    readOnly: bool | None = None
    secretRef: LocalObjectReference | None = None
    user: str | None = 'admin'


@dataclass(slots=True, kw_only=True, frozen=True)
class ResourceClaim(Loadable):
    name: str
    request: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SELinuxOptions(Loadable):
    level: str | None = None
    role: str | None = None
    type: str | None = None
    user: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ScaleIOVolumeSource(Loadable):
    gateway: str
    secretRef: LocalObjectReference
    system: str
    fsType: str | None = 'xfs'
    protectionDomain: str | None = None
    readOnly: bool | None = None
    sslEnabled: bool | None = None
    storageMode: str | None = 'ThinProvisioned'
    storagePool: str | None = None
    volumeName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SeccompProfile(Loadable):
    type: str
    localhostProfile: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SecretEnvSource(Loadable):
    name: str | None = None
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SecretKeySelector(Loadable):
    key: str
    name: str | None = None
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SecretProjection(Loadable):
    items: List[KeyToPath] | None = None
    name: str | None = None
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SecretVolumeSource(Loadable):
    defaultMode: int | None = None
    items: List[KeyToPath] | None = None
    optional: bool | None = None
    secretName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ServiceAccountTokenProjection(Loadable):
    path: str
    audience: str | None = None
    expirationSeconds: int | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SleepAction(Loadable):
    seconds: int


@dataclass(slots=True, kw_only=True, frozen=True)
class StorageOSVolumeSource(Loadable):
    fsType: str | None = None
    readOnly: bool | None = None
    secretRef: LocalObjectReference | None = None
    volumeName: str | None = None
    volumeNamespace: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Sysctl(Loadable):
    name: str
    value: str


@dataclass(slots=True, kw_only=True, frozen=True)
class Toleration(Loadable):
    effect: str | None = None
    key: str | None = None
    operator: str | None = None
    tolerationSeconds: int | None = None
    value: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class TypedLocalObjectReference(Loadable):
    kind: str
    name: str
    apiGroup: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class TypedObjectReference(Loadable):
    kind: str
    name: str
    apiGroup: str | None = None
    namespace: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class VolumeDevice(Loadable):
    devicePath: str
    name: str


@dataclass(slots=True, kw_only=True, frozen=True)
class VolumeMount(Loadable):
    mountPath: str
    name: str
    mountPropagation: str | None = None
    readOnly: bool | None = None
    recursiveReadOnly: str | None = None
    subPath: str | None = None
    subPathExpr: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class VsphereVirtualDiskVolumeSource(Loadable):
    volumePath: str
    fsType: str | None = None
    storagePolicyID: str | None = None
    storagePolicyName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class WindowsSecurityContextOptions(Loadable):
    gmsaCredentialSpec: str | None = None
    gmsaCredentialSpecName: str | None = None
    hostProcess: bool | None = None
    runAsUserName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class CSIVolumeSource(Loadable):
    driver: str
    fsType: str | None = None
    nodePublishSecretRef: LocalObjectReference | None = None
    readOnly: bool | None = None
    volumeAttributes: Dict[str, str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class CephFSVolumeSource(Loadable):
    monitors: List[str]
    path: str | None = None
    readOnly: bool | None = None
    secretFile: str | None = None
    secretRef: LocalObjectReference | None = None
    user: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class CinderVolumeSource(Loadable):
    volumeID: str
    fsType: str | None = None
    readOnly: bool | None = None
    secretRef: LocalObjectReference | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ConfigMapProjection(Loadable):
    items: List[KeyToPath] | None = None
    name: str | None = None
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ConfigMapVolumeSource(Loadable):
    defaultMode: int | None = None
    items: List[KeyToPath] | None = None
    name: str | None = None
    optional: bool | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ContainerRestartRule(Loadable):
    action: str
    exitCodes: ContainerRestartRuleOnExitCodes | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class EmptyDirVolumeSource(Loadable):
    medium: str | None = None
    sizeLimit: Quantity | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class EnvFromSource(Loadable):
    configMapRef: ConfigMapEnvSource | None = None
    prefix: str | None = None
    secretRef: SecretEnvSource | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class FlexVolumeSource(Loadable):
    driver: str
    fsType: str | None = None
    options: Dict[str, str] | None = None
    readOnly: bool | None = None
    secretRef: LocalObjectReference | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class HTTPGetAction(Loadable):
    port: IntOrString
    host: str | None = None
    httpHeaders: List[HTTPHeader] | None = None
    path: str | None = None
    scheme: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ISCSIVolumeSource(Loadable):
    iqn: str
    lun: int
    targetPortal: str
    chapAuthDiscovery: bool | None = None
    chapAuthSession: bool | None = None
    fsType: str | None = None
    initiatorName: str | None = None
    iscsiInterface: str | None = 'default'
    portals: List[str] | None = None
    readOnly: bool | None = None
    secretRef: LocalObjectReference | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class NodeSelector(Loadable):
    nodeSelectorTerms: List[NodeSelectorTerm]


@dataclass(slots=True, kw_only=True, frozen=True)
class PersistentVolumeClaimCondition(Loadable):
    status: str
    type: str
    lastProbeTime: Time | None = None
    lastTransitionTime: Time | None = None
    message: str | None = None
    reason: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PersistentVolumeClaimStatus(Loadable):
    accessModes: List[str] | None = None
    allocatedResourceStatuses: Dict[str, str] | None = None
    allocatedResources: Dict[str, Quantity] | None = None
    capacity: Dict[str, Quantity] | None = None
    conditions: List[PersistentVolumeClaimCondition] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'type',
        },
    )
    currentVolumeAttributesClassName: str | None = None
    modifyVolumeStatus: ModifyVolumeStatus | None = None
    phase: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodDNSConfig(Loadable):
    nameservers: List[str] | None = None
    options: List[PodDNSConfigOption] | None = None
    searches: List[str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodSecurityContext(Loadable):
    appArmorProfile: AppArmorProfile | None = None
    fsGroup: int | None = None
    fsGroupChangePolicy: str | None = None
    runAsGroup: int | None = None
    runAsNonRoot: bool | None = None
    runAsUser: int | None = None
    seLinuxChangePolicy: str | None = None
    seLinuxOptions: SELinuxOptions | None = None
    seccompProfile: SeccompProfile | None = None
    supplementalGroups: List[int] | None = None
    supplementalGroupsPolicy: str | None = None
    sysctls: List[Sysctl] | None = None
    windowsOptions: WindowsSecurityContextOptions | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ResourceFieldSelector(Loadable):
    resource: str
    containerName: str | None = None
    divisor: Quantity | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ResourceRequirements(Loadable):
    claims: List[ResourceClaim] | None = None
    limits: Dict[str, Quantity] | None = None
    requests: Dict[str, Quantity] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class SecurityContext(Loadable):
    allowPrivilegeEscalation: bool | None = None
    appArmorProfile: AppArmorProfile | None = None
    capabilities: Capabilities | None = None
    privileged: bool | None = None
    procMount: str | None = None
    readOnlyRootFilesystem: bool | None = None
    runAsGroup: int | None = None
    runAsNonRoot: bool | None = None
    runAsUser: int | None = None
    seLinuxOptions: SELinuxOptions | None = None
    seccompProfile: SeccompProfile | None = None
    windowsOptions: WindowsSecurityContextOptions | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class TCPSocketAction(Loadable):
    port: IntOrString
    host: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class VolumeResourceRequirements(Loadable):
    limits: Dict[str, Quantity] | None = None
    requests: Dict[str, Quantity] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ClusterTrustBundleProjection(Loadable):
    path: str
    labelSelector: LabelSelector | None = None
    name: str | None = None
    optional: bool | None = None
    signerName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class DownwardAPIVolumeFile(Loadable):
    path: str
    fieldRef: ObjectFieldSelector | None = None
    mode: int | None = None
    resourceFieldRef: ResourceFieldSelector | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class DownwardAPIVolumeSource(Loadable):
    defaultMode: int | None = None
    items: List[DownwardAPIVolumeFile] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class EnvVarSource(Loadable):
    configMapKeyRef: ConfigMapKeySelector | None = None
    fieldRef: ObjectFieldSelector | None = None
    fileKeyRef: FileKeySelector | None = None
    resourceFieldRef: ResourceFieldSelector | None = None
    secretKeyRef: SecretKeySelector | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class LifecycleHandler(Loadable):
    exec: ExecAction | None = None
    httpGet: HTTPGetAction | None = None
    sleep: SleepAction | None = None
    tcpSocket: TCPSocketAction | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class NodeAffinity(Loadable):
    preferredDuringSchedulingIgnoredDuringExecution: (
        List[PreferredSchedulingTerm] | None
    ) = None
    requiredDuringSchedulingIgnoredDuringExecution: NodeSelector | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PersistentVolumeClaimSpec(Loadable):
    accessModes: List[str] | None = None
    dataSource: TypedLocalObjectReference | None = None
    dataSourceRef: TypedObjectReference | None = None
    resources: VolumeResourceRequirements | None = None
    selector: LabelSelector | None = None
    storageClassName: str | None = None
    volumeAttributesClassName: str | None = None
    volumeMode: str | None = None
    volumeName: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PersistentVolumeClaimTemplate(Loadable):
    spec: PersistentVolumeClaimSpec
    metadata: ObjectMeta | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodAffinityTerm(Loadable):
    topologyKey: str
    labelSelector: LabelSelector | None = None
    matchLabelKeys: List[str] | None = None
    mismatchLabelKeys: List[str] | None = None
    namespaceSelector: LabelSelector | None = None
    namespaces: List[str] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Probe(Loadable):
    exec: ExecAction | None = None
    failureThreshold: int | None = None
    grpc: GRPCAction | None = None
    httpGet: HTTPGetAction | None = None
    initialDelaySeconds: int | None = None
    periodSeconds: int | None = None
    successThreshold: int | None = None
    tcpSocket: TCPSocketAction | None = None
    terminationGracePeriodSeconds: int | None = None
    timeoutSeconds: int | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class TopologySpreadConstraint(Loadable):
    maxSkew: int
    topologyKey: str
    whenUnsatisfiable: str
    labelSelector: LabelSelector | None = None
    matchLabelKeys: List[str] | None = None
    minDomains: int | None = None
    nodeAffinityPolicy: str | None = None
    nodeTaintsPolicy: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class WeightedPodAffinityTerm(Loadable):
    podAffinityTerm: PodAffinityTerm
    weight: int


@dataclass(slots=True, kw_only=True, frozen=True)
class DownwardAPIProjection(Loadable):
    items: List[DownwardAPIVolumeFile] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class EnvVar(Loadable):
    name: str
    value: str | None = None
    valueFrom: EnvVarSource | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class EphemeralVolumeSource(Loadable):
    volumeClaimTemplate: PersistentVolumeClaimTemplate | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Lifecycle(Loadable):
    postStart: LifecycleHandler | None = None
    preStop: LifecycleHandler | None = None
    stopSignal: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PersistentVolumeClaim(Loadable):
    apiVersion: str = 'v1'
    kind: str = 'PersistentVolumeClaim'
    metadata: ObjectMeta = field(default_factory=ObjectMeta)
    spec: PersistentVolumeClaimSpec | None = None
    status: PersistentVolumeClaimStatus | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodAffinity(Loadable):
    preferredDuringSchedulingIgnoredDuringExecution: (
        List[WeightedPodAffinityTerm] | None
    ) = None
    requiredDuringSchedulingIgnoredDuringExecution: List[PodAffinityTerm] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodAntiAffinity(Loadable):
    preferredDuringSchedulingIgnoredDuringExecution: (
        List[WeightedPodAffinityTerm] | None
    ) = None
    requiredDuringSchedulingIgnoredDuringExecution: List[PodAffinityTerm] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class VolumeProjection(Loadable):
    clusterTrustBundle: ClusterTrustBundleProjection | None = None
    configMap: ConfigMapProjection | None = None
    downwardAPI: DownwardAPIProjection | None = None
    podCertificate: PodCertificateProjection | None = None
    secret: SecretProjection | None = None
    serviceAccountToken: ServiceAccountTokenProjection | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Affinity(Loadable):
    nodeAffinity: NodeAffinity | None = None
    podAffinity: PodAffinity | None = None
    podAntiAffinity: PodAntiAffinity | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Container(Loadable):
    name: str
    args: List[str] | None = None
    command: List[str] | None = None
    env: List[EnvVar] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )
    envFrom: List[EnvFromSource] | None = None
    image: str | None = None
    imagePullPolicy: str | None = None
    lifecycle: Lifecycle | None = None
    livenessProbe: Probe | None = None
    ports: List[ContainerPort] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'containerPort',
        },
    )
    readinessProbe: Probe | None = None
    resizePolicy: List[ContainerResizePolicy] | None = None
    resources: ResourceRequirements | None = None
    restartPolicy: str | None = None
    restartPolicyRules: List[ContainerRestartRule] | None = None
    securityContext: SecurityContext | None = None
    startupProbe: Probe | None = None
    stdin: bool | None = None
    stdinOnce: bool | None = None
    terminationMessagePath: str | None = None
    terminationMessagePolicy: str | None = None
    tty: bool | None = None
    volumeDevices: List[VolumeDevice] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'devicePath',
        },
    )
    volumeMounts: List[VolumeMount] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'mountPath',
        },
    )
    workingDir: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class EphemeralContainer(Loadable):
    name: str
    args: List[str] | None = None
    command: List[str] | None = None
    env: List[EnvVar] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )
    envFrom: List[EnvFromSource] | None = None
    image: str | None = None
    imagePullPolicy: str | None = None
    lifecycle: Lifecycle | None = None
    livenessProbe: Probe | None = None
    ports: List[ContainerPort] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'containerPort',
        },
    )
    readinessProbe: Probe | None = None
    resizePolicy: List[ContainerResizePolicy] | None = None
    resources: ResourceRequirements | None = None
    restartPolicy: str | None = None
    restartPolicyRules: List[ContainerRestartRule] | None = None
    securityContext: SecurityContext | None = None
    startupProbe: Probe | None = None
    stdin: bool | None = None
    stdinOnce: bool | None = None
    targetContainerName: str | None = None
    terminationMessagePath: str | None = None
    terminationMessagePolicy: str | None = None
    tty: bool | None = None
    volumeDevices: List[VolumeDevice] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'devicePath',
        },
    )
    volumeMounts: List[VolumeMount] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'mountPath',
        },
    )
    workingDir: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class ProjectedVolumeSource(Loadable):
    defaultMode: int | None = None
    sources: List[VolumeProjection] | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class Volume(Loadable):
    name: str
    awsElasticBlockStore: AWSElasticBlockStoreVolumeSource | None = None
    azureDisk: AzureDiskVolumeSource | None = None
    azureFile: AzureFileVolumeSource | None = None
    cephfs: CephFSVolumeSource | None = None
    cinder: CinderVolumeSource | None = None
    configMap: ConfigMapVolumeSource | None = None
    csi: CSIVolumeSource | None = None
    downwardAPI: DownwardAPIVolumeSource | None = None
    emptyDir: EmptyDirVolumeSource | None = None
    ephemeral: EphemeralVolumeSource | None = None
    fc: FCVolumeSource | None = None
    flexVolume: FlexVolumeSource | None = None
    flocker: FlockerVolumeSource | None = None
    gcePersistentDisk: GCEPersistentDiskVolumeSource | None = None
    gitRepo: GitRepoVolumeSource | None = None
    glusterfs: GlusterfsVolumeSource | None = None
    hostPath: HostPathVolumeSource | None = None
    image: ImageVolumeSource | None = None
    iscsi: ISCSIVolumeSource | None = None
    nfs: NFSVolumeSource | None = None
    persistentVolumeClaim: PersistentVolumeClaimVolumeSource | None = None
    photonPersistentDisk: PhotonPersistentDiskVolumeSource | None = None
    portworxVolume: PortworxVolumeSource | None = None
    projected: ProjectedVolumeSource | None = None
    quobyte: QuobyteVolumeSource | None = None
    rbd: RBDVolumeSource | None = None
    scaleIO: ScaleIOVolumeSource | None = None
    secret: SecretVolumeSource | None = None
    storageos: StorageOSVolumeSource | None = None
    vsphereVolume: VsphereVirtualDiskVolumeSource | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PodSpec(Loadable):
    activeDeadlineSeconds: int | None = None
    affinity: Affinity | None = None
    automountServiceAccountToken: bool | None = None
    containers: List[Container] = field(
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'name',
        }
    )
    dnsConfig: PodDNSConfig | None = None
    dnsPolicy: str | None = None
    enableServiceLinks: bool | None = None
    ephemeralContainers: List[EphemeralContainer] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )
    hostAliases: List[HostAlias] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'ip',
        },
    )
    hostIPC: bool | None = None
    hostNetwork: bool | None = None
    hostPID: bool | None = None
    hostUsers: bool | None = None
    hostname: str | None = None
    hostnameOverride: str | None = None
    imagePullSecrets: List[LocalObjectReference] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )
    initContainers: List[Container] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )
    nodeName: str | None = None
    nodeSelector: Dict[str, str] | None = None
    os: PodOS | None = None
    overhead: Dict[str, Quantity] | None = None
    preemptionPolicy: str | None = None
    priority: int | None = None
    priorityClassName: str | None = None
    readinessGates: List[PodReadinessGate] | None = None
    resourceClaims: List[PodResourceClaim] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge,retainKeys',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )
    resources: ResourceRequirements | None = None
    restartPolicy: str | None = None
    runtimeClassName: str | None = None
    schedulerName: str | None = None
    schedulingGates: List[PodSchedulingGate] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )
    securityContext: PodSecurityContext | None = None
    serviceAccount: str | None = None
    serviceAccountName: str | None = None
    setHostnameAsFQDN: bool | None = None
    shareProcessNamespace: bool | None = None
    subdomain: str | None = None
    terminationGracePeriodSeconds: int | None = None
    tolerations: List[Toleration] | None = None
    topologySpreadConstraints: List[TopologySpreadConstraint] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge',
            'x-kubernetes-patch-merge-key': 'topologyKey',
        },
    )
    volumes: List[Volume] = field(
        default_factory=list,
        metadata={
            'x-kubernetes-patch-strategy': 'merge,retainKeys',
            'x-kubernetes-patch-merge-key': 'name',
        },
    )


@dataclass(slots=True, kw_only=True, frozen=True)
class PodTemplateSpec(Loadable):
    metadata: ObjectMeta | None = None
    spec: PodSpec | None = None
