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

from __future__ import annotations

from dataclasses import dataclass
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


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


@dataclass(slots=True, kw_only=True, frozen=True)
class AzureDiskVolumeSource(LazyLoadModel):
    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 AzureFilePersistentVolumeSource(LazyLoadModel):
    secretName: str
    shareName: str
    readOnly: bool | None = None
    secretNamespace: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class FCVolumeSource(LazyLoadModel):
    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 FlockerVolumeSource(LazyLoadModel):
    datasetName: str | None = None
    datasetUUID: str | None = None


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


@dataclass(slots=True, kw_only=True, frozen=True)
class GlusterfsPersistentVolumeSource(LazyLoadModel):
    endpoints: str
    path: str
    endpointsNamespace: str | None = None
    readOnly: bool | None = None


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


@dataclass(slots=True, kw_only=True, frozen=True)
class LocalVolumeSource(LazyLoadModel):
    path: str
    fsType: str | None = None


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


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


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


@dataclass(slots=True, kw_only=True, frozen=True)
class ObjectReference(LazyLoadModel):
    apiVersion: str | None = None
    fieldPath: str | None = None
    kind: str | None = None
    name: str | None = None
    namespace: str | None = None
    resourceVersion: str | None = None
    uid: str | None = None


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


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


@dataclass(slots=True, kw_only=True, frozen=True)
class QuobyteVolumeSource(LazyLoadModel):
    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 SecretReference(LazyLoadModel):
    name: str | None = None
    namespace: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class StorageOSPersistentVolumeSource(LazyLoadModel):
    fsType: str | None = None
    readOnly: bool | None = None
    secretRef: ObjectReference | None = None
    volumeName: str | None = None
    volumeNamespace: str | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class TopologySelectorLabelRequirement(LazyLoadModel):
    key: str
    values: List[str]


@dataclass(slots=True, kw_only=True, frozen=True)
class TopologySelectorTerm(LazyLoadModel):
    matchLabelExpressions: List[TopologySelectorLabelRequirement] | None = None


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


@dataclass(slots=True, kw_only=True, frozen=True)
class CSIPersistentVolumeSource(LazyLoadModel):
    driver: str
    volumeHandle: str
    controllerExpandSecretRef: SecretReference | None = None
    controllerPublishSecretRef: SecretReference | None = None
    fsType: str | None = None
    nodeExpandSecretRef: SecretReference | None = None
    nodePublishSecretRef: SecretReference | None = None
    nodeStageSecretRef: SecretReference | None = None
    readOnly: bool | None = None
    volumeAttributes: Dict[str, str] | None = None


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


@dataclass(slots=True, kw_only=True, frozen=True)
class CinderPersistentVolumeSource(LazyLoadModel):
    volumeID: str
    fsType: str | None = None
    readOnly: bool | None = None
    secretRef: SecretReference | None = None


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


@dataclass(slots=True, kw_only=True, frozen=True)
class ISCSIPersistentVolumeSource(LazyLoadModel):
    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: SecretReference | None = None


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


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


@dataclass(slots=True, kw_only=True, frozen=True)
class ScaleIOPersistentVolumeSource(LazyLoadModel):
    gateway: str
    secretRef: SecretReference
    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 VolumeNodeAffinity(LazyLoadModel):
    required: NodeSelector | None = None


@dataclass(slots=True, kw_only=True, frozen=True)
class PersistentVolumeSpec(LazyLoadModel):
    accessModes: List[str] | None = None
    awsElasticBlockStore: AWSElasticBlockStoreVolumeSource | None = None
    azureDisk: AzureDiskVolumeSource | None = None
    azureFile: AzureFilePersistentVolumeSource | None = None
    capacity: Dict[str, Quantity] | None = None
    cephfs: CephFSPersistentVolumeSource | None = None
    cinder: CinderPersistentVolumeSource | None = None
    claimRef: ObjectReference | None = None
    csi: CSIPersistentVolumeSource | None = None
    fc: FCVolumeSource | None = None
    flexVolume: FlexPersistentVolumeSource | None = None
    flocker: FlockerVolumeSource | None = None
    gcePersistentDisk: GCEPersistentDiskVolumeSource | None = None
    glusterfs: GlusterfsPersistentVolumeSource | None = None
    hostPath: HostPathVolumeSource | None = None
    iscsi: ISCSIPersistentVolumeSource | None = None
    local: LocalVolumeSource | None = None
    mountOptions: List[str] | None = None
    nfs: NFSVolumeSource | None = None
    nodeAffinity: VolumeNodeAffinity | None = None
    persistentVolumeReclaimPolicy: str | None = None
    photonPersistentDisk: PhotonPersistentDiskVolumeSource | None = None
    portworxVolume: PortworxVolumeSource | None = None
    quobyte: QuobyteVolumeSource | None = None
    rbd: RBDPersistentVolumeSource | None = None
    scaleIO: ScaleIOPersistentVolumeSource | None = None
    storageClassName: str | None = None
    storageos: StorageOSPersistentVolumeSource | None = None
    volumeAttributesClassName: str | None = None
    volumeMode: str | None = None
    vsphereVolume: VsphereVirtualDiskVolumeSource | None = None
