#
# Copyright (c) 2021 Incisive Technology Ltd
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
DO NOT EDIT THIS FILE!

This module is automatically generated using the Hikaru build program that turns
a Kubernetes swagger spec into the code for the hikaru.model package.
"""


from hikaru.meta import HikaruBase, HikaruDocumentBase, KubernetesException, WatcherDescriptor
from hikaru.generate import get_clean_dict
from hikaru.utils import Response
from typing import Dict, List, Optional, Any
from dataclasses import dataclass, field, InitVar
from kubernetes.client import CoreV1Api
from ..unversioned import *

from kubernetes.client import ApiClient
from kubernetes.client import AppsV1beta2Api


@dataclass
class SelfSubjectRulesReview(HikaruDocumentBase):
    r"""
    SelfSubjectRulesReview enumerates the set of actions the current user can perform
    within a namespace. The returned list of actions may be incomplete depending on the
    server's authorization mode, and any errors experienced during the evaluation.
    SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let
    an end user reason about their permissions. It should NOT Be used by external systems
    to drive authorization decisions as this raises confused deputy, cache
    lifetime/revocation, and correctness concerns. SubjectAccessReview, and
    LocalAccessReview are the correct way to defer authorization decisions to the API
    server.

    Full name: v1.SelfSubjectRulesReview

    Attributes:
    spec: Spec holds information about the request being evaluated.
    apiVersion: 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: 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:
    status: Status is filled in by the server and indicates the set of actions a user can
        perform.
    """

    _version = "v1"
    spec: "SelfSubjectRulesReviewSpec"
    apiVersion: Optional[str] = "authorization.k8s.io/v1"
    kind: Optional[str] = "SelfSubjectRulesReview"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["SubjectRulesReviewStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ObjectMeta(HikaruBase):
    r"""
    ObjectMeta is metadata that all persisted resources must have, which includes all
    objects users must create.

    Full name: v1.ObjectMeta

    Attributes:
    clusterName: The name of the cluster which the object belongs to. This is used to
        distinguish resources with same name and namespace in different clusters. This
        field is not set anywhere right now and apiserver is going to ignore it if set in
        create or update request.
    creationTimestamp: CreationTimestamp is a timestamp representing the server time when
        this object was created. It is not guaranteed to be set in happens-before order
        across separate operations. Clients may not set this value. It is represented in
        RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists.
        More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    deletionGracePeriodSeconds: Number of seconds allowed for this object to gracefully
        terminate before it will be removed from the system. Only set when
        deletionTimestamp is also set. May only be shortened. Read-only.
    deletionTimestamp: DeletionTimestamp is RFC 3339 date and time at which this resource
        will be deleted. This field is set by the server when a graceful deletion is
        requested by the user, and is not directly settable by a client. The resource is
        expected to be deleted (no longer visible from resource lists, and not reachable
        by name) after the time in this field, once the finalizers list is empty. As long
        as the finalizers list contains items, deletion is blocked. Once the
        deletionTimestamp is set, this value may not be unset or be set further into the
        future, although it may be shortened or the resource may be deleted prior to this
        time. For example, a user may request that a pod is deleted in 30 seconds. The
        Kubelet will react by sending a graceful termination signal to the containers in
        the pod. After that 30 seconds, the Kubelet will send a hard termination signal
        (SIGKILL) to the container and after cleanup, remove the pod from the API. In the
        presence of network partitions, this object may still exist after this timestamp,
        until an administrator or automated process can determine the resource is fully
        terminated. If not set, graceful deletion of the object has not been requested.
        Populated by the system when a graceful deletion is requested. Read-only. More
        info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    generateName: GenerateName is an optional prefix, used by the server, to generate a
        unique name ONLY IF the Name field has not been provided. If this field is used,
        the name returned to the client will be different than the name passed. This value
        will also be combined with a unique suffix. The provided value has the same
        validation rules as the Name field, and may be truncated by the length of the
        suffix required to make the value unique on the server. If this field is specified
        and the generated name exists, the server will NOT return a 409 - instead, it will
        either return 201 Created or 500 with Reason ServerTimeout indicating a unique
        name could not be found in the time allotted, and the client should retry
        (optionally after the time indicated in the Retry-After header). Applied only if
        Name is not specified. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
    generation: A sequence number representing a specific generation of the desired state.
        Populated by the system. Read-only.
    name: Name must be unique within a namespace. Is required when creating resources,
        although some resources may allow a client to request the generation of an
        appropriate name automatically. Name is primarily intended for creation
        idempotence and configuration definition. Cannot be updated. More info:
        http://kubernetes.io/docs/user-guide/identifiers#names
    namespace: Namespace defines the space within each name must be unique. An empty
        namespace is equivalent to the "default" namespace, but "default" is the canonical
        representation. Not all objects are required to be scoped to a namespace - the
        value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot
        be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
    resourceVersion: An opaque value that represents the internal version of this object
        that can be used by clients to determine when objects have changed. May be used
        for optimistic concurrency, change detection, and the watch operation on a
        resource or set of resources. Clients must treat these values as opaque and passed
        unmodified back to the server. They may only be valid for a particular resource or
        set of resources. Populated by the system. Read-only. Value must be treated as
        opaque by clients and . More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
    selfLink: SelfLink is a URL representing this object. Populated by the system.
        Read-only. DEPRECATED Kubernetes will stop propagating this field in 1.20 release
        and the field is planned to be removed in 1.21 release.
    uid: UID is the unique in time and space value for this object. It is typically
        generated by the server on successful creation of a resource and is not allowed to
        change on PUT operations. Populated by the system. Read-only. More info:
        http://kubernetes.io/docs/user-guide/identifiers#uids
    annotations: Annotations is an unstructured key value map stored with a resource that
        may be set by external tools to store and retrieve arbitrary metadata. They are
        not queryable and should be preserved when modifying objects. More info:
        http://kubernetes.io/docs/user-guide/annotations
    finalizers: Must be empty before the object is deleted from the registry. Each entry
        is an identifier for the responsible component that will remove the entry from the
        list. If the deletionTimestamp of the object is non-nil, entries in this list can
        only be removed. Finalizers may be processed and removed in any order. Order is
        NOT enforced because it introduces significant risk of stuck finalizers.
        finalizers is a shared field, any actor with permission can reorder it. If the
        finalizer list is processed in order, then this can lead to a situation in which
        the component responsible for the first finalizer in the list is waiting for a
        signal (field value, external system, or other) produced by a component
        responsible for a finalizer later in the list, resulting in a deadlock. Without
        enforced ordering finalizers are free to order amongst themselves and are not
        vulnerable to ordering changes in the list.
    labels: Map of string keys and values that can be used to organize and categorize
        (scope and select) objects. May match selectors of replication controllers and
        services. More info: http://kubernetes.io/docs/user-guide/labels
    managedFields: ManagedFields maps workflow-id and version to the set of fields that
        are managed by that workflow. This is mostly for internal housekeeping, and users
        typically shouldn't need to set or understand this field. A workflow can be the
        user's name, a controller's name, or the name of a specific apply path like
        "ci-cd". The set of fields is always in the version that the workflow used when
        modifying the object.
    ownerReferences: List of objects depended by this object. If ALL objects in the list
        have been deleted, this object will be garbage collected. If this object is
        managed by a controller, then an entry in this list will point to this controller,
        with the controller field set to true. There cannot be more than one managing
        controller.
    """

    clusterName: Optional[str] = None
    creationTimestamp: Optional[str] = None
    deletionGracePeriodSeconds: Optional[int] = None
    deletionTimestamp: Optional[str] = None
    generateName: Optional[str] = None
    generation: Optional[int] = None
    name: Optional[str] = None
    namespace: Optional[str] = None
    resourceVersion: Optional[str] = None
    selfLink: Optional[str] = None
    uid: Optional[str] = None
    annotations: Optional[Dict[str, str]] = field(default_factory=dict)
    finalizers: Optional[List[str]] = field(default_factory=list)
    labels: Optional[Dict[str, str]] = field(default_factory=dict)
    managedFields: Optional[List["ManagedFieldsEntry"]] = field(default_factory=list)
    ownerReferences: Optional[List["OwnerReference"]] = field(default_factory=list)


@dataclass
class SelfSubjectRulesReviewSpec(HikaruBase):
    r"""

    Full name: v1.SelfSubjectRulesReviewSpec

    Attributes:
    namespace: Namespace to evaluate rules for. Required.
    """

    namespace: Optional[str] = None


@dataclass
class SubjectRulesReviewStatus(HikaruBase):
    r"""
    SubjectRulesReviewStatus contains the result of a rules check. This check can be
    incomplete depending on the set of authorizers the server is configured with and any
    errors experienced during evaluation. Because authorization rules are additive, if a
    rule appears in a list it's safe to assume the subject has that permission, even if
    that list is incomplete.

    Full name: v1.SubjectRulesReviewStatus

    Attributes:
    incomplete: Incomplete is true when the rules returned by this call are incomplete.
        This is most commonly encountered when an authorizer, such as an external
        authorizer, doesn't support rules evaluation.
    nonResourceRules: NonResourceRules is the list of actions the subject is allowed to
        perform on non-resources. The list ordering isn't significant, may contain
        duplicates, and possibly be incomplete.
    resourceRules: ResourceRules is the list of actions the subject is allowed to perform
        on resources. The list ordering isn't significant, may contain duplicates, and
        possibly be incomplete.
    evaluationError: EvaluationError can appear in combination with Rules. It indicates an
        error occurred during rule evaluation, such as an authorizer that doesn't support
        rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.
    """

    incomplete: bool
    nonResourceRules: List["NonResourceRule"]
    resourceRules: List["ResourceRule"]
    evaluationError: Optional[str] = None


@dataclass
class FlockerVolumeSource(HikaruBase):
    r"""
    Represents a Flocker volume mounted by the Flocker agent. One and only one of
    datasetName and datasetUUID should be set. Flocker volumes do not support ownership
    management or SELinux relabeling.

    Full name: v1.FlockerVolumeSource

    Attributes:
    datasetName: Name of the dataset stored as metadata -> name on the dataset for Flocker
        should be considered as deprecated
    datasetUUID: UUID of the dataset. This is unique identifier of a Flocker dataset
    """

    datasetName: Optional[str] = None
    datasetUUID: Optional[str] = None


@dataclass
class SecretReference(HikaruBase):
    r"""
    SecretReference represents a Secret Reference. It has enough information to retrieve
    secret in any namespace

    Full name: v1.SecretReference

    Attributes:
    name: Name is unique within a namespace to reference a secret resource.
    namespace: Namespace defines the space within which the secret name must be unique.
    """

    name: Optional[str] = None
    namespace: Optional[str] = None


@dataclass
class CinderPersistentVolumeSource(HikaruBase):
    r"""
    Represents a cinder volume resource in Openstack. A Cinder volume must exist before
    mounting to a container. The volume must also be in the same region as the kubelet.
    Cinder volumes support ownership management and SELinux relabeling.

    Full name: v1.CinderPersistentVolumeSource

    Attributes:
    volumeID: volume id used to identify the volume in cinder. More info:
        https://examples.k8s.io/mysql-cinder-pd/README.md
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be
        "ext4" if unspecified. More info:
        https://examples.k8s.io/mysql-cinder-pd/README.md
    readOnly: Optional: Defaults to false (read/write). ReadOnly here will force the
        ReadOnly setting in VolumeMounts. More info:
        https://examples.k8s.io/mysql-cinder-pd/README.md
    secretRef: Optional: points to a secret object containing parameters used to connect
        to OpenStack.
    """

    volumeID: str
    fsType: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["SecretReference"] = None


@dataclass
class StatefulSet(HikaruDocumentBase):
    r"""
    DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet.
    See the release notes for more information. StatefulSet represents a set of pods with
    consistent identities. Identities are defined as: - Network: A single stable DNS and
    hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees
    that a given network identity will always map to the same storage identity.

    Full name: v1beta2.StatefulSet

    Attributes:
    apiVersion: 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: 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:
    spec: Spec defines the desired identities of pods in this set.
    status: Status is the current status of Pods in this StatefulSet. This data may be out
        of date by some window of time.
    """

    _version = "v1beta2"
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "StatefulSet"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["StatefulSetSpec"] = None
    status: Optional["StatefulSetStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def deleteCollectionNamespacedStatefulSet(
        namespace: str,
        continue_: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_selector: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete collection of StatefulSet

        operationID: deleteCollectionNamespacedStatefulSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets

        :param namespace: namespace for the resource
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "delete_collection_namespaced_stateful_set_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_collection_namespaced_stateful_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["_continue"] = continue_
        all_args["dry_run"] = dry_run
        all_args["field_selector"] = field_selector
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def createNamespacedStatefulSet(
        self,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        create a StatefulSet

        operationID: createNamespacedStatefulSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets

        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   StatefulSet    OK
          201   StatefulSet    Created
          202   StatefulSet    Accepted
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "create_namespaced_stateful_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "create_namespaced_stateful_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201, 202)
        return Response(result, codes_returning_objects)

    def create(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
    ) -> "StatefulSet":
        r"""
            create a StatefulSet

            operationID: createNamespacedStatefulSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to create() or in a "
                "StatefulSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.createNamespacedStatefulSet(
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def deleteNamespacedStatefulSet(
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete a StatefulSet

        operationID: deleteNamespacedStatefulSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          202   Status    Accepted
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "delete_namespaced_stateful_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_namespaced_stateful_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 202)
        return Response(result, codes_returning_objects)

    def delete(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        client: ApiClient = None,
    ) -> "StatefulSet":
        r"""
            delete a StatefulSet

            operationID: deleteNamespacedStatefulSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param grace_period_seconds: The duration in seconds before the object should
                be deleted. Value must be non-negative integer. The value zero
                indicates delete immediately. If this value is nil, the default
                grace period for the specified type will be used. Defaults to a per
                object value if not specified. zero means delete immediately.
            :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
                field will be deprecated in 1.7. Should the dependent objects be
                orphaned. If true/false, the "orphan" finalizer will be added
                to/removed from the object's finalizers list. Either this field or
                PropagationPolicy may be set, but not both.
            :param propagation_policy: Whether and how garbage collection will be
                performed. Either this field or OrphanDependents may be set, but not
                both. The default policy is decided by the existing finalizer set in
                the metadata.finalizers and the resource-specific default policy.
                Acceptable values are: 'Orphan' - orphan the dependents;
                'Background' - allow the garbage collector to delete the dependents
                in the background; 'Foreground' - a cascading policy that deletes
                all dependents in the foreground.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to delete() or in a "
                "StatefulSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to delete() or in a "
                "StatefulSet's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.deleteNamespacedStatefulSet(
            name=effective_name,
            namespace=effective_namespace,
            dry_run=dry_run,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def readNamespacedStatefulSet(
        name: str,
        namespace: str,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read the specified StatefulSet

        operationID: readNamespacedStatefulSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param exact: Should the export be exact. Exact export maintains
            cluster-specific fields like 'Namespace'. Deprecated. Planned for
            removal in 1.18.
        :param export: Should this value be exported. Export strips fields that a user
            can not specify. Deprecated. Planned for removal in 1.18.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   StatefulSet    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_stateful_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_stateful_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["exact"] = exact
        all_args["export"] = export
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def read(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
    ) -> "StatefulSet":
        r"""
            read the specified StatefulSet

            operationID: readNamespacedStatefulSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param exact: Should the export be exact. Exact export maintains
                cluster-specific fields like 'Namespace'. Deprecated. Planned for
                removal in 1.18.
            :param export: Should this value be exported. Export strips fields that a user
                can not specify. Deprecated. Planned for removal in 1.18.
            :param pretty: If 'true', then the output is pretty printed.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to read() or in a "
                "StatefulSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to read() or in a "
                "StatefulSet's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.readNamespacedStatefulSet(
            name=effective_name,
            namespace=effective_namespace,
            exact=exact,
            export=export,
            pretty=pretty,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def patchNamespacedStatefulSet(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update the specified StatefulSet

        operationID: patchNamespacedStatefulSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   StatefulSet    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "patch_namespaced_stateful_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_stateful_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def update(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
    ) -> "StatefulSet":
        r"""
            partially update the specified StatefulSet

            operationID: patchNamespacedStatefulSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint. This field is
                required for apply requests (application/apply-patch) but optional
                for non-apply patch types (JsonPatch, MergePatch,
                StrategicMergePatch).
            :param force: Force is going to "force" Apply requests. It means user will
                re-acquire conflicting fields owned by other people. Force flag must
                be unset for non-apply patch requests.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to update() or in a "
                "StatefulSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.patchNamespacedStatefulSet(
            name=self.metadata.name,
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            force=force,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def __enter__(self):
        return self

    def __exit__(self, ex_type, ex_value, ex_traceback):
        passed = ex_type is None and ex_value is None and ex_traceback is None
        has_rollback = hasattr(self, "__rollback")
        if passed:
            try:
                self.update()
            except Exception:
                if has_rollback:
                    self.merge(getattr(self, "__rollback"), overwrite=True)
                    delattr(self, "__rollback")
                raise
        if has_rollback:
            if not passed:
                self.merge(getattr(self, "__rollback"), overwrite=True)
            delattr(self, "__rollback")
        return False

    def replaceNamespacedStatefulSet(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace the specified StatefulSet

        operationID: replaceNamespacedStatefulSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   StatefulSet    OK
          201   StatefulSet    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "replace_namespaced_stateful_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_stateful_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)

    def replaceNamespacedStatefulSetStatus(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace status of the specified StatefulSet

        operationID: replaceNamespacedStatefulSetStatus
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   StatefulSet    OK
          201   StatefulSet    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "replace_namespaced_stateful_set_status_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_stateful_set_status_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)


@dataclass
class StatefulSetSpec(HikaruBase):
    r"""
    A StatefulSetSpec is the specification of a StatefulSet.

    Full name: v1beta2.StatefulSetSpec

    Attributes:
    selector: selector is a label query over pods that should match the replica count. It
        must match the pod template's labels. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
    serviceName: serviceName is the name of the service that governs this StatefulSet.
        This service must exist before the StatefulSet, and is responsible for the network
        identity of the set. Pods get DNS/hostnames that follow the pattern:
        pod-specific-string.serviceName.default.svc.cluster.local where
        "pod-specific-string" is managed by the StatefulSet controller.
    template: template is the object that describes the pod that will be created if
        insufficient replicas are detected. Each pod stamped out by the StatefulSet will
        fulfill this Template, but have a unique identity from the rest of the
        StatefulSet.
    podManagementPolicy: podManagementPolicy controls how pods are created during initial
        scale up, when replacing pods on nodes, or when scaling down. The default policy
        is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1,
        etc) and the controller will wait until each pod is ready before continuing. When
        scaling down, the pods are removed in the opposite order. The alternative policy
        is `Parallel` which will create pods in parallel to match the desired scale
        without waiting, and on scale down will delete all pods at once.
    replicas: replicas is the desired number of replicas of the given Template. These are
        replicas in the sense that they are instantiations of the same Template, but
        individual replicas also have a consistent identity. If unspecified, defaults to
        1.
    revisionHistoryLimit: revisionHistoryLimit is the maximum number of revisions that
        will be maintained in the StatefulSet's revision history. The revision history
        consists of all revisions not represented by a currently applied StatefulSetSpec
        version. The default value is 10.
    updateStrategy: updateStrategy indicates the StatefulSetUpdateStrategy that will be
        employed to update Pods in the StatefulSet when a revision is made to Template.
    volumeClaimTemplates: volumeClaimTemplates is a list of claims that pods are allowed
        to reference. The StatefulSet controller is responsible for mapping network
        identities to claims in a way that maintains the identity of a pod. Every claim in
        this list must have at least one matching (by name) volumeMount in one container
        in the template. A claim in this list takes precedence over any volumes in the
        template, with the same name.
    """

    selector: "LabelSelector"
    serviceName: str
    template: "PodTemplateSpec"
    podManagementPolicy: Optional[str] = None
    replicas: Optional[int] = None
    revisionHistoryLimit: Optional[int] = None
    updateStrategy: Optional["StatefulSetUpdateStrategy"] = None
    volumeClaimTemplates: Optional[List["PersistentVolumeClaim"]] = field(
        default_factory=list
    )


@dataclass
class StatefulSetStatus(HikaruBase):
    r"""
    StatefulSetStatus represents the current state of a StatefulSet.

    Full name: v1beta2.StatefulSetStatus

    Attributes:
    replicas: replicas is the number of Pods created by the StatefulSet controller.
    collisionCount: collisionCount is the count of hash collisions for the StatefulSet.
        The StatefulSet controller uses this field as a collision avoidance mechanism when
        it needs to create the name for the newest ControllerRevision.
    currentReplicas: currentReplicas is the number of Pods created by the StatefulSet
        controller from the StatefulSet version indicated by currentRevision.
    currentRevision: currentRevision, if not empty, indicates the version of the
        StatefulSet used to generate Pods in the sequence [0,currentReplicas).
    observedGeneration: observedGeneration is the most recent generation observed for this
        StatefulSet. It corresponds to the StatefulSet's generation, which is updated on
        mutation by the API Server.
    readyReplicas: readyReplicas is the number of Pods created by the StatefulSet
        controller that have a Ready Condition.
    updateRevision: updateRevision, if not empty, indicates the version of the StatefulSet
        used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
    updatedReplicas: updatedReplicas is the number of Pods created by the StatefulSet
        controller from the StatefulSet version indicated by updateRevision.
    conditions: Represents the latest available observations of a statefulset's current
        state.
    """

    replicas: int
    collisionCount: Optional[int] = None
    currentReplicas: Optional[int] = None
    currentRevision: Optional[str] = None
    observedGeneration: Optional[int] = None
    readyReplicas: Optional[int] = None
    updateRevision: Optional[str] = None
    updatedReplicas: Optional[int] = None
    conditions: Optional[List["StatefulSetCondition"]] = field(default_factory=list)


@dataclass
class NodeStatus(HikaruBase):
    r"""
    NodeStatus is information about the current status of a node.

    Full name: v1.NodeStatus

    Attributes:
    config: Status of the config assigned to the node via the dynamic Kubelet config
        feature.
    daemonEndpoints: Endpoints of daemons running on the Node.
    nodeInfo: Set of ids/uuids to uniquely identify the node. More info:
        https://kubernetes.io/docs/concepts/nodes/node/#info
    phase: NodePhase is the recently observed lifecycle phase of the node. More info:
        https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never
        populated, and now is deprecated.
    addresses: List of addresses reachable to the node. Queried from cloud provider, if
        available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
        Note: This field is declared as mergeable, but the merge key is not sufficiently
        unique, which can cause data corruption when it is merged. Callers should instead
        use a full-replacement patch. See http://pr.k8s.io/79391 for an example.
    allocatable: Allocatable represents the resources of a node that are available for
        scheduling. Defaults to Capacity.
    capacity: Capacity represents the total resources of a node. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
    conditions: Conditions is an array of current observed node conditions. More info:
        https://kubernetes.io/docs/concepts/nodes/node/#condition
    images: List of container images on this node
    volumesAttached: List of volumes that are attached to the node.
    volumesInUse: List of attachable volumes in use (mounted) by the node.
    """

    config: Optional["NodeConfigStatus"] = None
    daemonEndpoints: Optional["NodeDaemonEndpoints"] = None
    nodeInfo: Optional["NodeSystemInfo"] = None
    phase: Optional[str] = None
    addresses: Optional[List["NodeAddress"]] = field(default_factory=list)
    allocatable: Optional[Dict[str, str]] = field(default_factory=dict)
    capacity: Optional[Dict[str, str]] = field(default_factory=dict)
    conditions: Optional[List["NodeCondition"]] = field(default_factory=list)
    images: Optional[List["ContainerImage"]] = field(default_factory=list)
    volumesAttached: Optional[List["AttachedVolume"]] = field(default_factory=list)
    volumesInUse: Optional[List[str]] = field(default_factory=list)


@dataclass
class NodeAddress(HikaruBase):
    r"""
    NodeAddress contains information for the node's address.

    Full name: v1.NodeAddress

    Attributes:
    address: The node address.
    type: Node address type, one of Hostname, ExternalIP or InternalIP.
    """

    address: str
    type: str


@dataclass
class NodeCondition(HikaruBase):
    r"""
    NodeCondition contains condition information for a node.

    Full name: v1.NodeCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of node condition.
    lastHeartbeatTime: Last time we got an update on a given condition.
    lastTransitionTime: Last time the condition transit from one status to another.
    message: Human readable message indicating details about last transition.
    reason: (brief) reason for the condition's last transition.
    """

    status: str
    type: str
    lastHeartbeatTime: Optional[str] = None
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class NodeConfigStatus(HikaruBase):
    r"""
    NodeConfigStatus describes the status of the config assigned by
    Node.Spec.ConfigSource.

    Full name: v1.NodeConfigStatus

    Attributes:
    active: Active reports the checkpointed config the node is actively using. Active will
        represent either the current version of the Assigned config, or the current
        LastKnownGood config, depending on whether attempting to use the Assigned config
        results in an error.
    assigned: Assigned reports the checkpointed config the node will try to use. When
        Node.Spec.ConfigSource is updated, the node checkpoints the associated config
        payload to local disk, along with a record indicating intended config. The node
        refers to this record to choose its config checkpoint, and reports this record in
        Assigned. Assigned only updates in the status after the record has been
        checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned
        config the Active config by loading and validating the checkpointed payload
        identified by Assigned.
    error: Error describes any problems reconciling the Spec.ConfigSource to the Active
        config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource
        to the local Assigned record, attempting to checkpoint the payload associated with
        Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors
        may occur at different points while syncing config. Earlier errors (e.g. download
        or checkpointing errors) will not result in a rollback to LastKnownGood, and may
        resolve across Kubelet retries. Later errors (e.g. loading or validating a
        checkpointed config) will result in a rollback to LastKnownGood. In the latter
        case, it is usually possible to resolve the error by fixing the config assigned in
        Spec.ConfigSource. You can find additional information for debugging by searching
        the error message in the Kubelet log. Error is a human-readable description of the
        error state; machines can check whether or not Error is empty, but should not rely
        on the stability of the Error text across Kubelet versions.
    lastKnownGood: LastKnownGood reports the checkpointed config the node will fall back
        to when it encounters an error attempting to use the Assigned config. The Assigned
        config becomes the LastKnownGood config when the node determines that the Assigned
        config is stable and correct. This is currently implemented as a 10-minute soak
        period starting when the local record of Assigned config is updated. If the
        Assigned config is Active at the end of this period, it becomes the LastKnownGood.
        Note that if Spec.ConfigSource is reset to nil (use local defaults), the
        LastKnownGood is also immediately reset to nil, because the local default config
        is always assumed good. You should not make assumptions about the node's method of
        determining config stability and correctness, as this may change or become
        configurable in the future.
    """

    active: Optional["NodeConfigSource"] = None
    assigned: Optional["NodeConfigSource"] = None
    error: Optional[str] = None
    lastKnownGood: Optional["NodeConfigSource"] = None


@dataclass
class NodeDaemonEndpoints(HikaruBase):
    r"""
    NodeDaemonEndpoints lists ports opened by daemons running on the Node.

    Full name: v1.NodeDaemonEndpoints

    Attributes:
    kubeletEndpoint: Endpoint on which Kubelet is listening.
    """

    kubeletEndpoint: Optional["DaemonEndpoint"] = None


@dataclass
class ContainerImage(HikaruBase):
    r"""
    Describe a container image

    Full name: v1.ContainerImage

    Attributes:
    names: Names by which this image is known. e.g. ["k8s.gcr.io/hyperkube:v1.0.7",
        "dockerhub.io/google_containers/hyperkube:v1.0.7"]
    sizeBytes: The size of the image in bytes.
    """

    names: List[str]
    sizeBytes: Optional[int] = None


@dataclass
class NodeSystemInfo(HikaruBase):
    r"""
    NodeSystemInfo is a set of ids/uuids to uniquely identify the node.

    Full name: v1.NodeSystemInfo

    Attributes:
    architecture: The Architecture reported by the node
    bootID: Boot ID reported by the node.
    containerRuntimeVersion: ContainerRuntime Version reported by the node through runtime
        remote API (e.g. docker://1.5.0).
    kernelVersion: Kernel Version reported by the node from 'uname -r' (e.g.
        3.16.0-0.bpo.4-amd64).
    kubeProxyVersion: KubeProxy Version reported by the node.
    kubeletVersion: Kubelet Version reported by the node.
    machineID: MachineID reported by the node. For unique machine identification in the
        cluster this field is preferred. Learn more from man(5) machine-id:
        http://man7.org/linux/man-pages/man5/machine-id.5.html
    operatingSystem: The Operating System reported by the node
    osImage: OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7
        (wheezy)).
    systemUUID: SystemUUID reported by the node. For unique machine identification
        MachineID is preferred. This field is specific to Red Hat hosts
        https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
    """

    architecture: str
    bootID: str
    containerRuntimeVersion: str
    kernelVersion: str
    kubeProxyVersion: str
    kubeletVersion: str
    machineID: str
    operatingSystem: str
    osImage: str
    systemUUID: str


@dataclass
class AttachedVolume(HikaruBase):
    r"""
    AttachedVolume describes a volume attached to a node

    Full name: v1.AttachedVolume

    Attributes:
    devicePath: DevicePath represents the device path where the volume should be available
    name: Name of the attached volume
    """

    devicePath: str
    name: str


@dataclass
class ScopedResourceSelectorRequirement(HikaruBase):
    r"""
    A scoped-resource selector requirement is a selector that contains values, a scope
    name, and an operator that relates the scope name and values.

    Full name: v1.ScopedResourceSelectorRequirement

    Attributes:
    operator: Represents a scope's relationship to a set of values. Valid operators are
        In, NotIn, Exists, DoesNotExist.
    scopeName: The name of the scope that the selector applies to.
    values: An array of string values. If the operator is In or NotIn, the values array
        must be non-empty. If the operator is Exists or DoesNotExist, the values array
        must be empty. This array is replaced during a strategic merge patch.
    """

    operator: str
    scopeName: str
    values: Optional[List[str]] = field(default_factory=list)


@dataclass
class AggregationRule(HikaruBase):
    r"""
    AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole

    Full name: v1.AggregationRule

    Attributes:
    clusterRoleSelectors: ClusterRoleSelectors holds a list of selectors which will be
        used to find ClusterRoles and create the rules. If any of the selectors match,
        then the ClusterRole's permissions will be added
    """

    clusterRoleSelectors: Optional[List["LabelSelector"]] = field(default_factory=list)


@dataclass
class LabelSelector(HikaruBase):
    r"""
    A label selector is a label query over a set of resources. The result of matchLabels
    and matchExpressions are ANDed. An empty label selector matches all objects. A null
    label selector matches no objects.

    Full name: v1.LabelSelector

    Attributes:
    matchExpressions: matchExpressions is a list of label selector requirements. The
        requirements are ANDed.
    matchLabels: matchLabels is a map of {key,value} pairs. A single {key,value} in the
        matchLabels map is equivalent to an element of matchExpressions, whose key field
        is "key", the operator is "In", and the values array contains only "value". The
        requirements are ANDed.
    """

    matchExpressions: Optional[List["LabelSelectorRequirement"]] = field(
        default_factory=list
    )
    matchLabels: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class VolumeAttachmentStatus(HikaruBase):
    r"""
    VolumeAttachmentStatus is the status of a VolumeAttachment request.

    Full name: v1.VolumeAttachmentStatus

    Attributes:
    attached: Indicates the volume is successfully attached. This field must only be set
        by the entity completing the attach operation, i.e. the external-attacher.
    attachError: The last error encountered during attach operation, if any. This field
        must only be set by the entity completing the attach operation, i.e. the
        external-attacher.
    detachError: The last error encountered during detach operation, if any. This field
        must only be set by the entity completing the detach operation, i.e. the
        external-attacher.
    attachmentMetadata: Upon successful attach, this field is populated with any
        information returned by the attach operation that must be passed into subsequent
        WaitForAttach or Mount calls. This field must only be set by the entity completing
        the attach operation, i.e. the external-attacher.
    """

    attached: bool
    attachError: Optional["VolumeError"] = None
    detachError: Optional["VolumeError"] = None
    attachmentMetadata: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class VolumeError(HikaruBase):
    r"""
    VolumeError captures an error encountered during a volume operation.

    Full name: v1.VolumeError

    Attributes:
    message: String detailing the error encountered during Attach or Detach operation.
        This string may be logged, so it should not contain sensitive information.
    time: Time the error was encountered.
    """

    message: Optional[str] = None
    time: Optional[str] = None


@dataclass
class ProjectedVolumeSource(HikaruBase):
    r"""
    Represents a projected volume source

    Full name: v1.ProjectedVolumeSource

    Attributes:
    sources: list of volume projections
    defaultMode: Mode bits to use on created files by default. Must be a value between 0
        and 0777. Directories within the path are not affected by this setting. This might
        be in conflict with other options that affect the file mode, like fsGroup, and the
        result can be other mode bits set.
    """

    sources: List["VolumeProjection"]
    defaultMode: Optional[int] = None


@dataclass
class VolumeProjection(HikaruBase):
    r"""
    Projection that may be projected along with other supported volume types

    Full name: v1.VolumeProjection

    Attributes:
    configMap: information about the configMap data to project
    downwardAPI: information about the downwardAPI data to project
    secret: information about the secret data to project
    serviceAccountToken: information about the serviceAccountToken data to project
    """

    configMap: Optional["ConfigMapProjection"] = None
    downwardAPI: Optional["DownwardAPIProjection"] = None
    secret: Optional["SecretProjection"] = None
    serviceAccountToken: Optional["ServiceAccountTokenProjection"] = None


@dataclass
class Pod(HikaruDocumentBase):
    r"""
    Pod is a collection of containers that can run on a host. This resource is created by
    clients and scheduled onto hosts.

    Full name: Pod

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Specification of the desired behavior of the pod. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Most recently observed status of the pod. This data may not be up to date.
        Populated by the system. Read-only. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "Pod"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["PodSpec"] = None
    status: Optional["PodStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PodList(HikaruDocumentBase):
    r"""
    PodList is a list of Pods.

    Full name: v1.PodList

    Attributes:
    items: List of pods. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["Pod"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "PodList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ListMeta(HikaruBase):
    r"""
    ListMeta describes metadata that synthetic resources must have, including lists and
    various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

    Full name: v1.ListMeta

    Attributes:
    continue_: continue may be set if the user set a limit on the number of items
        returned, and indicates that the server has more data available. The value is
        opaque and may be used to issue another request to the endpoint that served this
        list to retrieve the next set of available objects. Continuing a consistent list
        may not be possible if the server configuration has changed or more than a few
        minutes have passed. The resourceVersion field returned when using this continue
        value will be identical to the value in the first response, unless you have
        received this token from an error message.
    remainingItemCount: remainingItemCount is the number of subsequent items in the list
        which are not included in this list response. If the list request contained label
        or field selectors, then the number of remaining items is unknown and the field
        will be left unset and omitted during serialization. If the list is complete
        (either because it is not chunking or because this is the last chunk), then there
        are no more remaining items and this field will be left unset and omitted during
        serialization. Servers older than v1.15 do not set this field. The intended use of
        the remainingItemCount is *estimating* the size of a collection. Clients should
        not rely on the remainingItemCount to be set or to be exact.
    resourceVersion: String that identifies the server's internal version of this object
        that can be used by clients to determine when objects have changed. Value must be
        treated as opaque by clients and passed unmodified back to the server. Populated
        by the system. Read-only. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
    selfLink: selfLink is a URL representing this object. Populated by the system.
        Read-only. DEPRECATED Kubernetes will stop propagating this field in 1.20 release
        and the field is planned to be removed in 1.21 release.
    """

    continue_: Optional[str] = None
    remainingItemCount: Optional[int] = None
    resourceVersion: Optional[str] = None
    selfLink: Optional[str] = None


@dataclass
class CustomResourceDefinitionNames(HikaruBase):
    r"""
    CustomResourceDefinitionNames indicates the names to serve this
    CustomResourceDefinition

    Full name: v1.CustomResourceDefinitionNames

    Attributes:
    kind: kind is the serialized kind of the resource. It is normally CamelCase and
        singular. Custom resource instances will use this value as the `kind` attribute in
        API calls.
    plural: plural is the plural name of the resource to serve. The custom resources are
        served under `/apis/<group>/<version>/.../<plural>`. Must match the name of the
        CustomResourceDefinition (in the form `<names.plural>.<group>`). Must be all
        lowercase.
    listKind: listKind is the serialized kind of the list for this resource. Defaults to
        "`kind`List".
    singular: singular is the singular name of the resource. It must be all lowercase.
        Defaults to lowercased `kind`.
    categories: categories is a list of grouped resources this custom resource belongs to
        (e.g. 'all'). This is published in API discovery documents, and used by clients to
        support invocations like `kubectl get all`.
    shortNames: shortNames are short names for the resource, exposed in API discovery
        documents, and used by clients to support invocations like `kubectl get
        <shortname>`. It must be all lowercase.
    """

    kind: str
    plural: str
    listKind: Optional[str] = None
    singular: Optional[str] = None
    categories: Optional[List[str]] = field(default_factory=list)
    shortNames: Optional[List[str]] = field(default_factory=list)


@dataclass
class PodTemplateSpec(HikaruBase):
    r"""
    PodTemplateSpec describes the data a pod should have when created from a template

    Full name: v1.PodTemplateSpec

    Attributes:
    metadata: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Specification of the desired behavior of the pod. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    metadata: Optional["ObjectMeta"] = None
    spec: Optional["PodSpec"] = None


@dataclass
class ValidatingWebhookConfiguration(HikaruDocumentBase):
    r"""
    ValidatingWebhookConfiguration describes the configuration of and admission webhook
    that accept or reject and object without changing it.

    Full name: v1.ValidatingWebhookConfiguration

    Attributes:
    apiVersion: 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: 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: Standard object metadata; More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
    webhooks: Webhooks is a list of webhooks and the affected resources and operations.
    """

    _version = "v1"
    apiVersion: Optional[str] = "admissionregistration.k8s.io/v1"
    kind: Optional[str] = "ValidatingWebhookConfiguration"
    metadata: Optional["ObjectMeta"] = None
    webhooks: Optional[List["ValidatingWebhook"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ValidatingWebhook(HikaruBase):
    r"""
    ValidatingWebhook describes an admission webhook and the resources and operations it
    applies to.

    Full name: v1.ValidatingWebhook

    Attributes:
    admissionReviewVersions: AdmissionReviewVersions is an ordered list of preferred
        `AdmissionReview` versions the Webhook expects. API server will try to use first
        version in the list which it supports. If none of the versions specified in this
        list supported by API server, validation will fail for this object. If a persisted
        webhook configuration specifies allowed versions and does not include any versions
        known to the API Server, calls to the webhook will fail and be subject to the
        failure policy.
    clientConfig: ClientConfig defines how to communicate with the hook. Required
    name: The name of the admission webhook. Name should be fully qualified, e.g.,
        imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and
        kubernetes.io is the name of the organization. Required.
    sideEffects: SideEffects states whether this webhook has side effects. Acceptable
        values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some
        or Unknown). Webhooks with side effects MUST implement a reconciliation system,
        since a request may be rejected by a future step in the admission change and the
        side effects therefore need to be undone. Requests with the dryRun attribute will
        be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
    failurePolicy: FailurePolicy defines how unrecognized errors from the admission
        endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
    matchPolicy: matchPolicy defines how the "rules" list is used to match incoming
        requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request
        only if it exactly matches a specified rule. For example, if deployments can be
        modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only
        included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a
        request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. -
        Equivalent: match a request if modifies a resource listed in rules, even via
        another API group or version. For example, if deployments can be modified via
        apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included
        `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to
        apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the
        webhook. Defaults to "Equivalent"
    namespaceSelector: NamespaceSelector decides whether to run the webhook on an object
        based on whether the namespace for that object matches the selector. If the object
        itself is a namespace, the matching is performed on object.metadata.labels. If the
        object is another cluster scoped resource, it never skips the webhook. For
        example, to run the webhook on any objects whose namespace is not associated with
        "runlevel" of "0" or "1"; you will set the selector as follows:
        "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator":
        "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook
        on any objects whose namespace is associated with the "environment" of "prod" or
        "staging"; you will set the selector as follows: "namespaceSelector": {
        "matchExpressions": [ { "key": "environment", "operator": "In", "values": [
        "prod", "staging" ] } ] } See
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more
        examples of label selectors. Default to the empty LabelSelector, which matches
        everything.
    objectSelector: ObjectSelector decides whether to run the webhook based on if the
        object has matching labels. objectSelector is evaluated against both the oldObject
        and newObject that would be sent to the webhook, and is considered to match if
        either object matches the selector. A null object (oldObject in the case of
        create, or newObject in the case of delete) or an object that cannot have labels
        (like a DeploymentRollback or a PodProxyOptions object) is not considered to
        match. Use the object selector only if the webhook is opt-in, because end users
        may skip the admission webhook by setting the labels. Default to the empty
        LabelSelector, which matches everything.
    timeoutSeconds: TimeoutSeconds specifies the timeout for this webhook. After the
        timeout passes, the webhook call will be ignored or the API call will fail based
        on the failure policy. The timeout value must be between 1 and 30 seconds. Default
        to 10 seconds.
    rules: Rules describes what operations on what resources/subresources the webhook
        cares about. The webhook cares about an operation if it matches _any_ Rule.
        However, in order to prevent ValidatingAdmissionWebhooks and
        MutatingAdmissionWebhooks from putting the cluster in a state which cannot be
        recovered from without completely disabling the plugin,
        ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on
        admission requests for ValidatingWebhookConfiguration and
        MutatingWebhookConfiguration objects.
    """

    admissionReviewVersions: List[str]
    clientConfig: "WebhookClientConfig"
    name: str
    sideEffects: str
    failurePolicy: Optional[str] = None
    matchPolicy: Optional[str] = None
    namespaceSelector: Optional["LabelSelector"] = None
    objectSelector: Optional["LabelSelector"] = None
    timeoutSeconds: Optional[int] = None
    rules: Optional[List["RuleWithOperations"]] = field(default_factory=list)


@dataclass
class Capabilities(HikaruBase):
    r"""
    Adds and removes POSIX capabilities from running containers.

    Full name: v1.Capabilities

    Attributes:
    add: Added capabilities
    drop: Removed capabilities
    """

    add: Optional[List[str]] = field(default_factory=list)
    drop: Optional[List[str]] = field(default_factory=list)


@dataclass
class DeploymentCondition(HikaruBase):
    r"""
    DeploymentCondition describes the state of a deployment at a certain point.

    Full name: v1beta2.DeploymentCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of deployment condition.
    lastTransitionTime: Last time the condition transitioned from one status to another.
    lastUpdateTime: The last time this condition was updated.
    message: A human readable message indicating details about the transition.
    reason: The reason for the condition's last transition.
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    lastUpdateTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class StorageClass(HikaruDocumentBase):
    r"""
    StorageClass describes the parameters for a class of storage for which
    PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced;
    the name of the storage class according to etcd is in ObjectMeta.Name.

    Full name: v1.StorageClass

    Attributes:
    provisioner: Provisioner indicates the type of the provisioner.
    allowVolumeExpansion: AllowVolumeExpansion shows whether the storage class allow
        volume expand
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    reclaimPolicy: Dynamically provisioned PersistentVolumes of this storage class are
        created with this reclaimPolicy. Defaults to Delete.
    volumeBindingMode: VolumeBindingMode indicates how PersistentVolumeClaims should be
        provisioned and bound. When unset, VolumeBindingImmediate is used. This field is
        only honored by servers that enable the VolumeScheduling feature.
    allowedTopologies: Restrict the node topologies where volumes can be dynamically
        provisioned. Each volume plugin defines its own supported topology specifications.
        An empty TopologySelectorTerm list means there is no topology restriction. This
        field is only honored by servers that enable the VolumeScheduling feature.
    mountOptions: Dynamically provisioned PersistentVolumes of this storage class are
        created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the
        PVs will simply fail if one is invalid.
    parameters: Parameters holds the parameters for the provisioner that should create
        volumes of this storage class.
    """

    _version = "v1"
    provisioner: str
    allowVolumeExpansion: Optional[bool] = None
    apiVersion: Optional[str] = "storage.k8s.io/v1"
    kind: Optional[str] = "StorageClass"
    metadata: Optional["ObjectMeta"] = None
    reclaimPolicy: Optional[str] = None
    volumeBindingMode: Optional[str] = None
    allowedTopologies: Optional[List["TopologySelectorTerm"]] = field(
        default_factory=list
    )
    mountOptions: Optional[List[str]] = field(default_factory=list)
    parameters: Optional[Dict[str, str]] = field(default_factory=dict)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class TopologySelectorTerm(HikaruBase):
    r"""
    A topology selector term represents the result of label queries. A null or empty
    topology selector term matches no objects. The requirements of them are ANDed. It
    provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and
    may change in the future.

    Full name: v1.TopologySelectorTerm

    Attributes:
    matchLabelExpressions: A list of topology selector requirements by labels.
    """

    matchLabelExpressions: Optional[List["TopologySelectorLabelRequirement"]] = field(
        default_factory=list
    )


@dataclass
class LoadBalancerIngress(HikaruBase):
    r"""
    LoadBalancerIngress represents the status of a load-balancer ingress point: traffic
    intended for the service should be sent to an ingress point.

    Full name: v1.LoadBalancerIngress

    Attributes:
    hostname: Hostname is set for load-balancer ingress points that are DNS based
        (typically AWS load-balancers)
    ip: IP is set for load-balancer ingress points that are IP based (typically GCE or
        OpenStack load-balancers)
    """

    hostname: Optional[str] = None
    ip: Optional[str] = None


@dataclass
class Secret(HikaruDocumentBase):
    r"""
    Secret holds secret data of a certain type. The total bytes of the values in the Data
    field must be less than MaxSecretSize bytes.

    Full name: Secret

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    type: Used to facilitate programmatic handling of secret data.
    data: Data contains the secret data. Each key must consist of alphanumeric characters,
        '-', '_' or '.'. The serialized form of the secret data is a base64 encoded
        string, representing the arbitrary (possibly non-string) data value here.
        Described in https://tools.ietf.org/html/rfc4648#section-4
    stringData: stringData allows specifying non-binary secret data in string form. It is
        provided as a write-only convenience method. All keys and values are merged into
        the data field on write, overwriting any existing values. It is never output when
        reading from the API.
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "Secret"
    metadata: Optional["ObjectMeta"] = None
    type: Optional[str] = None
    data: Optional[Dict[str, str]] = field(default_factory=dict)
    stringData: Optional[Dict[str, str]] = field(default_factory=dict)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class SecretList(HikaruDocumentBase):
    r"""
    SecretList is a list of Secret.

    Full name: v1.SecretList

    Attributes:
    items: Items is a list of secret objects. More info:
        https://kubernetes.io/docs/concepts/configuration/secret
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["Secret"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "SecretList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class HorizontalPodAutoscalerSpec(HikaruBase):
    r"""
    specification of a horizontal pod autoscaler.

    Full name: v1.HorizontalPodAutoscalerSpec

    Attributes:
    maxReplicas: upper limit for the number of pods that can be set by the autoscaler;
        cannot be smaller than MinReplicas.
    scaleTargetRef: reference to scaled resource; horizontal pod autoscaler will learn the
        current resource consumption and will set the desired number of pods by using its
        Scale subresource.
    minReplicas: minReplicas is the lower limit for the number of replicas to which the
        autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if
        the alpha feature gate HPAScaleToZero is enabled and at least one Object or
        External metric is configured. Scaling is active as long as at least one metric
        value is available.
    targetCPUUtilizationPercentage: target average CPU utilization (represented as a
        percentage of requested CPU) over all the pods; if not specified the default
        autoscaling policy will be used.
    """

    maxReplicas: int
    scaleTargetRef: "CrossVersionObjectReference"
    minReplicas: Optional[int] = None
    targetCPUUtilizationPercentage: Optional[int] = None


@dataclass
class CrossVersionObjectReference(HikaruBase):
    r"""
    CrossVersionObjectReference contains enough information to let you identify the
    referred resource.

    Full name: v1.CrossVersionObjectReference

    Attributes:
    kind: Kind of the referent; More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
    name: Name of the referent; More info:
        http://kubernetes.io/docs/user-guide/identifiers#names
    apiVersion: API version of the referent
    """

    kind: str
    name: str
    apiVersion: Optional[str] = "v1"


@dataclass
class ResourceAttributes(HikaruBase):
    r"""
    ResourceAttributes includes the authorization attributes available for resource
    requests to the Authorizer interface

    Full name: v1.ResourceAttributes

    Attributes:
    group: Group is the API Group of the Resource. "*" means all.
    name: Name is the name of the resource being requested for a "get" or deleted for a
        "delete". "" (empty) means all.
    namespace: Namespace is the namespace of the action being requested. Currently, there
        is no distinction between no namespace and all namespaces "" (empty) is defaulted
        for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources ""
        (empty) means "all" for namespace scoped resources from a SubjectAccessReview or
        SelfSubjectAccessReview
    resource: Resource is one of the existing resource types. "*" means all.
    subresource: Subresource is one of the existing resource types. "" means none.
    verb: Verb is a kubernetes resource API verb, like: get, list, watch, create, update,
        delete, proxy. "*" means all.
    version: Version is the API Version of the Resource. "*" means all.
    """

    group: Optional[str] = None
    name: Optional[str] = None
    namespace: Optional[str] = None
    resource: Optional[str] = None
    subresource: Optional[str] = None
    verb: Optional[str] = None
    version: Optional[str] = None


@dataclass
class ServicePort(HikaruBase):
    r"""
    ServicePort contains information on service's port.

    Full name: v1.ServicePort

    Attributes:
    port: The port that will be exposed by this service.
    name: The name of this port within the service. This must be a DNS_LABEL. All ports
        within a ServiceSpec must have unique names. When considering the endpoints for a
        Service, this must match the 'name' field in the EndpointPort. Optional if only
        one ServicePort is defined on this service.
    nodePort: The port on each node on which this service is exposed when type=NodePort or
        LoadBalancer. Usually assigned by the system. If specified, it will be allocated
        to the service if unused or else creation of the service will fail. Default is to
        auto-allocate a port if the ServiceType of this Service requires one. More info:
        https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
    protocol: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is
        TCP.
    targetPort: Number or name of the port to access on the pods targeted by the service.
        Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is
        a string, it will be looked up as a named port in the target Pod's container
        ports. If this is not specified, the value of the 'port' field is used (an
        identity map). This field is ignored for services with clusterIP=None, and should
        be omitted or set equal to the 'port' field. More info:
        https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
    """

    port: int
    name: Optional[str] = None
    nodePort: Optional[int] = None
    protocol: Optional[str] = None
    targetPort: Optional[object] = field(default_factory=dict)


@dataclass
class ReplicationController(HikaruDocumentBase):
    r"""
    ReplicationController represents the configuration of a replication controller.

    Full name: ReplicationController

    Attributes:
    apiVersion: 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: 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: If the Labels of a ReplicationController are empty, they are defaulted to be
        the same as the Pod(s) that the replication controller manages. Standard object's
        metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the specification of the desired behavior of the replication
        controller. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Status is the most recently observed status of the replication controller.
        This data may be out of date by some window of time. Populated by the system.
        Read-only. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ReplicationController"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["ReplicationControllerSpec"] = None
    status: Optional["ReplicationControllerStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ReplicationControllerList(HikaruDocumentBase):
    r"""
    ReplicationControllerList is a collection of replication controllers.

    Full name: v1.ReplicationControllerList

    Attributes:
    items: List of replication controllers. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["ReplicationController"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ReplicationControllerList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class CustomResourceDefinitionSpec(HikaruBase):
    r"""
    CustomResourceDefinitionSpec describes how a user wants their resource to appear

    Full name: v1.CustomResourceDefinitionSpec

    Attributes:
    group: group is the API group of the defined custom resource. The custom resources are
        served under `/apis/<group>/...`. Must match the name of the
        CustomResourceDefinition (in the form `<names.plural>.<group>`).
    names: names specify the resource and kind names for the custom resource.
    scope: scope indicates whether the defined custom resource is cluster- or
        namespace-scoped. Allowed values are `Cluster` and `Namespaced`.
    versions: versions is the list of all API versions of the defined custom resource.
        Version names are used to compute the order in which served versions are listed in
        API discovery. If the version string is "kube-like", it will sort above non
        "kube-like" version strings, which are ordered lexicographically. "Kube-like"
        versions start with a "v", then are followed by a number (the major version), then
        optionally the string "alpha" or "beta" and another number (the minor version).
        These are sorted first by GA > beta > alpha (where GA is a version with no suffix
        such as beta or alpha), and then by comparing major version, then minor version.
        An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1,
        v12alpha1, v11alpha2, foo1, foo10.
    conversion: conversion defines conversion settings for the CRD.
    preserveUnknownFields: preserveUnknownFields indicates that object fields which are
        not specified in the OpenAPI schema should be preserved when persisting to
        storage. apiVersion, kind, metadata and known fields inside metadata are always
        preserved. This field is deprecated in favor of setting
        `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`.
        See
        https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields
        for details.
    """

    group: str
    names: "CustomResourceDefinitionNames"
    scope: str
    versions: List["CustomResourceDefinitionVersion"]
    conversion: Optional["CustomResourceConversion"] = None
    preserveUnknownFields: Optional[bool] = None


@dataclass
class CustomResourceConversion(HikaruBase):
    r"""
    CustomResourceConversion describes how to convert different versions of a CR.

    Full name: v1.CustomResourceConversion

    Attributes:
    strategy: strategy specifies how custom resources are converted between versions.
        Allowed values are: - `None`: The converter only change the apiVersion and would
        not touch any other field in the custom resource. - `Webhook`: API Server will
        call to an external webhook to do the conversion. Additional information is needed
        for this option. This requires spec.preserveUnknownFields to be false, and
        spec.conversion.webhook to be set.
    webhook: webhook describes how to call the conversion webhook. Required when
        `strategy` is set to `Webhook`.
    """

    strategy: str
    webhook: Optional["WebhookConversion"] = None


@dataclass
class CustomResourceDefinitionVersion(HikaruBase):
    r"""
    CustomResourceDefinitionVersion describes a version for CRD.

    Full name: v1.CustomResourceDefinitionVersion

    Attributes:
    name: name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are
        served under this version at `/apis/<group>/<version>/...` if `served` is true.
    served: served is a flag enabling/disabling this version from being served via REST
        APIs
    storage: storage indicates this version should be used when persisting custom
        resources to storage. There must be exactly one version with storage=true.
    schema: schema describes the schema used for validation, pruning, and defaulting of
        this version of the custom resource.
    subresources: subresources specify what subresources this version of the defined
        custom resource have.
    additionalPrinterColumns: additionalPrinterColumns specifies additional columns
        returned in Table output. See
        https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables
        for details. If no columns are specified, a single column displaying the age of
        the custom resource is used.
    """

    name: str
    served: bool
    storage: bool
    schema: Optional["CustomResourceValidation"] = None
    subresources: Optional["CustomResourceSubresources"] = None
    additionalPrinterColumns: Optional[List["CustomResourceColumnDefinition"]] = field(
        default_factory=list
    )


@dataclass
class SelfSubjectAccessReviewSpec(HikaruBase):
    r"""
    SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of
    ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set

    Full name: v1.SelfSubjectAccessReviewSpec

    Attributes:
    nonResourceAttributes: NonResourceAttributes describes information for a non-resource
        access request
    resourceAttributes: ResourceAuthorizationAttributes describes information for a
        resource access request
    """

    nonResourceAttributes: Optional["NonResourceAttributes"] = None
    resourceAttributes: Optional["ResourceAttributes"] = None


@dataclass
class NonResourceAttributes(HikaruBase):
    r"""
    NonResourceAttributes includes the authorization attributes available for non-resource
    requests to the Authorizer interface

    Full name: v1.NonResourceAttributes

    Attributes:
    path: Path is the URL path of the request
    verb: Verb is the standard HTTP verb
    """

    path: Optional[str] = None
    verb: Optional[str] = None


@dataclass
class SELinuxOptions(HikaruBase):
    r"""
    SELinuxOptions are the labels to be applied to the container

    Full name: v1.SELinuxOptions

    Attributes:
    level: Level is SELinux level label that applies to the container.
    role: Role is a SELinux role label that applies to the container.
    type: Type is a SELinux type label that applies to the container.
    user: User is a SELinux user label that applies to the container.
    """

    level: Optional[str] = None
    role: Optional[str] = None
    type: Optional[str] = None
    user: Optional[str] = None


@dataclass
class ManagedFieldsEntry(HikaruBase):
    r"""
    ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
    that the fieldset applies to.

    Full name: v1.ManagedFieldsEntry

    Attributes:
    apiVersion: APIVersion defines the version of this resource that this field set
        applies to. The format is "group/version" just like the top-level APIVersion
        field. It is necessary to track the version of a field set because it cannot be
        automatically converted.
    fieldsType: FieldsType is the discriminator for the different fields format and
        version. There is currently only one possible value: "FieldsV1"
    manager: Manager is an identifier of the workflow managing these fields.
    operation: Operation is the type of operation which lead to this ManagedFieldsEntry
        being created. The only valid values for this field are 'Apply' and 'Update'.
    time: Time is timestamp of when these fields were set. It should always be empty if
        Operation is 'Apply'
    fieldsV1: FieldsV1 holds the first JSON version format as described in the "FieldsV1"
        type.
    """

    apiVersion: Optional[str] = "v1"
    fieldsType: Optional[str] = None
    manager: Optional[str] = None
    operation: Optional[str] = None
    time: Optional[str] = None
    fieldsV1: Optional[object] = field(default_factory=dict)


@dataclass
class LoadBalancerStatus(HikaruBase):
    r"""
    LoadBalancerStatus represents the status of a load-balancer.

    Full name: v1.LoadBalancerStatus

    Attributes:
    ingress: Ingress is a list containing ingress points for the load-balancer. Traffic
        intended for the service should be sent to these ingress points.
    """

    ingress: Optional[List["LoadBalancerIngress"]] = field(default_factory=list)


@dataclass
class ClusterRole(HikaruDocumentBase):
    r"""
    ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced
    as a unit by a RoleBinding or ClusterRoleBinding.

    Full name: ClusterRole

    Attributes:
    aggregationRule: AggregationRule is an optional field that describes how to build the
        Rules for this ClusterRole. If AggregationRule is set, then the Rules are
        controller managed and direct changes to Rules will be stomped by the controller.
    apiVersion: 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: 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: Standard object's metadata.
    rules: Rules holds all the PolicyRules for this ClusterRole
    """

    _version = "v1"
    aggregationRule: Optional["AggregationRule"] = None
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "ClusterRole"
    metadata: Optional["ObjectMeta"] = None
    rules: Optional[List["PolicyRule"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ClusterRoleList(HikaruDocumentBase):
    r"""
    ClusterRoleList is a collection of ClusterRoles

    Full name: v1.ClusterRoleList

    Attributes:
    items: Items is a list of ClusterRoles
    apiVersion: 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: 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: Standard object's metadata.
    """

    _version = "v1"
    items: List["ClusterRole"]
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "ClusterRoleList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class GroupVersionForDiscovery(HikaruBase):
    r"""
    GroupVersion contains the "group/version" and "version" string of a version. It is
    made a struct to keep extensibility.

    Full name: v1.GroupVersionForDiscovery

    Attributes:
    groupVersion: groupVersion specifies the API group and version in the form
        "group/version"
    version: version specifies the version in the form of "version". This is to save the
        clients the trouble of splitting the GroupVersion.
    """

    groupVersion: str
    version: str


@dataclass
class SecretKeySelector(HikaruBase):
    r"""
    SecretKeySelector selects a key of a Secret.

    Full name: v1.SecretKeySelector

    Attributes:
    key: The key of the secret to select from. Must be a valid secret key.
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    optional: Specify whether the Secret or its key must be defined
    """

    key: str
    name: Optional[str] = None
    optional: Optional[bool] = None


@dataclass
class PolicyRule(HikaruBase):
    r"""
    PolicyRule holds information that describes a policy rule, but does not contain
    information about who the rule applies to or which namespace the rule applies to.

    Full name: v1.PolicyRule

    Attributes:
    verbs: Verbs is a list of Verbs that apply to ALL the ResourceKinds and
        AttributeRestrictions contained in this rule. VerbAll represents all kinds.
    apiGroups: APIGroups is the name of the APIGroup that contains the resources. If
        multiple API groups are specified, any action requested against one of the
        enumerated resources in any API group will be allowed.
    nonResourceURLs: NonResourceURLs is a set of partial urls that a user should have
        access to. *s are allowed, but only as the full, final step in the path Since
        non-resource URLs are not namespaced, this field is only applicable for
        ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API
        resources (such as "pods" or "secrets") or non-resource URL paths (such as
        "/api"), but not both.
    resourceNames: ResourceNames is an optional white list of names that the rule applies
        to. An empty set means that everything is allowed.
    resources: Resources is a list of resources this rule applies to. ResourceAll
        represents all resources.
    """

    verbs: List[str]
    apiGroups: Optional[List[str]] = field(default_factory=list)
    nonResourceURLs: Optional[List[str]] = field(default_factory=list)
    resourceNames: Optional[List[str]] = field(default_factory=list)
    resources: Optional[List[str]] = field(default_factory=list)


@dataclass
class ComponentStatus(HikaruDocumentBase):
    r"""
    ComponentStatus (and ComponentStatusList) holds the cluster validation info.

    Full name: ComponentStatus

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    conditions: List of component conditions observed
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ComponentStatus"
    metadata: Optional["ObjectMeta"] = None
    conditions: Optional[List["ComponentCondition"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ComponentStatusList(HikaruDocumentBase):
    r"""
    Status of all the conditions for the component as a list of ComponentStatus objects.

    Full name: v1.ComponentStatusList

    Attributes:
    items: List of ComponentStatus objects.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["ComponentStatus"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ComponentStatusList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PodAntiAffinity(HikaruBase):
    r"""
    Pod anti affinity is a group of inter pod anti affinity scheduling rules.

    Full name: v1.PodAntiAffinity

    Attributes:
    preferredDuringSchedulingIgnoredDuringExecution: The scheduler will prefer to schedule
        pods to nodes that satisfy the anti-affinity expressions specified by this field,
        but it may choose a node that violates one or more of the expressions. The node
        that is most preferred is the one with the greatest sum of weights, i.e. for each
        node that meets all of the scheduling requirements (resource request,
        requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by
        iterating through the elements of this field and adding "weight" to the sum if the
        node has pods which matches the corresponding podAffinityTerm; the node(s) with
        the highest sum are the most preferred.
    requiredDuringSchedulingIgnoredDuringExecution: If the anti-affinity requirements
        specified by this field are not met at scheduling time, the pod will not be
        scheduled onto the node. If the anti-affinity requirements specified by this field
        cease to be met at some point during pod execution (e.g. due to a pod label
        update), the system may or may not try to eventually evict the pod from its node.
        When there are multiple elements, the lists of nodes corresponding to each
        podAffinityTerm are intersected, i.e. all terms must be satisfied.
    """

    preferredDuringSchedulingIgnoredDuringExecution: Optional[
        List["WeightedPodAffinityTerm"]
    ] = field(default_factory=list)
    requiredDuringSchedulingIgnoredDuringExecution: Optional[
        List["PodAffinityTerm"]
    ] = field(default_factory=list)


@dataclass
class WeightedPodAffinityTerm(HikaruBase):
    r"""
    The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to
    find the most preferred node(s)

    Full name: v1.WeightedPodAffinityTerm

    Attributes:
    podAffinityTerm: Required. A pod affinity term, associated with the corresponding
        weight.
    weight: weight associated with matching the corresponding podAffinityTerm, in the
        range 1-100.
    """

    podAffinityTerm: "PodAffinityTerm"
    weight: int


@dataclass
class PodAffinityTerm(HikaruBase):
    r"""
    Defines a set of pods (namely those matching the labelSelector relative to the given
    namespace(s)) that this pod should be co-located (affinity) or not co-located
    (anti-affinity) with, where co-located is defined as running on a node whose value of
    the label with key <topologyKey> matches that of any node on which a pod of the set of
    pods is running

    Full name: v1.PodAffinityTerm

    Attributes:
    topologyKey: This pod should be co-located (affinity) or not co-located
        (anti-affinity) with the pods matching the labelSelector in the specified
        namespaces, where co-located is defined as running on a node whose value of the
        label with key topologyKey matches that of any node on which any of the selected
        pods is running. Empty topologyKey is not allowed.
    labelSelector: A label query over a set of resources, in this case pods.
    namespaces: namespaces specifies which namespaces the labelSelector applies to
        (matches against); null or empty list means "this pod's namespace"
    """

    topologyKey: str
    labelSelector: Optional["LabelSelector"] = None
    namespaces: Optional[List[str]] = field(default_factory=list)


@dataclass
class TokenRequestSpec(HikaruBase):
    r"""
    TokenRequestSpec contains client provided parameters of a token request.

    Full name: v1.TokenRequestSpec

    Attributes:
    audiences: Audiences are the intendend audiences of the token. A recipient of a token
        must identitfy themself with an identifier in the list of audiences of the token,
        and otherwise should reject the token. A token issued for multiple audiences may
        be used to authenticate against any of the audiences listed but implies a high
        degree of trust between the target audiences.
    boundObjectRef: BoundObjectRef is a reference to an object that the token will be
        bound to. The token will only be valid for as long as the bound object exists.
        NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but
        other audiences may not. Keep ExpirationSeconds small if you want prompt
        revocation.
    expirationSeconds: ExpirationSeconds is the requested duration of validity of the
        request. The token issuer may return a token with a different validity duration so
        a client needs to check the 'expiration' field in a response.
    """

    audiences: List[str]
    boundObjectRef: Optional["BoundObjectReference"] = None
    expirationSeconds: Optional[int] = None


@dataclass
class BoundObjectReference(HikaruBase):
    r"""
    BoundObjectReference is a reference to an object that a token is bound to.

    Full name: v1.BoundObjectReference

    Attributes:
    apiVersion: API version of the referent.
    kind: Kind of the referent. Valid kinds are 'Pod' and 'Secret'.
    name: Name of the referent.
    uid: UID of the referent.
    """

    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "None"
    name: Optional[str] = None
    uid: Optional[str] = None


@dataclass
class HostAlias(HikaruBase):
    r"""
    HostAlias holds the mapping between IP and hostnames that will be injected as an entry
    in the pod's hosts file.

    Full name: v1.HostAlias

    Attributes:
    ip: IP address of the host file entry.
    hostnames: Hostnames for the above IP address.
    """

    ip: Optional[str] = None
    hostnames: Optional[List[str]] = field(default_factory=list)


@dataclass
class Probe(HikaruBase):
    r"""
    Probe describes a health check to be performed against a container to determine
    whether it is alive or ready to receive traffic.

    Full name: v1.Probe

    Attributes:
    exec: One and only one of the following should be specified. Exec specifies the action
        to take.
    failureThreshold: Minimum consecutive failures for the probe to be considered failed
        after having succeeded. Defaults to 3. Minimum value is 1.
    httpGet: HTTPGet specifies the http request to perform.
    initialDelaySeconds: Number of seconds after the container has started before liveness
        probes are initiated. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
    periodSeconds: How often (in seconds) to perform the probe. Default to 10 seconds.
        Minimum value is 1.
    successThreshold: Minimum consecutive successes for the probe to be considered
        successful after having failed. Defaults to 1. Must be 1 for liveness and startup.
        Minimum value is 1.
    tcpSocket: TCPSocket specifies an action involving a TCP port. TCP hooks not yet
        supported
    timeoutSeconds: Number of seconds after which the probe times out. Defaults to 1
        second. Minimum value is 1. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
    """

    exec: Optional["ExecAction"] = None
    failureThreshold: Optional[int] = None
    httpGet: Optional["HTTPGetAction"] = None
    initialDelaySeconds: Optional[int] = None
    periodSeconds: Optional[int] = None
    successThreshold: Optional[int] = None
    tcpSocket: Optional["TCPSocketAction"] = None
    timeoutSeconds: Optional[int] = None


@dataclass
class ExecAction(HikaruBase):
    r"""
    ExecAction describes a "run in container" action.

    Full name: v1.ExecAction

    Attributes:
    command: Command is the command line to execute inside the container, the working
        directory for the command is root ('/') in the container's filesystem. The command
        is simply exec'd, it is not run inside a shell, so traditional shell instructions
        ('|', etc) won't work. To use a shell, you need to explicitly call out to that
        shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
    """

    command: Optional[List[str]] = field(default_factory=list)


@dataclass
class HTTPGetAction(HikaruBase):
    r"""
    HTTPGetAction describes an action based on HTTP Get requests.

    Full name: v1.HTTPGetAction

    Attributes:
    port: Name or number of the port to access on the container. Number must be in the
        range 1 to 65535. Name must be an IANA_SVC_NAME.
    host: Host name to connect to, defaults to the pod IP. You probably want to set "Host"
        in httpHeaders instead.
    path: Path to access on the HTTP server.
    scheme: Scheme to use for connecting to the host. Defaults to HTTP.
    httpHeaders: Custom headers to set in the request. HTTP allows repeated headers.
    """

    port: object
    host: Optional[str] = None
    path: Optional[str] = None
    scheme: Optional[str] = None
    httpHeaders: Optional[List["HTTPHeader"]] = field(default_factory=list)


@dataclass
class TCPSocketAction(HikaruBase):
    r"""
    TCPSocketAction describes an action based on opening a socket

    Full name: v1.TCPSocketAction

    Attributes:
    port: Number or name of the port to access on the container. Number must be in the
        range 1 to 65535. Name must be an IANA_SVC_NAME.
    host: Optional: Host name to connect to, defaults to the pod IP.
    """

    port: object
    host: Optional[str] = None


@dataclass
class RoleBinding(HikaruDocumentBase):
    r"""
    RoleBinding references a role, but does not contain it. It can reference a Role in the
    same namespace or a ClusterRole in the global namespace. It adds who information via
    Subjects and namespace information by which namespace it exists in. RoleBindings in a
    given namespace only have effect in that namespace.

    Full name: RoleBinding

    Attributes:
    roleRef: RoleRef can reference a Role in the current namespace or a ClusterRole in the
        global namespace. If the RoleRef cannot be resolved, the Authorizer must return an
        error.
    apiVersion: 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: 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: Standard object's metadata.
    subjects: Subjects holds references to the objects the role applies to.
    """

    _version = "v1"
    roleRef: "RoleRef"
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "RoleBinding"
    metadata: Optional["ObjectMeta"] = None
    subjects: Optional[List["Subject"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class RoleBindingList(HikaruDocumentBase):
    r"""
    RoleBindingList is a collection of RoleBindings

    Full name: v1.RoleBindingList

    Attributes:
    items: Items is a list of RoleBindings
    apiVersion: 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: 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: Standard object's metadata.
    """

    _version = "v1"
    items: List["RoleBinding"]
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "RoleBindingList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class EnvVar(HikaruBase):
    r"""
    EnvVar represents an environment variable present in a Container.

    Full name: v1.EnvVar

    Attributes:
    name: Name of the environment variable. Must be a C_IDENTIFIER.
    value: Variable references $(VAR_NAME) are expanded using the previous defined
        environment variables in the container and any service environment variables. If a
        variable cannot be resolved, the reference in the input string will be unchanged.
        The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
        references will never be expanded, regardless of whether the variable exists or
        not. Defaults to "".
    valueFrom: Source for the environment variable's value. Cannot be used if value is not
        empty.
    """

    name: str
    value: Optional[str] = None
    valueFrom: Optional["EnvVarSource"] = None


@dataclass
class EnvFromSource(HikaruBase):
    r"""
    EnvFromSource represents the source of a set of ConfigMaps

    Full name: v1.EnvFromSource

    Attributes:
    configMapRef: The ConfigMap to select from
    prefix: An optional identifier to prepend to each key in the ConfigMap. Must be a
        C_IDENTIFIER.
    secretRef: The Secret to select from
    """

    configMapRef: Optional["ConfigMapEnvSource"] = None
    prefix: Optional[str] = None
    secretRef: Optional["SecretEnvSource"] = None


@dataclass
class VolumeMount(HikaruBase):
    r"""
    VolumeMount describes a mounting of a Volume within a container.

    Full name: v1.VolumeMount

    Attributes:
    mountPath: Path within the container at which the volume should be mounted. Must not
        contain ':'.
    name: This must match the Name of a Volume.
    mountPropagation: mountPropagation determines how mounts are propagated from the host
        to container and the other way around. When not set, MountPropagationNone is used.
        This field is beta in 1.10.
    readOnly: Mounted read-only if true, read-write otherwise (false or unspecified).
        Defaults to false.
    subPath: Path within the volume from which the container's volume should be mounted.
        Defaults to "" (volume's root).
    subPathExpr: Expanded path within the volume from which the container's volume should
        be mounted. Behaves similarly to SubPath but environment variable references
        $(VAR_NAME) are expanded using the container's environment. Defaults to ""
        (volume's root). SubPathExpr and SubPath are mutually exclusive.
    """

    mountPath: str
    name: str
    mountPropagation: Optional[str] = None
    readOnly: Optional[bool] = None
    subPath: Optional[str] = None
    subPathExpr: Optional[str] = None


@dataclass
class Volume(HikaruBase):
    r"""
    Volume represents a named volume in a pod that may be accessed by any container in the
    pod.

    Full name: v1.Volume

    Attributes:
    name: Volume's name. Must be a DNS_LABEL and unique within the pod. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    awsElasticBlockStore: AWSElasticBlockStore represents an AWS Disk resource that is
        attached to a kubelet's host machine and then exposed to the pod. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
    azureDisk: AzureDisk represents an Azure Data Disk mount on the host and bind mount to
        the pod.
    azureFile: AzureFile represents an Azure File Service mount on the host and bind mount
        to the pod.
    cephfs: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
    cinder: Cinder represents a cinder volume attached and mounted on kubelets host
        machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
    configMap: ConfigMap represents a configMap that should populate this volume
    csi: CSI (Container Storage Interface) represents storage that is handled by an
        external CSI driver (Alpha feature).
    downwardAPI: DownwardAPI represents downward API about the pod that should populate
        this volume
    emptyDir: EmptyDir represents a temporary directory that shares a pod's lifetime. More
        info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
    fc: FC represents a Fibre Channel resource that is attached to a kubelet's host
        machine and then exposed to the pod.
    flexVolume: FlexVolume represents a generic volume resource that is
        provisioned/attached using an exec based plugin.
    flocker: Flocker represents a Flocker volume attached to a kubelet's host machine.
        This depends on the Flocker control service being running
    gcePersistentDisk: GCEPersistentDisk represents a GCE Disk resource that is attached
        to a kubelet's host machine and then exposed to the pod. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    gitRepo: GitRepo represents a git repository at a particular revision. DEPRECATED:
        GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir
        into an InitContainer that clones the repo using git, then mount the EmptyDir into
        the Pod's container.
    glusterfs: Glusterfs represents a Glusterfs mount on the host that shares a pod's
        lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
    hostPath: HostPath represents a pre-existing file or directory on the host machine
        that is directly exposed to the container. This is generally used for system
        agents or other privileged things that are allowed to see the host machine. Most
        containers will NOT need this. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#hostpath
    iscsi: ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host
        machine and then exposed to the pod. More info:
        https://examples.k8s.io/volumes/iscsi/README.md
    nfs: NFS represents an NFS mount on the host that shares a pod's lifetime More info:
        https://kubernetes.io/docs/concepts/storage/volumes#nfs
    persistentVolumeClaim: PersistentVolumeClaimVolumeSource represents a reference to a
        PersistentVolumeClaim in the same namespace. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    photonPersistentDisk: PhotonPersistentDisk represents a PhotonController persistent
        disk attached and mounted on kubelets host machine
    portworxVolume: PortworxVolume represents a portworx volume attached and mounted on
        kubelets host machine
    projected: Items for all in one resources secrets, configmaps, and downward API
    quobyte: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
    rbd: RBD represents a Rados Block Device mount on the host that shares a pod's
        lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
    scaleIO: ScaleIO represents a ScaleIO persistent volume attached and mounted on
        Kubernetes nodes.
    secret: Secret represents a secret that should populate this volume. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#secret
    storageos: StorageOS represents a StorageOS volume attached and mounted on Kubernetes
        nodes.
    vsphereVolume: VsphereVolume represents a vSphere volume attached and mounted on
        kubelets host machine
    """

    name: str
    awsElasticBlockStore: Optional["AWSElasticBlockStoreVolumeSource"] = None
    azureDisk: Optional["AzureDiskVolumeSource"] = None
    azureFile: Optional["AzureFileVolumeSource"] = None
    cephfs: Optional["CephFSVolumeSource"] = None
    cinder: Optional["CinderVolumeSource"] = None
    configMap: Optional["ConfigMapVolumeSource"] = None
    csi: Optional["CSIVolumeSource"] = None
    downwardAPI: Optional["DownwardAPIVolumeSource"] = None
    emptyDir: Optional["EmptyDirVolumeSource"] = None
    fc: Optional["FCVolumeSource"] = None
    flexVolume: Optional["FlexVolumeSource"] = None
    flocker: Optional["FlockerVolumeSource"] = None
    gcePersistentDisk: Optional["GCEPersistentDiskVolumeSource"] = None
    gitRepo: Optional["GitRepoVolumeSource"] = None
    glusterfs: Optional["GlusterfsVolumeSource"] = None
    hostPath: Optional["HostPathVolumeSource"] = None
    iscsi: Optional["ISCSIVolumeSource"] = None
    nfs: Optional["NFSVolumeSource"] = None
    persistentVolumeClaim: Optional["PersistentVolumeClaimVolumeSource"] = None
    photonPersistentDisk: Optional["PhotonPersistentDiskVolumeSource"] = None
    portworxVolume: Optional["PortworxVolumeSource"] = None
    projected: Optional["ProjectedVolumeSource"] = None
    quobyte: Optional["QuobyteVolumeSource"] = None
    rbd: Optional["RBDVolumeSource"] = None
    scaleIO: Optional["ScaleIOVolumeSource"] = None
    secret: Optional["SecretVolumeSource"] = None
    storageos: Optional["StorageOSVolumeSource"] = None
    vsphereVolume: Optional["VsphereVirtualDiskVolumeSource"] = None


@dataclass
class TopologySpreadConstraint(HikaruBase):
    r"""
    TopologySpreadConstraint specifies how to spread matching pods among the given
    topology.

    Full name: v1.TopologySpreadConstraint

    Attributes:
    maxSkew: MaxSkew describes the degree to which pods may be unevenly distributed. It's
        the maximum permitted difference between the number of matching pods in any two
        topology domains of a given topology type. For example, in a 3-zone cluster,
        MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1
        | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be
        scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the
        ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming
        pod can be scheduled onto any zone. It's a required field. Default value is 1 and
        0 is not allowed.
    topologyKey: TopologyKey is the key of node labels. Nodes that have a label with this
        key and identical values are considered to be in the same topology. We consider
        each <key, value> as a "bucket", and try to put balanced number of pods into each
        bucket. It's a required field.
    whenUnsatisfiable: WhenUnsatisfiable indicates how to deal with a pod if it doesn't
        satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not
        to schedule it - ScheduleAnyway tells the scheduler to still schedule it It's
        considered as "Unsatisfiable" if and only if placing incoming pod on any topology
        violates "MaxSkew". For example, in a 3-zone cluster, MaxSkew is set to 1, and
        pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P
        P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be
        scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on
        zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be
        imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
    labelSelector: LabelSelector is used to find matching pods. Pods that match this label
        selector are counted to determine the number of pods in their corresponding
        topology domain.
    """

    maxSkew: int
    topologyKey: str
    whenUnsatisfiable: str
    labelSelector: Optional["LabelSelector"] = None


@dataclass
class CinderVolumeSource(HikaruBase):
    r"""
    Represents a cinder volume resource in Openstack. A Cinder volume must exist before
    mounting to a container. The volume must also be in the same region as the kubelet.
    Cinder volumes support ownership management and SELinux relabeling.

    Full name: v1.CinderVolumeSource

    Attributes:
    volumeID: volume id used to identify the volume in cinder. More info:
        https://examples.k8s.io/mysql-cinder-pd/README.md
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be
        "ext4" if unspecified. More info:
        https://examples.k8s.io/mysql-cinder-pd/README.md
    readOnly: Optional: Defaults to false (read/write). ReadOnly here will force the
        ReadOnly setting in VolumeMounts. More info:
        https://examples.k8s.io/mysql-cinder-pd/README.md
    secretRef: Optional: points to a secret object containing parameters used to connect
        to OpenStack.
    """

    volumeID: str
    fsType: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["LocalObjectReference"] = None


@dataclass
class LocalObjectReference(HikaruBase):
    r"""
    LocalObjectReference contains enough information to let you locate the referenced
    object inside the same namespace.

    Full name: v1.LocalObjectReference

    Attributes:
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    """

    name: Optional[str] = None


@dataclass
class NodeSelectorTerm(HikaruBase):
    r"""
    A null or empty node selector term matches no objects. The requirements of them are
    ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.

    Full name: v1.NodeSelectorTerm

    Attributes:
    matchExpressions: A list of node selector requirements by node's labels.
    matchFields: A list of node selector requirements by node's fields.
    """

    matchExpressions: Optional[List["NodeSelectorRequirement"]] = field(
        default_factory=list
    )
    matchFields: Optional[List["NodeSelectorRequirement"]] = field(default_factory=list)


@dataclass
class NodeSelectorRequirement(HikaruBase):
    r"""
    A node selector requirement is a selector that contains values, a key, and an operator
    that relates the key and values.

    Full name: v1.NodeSelectorRequirement

    Attributes:
    key: The label key that the selector applies to.
    operator: Represents a key's relationship to a set of values. Valid operators are In,
        NotIn, Exists, DoesNotExist. Gt, and Lt.
    values: An array of string values. If the operator is In or NotIn, the values array
        must be non-empty. If the operator is Exists or DoesNotExist, the values array
        must be empty. If the operator is Gt or Lt, the values array must have a single
        element, which will be interpreted as an integer. This array is replaced during a
        strategic merge patch.
    """

    key: str
    operator: str
    values: Optional[List[str]] = field(default_factory=list)


@dataclass
class ReplicationControllerStatus(HikaruBase):
    r"""
    ReplicationControllerStatus represents the current status of a replication controller.

    Full name: v1.ReplicationControllerStatus

    Attributes:
    replicas: Replicas is the most recently oberved number of replicas. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
    availableReplicas: The number of available replicas (ready for at least
        minReadySeconds) for this replication controller.
    fullyLabeledReplicas: The number of pods that have labels matching the labels of the
        pod template of the replication controller.
    observedGeneration: ObservedGeneration reflects the generation of the most recently
        observed replication controller.
    readyReplicas: The number of ready replicas for this replication controller.
    conditions: Represents the latest available observations of a replication controller's
        current state.
    """

    replicas: int
    availableReplicas: Optional[int] = None
    fullyLabeledReplicas: Optional[int] = None
    observedGeneration: Optional[int] = None
    readyReplicas: Optional[int] = None
    conditions: Optional[List["ReplicationControllerCondition"]] = field(
        default_factory=list
    )


@dataclass
class ReplicationControllerCondition(HikaruBase):
    r"""
    ReplicationControllerCondition describes the state of a replication controller at a
    certain point.

    Full name: v1.ReplicationControllerCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of replication controller condition.
    lastTransitionTime: The last time the condition transitioned from one status to
        another.
    message: A human readable message indicating details about the transition.
    reason: The reason for the condition's last transition.
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class StatefulSetUpdateStrategy(HikaruBase):
    r"""
    StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will
    use to perform updates. It includes any additional parameters necessary to perform the
    update for the indicated strategy.

    Full name: v1beta2.StatefulSetUpdateStrategy

    Attributes:
    rollingUpdate: RollingUpdate is used to communicate parameters when Type is
        RollingUpdateStatefulSetStrategyType.
    type: Type indicates the type of the StatefulSetUpdateStrategy. Default is
        RollingUpdate.
    """

    rollingUpdate: Optional["RollingUpdateStatefulSetStrategy"] = None
    type: Optional[str] = None


@dataclass
class RollingUpdateStatefulSetStrategy(HikaruBase):
    r"""
    RollingUpdateStatefulSetStrategy is used to communicate parameter for
    RollingUpdateStatefulSetStrategyType.

    Full name: v1beta2.RollingUpdateStatefulSetStrategy

    Attributes:
    partition: Partition indicates the ordinal at which the StatefulSet should be
        partitioned. Default value is 0.
    """

    partition: Optional[int] = None


@dataclass
class ScaleStatus(HikaruBase):
    r"""
    ScaleStatus represents the current status of a scale subresource.

    Full name: v1beta2.ScaleStatus

    Attributes:
    replicas: actual number of observed instances of the scaled object.
    targetSelector: label selector for pods that should match the replicas count. This is
        a serializated version of both map-based and more expressive set-based selectors.
        This is done to avoid introspection in the clients. The string will be in the same
        format as the query-param syntax. If the target type only supports map-based
        selectors, both this field and map-based selector field are populated. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
    selector: label query over pods that should match the replicas count. More info:
        http://kubernetes.io/docs/user-guide/labels#label-selectors
    """

    replicas: int
    targetSelector: Optional[str] = None
    selector: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class EndpointPort(HikaruBase):
    r"""
    EndpointPort is a tuple that describes a single port.

    Full name: v1.EndpointPort

    Attributes:
    port: The port number of the endpoint.
    name: The name of this port. This must match the 'name' field in the corresponding
        ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
    protocol: The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
    """

    port: int
    name: Optional[str] = None
    protocol: Optional[str] = None


@dataclass
class ConfigMapNodeConfigSource(HikaruBase):
    r"""
    ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a
    config source for the Node.

    Full name: v1.ConfigMapNodeConfigSource

    Attributes:
    kubeletConfigKey: KubeletConfigKey declares which key of the referenced ConfigMap
        corresponds to the KubeletConfiguration structure This field is required in all
        cases.
    name: Name is the metadata.name of the referenced ConfigMap. This field is required in
        all cases.
    namespace: Namespace is the metadata.namespace of the referenced ConfigMap. This field
        is required in all cases.
    resourceVersion: ResourceVersion is the metadata.ResourceVersion of the referenced
        ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.
    uid: UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in
        Node.Spec, and required in Node.Status.
    """

    kubeletConfigKey: str
    name: str
    namespace: str
    resourceVersion: Optional[str] = None
    uid: Optional[str] = None


@dataclass
class JobSpec(HikaruBase):
    r"""
    JobSpec describes how the job execution will look like.

    Full name: v1.JobSpec

    Attributes:
    template: Describes the pod that will be created when executing a job. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
    activeDeadlineSeconds: Specifies the duration in seconds relative to the startTime
        that the job may be active before the system tries to terminate it; value must be
        positive integer
    backoffLimit: Specifies the number of retries before marking this job failed. Defaults
        to 6
    completions: Specifies the desired number of successfully finished pods the job should
        be run with. Setting to nil means that the success of any pod signals the success
        of all pods, and allows parallelism to have any positive value. Setting to 1 means
        that parallelism is limited to 1 and the success of that pod signals the success
        of the job. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
    manualSelector: manualSelector controls generation of pod labels and pod selectors.
        Leave `manualSelector` unset unless you are certain what you are doing. When false
        or unset, the system pick labels unique to this job and appends those labels to
        the pod template. When true, the user is responsible for picking unique labels and
        specifying the selector. Failure to pick a unique label may cause this and other
        jobs to not function correctly. However, You may see `manualSelector=true` in jobs
        that were created with the old `extensions/v1beta1` API. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
    parallelism: Specifies the maximum desired number of pods the job should run at any
        given time. The actual number of pods running in steady state will be less than
        this number when ((.spec.completions - .status.successful) < .spec.parallelism),
        i.e. when the work left to do is less than max parallelism. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
    selector: A label query over pods that should match the pod count. Normally, the
        system sets this field for you. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
    ttlSecondsAfterFinished: ttlSecondsAfterFinished limits the lifetime of a Job that has
        finished execution (either Complete or Failed). If this field is set,
        ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically
        deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers)
        will be honored. If this field is unset, the Job won't be automatically deleted.
        If this field is set to zero, the Job becomes eligible to be deleted immediately
        after it finishes. This field is alpha-level and is only honored by servers that
        enable the TTLAfterFinished feature.
    """

    template: "PodTemplateSpec"
    activeDeadlineSeconds: Optional[int] = None
    backoffLimit: Optional[int] = None
    completions: Optional[int] = None
    manualSelector: Optional[bool] = None
    parallelism: Optional[int] = None
    selector: Optional["LabelSelector"] = None
    ttlSecondsAfterFinished: Optional[int] = None


@dataclass
class ResourceQuotaSpec(HikaruBase):
    r"""
    ResourceQuotaSpec defines the desired hard limits to enforce for Quota.

    Full name: v1.ResourceQuotaSpec

    Attributes:
    scopeSelector: scopeSelector is also a collection of filters like scopes that must
        match each object tracked by a quota but expressed using ScopeSelectorOperator in
        combination with possible values. For a resource to match, both scopes AND
        scopeSelector (if specified in spec), must be matched.
    hard: hard is the set of desired hard limits for each named resource. More info:
        https://kubernetes.io/docs/concepts/policy/resource-quotas/
    scopes: A collection of filters that must match each object tracked by a quota. If not
        specified, the quota matches all objects.
    """

    scopeSelector: Optional["ScopeSelector"] = None
    hard: Optional[Dict[str, str]] = field(default_factory=dict)
    scopes: Optional[List[str]] = field(default_factory=list)


@dataclass
class ScopeSelector(HikaruBase):
    r"""
    A scope selector represents the AND of the selectors represented by the
    scoped-resource selector requirements.

    Full name: v1.ScopeSelector

    Attributes:
    matchExpressions: A list of scope selector requirements by scope of the resources.
    """

    matchExpressions: Optional[List["ScopedResourceSelectorRequirement"]] = field(
        default_factory=list
    )


@dataclass
class CustomResourceDefinitionStatus(HikaruBase):
    r"""
    CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition

    Full name: v1.CustomResourceDefinitionStatus

    Attributes:
    acceptedNames: acceptedNames are the names that are actually being used to serve
        discovery. They may be different than the names in spec.
    storedVersions: storedVersions lists all versions of CustomResources that were ever
        persisted. Tracking these versions allows a migration path for stored versions in
        etcd. The field is mutable so a migration controller can finish a migration to
        another version (ensuring no old objects are left in storage), and then remove the
        rest of the versions from this list. Versions may not be removed from
        `spec.versions` while they exist in this list.
    conditions: conditions indicate state for particular aspects of a
        CustomResourceDefinition
    """

    acceptedNames: "CustomResourceDefinitionNames"
    storedVersions: List[str]
    conditions: Optional[List["CustomResourceDefinitionCondition"]] = field(
        default_factory=list
    )


@dataclass
class CustomResourceDefinitionCondition(HikaruBase):
    r"""
    CustomResourceDefinitionCondition contains details for the current condition of this
    pod.

    Full name: v1.CustomResourceDefinitionCondition

    Attributes:
    status: status is the status of the condition. Can be True, False, Unknown.
    type: type is the type of the condition. Types include Established, NamesAccepted and
        Terminating.
    lastTransitionTime: lastTransitionTime last time the condition transitioned from one
        status to another.
    message: message is a human-readable message indicating details about last transition.
    reason: reason is a unique, one-word, CamelCase reason for the condition's last
        transition.
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class DownwardAPIProjection(HikaruBase):
    r"""
    Represents downward API info for projecting into a projected volume. Note that this is
    identical to a downwardAPI volume source without the default mode.

    Full name: v1.DownwardAPIProjection

    Attributes:
    items: Items is a list of DownwardAPIVolume file
    """

    items: Optional[List["DownwardAPIVolumeFile"]] = field(default_factory=list)


@dataclass
class DownwardAPIVolumeFile(HikaruBase):
    r"""
    DownwardAPIVolumeFile represents information to create the file containing the pod
    field

    Full name: v1.DownwardAPIVolumeFile

    Attributes:
    path: Required: Path is the relative path name of the file to be created. Must not be
        absolute or contain the '..' path. Must be utf-8 encoded. The first item of the
        relative path must not start with '..'
    fieldRef: Required: Selects a field of the pod: only annotations, labels, name and
        namespace are supported.
    mode: Optional: mode bits to use on this file, must be a value between 0 and 0777. If
        not specified, the volume defaultMode will be used. This might be in conflict with
        other options that affect the file mode, like fsGroup, and the result can be other
        mode bits set.
    resourceFieldRef: Selects a resource of the container: only resources limits and
        requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are
        currently supported.
    """

    path: str
    fieldRef: Optional["ObjectFieldSelector"] = None
    mode: Optional[int] = None
    resourceFieldRef: Optional["ResourceFieldSelector"] = None


@dataclass
class ResourceQuota(HikaruDocumentBase):
    r"""
    ResourceQuota sets aggregate quota restrictions enforced per namespace

    Full name: v1.ResourceQuota

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the desired quota.
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Status defines the actual enforced quota and its current usage.
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ResourceQuota"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["ResourceQuotaSpec"] = None
    status: Optional["ResourceQuotaStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ResourceQuotaStatus(HikaruBase):
    r"""
    ResourceQuotaStatus defines the enforced hard limits and observed use.

    Full name: v1.ResourceQuotaStatus

    Attributes:
    hard: Hard is the set of enforced hard limits for each named resource. More info:
        https://kubernetes.io/docs/concepts/policy/resource-quotas/
    used: Used is the current observed total usage of the resource in the namespace.
    """

    hard: Optional[Dict[str, str]] = field(default_factory=dict)
    used: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class NodeSpec(HikaruBase):
    r"""
    NodeSpec describes the attributes that a node is created with.

    Full name: v1.NodeSpec

    Attributes:
    configSource: If specified, the source to get node configuration from The
        DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this
        field
    externalID: Deprecated. Not all kubelets will set this field. Remove field after 1.13.
        see: https://issues.k8s.io/61966
    podCIDR: PodCIDR represents the pod IP range assigned to the node.
    providerID: ID of the node assigned by the cloud provider in the format:
        <ProviderName>://<ProviderSpecificNodeID>
    unschedulable: Unschedulable controls node schedulability of new pods. By default,
        node is schedulable. More info:
        https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
    podCIDRs: podCIDRs represents the IP ranges assigned to the node for usage by Pods on
        that node. If this field is specified, the 0th entry must match the podCIDR field.
        It may contain at most 1 value for each of IPv4 and IPv6.
    taints: If specified, the node's taints.
    """

    configSource: Optional["NodeConfigSource"] = None
    externalID: Optional[str] = None
    podCIDR: Optional[str] = None
    providerID: Optional[str] = None
    unschedulable: Optional[bool] = None
    podCIDRs: Optional[List[str]] = field(default_factory=list)
    taints: Optional[List["Taint"]] = field(default_factory=list)


@dataclass
class NodeConfigSource(HikaruBase):
    r"""
    NodeConfigSource specifies a source of node configuration. Exactly one subfield
    (excluding metadata) must be non-nil.

    Full name: v1.NodeConfigSource

    Attributes:
    configMap: ConfigMap is a reference to a Node's ConfigMap
    """

    configMap: Optional["ConfigMapNodeConfigSource"] = None


@dataclass
class Taint(HikaruBase):
    r"""
    The node this Taint is attached to has the "effect" on any pod that does not tolerate
    the Taint.

    Full name: v1.Taint

    Attributes:
    effect: Required. The effect of the taint on pods that do not tolerate the taint.
        Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
    key: Required. The taint key to be applied to a node.
    timeAdded: TimeAdded represents the time at which the taint was added. It is only
        written for NoExecute taints.
    value: Required. The taint value corresponding to the taint key.
    """

    effect: str
    key: str
    timeAdded: Optional[str] = None
    value: Optional[str] = None


@dataclass
class SessionAffinityConfig(HikaruBase):
    r"""
    SessionAffinityConfig represents the configurations of session affinity.

    Full name: v1.SessionAffinityConfig

    Attributes:
    clientIP: clientIP contains the configurations of Client IP based session affinity.
    """

    clientIP: Optional["ClientIPConfig"] = None


@dataclass
class ClientIPConfig(HikaruBase):
    r"""
    ClientIPConfig represents the configurations of Client IP based session affinity.

    Full name: v1.ClientIPConfig

    Attributes:
    timeoutSeconds: timeoutSeconds specifies the seconds of ClientIP type session sticky
        time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP".
        Default value is 10800(for 3 hours).
    """

    timeoutSeconds: Optional[int] = None


@dataclass
class APIService(HikaruDocumentBase):
    r"""
    APIService represents a server for a particular GroupVersion. Name must be
    "version.group".

    Full name: APIService

    Attributes:
    apiVersion: 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: 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:
    spec: Spec contains information for locating and communicating with a server
    status: Status contains derived information about an API server
    """

    _version = "v1"
    apiVersion: Optional[str] = "apiregistration.k8s.io/v1"
    kind: Optional[str] = "APIService"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["APIServiceSpec"] = None
    status: Optional["APIServiceStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class APIServiceList(HikaruDocumentBase):
    r"""
    APIServiceList is a list of APIService objects.

    Full name: v1.APIServiceList

    Attributes:
    items:
    apiVersion: 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: 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:
    """

    _version = "v1"
    items: List["APIService"]
    apiVersion: Optional[str] = "apiregistration.k8s.io/v1"
    kind: Optional[str] = "APIServiceList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PersistentVolumeClaim(HikaruDocumentBase):
    r"""
    PersistentVolumeClaim is a user's request for and claim to a persistent volume

    Full name: v1.PersistentVolumeClaim

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the desired characteristics of a volume requested by a pod author.
        More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    status: Status represents the current information/status of a persistent volume claim.
        Read-only. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "PersistentVolumeClaim"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["PersistentVolumeClaimSpec"] = None
    status: Optional["PersistentVolumeClaimStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ServiceReference(HikaruBase):
    r"""
    ServiceReference holds a reference to Service.legacy.k8s.io

    Full name: apiextensions.v1.ServiceReference

    Attributes:
    name: `name` is the name of the service. Required
    namespace: `namespace` is the namespace of the service. Required
    path: `path` is an optional URL path which will be sent in any request to this
        service.
    port: If specified, the port on the service that hosting webhook. Default to 443 for
        backward compatibility. `port` should be a valid port number (1-65535, inclusive).
    """

    name: str
    namespace: str
    path: Optional[str] = None
    port: Optional[int] = None


@dataclass
class ExternalDocumentation(HikaruBase):
    r"""
    ExternalDocumentation allows referencing an external resource for extended
    documentation.

    Full name: v1.ExternalDocumentation

    Attributes:
    description:
    url:
    """

    description: Optional[str] = None
    url: Optional[str] = None


@dataclass
class ContainerStatus(HikaruBase):
    r"""
    ContainerStatus contains details for the current status of this container.

    Full name: v1.ContainerStatus

    Attributes:
    image: The image the container is running. More info:
        https://kubernetes.io/docs/concepts/containers/images
    imageID: ImageID of the container's image.
    name: This must be a DNS_LABEL. Each container in a pod must have a unique name.
        Cannot be updated.
    ready: Specifies whether the container has passed its readiness probe.
    restartCount: The number of times the container has been restarted, currently based on
        the number of dead containers that have not yet been removed. Note that this is
        calculated from dead containers. But those containers are subject to garbage
        collection. This value will get capped at 5 by GC.
    containerID: Container's ID in the format 'docker://<container_id>'.
    lastState: Details about the container's last termination condition.
    started: Specifies whether the container has passed its startup probe. Initialized as
        false, becomes true after startupProbe is considered successful. Resets to false
        when the container is restarted, or if kubelet loses state temporarily. Is always
        true when no startupProbe is defined.
    state: Details about the container's current condition.
    """

    image: str
    imageID: str
    name: str
    ready: bool
    restartCount: int
    containerID: Optional[str] = None
    lastState: Optional["ContainerState"] = None
    started: Optional[bool] = None
    state: Optional["ContainerState"] = None


@dataclass
class ContainerState(HikaruBase):
    r"""
    ContainerState holds a possible state of container. Only one of its members may be
    specified. If none of them is specified, the default one is ContainerStateWaiting.

    Full name: v1.ContainerState

    Attributes:
    running: Details about a running container
    terminated: Details about a terminated container
    waiting: Details about a waiting container
    """

    running: Optional["ContainerStateRunning"] = None
    terminated: Optional["ContainerStateTerminated"] = None
    waiting: Optional["ContainerStateWaiting"] = None


@dataclass
class CSINodeSpec(HikaruBase):
    r"""
    CSINodeSpec holds information about the specification of all CSI drivers installed on
    a node

    Full name: v1.CSINodeSpec

    Attributes:
    drivers: drivers is a list of information of all CSI Drivers existing on a node. If
        all drivers in the list are uninstalled, this can become empty.
    """

    drivers: List["CSINodeDriver"]


@dataclass
class CSINodeDriver(HikaruBase):
    r"""
    CSINodeDriver holds information about the specification of one CSI driver installed on
    a node

    Full name: v1.CSINodeDriver

    Attributes:
    name: This is the name of the CSI driver that this object refers to. This MUST be the
        same name returned by the CSI GetPluginName() call for that driver.
    nodeID: nodeID of the node from the driver point of view. This field enables
        Kubernetes to communicate with storage systems that do not share the same
        nomenclature for nodes. For example, Kubernetes may refer to a given node as
        "node1", but the storage system may refer to the same node as "nodeA". When
        Kubernetes issues a command to the storage system to attach a volume to a specific
        node, it can use this field to refer to the node name using the ID that the
        storage system will understand, e.g. "nodeA" instead of "node1". This field is
        required.
    allocatable: allocatable represents the volume resources of a node that are available
        for scheduling. This field is beta.
    topologyKeys: topologyKeys is the list of keys supported by the driver. When a driver
        is initialized on a cluster, it provides a set of topology keys that it
        understands (e.g. "company.com/zone", "company.com/region"). When a driver is
        initialized on a node, it provides the same topology keys along with values.
        Kubelet will expose these topology keys as labels on its own node object. When
        Kubernetes does topology aware provisioning, it can use this list to determine
        which labels it should retrieve from the node object and pass back to the driver.
        It is possible for different nodes to use different topology keys. This can be
        empty if driver does not support topology.
    """

    name: str
    nodeID: str
    allocatable: Optional["VolumeNodeResources"] = None
    topologyKeys: Optional[List[str]] = field(default_factory=list)


@dataclass
class PodDNSConfigOption(HikaruBase):
    r"""
    PodDNSConfigOption defines DNS resolver options of a pod.

    Full name: v1.PodDNSConfigOption

    Attributes:
    name: Required.
    value:
    """

    name: Optional[str] = None
    value: Optional[str] = None


@dataclass
class ServiceStatus(HikaruBase):
    r"""
    ServiceStatus represents the current status of a service.

    Full name: v1.ServiceStatus

    Attributes:
    loadBalancer: LoadBalancer contains the current status of the load-balancer, if one is
        present.
    """

    loadBalancer: Optional["LoadBalancerStatus"] = None


@dataclass
class AzureDiskVolumeSource(HikaruBase):
    r"""
    AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.

    Full name: v1.AzureDiskVolumeSource

    Attributes:
    diskName: The Name of the data disk in the blob storage
    diskURI: The URI the data disk in the blob storage
    cachingMode: Host Caching mode: None, Read Only, Read Write.
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if
        unspecified.
    kind: Expected values Shared: multiple blob disks per storage account Dedicated:
        single blob disk per storage account Managed: azure managed data disk (only in
        managed availability set). defaults to shared
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    """

    diskName: str
    diskURI: str
    cachingMode: Optional[str] = None
    fsType: Optional[str] = None
    kind: Optional[str] = "None"
    readOnly: Optional[bool] = None


@dataclass
class ResourceQuotaList(HikaruDocumentBase):
    r"""
    ResourceQuotaList is a list of ResourceQuota items.

    Full name: v1.ResourceQuotaList

    Attributes:
    items: Items is a list of ResourceQuota objects. More info:
        https://kubernetes.io/docs/concepts/policy/resource-quotas/
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["ResourceQuota"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ResourceQuotaList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class RoleRef(HikaruBase):
    r"""
    RoleRef contains information that points to the role being used

    Full name: v1.RoleRef

    Attributes:
    apiGroup: APIGroup is the group for the resource being referenced
    kind: Kind is the type of resource being referenced
    name: Name is the name of resource being referenced
    """

    apiGroup: str
    kind: str
    name: str


@dataclass
class ConfigMap(HikaruDocumentBase):
    r"""
    ConfigMap holds configuration data for pods to consume.

    Full name: v1.ConfigMap

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    binaryData: BinaryData contains the binary data. Each key must consist of alphanumeric
        characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in
        the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in
        the Data field, this is enforced during validation process. Using this field will
        require 1.10+ apiserver and kubelet.
    data: Data contains the configuration data. Each key must consist of alphanumeric
        characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the
        BinaryData field. The keys stored in Data must not overlap with the keys in the
        BinaryData field, this is enforced during validation process.
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ConfigMap"
    metadata: Optional["ObjectMeta"] = None
    binaryData: Optional[Dict[str, str]] = field(default_factory=dict)
    data: Optional[Dict[str, str]] = field(default_factory=dict)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class EnvVarSource(HikaruBase):
    r"""
    EnvVarSource represents a source for the value of an EnvVar.

    Full name: v1.EnvVarSource

    Attributes:
    configMapKeyRef: Selects a key of a ConfigMap.
    fieldRef: Selects a field of the pod: supports metadata.name, metadata.namespace,
        metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName,
        status.hostIP, status.podIP, status.podIPs.
    resourceFieldRef: Selects a resource of the container: only resources limits and
        requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu,
        requests.memory and requests.ephemeral-storage) are currently supported.
    secretKeyRef: Selects a key of a secret in the pod's namespace
    """

    configMapKeyRef: Optional["ConfigMapKeySelector"] = None
    fieldRef: Optional["ObjectFieldSelector"] = None
    resourceFieldRef: Optional["ResourceFieldSelector"] = None
    secretKeyRef: Optional["SecretKeySelector"] = None


@dataclass
class ConfigMapKeySelector(HikaruBase):
    r"""
    Selects a key from a ConfigMap.

    Full name: v1.ConfigMapKeySelector

    Attributes:
    key: The key to select.
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    optional: Specify whether the ConfigMap or its key must be defined
    """

    key: str
    name: Optional[str] = None
    optional: Optional[bool] = None


@dataclass
class ObjectFieldSelector(HikaruBase):
    r"""
    ObjectFieldSelector selects an APIVersioned field of an object.

    Full name: v1.ObjectFieldSelector

    Attributes:
    fieldPath: Path of the field to select in the specified API version.
    apiVersion: Version of the schema the FieldPath is written in terms of, defaults to
        "v1".
    """

    fieldPath: str
    apiVersion: Optional[str] = "v1"


@dataclass
class ResourceFieldSelector(HikaruBase):
    r"""
    ResourceFieldSelector represents container resources (cpu, memory) and their output
    format

    Full name: v1.ResourceFieldSelector

    Attributes:
    resource: Required: resource to select
    containerName: Container name: required for volumes, optional for env vars
    divisor: Specifies the output format of the exposed resources, defaults to "1"
    """

    resource: str
    containerName: Optional[str] = None
    divisor: Optional[str] = None


@dataclass
class PersistentVolumeClaimList(HikaruDocumentBase):
    r"""
    PersistentVolumeClaimList is a list of PersistentVolumeClaim items.

    Full name: v1.PersistentVolumeClaimList

    Attributes:
    items: A list of persistent volume claims. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["PersistentVolumeClaim"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "PersistentVolumeClaimList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PersistentVolumeSpec(HikaruBase):
    r"""
    PersistentVolumeSpec is the specification of a persistent volume.

    Full name: v1.PersistentVolumeSpec

    Attributes:
    awsElasticBlockStore: AWSElasticBlockStore represents an AWS Disk resource that is
        attached to a kubelet's host machine and then exposed to the pod. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
    azureDisk: AzureDisk represents an Azure Data Disk mount on the host and bind mount to
        the pod.
    azureFile: AzureFile represents an Azure File Service mount on the host and bind mount
        to the pod.
    cephfs: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
    cinder: Cinder represents a cinder volume attached and mounted on kubelets host
        machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
    claimRef: ClaimRef is part of a bi-directional binding between PersistentVolume and
        PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the
        authoritative bind between PV and PVC. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
    csi: CSI represents storage that is handled by an external CSI driver (Beta feature).
    fc: FC represents a Fibre Channel resource that is attached to a kubelet's host
        machine and then exposed to the pod.
    flexVolume: FlexVolume represents a generic volume resource that is
        provisioned/attached using an exec based plugin.
    flocker: Flocker represents a Flocker volume attached to a kubelet's host machine and
        exposed to the pod for its usage. This depends on the Flocker control service
        being running
    gcePersistentDisk: GCEPersistentDisk represents a GCE Disk resource that is attached
        to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.
        More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    glusterfs: Glusterfs represents a Glusterfs volume that is attached to a host and
        exposed to the pod. Provisioned by an admin. More info:
        https://examples.k8s.io/volumes/glusterfs/README.md
    hostPath: HostPath represents a directory on the host. Provisioned by a developer or
        tester. This is useful for single-node development and testing only! On-host
        storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
        More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
    iscsi: ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host
        machine and then exposed to the pod. Provisioned by an admin.
    local: Local represents directly-attached storage with node affinity
    nfs: NFS represents an NFS mount on the host. Provisioned by an admin. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#nfs
    nodeAffinity: NodeAffinity defines constraints that limit what nodes this volume can
        be accessed from. This field influences the scheduling of pods that use this
        volume.
    persistentVolumeReclaimPolicy: What happens to a persistent volume when released from
        its claim. Valid options are Retain (default for manually created
        PersistentVolumes), Delete (default for dynamically provisioned
        PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the
        volume plugin underlying this PersistentVolume. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
    photonPersistentDisk: PhotonPersistentDisk represents a PhotonController persistent
        disk attached and mounted on kubelets host machine
    portworxVolume: PortworxVolume represents a portworx volume attached and mounted on
        kubelets host machine
    quobyte: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
    rbd: RBD represents a Rados Block Device mount on the host that shares a pod's
        lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
    scaleIO: ScaleIO represents a ScaleIO persistent volume attached and mounted on
        Kubernetes nodes.
    storageClassName: Name of StorageClass to which this persistent volume belongs. Empty
        value means that this volume does not belong to any StorageClass.
    storageos: StorageOS represents a StorageOS volume that is attached to the kubelet's
        host machine and mounted into the pod More info:
        https://examples.k8s.io/volumes/storageos/README.md
    volumeMode: volumeMode defines if a volume is intended to be used with a formatted
        filesystem or to remain in raw block state. Value of Filesystem is implied when
        not included in spec. This is a beta feature.
    vsphereVolume: VsphereVolume represents a vSphere volume attached and mounted on
        kubelets host machine
    accessModes: AccessModes contains all ways the volume can be mounted. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
    capacity: A description of the persistent volume's resources and capacity. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
    mountOptions: A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will
        simply fail if one is invalid. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
    """

    awsElasticBlockStore: Optional["AWSElasticBlockStoreVolumeSource"] = None
    azureDisk: Optional["AzureDiskVolumeSource"] = None
    azureFile: Optional["AzureFilePersistentVolumeSource"] = None
    cephfs: Optional["CephFSPersistentVolumeSource"] = None
    cinder: Optional["CinderPersistentVolumeSource"] = None
    claimRef: Optional["ObjectReference"] = None
    csi: Optional["CSIPersistentVolumeSource"] = None
    fc: Optional["FCVolumeSource"] = None
    flexVolume: Optional["FlexPersistentVolumeSource"] = None
    flocker: Optional["FlockerVolumeSource"] = None
    gcePersistentDisk: Optional["GCEPersistentDiskVolumeSource"] = None
    glusterfs: Optional["GlusterfsPersistentVolumeSource"] = None
    hostPath: Optional["HostPathVolumeSource"] = None
    iscsi: Optional["ISCSIPersistentVolumeSource"] = None
    local: Optional["LocalVolumeSource"] = None
    nfs: Optional["NFSVolumeSource"] = None
    nodeAffinity: Optional["VolumeNodeAffinity"] = None
    persistentVolumeReclaimPolicy: Optional[str] = None
    photonPersistentDisk: Optional["PhotonPersistentDiskVolumeSource"] = None
    portworxVolume: Optional["PortworxVolumeSource"] = None
    quobyte: Optional["QuobyteVolumeSource"] = None
    rbd: Optional["RBDPersistentVolumeSource"] = None
    scaleIO: Optional["ScaleIOPersistentVolumeSource"] = None
    storageClassName: Optional[str] = None
    storageos: Optional["StorageOSPersistentVolumeSource"] = None
    volumeMode: Optional[str] = None
    vsphereVolume: Optional["VsphereVirtualDiskVolumeSource"] = None
    accessModes: Optional[List[str]] = field(default_factory=list)
    capacity: Optional[Dict[str, str]] = field(default_factory=dict)
    mountOptions: Optional[List[str]] = field(default_factory=list)


@dataclass
class AWSElasticBlockStoreVolumeSource(HikaruBase):
    r"""
    Represents a Persistent Disk resource in AWS. An AWS EBS disk must exist before
    mounting to a container. The disk must also be in the same AWS zone as the kubelet. An
    AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership
    management and SELinux relabeling.

    Full name: v1.AWSElasticBlockStoreVolumeSource

    Attributes:
    volumeID: Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More
        info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
    fsType: Filesystem type of the volume that you want to mount. Tip: Ensure that the
        filesystem type is supported by the host operating system. Examples: "ext4",
        "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
    partition: The partition in the volume that you want to mount. If omitted, the default
        is to mount by volume name. Examples: For volume /dev/sda1, you specify the
        partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can
        leave the property empty).
    readOnly: Specify "true" to force and set the ReadOnly property in VolumeMounts to
        "true". If omitted, the default is "false". More info:
        https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
    """

    volumeID: str
    fsType: Optional[str] = None
    partition: Optional[int] = None
    readOnly: Optional[bool] = None


@dataclass
class AzureFilePersistentVolumeSource(HikaruBase):
    r"""
    AzureFile represents an Azure File Service mount on the host and bind mount to the
    pod.

    Full name: v1.AzureFilePersistentVolumeSource

    Attributes:
    secretName: the name of secret that contains Azure Storage Account Name and Key
    shareName: Share Name
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    secretNamespace: the namespace of the secret that contains Azure Storage Account Name
        and Key default is the same as the Pod
    """

    secretName: str
    shareName: str
    readOnly: Optional[bool] = None
    secretNamespace: Optional[str] = None


@dataclass
class CephFSPersistentVolumeSource(HikaruBase):
    r"""
    Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do
    not support ownership management or SELinux relabeling.

    Full name: v1.CephFSPersistentVolumeSource

    Attributes:
    monitors: Required: Monitors is a collection of Ceph monitors More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    path: Optional: Used as the mounted root, rather than the full Ceph tree, default is /
    readOnly: Optional: Defaults to false (read/write). ReadOnly here will force the
        ReadOnly setting in VolumeMounts. More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    secretFile: Optional: SecretFile is the path to key ring for User, default is
        /etc/ceph/user.secret More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    secretRef: Optional: SecretRef is reference to the authentication secret for User,
        default is empty. More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    user: Optional: User is the rados user name, default is admin More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    """

    monitors: List[str]
    path: Optional[str] = None
    readOnly: Optional[bool] = None
    secretFile: Optional[str] = None
    secretRef: Optional["SecretReference"] = None
    user: Optional[str] = None


@dataclass
class ObjectReference(HikaruBase):
    r"""
    ObjectReference contains enough information to let you inspect or modify the referred
    object.

    Full name: v1.ObjectReference

    Attributes:
    apiVersion: API version of the referent.
    fieldPath: If referring to a piece of an object instead of an entire object, this
        string should contain a valid JSON/Go field access statement, such as
        desiredState.manifest.containers[2]. For example, if the object reference is to a
        container within a pod, this would take on a value like: "spec.containers{name}"
        (where "name" refers to the name of the container that triggered the event) or if
        no container name is specified "spec.containers[2]" (container with index 2 in
        this pod). This syntax is chosen only to have some well-defined way of referencing
        a part of an object.
    kind: Kind of the referent. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    namespace: Namespace of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
    resourceVersion: Specific resourceVersion to which this reference is made, if any.
        More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
    uid: UID of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
    """

    apiVersion: Optional[str] = "v1"
    fieldPath: Optional[str] = None
    kind: Optional[str] = "None"
    name: Optional[str] = None
    namespace: Optional[str] = None
    resourceVersion: Optional[str] = None
    uid: Optional[str] = None


@dataclass
class CSIPersistentVolumeSource(HikaruBase):
    r"""
    Represents storage that is managed by an external CSI volume driver (Beta feature)

    Full name: v1.CSIPersistentVolumeSource

    Attributes:
    driver: Driver is the name of the driver to use for this volume. Required.
    volumeHandle: VolumeHandle is the unique volume name returned by the CSI volume
        plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.
    controllerExpandSecretRef: ControllerExpandSecretRef is a reference to the secret
        object containing sensitive information to pass to the CSI driver to complete the
        CSI ControllerExpandVolume call. This is an alpha field and requires enabling
        ExpandCSIVolumes feature gate. This field is optional, and may be empty if no
        secret is required. If the secret object contains more than one secret, all
        secrets are passed.
    controllerPublishSecretRef: ControllerPublishSecretRef is a reference to the secret
        object containing sensitive information to pass to the CSI driver to complete the
        CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is
        optional, and may be empty if no secret is required. If the secret object contains
        more than one secret, all secrets are passed.
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs".
    nodePublishSecretRef: NodePublishSecretRef is a reference to the secret object
        containing sensitive information to pass to the CSI driver to complete the CSI
        NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may
        be empty if no secret is required. If the secret object contains more than one
        secret, all secrets are passed.
    nodeStageSecretRef: NodeStageSecretRef is a reference to the secret object containing
        sensitive information to pass to the CSI driver to complete the CSI
        NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is
        optional, and may be empty if no secret is required. If the secret object contains
        more than one secret, all secrets are passed.
    readOnly: Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to
        false (read/write).
    volumeAttributes: Attributes of the volume to publish.
    """

    driver: str
    volumeHandle: str
    controllerExpandSecretRef: Optional["SecretReference"] = None
    controllerPublishSecretRef: Optional["SecretReference"] = None
    fsType: Optional[str] = None
    nodePublishSecretRef: Optional["SecretReference"] = None
    nodeStageSecretRef: Optional["SecretReference"] = None
    readOnly: Optional[bool] = None
    volumeAttributes: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class FCVolumeSource(HikaruBase):
    r"""
    Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as
    read/write once. Fibre Channel volumes support ownership management and SELinux
    relabeling.

    Full name: v1.FCVolumeSource

    Attributes:
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if
        unspecified.
    lun: Optional: FC target lun number
    readOnly: Optional: Defaults to false (read/write). ReadOnly here will force the
        ReadOnly setting in VolumeMounts.
    targetWWNs: Optional: FC target worldwide names (WWNs)
    wwids: Optional: FC volume world wide identifiers (wwids) Either wwids or combination
        of targetWWNs and lun must be set, but not both simultaneously.
    """

    fsType: Optional[str] = None
    lun: Optional[int] = None
    readOnly: Optional[bool] = None
    targetWWNs: Optional[List[str]] = field(default_factory=list)
    wwids: Optional[List[str]] = field(default_factory=list)


@dataclass
class FlexPersistentVolumeSource(HikaruBase):
    r"""
    FlexPersistentVolumeSource represents a generic persistent volume resource that is
    provisioned/attached using an exec based plugin.

    Full name: v1.FlexPersistentVolumeSource

    Attributes:
    driver: Driver is the name of the driver to use for this volume.
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on
        FlexVolume script.
    readOnly: Optional: Defaults to false (read/write). ReadOnly here will force the
        ReadOnly setting in VolumeMounts.
    secretRef: Optional: SecretRef is reference to the secret object containing sensitive
        information to pass to the plugin scripts. This may be empty if no secret object
        is specified. If the secret object contains more than one secret, all secrets are
        passed to the plugin scripts.
    options: Optional: Extra command options if any.
    """

    driver: str
    fsType: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["SecretReference"] = None
    options: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class GCEPersistentDiskVolumeSource(HikaruBase):
    r"""
    Represents a Persistent Disk resource in Google Compute Engine. A GCE PD must exist
    before mounting to a container. The disk must also be in the same GCE project and zone
    as the kubelet. A GCE PD can only be mounted as read/write once or read-only many
    times. GCE PDs support ownership management and SELinux relabeling.

    Full name: v1.GCEPersistentDiskVolumeSource

    Attributes:
    pdName: Unique name of the PD resource in GCE. Used to identify the disk in GCE. More
        info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    fsType: Filesystem type of the volume that you want to mount. Tip: Ensure that the
        filesystem type is supported by the host operating system. Examples: "ext4",
        "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    partition: The partition in the volume that you want to mount. If omitted, the default
        is to mount by volume name. Examples: For volume /dev/sda1, you specify the
        partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can
        leave the property empty). More info:
        https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    readOnly: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to
        false. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    """

    pdName: str
    fsType: Optional[str] = None
    partition: Optional[int] = None
    readOnly: Optional[bool] = None


@dataclass
class GlusterfsPersistentVolumeSource(HikaruBase):
    r"""
    Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do
    not support ownership management or SELinux relabeling.

    Full name: v1.GlusterfsPersistentVolumeSource

    Attributes:
    endpoints: EndpointsName is the endpoint name that details Glusterfs topology. More
        info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
    path: Path is the Glusterfs volume path. More info:
        https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
    endpointsNamespace: EndpointsNamespace is the namespace that contains Glusterfs
        endpoint. If this field is empty, the EndpointNamespace defaults to the same
        namespace as the bound PVC. More info:
        https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
    readOnly: ReadOnly here will force the Glusterfs volume to be mounted with read-only
        permissions. Defaults to false. More info:
        https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
    """

    endpoints: str
    path: str
    endpointsNamespace: Optional[str] = None
    readOnly: Optional[bool] = None


@dataclass
class HostPathVolumeSource(HikaruBase):
    r"""
    Represents a host path mapped into a pod. Host path volumes do not support ownership
    management or SELinux relabeling.

    Full name: v1.HostPathVolumeSource

    Attributes:
    path: Path of the directory on the host. If the path is a symlink, it will follow the
        link to the real path. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#hostpath
    type: Type for HostPath Volume Defaults to "" More info:
        https://kubernetes.io/docs/concepts/storage/volumes#hostpath
    """

    path: str
    type: Optional[str] = None


@dataclass
class ISCSIPersistentVolumeSource(HikaruBase):
    r"""
    ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be
    mounted as read/write once. ISCSI volumes support ownership management and SELinux
    relabeling.

    Full name: v1.ISCSIPersistentVolumeSource

    Attributes:
    iqn: Target iSCSI Qualified Name.
    lun: iSCSI Target Lun number.
    targetPortal: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the
        port is other than default (typically TCP ports 860 and 3260).
    chapAuthDiscovery: whether support iSCSI Discovery CHAP authentication
    chapAuthSession: whether support iSCSI Session CHAP authentication
    fsType: Filesystem type of the volume that you want to mount. Tip: Ensure that the
        filesystem type is supported by the host operating system. Examples: "ext4",
        "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#iscsi
    initiatorName: Custom iSCSI Initiator Name. If initiatorName is specified with
        iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name>
        will be created for the connection.
    iscsiInterface: iSCSI Interface Name that uses an iSCSI transport. Defaults to
        'default' (tcp).
    readOnly: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to
        false.
    secretRef: CHAP Secret for iSCSI target and initiator authentication
    portals: iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the
        port is other than default (typically TCP ports 860 and 3260).
    """

    iqn: str
    lun: int
    targetPortal: str
    chapAuthDiscovery: Optional[bool] = None
    chapAuthSession: Optional[bool] = None
    fsType: Optional[str] = None
    initiatorName: Optional[str] = None
    iscsiInterface: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["SecretReference"] = None
    portals: Optional[List[str]] = field(default_factory=list)


@dataclass
class LocalVolumeSource(HikaruBase):
    r"""
    Local represents directly-attached storage with node affinity (Beta feature)

    Full name: v1.LocalVolumeSource

    Attributes:
    path: The full path to the volume on the node. It can be either a directory or block
        device (disk, partition, ...).
    fsType: Filesystem type to mount. It applies only when the Path is a block device.
        Must be a filesystem type supported by the host operating system. Ex. "ext4",
        "xfs", "ntfs". The default value is to auto-select a fileystem if unspecified.
    """

    path: str
    fsType: Optional[str] = None


@dataclass
class NFSVolumeSource(HikaruBase):
    r"""
    Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support
    ownership management or SELinux relabeling.

    Full name: v1.NFSVolumeSource

    Attributes:
    path: Path that is exported by the NFS server. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#nfs
    server: Server is the hostname or IP address of the NFS server. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#nfs
    readOnly: ReadOnly here will force the NFS export to be mounted with read-only
        permissions. Defaults to false. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#nfs
    """

    path: str
    server: str
    readOnly: Optional[bool] = None


@dataclass
class VolumeNodeAffinity(HikaruBase):
    r"""
    VolumeNodeAffinity defines constraints that limit what nodes this volume can be
    accessed from.

    Full name: v1.VolumeNodeAffinity

    Attributes:
    required: Required specifies hard node constraints that must be met.
    """

    required: Optional["NodeSelector"] = None


@dataclass
class PhotonPersistentDiskVolumeSource(HikaruBase):
    r"""
    Represents a Photon Controller persistent disk resource.

    Full name: v1.PhotonPersistentDiskVolumeSource

    Attributes:
    pdID: ID that identifies Photon Controller persistent disk
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if
        unspecified.
    """

    pdID: str
    fsType: Optional[str] = None


@dataclass
class PortworxVolumeSource(HikaruBase):
    r"""
    PortworxVolumeSource represents a Portworx volume resource.

    Full name: v1.PortworxVolumeSource

    Attributes:
    volumeID: VolumeID uniquely identifies a Portworx volume
    fsType: FSType represents the filesystem type to mount Must be a filesystem type
        supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to
        be "ext4" if unspecified.
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    """

    volumeID: str
    fsType: Optional[str] = None
    readOnly: Optional[bool] = None


@dataclass
class QuobyteVolumeSource(HikaruBase):
    r"""
    Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not
    support ownership management or SELinux relabeling.

    Full name: v1.QuobyteVolumeSource

    Attributes:
    registry: Registry represents a single or multiple Quobyte Registry services specified
        as a string as host:port pair (multiple entries are separated with commas) which
        acts as the central registry for volumes
    volume: Volume is a string that references an already created Quobyte volume by name.
    group: Group to map volume access to Default is no group
    readOnly: ReadOnly here will force the Quobyte volume to be mounted with read-only
        permissions. Defaults to false.
    tenant: Tenant owning the given Quobyte volume in the Backend Used with dynamically
        provisioned Quobyte volumes, value is set by the plugin
    user: User to map volume access to Defaults to serivceaccount user
    """

    registry: str
    volume: str
    group: Optional[str] = None
    readOnly: Optional[bool] = None
    tenant: Optional[str] = None
    user: Optional[str] = None


@dataclass
class RBDPersistentVolumeSource(HikaruBase):
    r"""
    Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes
    support ownership management and SELinux relabeling.

    Full name: v1.RBDPersistentVolumeSource

    Attributes:
    image: The rados image name. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    monitors: A collection of Ceph monitors. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    fsType: Filesystem type of the volume that you want to mount. Tip: Ensure that the
        filesystem type is supported by the host operating system. Examples: "ext4",
        "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#rbd
    keyring: Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring.
        More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    pool: The rados pool name. Default is rbd. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    readOnly: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to
        false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    secretRef: SecretRef is name of the authentication secret for RBDUser. If provided
        overrides keyring. Default is nil. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    user: The rados user name. Default is admin. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    """

    image: str
    monitors: List[str]
    fsType: Optional[str] = None
    keyring: Optional[str] = None
    pool: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["SecretReference"] = None
    user: Optional[str] = None


@dataclass
class ScaleIOPersistentVolumeSource(HikaruBase):
    r"""
    ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume

    Full name: v1.ScaleIOPersistentVolumeSource

    Attributes:
    gateway: The host address of the ScaleIO API Gateway.
    secretRef: SecretRef references to the secret for ScaleIO user and other sensitive
        information. If this is not provided, Login operation will fail.
    system: The name of the storage system as configured in ScaleIO.
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs"
    protectionDomain: The name of the ScaleIO Protection Domain for the configured
        storage.
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    sslEnabled: Flag to enable/disable SSL communication with Gateway, default false
    storageMode: Indicates whether the storage for a volume should be ThickProvisioned or
        ThinProvisioned. Default is ThinProvisioned.
    storagePool: The ScaleIO Storage Pool associated with the protection domain.
    volumeName: The name of a volume already created in the ScaleIO system that is
        associated with this volume source.
    """

    gateway: str
    secretRef: "SecretReference"
    system: str
    fsType: Optional[str] = None
    protectionDomain: Optional[str] = None
    readOnly: Optional[bool] = None
    sslEnabled: Optional[bool] = None
    storageMode: Optional[str] = None
    storagePool: Optional[str] = None
    volumeName: Optional[str] = None


@dataclass
class StorageOSPersistentVolumeSource(HikaruBase):
    r"""
    Represents a StorageOS persistent volume resource.

    Full name: v1.StorageOSPersistentVolumeSource

    Attributes:
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if
        unspecified.
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    secretRef: SecretRef specifies the secret to use for obtaining the StorageOS API
        credentials. If not specified, default values will be attempted.
    volumeName: VolumeName is the human-readable name of the StorageOS volume. Volume
        names are only unique within a namespace.
    volumeNamespace: VolumeNamespace specifies the scope of the volume within StorageOS.
        If no namespace is specified then the Pod's namespace will be used. This allows
        the Kubernetes name scoping to be mirrored within StorageOS for tighter
        integration. Set VolumeName to any name to override the default behaviour. Set to
        "default" if you are not using namespaces within StorageOS. Namespaces that do not
        pre-exist within StorageOS will be created.
    """

    fsType: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["ObjectReference"] = None
    volumeName: Optional[str] = None
    volumeNamespace: Optional[str] = None


@dataclass
class VsphereVirtualDiskVolumeSource(HikaruBase):
    r"""
    Represents a vSphere volume resource.

    Full name: v1.VsphereVirtualDiskVolumeSource

    Attributes:
    volumePath: Path that identifies vSphere volume vmdk
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if
        unspecified.
    storagePolicyID: Storage Policy Based Management (SPBM) profile ID associated with the
        StoragePolicyName.
    storagePolicyName: Storage Policy Based Management (SPBM) profile name.
    """

    volumePath: str
    fsType: Optional[str] = None
    storagePolicyID: Optional[str] = None
    storagePolicyName: Optional[str] = None


@dataclass
class ClusterRoleBinding(HikaruDocumentBase):
    r"""
    ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a
    ClusterRole in the global namespace, and adds who information via Subject.

    Full name: v1.ClusterRoleBinding

    Attributes:
    roleRef: RoleRef can only reference a ClusterRole in the global namespace. If the
        RoleRef cannot be resolved, the Authorizer must return an error.
    apiVersion: 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: 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: Standard object's metadata.
    subjects: Subjects holds references to the objects the role applies to.
    """

    _version = "v1"
    roleRef: "RoleRef"
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "ClusterRoleBinding"
    metadata: Optional["ObjectMeta"] = None
    subjects: Optional[List["Subject"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Subject(HikaruBase):
    r"""
    Subject contains a reference to the object or user identities a role binding applies
    to. This can either hold a direct API object reference, or a value for non-objects
    such as user and group names.

    Full name: v1.Subject

    Attributes:
    kind: Kind of object being referenced. Values defined by this API group are "User",
        "Group", and "ServiceAccount". If the Authorizer does not recognized the kind
        value, the Authorizer should report an error.
    name: Name of the object being referenced.
    apiGroup: APIGroup holds the API group of the referenced subject. Defaults to "" for
        ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and
        Group subjects.
    namespace: Namespace of the referenced object. If the object kind is non-namespace,
        such as "User" or "Group", and this value is not empty the Authorizer should
        report an error.
    """

    kind: str
    name: str
    apiGroup: Optional[str] = None
    namespace: Optional[str] = None


@dataclass
class LocalSubjectAccessReview(HikaruDocumentBase):
    r"""
    LocalSubjectAccessReview checks whether or not a user or group can perform an action
    in a given namespace. Having a namespace scoped resource makes it much easier to grant
    namespace scoped policy that includes permissions checking.

    Full name: v1.LocalSubjectAccessReview

    Attributes:
    spec: Spec holds information about the request being evaluated. spec.namespace must be
        equal to the namespace you made the request against. If empty, it is defaulted.
    apiVersion: 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: 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:
    status: Status is filled in by the server and indicates whether the request is allowed
        or not
    """

    _version = "v1"
    spec: "SubjectAccessReviewSpec"
    apiVersion: Optional[str] = "authorization.k8s.io/v1"
    kind: Optional[str] = "LocalSubjectAccessReview"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["SubjectAccessReviewStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class SubjectAccessReviewSpec(HikaruBase):
    r"""
    SubjectAccessReviewSpec is a description of the access request. Exactly one of
    ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set

    Full name: v1.SubjectAccessReviewSpec

    Attributes:
    nonResourceAttributes: NonResourceAttributes describes information for a non-resource
        access request
    resourceAttributes: ResourceAuthorizationAttributes describes information for a
        resource access request
    uid: UID information about the requesting user.
    user: User is the user you're testing for. If you specify "User" but not "Groups",
        then is it interpreted as "What if User were not a member of any groups
    extra: Extra corresponds to the user.Info.GetExtra() method from the authenticator.
        Since that is input to the authorizer it needs a reflection here.
    groups: Groups is the groups you're testing for.
    """

    nonResourceAttributes: Optional["NonResourceAttributes"] = None
    resourceAttributes: Optional["ResourceAttributes"] = None
    uid: Optional[str] = None
    user: Optional[str] = None
    extra: Optional[Dict[str, str]] = field(default_factory=dict)
    groups: Optional[List[str]] = field(default_factory=list)


@dataclass
class SubjectAccessReviewStatus(HikaruBase):
    r"""
    SubjectAccessReviewStatus

    Full name: v1.SubjectAccessReviewStatus

    Attributes:
    allowed: Allowed is required. True if the action would be allowed, false otherwise.
    denied: Denied is optional. True if the action would be denied, otherwise false. If
        both allowed is false and denied is false, then the authorizer has no opinion on
        whether to authorize the action. Denied may not be true if Allowed is true.
    evaluationError: EvaluationError is an indication that some error occurred during the
        authorization check. It is entirely possible to get an error and be able to
        continue determine authorization status in spite of it. For instance, RBAC can be
        missing a role, but enough roles are still present and bound to reason about the
        request.
    reason: Reason is optional. It indicates why a request was allowed or denied.
    """

    allowed: bool
    denied: Optional[bool] = None
    evaluationError: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class PersistentVolume(HikaruDocumentBase):
    r"""
    PersistentVolume (PV) is a storage resource provisioned by an administrator. It is
    analogous to a node. More info:
    https://kubernetes.io/docs/concepts/storage/persistent-volumes

    Full name: PersistentVolume

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines a specification of a persistent volume owned by the cluster.
        Provisioned by an administrator. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
    status: Status represents the current information/status for the persistent volume.
        Populated by the system. Read-only. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "PersistentVolume"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["PersistentVolumeSpec"] = None
    status: Optional["PersistentVolumeStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PersistentVolumeList(HikaruDocumentBase):
    r"""
    PersistentVolumeList is a list of PersistentVolume items.

    Full name: v1.PersistentVolumeList

    Attributes:
    items: List of persistent volumes. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["PersistentVolume"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "PersistentVolumeList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class NamespaceSpec(HikaruBase):
    r"""
    NamespaceSpec describes the attributes on a Namespace.

    Full name: v1.NamespaceSpec

    Attributes:
    finalizers: Finalizers is an opaque list of values that must be empty to permanently
        remove object from storage. More info:
        https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
    """

    finalizers: Optional[List[str]] = field(default_factory=list)


@dataclass
class Lease(HikaruDocumentBase):
    r"""
    Lease defines a lease concept.

    Full name: Lease

    Attributes:
    apiVersion: 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: 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: More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Specification of the Lease. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "coordination.k8s.io/v1"
    kind: Optional[str] = "Lease"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["LeaseSpec"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class LeaseList(HikaruDocumentBase):
    r"""
    LeaseList is a list of Lease objects.

    Full name: v1.LeaseList

    Attributes:
    items: Items is a list of schema objects.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["Lease"]
    apiVersion: Optional[str] = "coordination.k8s.io/v1"
    kind: Optional[str] = "LeaseList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class StatusDetails(HikaruBase):
    r"""
    StatusDetails is a set of additional properties that MAY be set by the server to
    provide additional information about a response. The Reason field of a Status object
    defines what attributes will be set. Clients must ignore fields that do not match the
    defined type of each attribute, and should assume that any attribute may be empty,
    invalid, or under defined.

    Full name: v1.StatusDetails

    Attributes:
    group: The group attribute of the resource associated with the status StatusReason.
    kind: The kind attribute of the resource associated with the status StatusReason. On
        some operations may differ from the requested resource Kind. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    name: The name attribute of the resource associated with the status StatusReason (when
        there is a single name which can be described).
    retryAfterSeconds: If specified, the time in seconds before the operation should be
        retried. Some errors may indicate the client must take an alternate action - for
        those errors this field may indicate how long to wait before taking the alternate
        action.
    uid: UID of the resource. (when there is a single resource which can be described).
        More info: http://kubernetes.io/docs/user-guide/identifiers#uids
    causes: The Causes array includes more details associated with the StatusReason
        failure. Not all StatusReasons may provide detailed causes.
    """

    group: Optional[str] = None
    kind: Optional[str] = "None"
    name: Optional[str] = None
    retryAfterSeconds: Optional[int] = None
    uid: Optional[str] = None
    causes: Optional[List["StatusCause"]] = field(default_factory=list)


@dataclass
class StatusCause(HikaruBase):
    r"""
    StatusCause provides more information about an api.Status failure, including cases
    when multiple errors are encountered.

    Full name: v1.StatusCause

    Attributes:
    field: The field of the resource that has caused this error, as named by its JSON
        serialization. May include dot and postfix notation for nested attributes. Arrays
        are zero-indexed. Fields may appear more than once in an array of causes due to
        fields having multiple errors. Optional. Examples: "name" - the field "name" on
        the current resource "items[0].name" - the field "name" on the first array entry
        in "items"
    message: A human-readable description of the cause of the error. This field may be
        presented as-is to a reader.
    reason: A machine-readable description of the cause of the error. If this value is
        empty there is no information available.
    """

    field: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class ContainerStateWaiting(HikaruBase):
    r"""
    ContainerStateWaiting is a waiting state of a container.

    Full name: v1.ContainerStateWaiting

    Attributes:
    message: Message regarding why the container is not yet running.
    reason: (brief) reason the container is not yet running.
    """

    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class APIServiceStatus(HikaruBase):
    r"""
    APIServiceStatus contains derived information about an API server

    Full name: v1.APIServiceStatus

    Attributes:
    conditions: Current service state of apiService.
    """

    conditions: Optional[List["APIServiceCondition"]] = field(default_factory=list)


@dataclass
class APIServiceCondition(HikaruBase):
    r"""
    APIServiceCondition describes the state of an APIService at a particular point

    Full name: v1.APIServiceCondition

    Attributes:
    status: Status is the status of the condition. Can be True, False, Unknown.
    type: Type is the type of the condition.
    lastTransitionTime: Last time the condition transitioned from one status to another.
    message: Human-readable message indicating details about last transition.
    reason: Unique, one-word, CamelCase reason for the condition's last transition.
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class PersistentVolumeClaimStatus(HikaruBase):
    r"""
    PersistentVolumeClaimStatus is the current status of a persistent volume claim.

    Full name: v1.PersistentVolumeClaimStatus

    Attributes:
    phase: Phase represents the current phase of PersistentVolumeClaim.
    accessModes: AccessModes contains the actual access modes the volume backing the PVC
        has. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
    capacity: Represents the actual resources of the underlying volume.
    conditions: Current Condition of persistent volume claim. If underlying persistent
        volume is being resized then the Condition will be set to 'ResizeStarted'.
    """

    phase: Optional[str] = None
    accessModes: Optional[List[str]] = field(default_factory=list)
    capacity: Optional[Dict[str, str]] = field(default_factory=dict)
    conditions: Optional[List["PersistentVolumeClaimCondition"]] = field(
        default_factory=list
    )


@dataclass
class PersistentVolumeClaimCondition(HikaruBase):
    r"""
    PersistentVolumeClaimCondition contails details about state of pvc

    Full name: v1.PersistentVolumeClaimCondition

    Attributes:
    status:
    type:
    lastProbeTime: Last time we probed the condition.
    lastTransitionTime: Last time the condition transitioned from one status to another.
    message: Human-readable message indicating details about last transition.
    reason: Unique, this should be a short, machine understandable string that gives the
        reason for condition's last transition. If it reports "ResizeStarted" that means
        the underlying persistent volume is being resized.
    """

    status: str
    type: str
    lastProbeTime: Optional[str] = None
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class ConfigMapProjection(HikaruBase):
    r"""
    Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's
    Data field will be presented in a projected volume as files using the keys in the Data
    field as the file names, unless the items element is populated with specific mappings
    of keys to paths. Note that this is identical to a configmap volume source without the
    default mode.

    Full name: v1.ConfigMapProjection

    Attributes:
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    optional: Specify whether the ConfigMap or its keys must be defined
    items: If unspecified, each key-value pair in the Data field of the referenced
        ConfigMap will be projected into the volume as a file whose name is the key and
        content is the value. If specified, the listed keys will be projected into the
        specified paths, and unlisted keys will not be present. If a key is specified
        which is not present in the ConfigMap, the volume setup will error unless it is
        marked optional. Paths must be relative and may not contain the '..' path or start
        with '..'.
    """

    name: Optional[str] = None
    optional: Optional[bool] = None
    items: Optional[List["KeyToPath"]] = field(default_factory=list)


@dataclass
class KeyToPath(HikaruBase):
    r"""
    Maps a string key to a path within a volume.

    Full name: v1.KeyToPath

    Attributes:
    key: The key to project.
    path: The relative path of the file to map the key to. May not be an absolute path.
        May not contain the path element '..'. May not start with the string '..'.
    mode: Optional: mode bits to use on this file, must be a value between 0 and 0777. If
        not specified, the volume defaultMode will be used. This might be in conflict with
        other options that affect the file mode, like fsGroup, and the result can be other
        mode bits set.
    """

    key: str
    path: str
    mode: Optional[int] = None


@dataclass
class Sysctl(HikaruBase):
    r"""
    Sysctl defines a kernel parameter to be set

    Full name: v1.Sysctl

    Attributes:
    name: Name of a property to set
    value: Value of a property to set
    """

    name: str
    value: str


@dataclass
class WebhookClientConfig(HikaruBase):
    r"""
    WebhookClientConfig contains the information to make a TLS connection with the
    webhook.

    Full name: admissionregistration.v1.WebhookClientConfig

    Attributes:
    caBundle: caBundle is a PEM encoded CA bundle which will be used to validate the
        webhook's server certificate. If unspecified, system trust roots on the apiserver
        are used.
    service: service is a reference to the service for this webhook. Either service or url
        must be specified. If the webhook is running within the cluster, then you should
        use `service`.
    url: url gives the location of the webhook, in standard URL form
        (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.
        The `host` should not refer to a service running in the cluster; use the `service`
        field instead. The host might be resolved via external DNS in some apiservers
        (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering
        violation). `host` may also be an IP address. Please note that using `localhost`
        or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook
        on all hosts which run an apiserver which might need to make calls to this
        webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in
        a new cluster. The scheme must be "https"; the URL must begin with "https://". A
        path is optional, and if present may be any string permissible in a URL. You may
        use the path to pass an arbitrary string to the webhook, for example, a cluster
        identifier. Attempting to use a user or basic auth e.g. "user:password@" is not
        allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either.
    """

    caBundle: Optional[str] = None
    service: Optional["ServiceReference"] = None
    url: Optional[str] = None


@dataclass
class RuleWithOperations(HikaruBase):
    r"""
    RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
    sure that all the tuple expansions are valid.

    Full name: v1.RuleWithOperations

    Attributes:
    scope: scope specifies the scope of this rule. Valid values are "Cluster",
        "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will
        match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that
        only namespaced resources will match this rule. "*" means that there are no scope
        restrictions. Subresources match the scope of their parent resource. Default is
        "*".
    apiGroups: APIGroups is the API groups the resources belong to. '*' is all groups. If
        '*' is present, the length of the slice must be one. Required.
    apiVersions: APIVersions is the API versions the resources belong to. '*' is all
        versions. If '*' is present, the length of the slice must be one. Required.
    operations: Operations is the operations the admission hook cares about - CREATE,
        UPDATE, or * for all operations. If '*' is present, the length of the slice must
        be one. Required.
    resources: Resources is a list of resources this rule applies to. For example: 'pods'
        means pods. 'pods/log' means the log subresource of pods. '*' means all resources,
        but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all
        scale subresources. '*/*' means all resources and their subresources. If wildcard
        is present, the validation rule will ensure resources do not overlap with each
        other. Depending on the enclosing object, subresources might not be allowed.
        Required.
    """

    scope: Optional[str] = None
    apiGroups: Optional[List[str]] = field(default_factory=list)
    apiVersions: Optional[List[str]] = field(default_factory=list)
    operations: Optional[List[str]] = field(default_factory=list)
    resources: Optional[List[str]] = field(default_factory=list)


@dataclass
class OwnerReference(HikaruBase):
    r"""
    OwnerReference contains enough information to let you identify an owning object. An
    owning object must be in the same namespace as the dependent, or be cluster-scoped, so
    there is no namespace field.

    Full name: v1.OwnerReference

    Attributes:
    apiVersion: API version of the referent.
    kind: Kind of the referent. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    name: Name of the referent. More info:
        http://kubernetes.io/docs/user-guide/identifiers#names
    uid: UID of the referent. More info:
        http://kubernetes.io/docs/user-guide/identifiers#uids
    blockOwnerDeletion: If true, AND if the owner has the "foregroundDeletion" finalizer,
        then the owner cannot be deleted from the key-value store until this reference is
        removed. Defaults to false. To set this field, a user needs "delete" permission of
        the owner, otherwise 422 (Unprocessable Entity) will be returned.
    controller: If true, this reference points to the managing controller.
    """

    apiVersion: str
    kind: str
    name: str
    uid: str
    blockOwnerDeletion: Optional[bool] = None
    controller: Optional[bool] = None


@dataclass
class PersistentVolumeClaimSpec(HikaruBase):
    r"""
    PersistentVolumeClaimSpec describes the common attributes of storage devices and
    allows a Source for provider-specific attributes

    Full name: v1.PersistentVolumeClaimSpec

    Attributes:
    dataSource: This field requires the VolumeSnapshotDataSource alpha feature gate to be
        enabled and currently VolumeSnapshot is the only supported data source. If the
        provisioner can support VolumeSnapshot data source, it will create a new volume
        and data will be restored to the volume at the same time. If the provisioner does
        not support VolumeSnapshot data source, volume will not be created and the failure
        will be reported as an event. In the future, we plan to support more data source
        types and the behavior of the provisioner may change.
    resources: Resources represents the minimum resources the volume should have. More
        info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
    selector: A label query over volumes to consider for binding.
    storageClassName: Name of the StorageClass required by the claim. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
    volumeMode: volumeMode defines what type of volume is required by the claim. Value of
        Filesystem is implied when not included in claim spec. This is a beta feature.
    volumeName: VolumeName is the binding reference to the PersistentVolume backing this
        claim.
    accessModes: AccessModes contains the desired access modes the volume should have.
        More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
    """

    dataSource: Optional["TypedLocalObjectReference"] = None
    resources: Optional["ResourceRequirements"] = None
    selector: Optional["LabelSelector"] = None
    storageClassName: Optional[str] = None
    volumeMode: Optional[str] = None
    volumeName: Optional[str] = None
    accessModes: Optional[List[str]] = field(default_factory=list)


@dataclass
class Toleration(HikaruBase):
    r"""
    The pod this Toleration is attached to tolerates any taint that matches the triple
    <key,value,effect> using the matching operator <operator>.

    Full name: v1.Toleration

    Attributes:
    effect: Effect indicates the taint effect to match. Empty means match all taint
        effects. When specified, allowed values are NoSchedule, PreferNoSchedule and
        NoExecute.
    key: Key is the taint key that the toleration applies to. Empty means match all taint
        keys. If the key is empty, operator must be Exists; this combination means to
        match all values and all keys.
    operator: Operator represents a key's relationship to the value. Valid operators are
        Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value,
        so that a pod can tolerate all taints of a particular category.
    tolerationSeconds: TolerationSeconds represents the period of time the toleration
        (which must be of effect NoExecute, otherwise this field is ignored) tolerates the
        taint. By default, it is not set, which means tolerate the taint forever (do not
        evict). Zero and negative values will be treated as 0 (evict immediately) by the
        system.
    value: Value is the taint value the toleration matches to. If the operator is Exists,
        the value should be empty, otherwise just a regular string.
    """

    effect: Optional[str] = None
    key: Optional[str] = None
    operator: Optional[str] = None
    tolerationSeconds: Optional[int] = None
    value: Optional[str] = None


@dataclass
class AzureFileVolumeSource(HikaruBase):
    r"""
    AzureFile represents an Azure File Service mount on the host and bind mount to the
    pod.

    Full name: v1.AzureFileVolumeSource

    Attributes:
    secretName: the name of secret that contains Azure Storage Account Name and Key
    shareName: Share Name
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    """

    secretName: str
    shareName: str
    readOnly: Optional[bool] = None


@dataclass
class CephFSVolumeSource(HikaruBase):
    r"""
    Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do
    not support ownership management or SELinux relabeling.

    Full name: v1.CephFSVolumeSource

    Attributes:
    monitors: Required: Monitors is a collection of Ceph monitors More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    path: Optional: Used as the mounted root, rather than the full Ceph tree, default is /
    readOnly: Optional: Defaults to false (read/write). ReadOnly here will force the
        ReadOnly setting in VolumeMounts. More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    secretFile: Optional: SecretFile is the path to key ring for User, default is
        /etc/ceph/user.secret More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    secretRef: Optional: SecretRef is reference to the authentication secret for User,
        default is empty. More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    user: Optional: User is the rados user name, default is admin More info:
        https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
    """

    monitors: List[str]
    path: Optional[str] = None
    readOnly: Optional[bool] = None
    secretFile: Optional[str] = None
    secretRef: Optional["LocalObjectReference"] = None
    user: Optional[str] = None


@dataclass
class ConfigMapVolumeSource(HikaruBase):
    r"""
    Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data field
    will be presented in a volume as files using the keys in the Data field as the file
    names, unless the items element is populated with specific mappings of keys to paths.
    ConfigMap volumes support ownership management and SELinux relabeling.

    Full name: v1.ConfigMapVolumeSource

    Attributes:
    defaultMode: Optional: mode bits to use on created files by default. Must be a value
        between 0 and 0777. Defaults to 0644. Directories within the path are not affected
        by this setting. This might be in conflict with other options that affect the file
        mode, like fsGroup, and the result can be other mode bits set.
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    optional: Specify whether the ConfigMap or its keys must be defined
    items: If unspecified, each key-value pair in the Data field of the referenced
        ConfigMap will be projected into the volume as a file whose name is the key and
        content is the value. If specified, the listed keys will be projected into the
        specified paths, and unlisted keys will not be present. If a key is specified
        which is not present in the ConfigMap, the volume setup will error unless it is
        marked optional. Paths must be relative and may not contain the '..' path or start
        with '..'.
    """

    defaultMode: Optional[int] = None
    name: Optional[str] = None
    optional: Optional[bool] = None
    items: Optional[List["KeyToPath"]] = field(default_factory=list)


@dataclass
class CSIVolumeSource(HikaruBase):
    r"""
    Represents a source location of a volume to mount, managed by an external CSI driver

    Full name: v1.CSIVolumeSource

    Attributes:
    driver: Driver is the name of the CSI driver that handles this volume. Consult with
        your admin for the correct name as registered in the cluster.
    fsType: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the
        empty value is passed to the associated CSI driver which will determine the
        default filesystem to apply.
    nodePublishSecretRef: NodePublishSecretRef is a reference to the secret object
        containing sensitive information to pass to the CSI driver to complete the CSI
        NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may
        be empty if no secret is required. If the secret object contains more than one
        secret, all secret references are passed.
    readOnly: Specifies a read-only configuration for the volume. Defaults to false
        (read/write).
    volumeAttributes: VolumeAttributes stores driver-specific properties that are passed
        to the CSI driver. Consult your driver's documentation for supported values.
    """

    driver: str
    fsType: Optional[str] = None
    nodePublishSecretRef: Optional["LocalObjectReference"] = None
    readOnly: Optional[bool] = None
    volumeAttributes: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class DownwardAPIVolumeSource(HikaruBase):
    r"""
    DownwardAPIVolumeSource represents a volume containing downward API info. Downward API
    volumes support ownership management and SELinux relabeling.

    Full name: v1.DownwardAPIVolumeSource

    Attributes:
    defaultMode: Optional: mode bits to use on created files by default. Must be a value
        between 0 and 0777. Defaults to 0644. Directories within the path are not affected
        by this setting. This might be in conflict with other options that affect the file
        mode, like fsGroup, and the result can be other mode bits set.
    items: Items is a list of downward API volume file
    """

    defaultMode: Optional[int] = None
    items: Optional[List["DownwardAPIVolumeFile"]] = field(default_factory=list)


@dataclass
class EmptyDirVolumeSource(HikaruBase):
    r"""
    Represents an empty directory for a pod. Empty directory volumes support ownership
    management and SELinux relabeling.

    Full name: v1.EmptyDirVolumeSource

    Attributes:
    medium: What type of storage medium should back this directory. The default is ""
        which means to use the node's default medium. Must be an empty string (default) or
        Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
    sizeLimit: Total amount of local storage required for this EmptyDir volume. The size
        limit is also applicable for memory medium. The maximum usage on memory medium
        EmptyDir would be the minimum value between the SizeLimit specified here and the
        sum of memory limits of all containers in a pod. The default is nil which means
        that the limit is undefined. More info:
        http://kubernetes.io/docs/user-guide/volumes#emptydir
    """

    medium: Optional[str] = None
    sizeLimit: Optional[str] = None


@dataclass
class FlexVolumeSource(HikaruBase):
    r"""
    FlexVolume represents a generic volume resource that is provisioned/attached using an
    exec based plugin.

    Full name: v1.FlexVolumeSource

    Attributes:
    driver: Driver is the name of the driver to use for this volume.
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on
        FlexVolume script.
    readOnly: Optional: Defaults to false (read/write). ReadOnly here will force the
        ReadOnly setting in VolumeMounts.
    secretRef: Optional: SecretRef is reference to the secret object containing sensitive
        information to pass to the plugin scripts. This may be empty if no secret object
        is specified. If the secret object contains more than one secret, all secrets are
        passed to the plugin scripts.
    options: Optional: Extra command options if any.
    """

    driver: str
    fsType: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["LocalObjectReference"] = None
    options: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class GitRepoVolumeSource(HikaruBase):
    r"""
    Represents a volume that is populated with the contents of a git repository. Git repo
    volumes do not support ownership management. Git repo volumes support SELinux
    relabeling. DEPRECATED: GitRepo is deprecated. To provision a container with a git
    repo, mount an EmptyDir into an InitContainer that clones the repo using git, then
    mount the EmptyDir into the Pod's container.

    Full name: v1.GitRepoVolumeSource

    Attributes:
    repository: Repository URL
    directory: Target directory name. Must not contain or start with '..'. If '.' is
        supplied, the volume directory will be the git repository. Otherwise, if
        specified, the volume will contain the git repository in the subdirectory with the
        given name.
    revision: Commit hash for the specified revision.
    """

    repository: str
    directory: Optional[str] = None
    revision: Optional[str] = None


@dataclass
class GlusterfsVolumeSource(HikaruBase):
    r"""
    Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do
    not support ownership management or SELinux relabeling.

    Full name: v1.GlusterfsVolumeSource

    Attributes:
    endpoints: EndpointsName is the endpoint name that details Glusterfs topology. More
        info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
    path: Path is the Glusterfs volume path. More info:
        https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
    readOnly: ReadOnly here will force the Glusterfs volume to be mounted with read-only
        permissions. Defaults to false. More info:
        https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
    """

    endpoints: str
    path: str
    readOnly: Optional[bool] = None


@dataclass
class ISCSIVolumeSource(HikaruBase):
    r"""
    Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI
    volumes support ownership management and SELinux relabeling.

    Full name: v1.ISCSIVolumeSource

    Attributes:
    iqn: Target iSCSI Qualified Name.
    lun: iSCSI Target Lun number.
    targetPortal: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the
        port is other than default (typically TCP ports 860 and 3260).
    chapAuthDiscovery: whether support iSCSI Discovery CHAP authentication
    chapAuthSession: whether support iSCSI Session CHAP authentication
    fsType: Filesystem type of the volume that you want to mount. Tip: Ensure that the
        filesystem type is supported by the host operating system. Examples: "ext4",
        "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#iscsi
    initiatorName: Custom iSCSI Initiator Name. If initiatorName is specified with
        iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name>
        will be created for the connection.
    iscsiInterface: iSCSI Interface Name that uses an iSCSI transport. Defaults to
        'default' (tcp).
    readOnly: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to
        false.
    secretRef: CHAP Secret for iSCSI target and initiator authentication
    portals: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the
        port is other than default (typically TCP ports 860 and 3260).
    """

    iqn: str
    lun: int
    targetPortal: str
    chapAuthDiscovery: Optional[bool] = None
    chapAuthSession: Optional[bool] = None
    fsType: Optional[str] = None
    initiatorName: Optional[str] = None
    iscsiInterface: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["LocalObjectReference"] = None
    portals: Optional[List[str]] = field(default_factory=list)


@dataclass
class PersistentVolumeClaimVolumeSource(HikaruBase):
    r"""
    PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
    This volume finds the bound PV and mounts that volume for the pod. A
    PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of
    volume that is owned by someone else (the system).

    Full name: v1.PersistentVolumeClaimVolumeSource

    Attributes:
    claimName: ClaimName is the name of a PersistentVolumeClaim in the same namespace as
        the pod using this volume. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    readOnly: Will force the ReadOnly setting in VolumeMounts. Default false.
    """

    claimName: str
    readOnly: Optional[bool] = None


@dataclass
class RBDVolumeSource(HikaruBase):
    r"""
    Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes
    support ownership management and SELinux relabeling.

    Full name: v1.RBDVolumeSource

    Attributes:
    image: The rados image name. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    monitors: A collection of Ceph monitors. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    fsType: Filesystem type of the volume that you want to mount. Tip: Ensure that the
        filesystem type is supported by the host operating system. Examples: "ext4",
        "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#rbd
    keyring: Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring.
        More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    pool: The rados pool name. Default is rbd. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    readOnly: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to
        false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    secretRef: SecretRef is name of the authentication secret for RBDUser. If provided
        overrides keyring. Default is nil. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    user: The rados user name. Default is admin. More info:
        https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    """

    image: str
    monitors: List[str]
    fsType: Optional[str] = None
    keyring: Optional[str] = None
    pool: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["LocalObjectReference"] = None
    user: Optional[str] = None


@dataclass
class ScaleIOVolumeSource(HikaruBase):
    r"""
    ScaleIOVolumeSource represents a persistent ScaleIO volume

    Full name: v1.ScaleIOVolumeSource

    Attributes:
    gateway: The host address of the ScaleIO API Gateway.
    secretRef: SecretRef references to the secret for ScaleIO user and other sensitive
        information. If this is not provided, Login operation will fail.
    system: The name of the storage system as configured in ScaleIO.
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".
    protectionDomain: The name of the ScaleIO Protection Domain for the configured
        storage.
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    sslEnabled: Flag to enable/disable SSL communication with Gateway, default false
    storageMode: Indicates whether the storage for a volume should be ThickProvisioned or
        ThinProvisioned. Default is ThinProvisioned.
    storagePool: The ScaleIO Storage Pool associated with the protection domain.
    volumeName: The name of a volume already created in the ScaleIO system that is
        associated with this volume source.
    """

    gateway: str
    secretRef: "LocalObjectReference"
    system: str
    fsType: Optional[str] = None
    protectionDomain: Optional[str] = None
    readOnly: Optional[bool] = None
    sslEnabled: Optional[bool] = None
    storageMode: Optional[str] = None
    storagePool: Optional[str] = None
    volumeName: Optional[str] = None


@dataclass
class SecretVolumeSource(HikaruBase):
    r"""
    Adapts a Secret into a volume. The contents of the target Secret's Data field will be
    presented in a volume as files using the keys in the Data field as the file names.
    Secret volumes support ownership management and SELinux relabeling.

    Full name: v1.SecretVolumeSource

    Attributes:
    defaultMode: Optional: mode bits to use on created files by default. Must be a value
        between 0 and 0777. Defaults to 0644. Directories within the path are not affected
        by this setting. This might be in conflict with other options that affect the file
        mode, like fsGroup, and the result can be other mode bits set.
    optional: Specify whether the Secret or its keys must be defined
    secretName: Name of the secret in the pod's namespace to use. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#secret
    items: If unspecified, each key-value pair in the Data field of the referenced Secret
        will be projected into the volume as a file whose name is the key and content is
        the value. If specified, the listed keys will be projected into the specified
        paths, and unlisted keys will not be present. If a key is specified which is not
        present in the Secret, the volume setup will error unless it is marked optional.
        Paths must be relative and may not contain the '..' path or start with '..'.
    """

    defaultMode: Optional[int] = None
    optional: Optional[bool] = None
    secretName: Optional[str] = None
    items: Optional[List["KeyToPath"]] = field(default_factory=list)


@dataclass
class StorageOSVolumeSource(HikaruBase):
    r"""
    Represents a StorageOS persistent volume resource.

    Full name: v1.StorageOSVolumeSource

    Attributes:
    fsType: Filesystem type to mount. Must be a filesystem type supported by the host
        operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if
        unspecified.
    readOnly: Defaults to false (read/write). ReadOnly here will force the ReadOnly
        setting in VolumeMounts.
    secretRef: SecretRef specifies the secret to use for obtaining the StorageOS API
        credentials. If not specified, default values will be attempted.
    volumeName: VolumeName is the human-readable name of the StorageOS volume. Volume
        names are only unique within a namespace.
    volumeNamespace: VolumeNamespace specifies the scope of the volume within StorageOS.
        If no namespace is specified then the Pod's namespace will be used. This allows
        the Kubernetes name scoping to be mirrored within StorageOS for tighter
        integration. Set VolumeName to any name to override the default behaviour. Set to
        "default" if you are not using namespaces within StorageOS. Namespaces that do not
        pre-exist within StorageOS will be created.
    """

    fsType: Optional[str] = None
    readOnly: Optional[bool] = None
    secretRef: Optional["LocalObjectReference"] = None
    volumeName: Optional[str] = None
    volumeNamespace: Optional[str] = None


@dataclass
class ReplicaSetCondition(HikaruBase):
    r"""
    ReplicaSetCondition describes the state of a replica set at a certain point.

    Full name: v1beta2.ReplicaSetCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of replica set condition.
    lastTransitionTime: The last time the condition transitioned from one status to
        another.
    message: A human readable message indicating details about the transition.
    reason: The reason for the condition's last transition.
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class Namespace(HikaruDocumentBase):
    r"""
    Namespace provides a scope for Names. Use of multiple namespaces is optional.

    Full name: Namespace

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the behavior of the Namespace. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Status describes the current status of a Namespace. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "Namespace"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["NamespaceSpec"] = None
    status: Optional["NamespaceStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class NamespaceList(HikaruDocumentBase):
    r"""
    NamespaceList is a list of Namespaces.

    Full name: v1.NamespaceList

    Attributes:
    items: Items is the list of Namespace objects in the list. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["Namespace"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "NamespaceList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class LeaseSpec(HikaruBase):
    r"""
    LeaseSpec is a specification of a Lease.

    Full name: v1.LeaseSpec

    Attributes:
    acquireTime: acquireTime is a time when the current lease was acquired.
    holderIdentity: holderIdentity contains the identity of the holder of a current lease.
    leaseDurationSeconds: leaseDurationSeconds is a duration that candidates for a lease
        need to wait to force acquire it. This is measure against time of last observed
        RenewTime.
    leaseTransitions: leaseTransitions is the number of transitions of a lease between
        holders.
    renewTime: renewTime is a time when the current holder of a lease has last updated the
        lease.
    """

    acquireTime: Optional[str] = None
    holderIdentity: Optional[str] = None
    leaseDurationSeconds: Optional[int] = None
    leaseTransitions: Optional[int] = None
    renewTime: Optional[str] = None


@dataclass
class Endpoints(HikaruDocumentBase):
    r"""
    Endpoints is a collection of endpoints that implement the actual service. Example:
    Name: "mysvc", Subsets: [ { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
    Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }, { Addresses:
    [{"ip": "10.10.3.3"}], Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
    }, ]

    Full name: Endpoints

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    subsets: The set of all endpoints is the union of all subsets. Addresses are placed
        into subsets according to the IPs they share. A single address with multiple
        ports, some of which are ready and some of which are not (because they come from
        different containers) will result in the address being displayed in different
        subsets for the different ports. No address will appear in both Addresses and
        NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a
        service.
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "Endpoints"
    metadata: Optional["ObjectMeta"] = None
    subsets: Optional[List["EndpointSubset"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class EndpointsList(HikaruDocumentBase):
    r"""
    EndpointsList is a list of endpoints.

    Full name: v1.EndpointsList

    Attributes:
    items: List of endpoints.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["Endpoints"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "EndpointsList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Container(HikaruBase):
    r"""
    A single application container that you want to run within a pod.

    Full name: v1.Container

    Attributes:
    name: Name of the container specified as a DNS_LABEL. Each container in a pod must
        have a unique name (DNS_LABEL). Cannot be updated.
    image: Docker image name. More info:
        https://kubernetes.io/docs/concepts/containers/images This field is optional to
        allow higher level config management to default or override container images in
        workload controllers like Deployments and StatefulSets.
    imagePullPolicy: Image pull policy. One of Always, Never, IfNotPresent. Defaults to
        Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.
        More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
    lifecycle: Actions that the management system should take in response to container
        lifecycle events. Cannot be updated.
    livenessProbe: Periodic probe of container liveness. Container will be restarted if
        the probe fails. Cannot be updated. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
    readinessProbe: Periodic probe of container service readiness. Container will be
        removed from service endpoints if the probe fails. Cannot be updated. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
    resources: Compute Resources required by this container. Cannot be updated. More info:
        https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
    securityContext: Security options the pod should run with. More info:
        https://kubernetes.io/docs/concepts/policy/security-context/ More info:
        https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
    startupProbe: StartupProbe indicates that the Pod has successfully initialized. If
        specified, no other probes are executed until this completes successfully. If this
        probe fails, the Pod will be restarted, just as if the livenessProbe failed. This
        can be used to provide different probe parameters at the beginning of a Pod's
        lifecycle, when it might take a long time to load data or warm a cache, than
        during steady-state operation. This cannot be updated. This is an alpha feature
        enabled by the StartupProbe feature flag. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
    stdin: Whether this container should allocate a buffer for stdin in the container
        runtime. If this is not set, reads from stdin in the container will always result
        in EOF. Default is false.
    stdinOnce: Whether the container runtime should close the stdin channel after it has
        been opened by a single attach. When stdin is true the stdin stream will remain
        open across multiple attach sessions. If stdinOnce is set to true, stdin is opened
        on container start, is empty until the first client attaches to stdin, and then
        remains open and accepts data until the client disconnects, at which time stdin is
        closed and remains closed until the container is restarted. If this flag is false,
        a container processes that reads from stdin will never receive an EOF. Default is
        false
    terminationMessagePath: Optional: Path at which the file to which the container's
        termination message will be written is mounted into the container's filesystem.
        Message written is intended to be brief final status, such as an assertion failure
        message. Will be truncated by the node if greater than 4096 bytes. The total
        message length across all containers will be limited to 12kb. Defaults to
        /dev/termination-log. Cannot be updated.
    terminationMessagePolicy: Indicate how the termination message should be populated.
        File will use the contents of terminationMessagePath to populate the container
        status message on both success and failure. FallbackToLogsOnError will use the
        last chunk of container log output if the termination message file is empty and
        the container exited with an error. The log output is limited to 2048 bytes or 80
        lines, whichever is smaller. Defaults to File. Cannot be updated.
    tty: Whether this container should allocate a TTY for itself, also requires 'stdin' to
        be true. Default is false.
    workingDir: Container's working directory. If not specified, the container runtime's
        default will be used, which might be configured in the container image. Cannot be
        updated.
    args: Arguments to the entrypoint. The docker image's CMD is used if this is not
        provided. Variable references $(VAR_NAME) are expanded using the container's
        environment. If a variable cannot be resolved, the reference in the input string
        will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie:
        $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the
        variable exists or not. Cannot be updated. More info:
        https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
    command: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT
        is used if this is not provided. Variable references $(VAR_NAME) are expanded
        using the container's environment. If a variable cannot be resolved, the reference
        in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with
        a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
        regardless of whether the variable exists or not. Cannot be updated. More info:
        https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
    env: List of environment variables to set in the container. Cannot be updated.
    envFrom: List of sources to populate environment variables in the container. The keys
        defined within a source must be a C_IDENTIFIER. All invalid keys will be reported
        as an event when the container is starting. When a key exists in multiple sources,
        the value associated with the last source will take precedence. Values defined by
        an Env with a duplicate key will take precedence. Cannot be updated.
    ports: List of ports to expose from the container. Exposing a port here gives the
        system additional information about the network connections a container uses, but
        is primarily informational. Not specifying a port here DOES NOT prevent that port
        from being exposed. Any port which is listening on the default "0.0.0.0" address
        inside a container will be accessible from the network. Cannot be updated.
    volumeDevices: volumeDevices is the list of block devices to be used by the container.
        This is a beta feature.
    volumeMounts: Pod volumes to mount into the container's filesystem. Cannot be updated.
    """

    name: str
    image: Optional[str] = None
    imagePullPolicy: Optional[str] = None
    lifecycle: Optional["Lifecycle"] = None
    livenessProbe: Optional["Probe"] = None
    readinessProbe: Optional["Probe"] = None
    resources: Optional["ResourceRequirements"] = None
    securityContext: Optional["SecurityContext"] = None
    startupProbe: Optional["Probe"] = None
    stdin: Optional[bool] = None
    stdinOnce: Optional[bool] = None
    terminationMessagePath: Optional[str] = None
    terminationMessagePolicy: Optional[str] = None
    tty: Optional[bool] = None
    workingDir: Optional[str] = None
    args: Optional[List[str]] = field(default_factory=list)
    command: Optional[List[str]] = field(default_factory=list)
    env: Optional[List["EnvVar"]] = field(default_factory=list)
    envFrom: Optional[List["EnvFromSource"]] = field(default_factory=list)
    ports: Optional[List["ContainerPort"]] = field(default_factory=list)
    volumeDevices: Optional[List["VolumeDevice"]] = field(default_factory=list)
    volumeMounts: Optional[List["VolumeMount"]] = field(default_factory=list)


@dataclass
class Lifecycle(HikaruBase):
    r"""
    Lifecycle describes actions that the management system should take in response to
    container lifecycle events. For the PostStart and PreStop lifecycle handlers,
    management of the container blocks until the action is complete, unless the container
    process fails, in which case the handler is aborted.

    Full name: v1.Lifecycle

    Attributes:
    postStart: PostStart is called immediately after a container is created. If the
        handler fails, the container is terminated and restarted according to its restart
        policy. Other management of the container blocks until the hook completes. More
        info:
        https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
    preStop: PreStop is called immediately before a container is terminated due to an API
        request or management event such as liveness/startup probe failure, preemption,
        resource contention, etc. The handler is not called if the container crashes or
        exits. The reason for termination is passed to the handler. The Pod's termination
        grace period countdown begins before the PreStop hooked is executed. Regardless of
        the outcome of the handler, the container will eventually terminate within the
        Pod's termination grace period. Other management of the container blocks until the
        hook completes or until the termination grace period is reached. More info:
        https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
    """

    postStart: Optional["Handler"] = None
    preStop: Optional["Handler"] = None


@dataclass
class ContainerPort(HikaruBase):
    r"""
    ContainerPort represents a network port in a single container.

    Full name: v1.ContainerPort

    Attributes:
    containerPort: Number of port to expose on the pod's IP address. This must be a valid
        port number, 0 < x < 65536.
    hostIP: What host IP to bind the external port to.
    hostPort: Number of port to expose on the host. If specified, this must be a valid
        port number, 0 < x < 65536. If HostNetwork is specified, this must match
        ContainerPort. Most containers do not need this.
    name: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
        named port in a pod must have a unique name. Name for the port that can be
        referred to by services.
    protocol: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".
    """

    containerPort: int
    hostIP: Optional[str] = None
    hostPort: Optional[int] = None
    name: Optional[str] = None
    protocol: Optional[str] = None


@dataclass
class ResourceRequirements(HikaruBase):
    r"""
    ResourceRequirements describes the compute resource requirements.

    Full name: v1.ResourceRequirements

    Attributes:
    limits: Limits describes the maximum amount of compute resources allowed. More info:
        https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
    requests: Requests describes the minimum amount of compute resources required. If
        Requests is omitted for a container, it defaults to Limits if that is explicitly
        specified, otherwise to an implementation-defined value. More info:
        https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
    """

    limits: Optional[Dict[str, str]] = field(default_factory=dict)
    requests: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class SecurityContext(HikaruBase):
    r"""
    SecurityContext holds security configuration that will be applied to a container. Some
    fields are present in both SecurityContext and PodSecurityContext. When both are set,
    the values in SecurityContext take precedence.

    Full name: v1.SecurityContext

    Attributes:
    allowPrivilegeEscalation: AllowPrivilegeEscalation controls whether a process can gain
        more privileges than its parent process. This bool directly controls if the
        no_new_privs flag will be set on the container process. AllowPrivilegeEscalation
        is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN
    capabilities: The capabilities to add/drop when running containers. Defaults to the
        default set of capabilities granted by the container runtime.
    privileged: Run container in privileged mode. Processes in privileged containers are
        essentially equivalent to root on the host. Defaults to false.
    procMount: procMount denotes the type of proc mount to use for the containers. The
        default is DefaultProcMount which uses the container runtime defaults for readonly
        paths and masked paths. This requires the ProcMountType feature flag to be
        enabled.
    readOnlyRootFilesystem: Whether this container has a read-only root filesystem.
        Default is false.
    runAsGroup: The GID to run the entrypoint of the container process. Uses runtime
        default if unset. May also be set in PodSecurityContext. If set in both
        SecurityContext and PodSecurityContext, the value specified in SecurityContext
        takes precedence.
    runAsNonRoot: Indicates that the container must run as a non-root user. If true, the
        Kubelet will validate the image at runtime to ensure that it does not run as UID 0
        (root) and fail to start the container if it does. If unset or false, no such
        validation will be performed. May also be set in PodSecurityContext. If set in
        both SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence.
    runAsUser: The UID to run the entrypoint of the container process. Defaults to user
        specified in image metadata if unspecified. May also be set in PodSecurityContext.
        If set in both SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence.
    seLinuxOptions: The SELinux context to be applied to the container. If unspecified,
        the container runtime will allocate a random SELinux context for each container.
        May also be set in PodSecurityContext. If set in both SecurityContext and
        PodSecurityContext, the value specified in SecurityContext takes precedence.
    windowsOptions: The Windows specific settings applied to all containers. If
        unspecified, the options from the PodSecurityContext will be used. If set in both
        SecurityContext and PodSecurityContext, the value specified in SecurityContext
        takes precedence.
    """

    allowPrivilegeEscalation: Optional[bool] = None
    capabilities: Optional["Capabilities"] = None
    privileged: Optional[bool] = None
    procMount: Optional[str] = None
    readOnlyRootFilesystem: Optional[bool] = None
    runAsGroup: Optional[int] = None
    runAsNonRoot: Optional[bool] = None
    runAsUser: Optional[int] = None
    seLinuxOptions: Optional["SELinuxOptions"] = None
    windowsOptions: Optional["WindowsSecurityContextOptions"] = None


@dataclass
class VolumeDevice(HikaruBase):
    r"""
    volumeDevice describes a mapping of a raw block device within a container.

    Full name: v1.VolumeDevice

    Attributes:
    devicePath: devicePath is the path inside of the container that the device will be
        mapped to.
    name: name must match the name of a persistentVolumeClaim in the pod
    """

    devicePath: str
    name: str


@dataclass
class LimitRangeSpec(HikaruBase):
    r"""
    LimitRangeSpec defines a min/max usage limit for resources that match on kind.

    Full name: v1.LimitRangeSpec

    Attributes:
    limits: Limits is the list of LimitRangeItem objects that are enforced.
    """

    limits: List["LimitRangeItem"]


@dataclass
class LimitRangeItem(HikaruBase):
    r"""
    LimitRangeItem defines a min/max usage limit for any resource that matches on kind.

    Full name: v1.LimitRangeItem

    Attributes:
    type: Type of resource that this limit applies to.
    default: Default resource requirement limit value by resource name if resource limit
        is omitted.
    defaultRequest: DefaultRequest is the default resource requirement request value by
        resource name if resource request is omitted.
    max: Max usage constraints on this kind by resource name.
    maxLimitRequestRatio: MaxLimitRequestRatio if specified, the named resource must have
        a request and limit that are both non-zero where limit divided by request is less
        than or equal to the enumerated value; this represents the max burst for the named
        resource.
    min: Min usage constraints on this kind by resource name.
    """

    type: Optional[str] = None
    default: Optional[Dict[str, str]] = field(default_factory=dict)
    defaultRequest: Optional[Dict[str, str]] = field(default_factory=dict)
    max: Optional[Dict[str, str]] = field(default_factory=dict)
    maxLimitRequestRatio: Optional[Dict[str, str]] = field(default_factory=dict)
    min: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class Status(HikaruDocumentBase):
    r"""
    Status is a return value for calls that don't return other objects.

    Full name: v1.Status

    Attributes:
    apiVersion: 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
    code: Suggested HTTP return code for this status, 0 if not set.
    details: Extended data associated with the reason. Each reason may define its own
        extended details. This field is optional and the data returned is not guaranteed
        to conform to any schema except that defined by the reason type.
    kind: 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
    message: A human-readable description of the status of this operation.
    metadata: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    reason: A machine-readable description of why this operation is in the "Failure"
        status. If this value is empty there is no information available. A Reason
        clarifies an HTTP status code but does not override it.
    status: Status of the operation. One of: "Success" or "Failure". More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    code: Optional[int] = None
    details: Optional["StatusDetails"] = None
    kind: Optional[str] = "Status"
    message: Optional[str] = None
    metadata: Optional["ListMeta"] = None
    reason: Optional[str] = None
    status: Optional[str] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ContainerStateRunning(HikaruBase):
    r"""
    ContainerStateRunning is a running state of a container.

    Full name: v1.ContainerStateRunning

    Attributes:
    startedAt: Time at which the container was last (re-)started
    """

    startedAt: Optional[str] = None


@dataclass
class ContainerStateTerminated(HikaruBase):
    r"""
    ContainerStateTerminated is a terminated state of a container.

    Full name: v1.ContainerStateTerminated

    Attributes:
    exitCode: Exit status from the last termination of the container
    containerID: Container's ID in the format 'docker://<container_id>'
    finishedAt: Time at which the container last terminated
    message: Message regarding the last termination of the container
    reason: (brief) reason from the last termination of the container
    signal: Signal from the last termination of the container
    startedAt: Time at which previous execution of the container started
    """

    exitCode: int
    containerID: Optional[str] = None
    finishedAt: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None
    signal: Optional[int] = None
    startedAt: Optional[str] = None


@dataclass
class DeploymentSpec(HikaruBase):
    r"""
    DeploymentSpec is the specification of the desired behavior of the Deployment.

    Full name: v1beta2.DeploymentSpec

    Attributes:
    selector: Label selector for pods. Existing ReplicaSets whose pods are selected by
        this will be the ones affected by this deployment. It must match the pod
        template's labels.
    template: Template describes the pods that will be created.
    minReadySeconds: Minimum number of seconds for which a newly created pod should be
        ready without any of its container crashing, for it to be considered available.
        Defaults to 0 (pod will be considered available as soon as it is ready)
    paused: Indicates that the deployment is paused.
    progressDeadlineSeconds: The maximum time in seconds for a deployment to make progress
        before it is considered to be failed. The deployment controller will continue to
        process failed deployments and a condition with a ProgressDeadlineExceeded reason
        will be surfaced in the deployment status. Note that progress will not be
        estimated during the time a deployment is paused. Defaults to 600s.
    replicas: Number of desired pods. This is a pointer to distinguish between explicit
        zero and not specified. Defaults to 1.
    revisionHistoryLimit: The number of old ReplicaSets to retain to allow rollback. This
        is a pointer to distinguish between explicit zero and not specified. Defaults to
        10.
    strategy: The deployment strategy to use to replace existing pods with new ones.
    """

    selector: "LabelSelector"
    template: "PodTemplateSpec"
    minReadySeconds: Optional[int] = None
    paused: Optional[bool] = None
    progressDeadlineSeconds: Optional[int] = None
    replicas: Optional[int] = None
    revisionHistoryLimit: Optional[int] = None
    strategy: Optional["DeploymentStrategy"] = None


@dataclass
class DeploymentStrategy(HikaruBase):
    r"""
    DeploymentStrategy describes how to replace existing pods with new ones.

    Full name: v1beta2.DeploymentStrategy

    Attributes:
    rollingUpdate: Rolling update config params. Present only if DeploymentStrategyType =
        RollingUpdate.
    type: Type of deployment. Can be "Recreate" or "RollingUpdate". Default is
        RollingUpdate.
    """

    rollingUpdate: Optional["RollingUpdateDeployment"] = None
    type: Optional[str] = None


@dataclass
class LimitRange(HikaruDocumentBase):
    r"""
    LimitRange sets resource usage limits for each kind of resource in a Namespace.

    Full name: LimitRange

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the limits enforced. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "LimitRange"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["LimitRangeSpec"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class LimitRangeList(HikaruDocumentBase):
    r"""
    LimitRangeList is a list of LimitRange items.

    Full name: v1.LimitRangeList

    Attributes:
    items: Items is a list of LimitRange objects. More info:
        https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["LimitRange"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "LimitRangeList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PodAffinity(HikaruBase):
    r"""
    Pod affinity is a group of inter pod affinity scheduling rules.

    Full name: v1.PodAffinity

    Attributes:
    preferredDuringSchedulingIgnoredDuringExecution: The scheduler will prefer to schedule
        pods to nodes that satisfy the affinity expressions specified by this field, but
        it may choose a node that violates one or more of the expressions. The node that
        is most preferred is the one with the greatest sum of weights, i.e. for each node
        that meets all of the scheduling requirements (resource request,
        requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating
        through the elements of this field and adding "weight" to the sum if the node has
        pods which matches the corresponding podAffinityTerm; the node(s) with the highest
        sum are the most preferred.
    requiredDuringSchedulingIgnoredDuringExecution: If the affinity requirements specified
        by this field are not met at scheduling time, the pod will not be scheduled onto
        the node. If the affinity requirements specified by this field cease to be met at
        some point during pod execution (e.g. due to a pod label update), the system may
        or may not try to eventually evict the pod from its node. When there are multiple
        elements, the lists of nodes corresponding to each podAffinityTerm are
        intersected, i.e. all terms must be satisfied.
    """

    preferredDuringSchedulingIgnoredDuringExecution: Optional[
        List["WeightedPodAffinityTerm"]
    ] = field(default_factory=list)
    requiredDuringSchedulingIgnoredDuringExecution: Optional[
        List["PodAffinityTerm"]
    ] = field(default_factory=list)


@dataclass
class ReplicaSet(HikaruDocumentBase):
    r"""
    DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See
    the release notes for more information. ReplicaSet ensures that a specified number of
    pod replicas are running at any given time.

    Full name: v1beta2.ReplicaSet

    Attributes:
    apiVersion: 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: 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: If the Labels of a ReplicaSet are empty, they are defaulted to be the same
        as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the specification of the desired behavior of the ReplicaSet. More
        info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Status is the most recently observed status of the ReplicaSet. This data may
        be out of date by some window of time. Populated by the system. Read-only. More
        info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1beta2"
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "ReplicaSet"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["ReplicaSetSpec"] = None
    status: Optional["ReplicaSetStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def deleteCollectionNamespacedReplicaSet(
        namespace: str,
        continue_: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_selector: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete collection of ReplicaSet

        operationID: deleteCollectionNamespacedReplicaSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets

        :param namespace: namespace for the resource
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "delete_collection_namespaced_replica_set_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_collection_namespaced_replica_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["_continue"] = continue_
        all_args["dry_run"] = dry_run
        all_args["field_selector"] = field_selector
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def createNamespacedReplicaSet(
        self,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        create a ReplicaSet

        operationID: createNamespacedReplicaSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets

        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ReplicaSet    OK
          201   ReplicaSet    Created
          202   ReplicaSet    Accepted
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "create_namespaced_replica_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "create_namespaced_replica_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201, 202)
        return Response(result, codes_returning_objects)

    def create(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
    ) -> "ReplicaSet":
        r"""
            create a ReplicaSet

            operationID: createNamespacedReplicaSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to create() or in a "
                "ReplicaSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.createNamespacedReplicaSet(
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def deleteNamespacedReplicaSet(
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete a ReplicaSet

        operationID: deleteNamespacedReplicaSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          202   Status    Accepted
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "delete_namespaced_replica_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_namespaced_replica_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 202)
        return Response(result, codes_returning_objects)

    def delete(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        client: ApiClient = None,
    ) -> "ReplicaSet":
        r"""
            delete a ReplicaSet

            operationID: deleteNamespacedReplicaSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param grace_period_seconds: The duration in seconds before the object should
                be deleted. Value must be non-negative integer. The value zero
                indicates delete immediately. If this value is nil, the default
                grace period for the specified type will be used. Defaults to a per
                object value if not specified. zero means delete immediately.
            :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
                field will be deprecated in 1.7. Should the dependent objects be
                orphaned. If true/false, the "orphan" finalizer will be added
                to/removed from the object's finalizers list. Either this field or
                PropagationPolicy may be set, but not both.
            :param propagation_policy: Whether and how garbage collection will be
                performed. Either this field or OrphanDependents may be set, but not
                both. The default policy is decided by the existing finalizer set in
                the metadata.finalizers and the resource-specific default policy.
                Acceptable values are: 'Orphan' - orphan the dependents;
                'Background' - allow the garbage collector to delete the dependents
                in the background; 'Foreground' - a cascading policy that deletes
                all dependents in the foreground.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to delete() or in a "
                "ReplicaSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to delete() or in a "
                "ReplicaSet's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.deleteNamespacedReplicaSet(
            name=effective_name,
            namespace=effective_namespace,
            dry_run=dry_run,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def readNamespacedReplicaSet(
        name: str,
        namespace: str,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read the specified ReplicaSet

        operationID: readNamespacedReplicaSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param exact: Should the export be exact. Exact export maintains
            cluster-specific fields like 'Namespace'. Deprecated. Planned for
            removal in 1.18.
        :param export: Should this value be exported. Export strips fields that a user
            can not specify. Deprecated. Planned for removal in 1.18.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ReplicaSet    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_replica_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_replica_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["exact"] = exact
        all_args["export"] = export
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def read(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
    ) -> "ReplicaSet":
        r"""
            read the specified ReplicaSet

            operationID: readNamespacedReplicaSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param exact: Should the export be exact. Exact export maintains
                cluster-specific fields like 'Namespace'. Deprecated. Planned for
                removal in 1.18.
            :param export: Should this value be exported. Export strips fields that a user
                can not specify. Deprecated. Planned for removal in 1.18.
            :param pretty: If 'true', then the output is pretty printed.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to read() or in a "
                "ReplicaSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to read() or in a "
                "ReplicaSet's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.readNamespacedReplicaSet(
            name=effective_name,
            namespace=effective_namespace,
            exact=exact,
            export=export,
            pretty=pretty,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def patchNamespacedReplicaSet(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update the specified ReplicaSet

        operationID: patchNamespacedReplicaSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ReplicaSet    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "patch_namespaced_replica_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_replica_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def update(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
    ) -> "ReplicaSet":
        r"""
            partially update the specified ReplicaSet

            operationID: patchNamespacedReplicaSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint. This field is
                required for apply requests (application/apply-patch) but optional
                for non-apply patch types (JsonPatch, MergePatch,
                StrategicMergePatch).
            :param force: Force is going to "force" Apply requests. It means user will
                re-acquire conflicting fields owned by other people. Force flag must
                be unset for non-apply patch requests.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to update() or in a "
                "ReplicaSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.patchNamespacedReplicaSet(
            name=self.metadata.name,
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            force=force,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def __enter__(self):
        return self

    def __exit__(self, ex_type, ex_value, ex_traceback):
        passed = ex_type is None and ex_value is None and ex_traceback is None
        has_rollback = hasattr(self, "__rollback")
        if passed:
            try:
                self.update()
            except Exception:
                if has_rollback:
                    self.merge(getattr(self, "__rollback"), overwrite=True)
                    delattr(self, "__rollback")
                raise
        if has_rollback:
            if not passed:
                self.merge(getattr(self, "__rollback"), overwrite=True)
            delattr(self, "__rollback")
        return False

    def replaceNamespacedReplicaSet(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace the specified ReplicaSet

        operationID: replaceNamespacedReplicaSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ReplicaSet    OK
          201   ReplicaSet    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "replace_namespaced_replica_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_replica_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)

    def replaceNamespacedReplicaSetStatus(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace status of the specified ReplicaSet

        operationID: replaceNamespacedReplicaSetStatus
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ReplicaSet    OK
          201   ReplicaSet    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "replace_namespaced_replica_set_status_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_replica_set_status_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)


@dataclass
class ReplicaSetList(HikaruDocumentBase):
    r"""
    ReplicaSetList is a collection of ReplicaSets.

    Full name: v1beta2.ReplicaSetList

    Attributes:
    items: List of ReplicaSets. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1beta2"
    items: List["ReplicaSet"]
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "ReplicaSetList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def listNamespacedReplicaSet(
        namespace: str,
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind ReplicaSet

        operationID: listNamespacedReplicaSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets

        :param namespace: namespace for the resource
        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ReplicaSetList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_namespaced_replica_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_namespaced_replica_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _namespaced_watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_namespaced_replica_set",
    )

    @staticmethod
    def listReplicaSetForAllNamespaces(
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        pretty: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind ReplicaSet

        operationID: listReplicaSetForAllNamespaces
        path: /apis/apps/v1beta2/replicasets

        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param pretty: If 'true', then the output is pretty printed.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ReplicaSetList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_replica_set_for_all_namespaces_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_replica_set_for_all_namespaces_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["pretty"] = pretty
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_replica_set_for_all_namespaces",
    )


@dataclass
class WindowsSecurityContextOptions(HikaruBase):
    r"""
    WindowsSecurityContextOptions contain Windows-specific options and credentials.

    Full name: v1.WindowsSecurityContextOptions

    Attributes:
    gmsaCredentialSpec: GMSACredentialSpec is where the GMSA admission webhook
        (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA
        credential spec named by the GMSACredentialSpecName field. This field is
        alpha-level and is only honored by servers that enable the WindowsGMSA feature
        flag.
    gmsaCredentialSpecName: GMSACredentialSpecName is the name of the GMSA credential spec
        to use. This field is alpha-level and is only honored by servers that enable the
        WindowsGMSA feature flag.
    runAsUserName: The UserName in Windows to run the entrypoint of the container process.
        Defaults to the user specified in image metadata if unspecified. May also be set
        in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the
        value specified in SecurityContext takes precedence. This field is beta-level and
        may be disabled with the WindowsRunAsUserName feature flag.
    """

    gmsaCredentialSpec: Optional[str] = None
    gmsaCredentialSpecName: Optional[str] = None
    runAsUserName: Optional[str] = None


@dataclass
class NetworkPolicySpec(HikaruBase):
    r"""
    NetworkPolicySpec provides the specification of a NetworkPolicy

    Full name: v1.NetworkPolicySpec

    Attributes:
    podSelector: Selects the pods to which this NetworkPolicy object applies. The array of
        ingress rules is applied to any pods selected by this field. Multiple network
        policies can select the same set of pods. In this case, the ingress rules for each
        are combined additively. This field is NOT optional and follows standard label
        selector semantics. An empty podSelector matches all pods in this namespace.
    egress: List of egress rules to be applied to the selected pods. Outgoing traffic is
        allowed if there are no NetworkPolicies selecting the pod (and cluster policy
        otherwise allows the traffic), OR if the traffic matches at least one egress rule
        across all of the NetworkPolicy objects whose podSelector matches the pod. If this
        field is empty then this NetworkPolicy limits all outgoing traffic (and serves
        solely to ensure that the pods it selects are isolated by default). This field is
        beta-level in 1.8
    ingress: List of ingress rules to be applied to the selected pods. Traffic is allowed
        to a pod if there are no NetworkPolicies selecting the pod (and cluster policy
        otherwise allows the traffic), OR if the traffic source is the pod's local node,
        OR if the traffic matches at least one ingress rule across all of the
        NetworkPolicy objects whose podSelector matches the pod. If this field is empty
        then this NetworkPolicy does not allow any traffic (and serves solely to ensure
        that the pods it selects are isolated by default)
    policyTypes: List of rule types that the NetworkPolicy relates to. Valid options are
        "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will
        default based on the existence of Ingress or Egress rules; policies that contain
        an Egress section are assumed to affect Egress, and all policies (whether or not
        they contain an Ingress section) are assumed to affect Ingress. If you want to
        write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
        Likewise, if you want to write a policy that specifies that no egress is allowed,
        you must specify a policyTypes value that include "Egress" (since such a policy
        would not include an Egress section and would otherwise default to just [
        "Ingress" ]). This field is beta-level in 1.8
    """

    podSelector: "LabelSelector"
    egress: Optional[List["NetworkPolicyEgressRule"]] = field(default_factory=list)
    ingress: Optional[List["NetworkPolicyIngressRule"]] = field(default_factory=list)
    policyTypes: Optional[List[str]] = field(default_factory=list)


@dataclass
class NetworkPolicyEgressRule(HikaruBase):
    r"""
    NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of
    pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports
    and to. This type is beta-level in 1.8

    Full name: v1.NetworkPolicyEgressRule

    Attributes:
    ports: List of destination ports for outgoing traffic. Each item in this list is
        combined using a logical OR. If this field is empty or missing, this rule matches
        all ports (traffic not restricted by port). If this field is present and contains
        at least one item, then this rule allows traffic only if the traffic matches at
        least one port in the list.
    to: List of destinations for outgoing traffic of pods selected for this rule. Items in
        this list are combined using a logical OR operation. If this field is empty or
        missing, this rule matches all destinations (traffic not restricted by
        destination). If this field is present and contains at least one item, this rule
        allows traffic only if the traffic matches at least one item in the to list.
    """

    ports: Optional[List["NetworkPolicyPort"]] = field(default_factory=list)
    to: Optional[List["NetworkPolicyPeer"]] = field(default_factory=list)


@dataclass
class NetworkPolicyIngressRule(HikaruBase):
    r"""
    NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the
    pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports
    and from.

    Full name: v1.NetworkPolicyIngressRule

    Attributes:
    from_: List of sources which should be able to access the pods selected for this rule.
        Items in this list are combined using a logical OR operation. If this field is
        empty or missing, this rule matches all sources (traffic not restricted by
        source). If this field is present and contains at least one item, this rule allows
        traffic only if the traffic matches at least one item in the from list.
    ports: List of ports which should be made accessible on the pods selected for this
        rule. Each item in this list is combined using a logical OR. If this field is
        empty or missing, this rule matches all ports (traffic not restricted by port). If
        this field is present and contains at least one item, then this rule allows
        traffic only if the traffic matches at least one port in the list.
    """

    from_: Optional[List["NetworkPolicyPeer"]] = field(default_factory=list)
    ports: Optional[List["NetworkPolicyPort"]] = field(default_factory=list)


@dataclass
class APIGroup(HikaruDocumentBase):
    r"""
    APIGroup contains the name, the supported versions, and the preferred version of a
    group.

    Full name: APIGroup

    Attributes:
    name: name is the name of the group.
    versions: versions are the versions supported in this group.
    apiVersion: 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: 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
    preferredVersion: preferredVersion is the version preferred by the API server, which
        probably is the storage version.
    serverAddressByClientCIDRs: a map of client CIDR to server address that is serving
        this group. This is to help clients reach servers in the most network-efficient
        way possible. Clients can use the appropriate server address as per the CIDR that
        they match. In case of multiple matches, clients should use the longest matching
        CIDR. The server returns only those CIDRs that it thinks that the client can
        match. For example: the master will return an internal IP CIDR only, if the client
        reaches the server using an internal IP. Server looks at X-Forwarded-For header or
        X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
    """

    _version = "v1"
    name: str
    versions: List["GroupVersionForDiscovery"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "APIGroup"
    preferredVersion: Optional["GroupVersionForDiscovery"] = None
    serverAddressByClientCIDRs: Optional[List["ServerAddressByClientCIDR"]] = field(
        default_factory=list
    )
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class APIGroupList(HikaruDocumentBase):
    r"""
    APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.

    Full name: v1.APIGroupList

    Attributes:
    groups: groups is a list of APIGroup.
    apiVersion: 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: 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
    """

    _version = "v1"
    groups: List["APIGroup"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "APIGroupList"
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Service(HikaruDocumentBase):
    r"""
    Service is a named abstraction of software service (for example, mysql) consisting of
    local port (for example 3306) that the proxy listens on, and the selector that
    determines which pods will answer requests sent through the proxy.

    Full name: v1.Service

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the behavior of a service.
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Most recently observed status of the service. Populated by the system.
        Read-only. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "Service"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["ServiceSpec"] = None
    status: Optional["ServiceStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ServiceSpec(HikaruBase):
    r"""
    ServiceSpec describes the attributes that a user creates on a service.

    Full name: v1.ServiceSpec

    Attributes:
    clusterIP: clusterIP is the IP address of the service and is usually assigned randomly
        by the master. If an address is specified manually and is not in use by others, it
        will be allocated to the service; otherwise, creation of the service will fail.
        This field can not be changed through updates. Valid values are "None", empty
        string (""), or a valid IP address. "None" can be specified for headless services
        when proxying is not required. Only applies to types ClusterIP, NodePort, and
        LoadBalancer. Ignored if type is ExternalName. More info:
        https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
    externalName: externalName is the external reference that kubedns or equivalent will
        return as a CNAME record for this service. No proxying will be involved. Must be a
        valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to
        be ExternalName.
    externalTrafficPolicy: externalTrafficPolicy denotes if this Service desires to route
        external traffic to node-local or cluster-wide endpoints. "Local" preserves the
        client source IP and avoids a second hop for LoadBalancer and Nodeport type
        services, but risks potentially imbalanced traffic spreading. "Cluster" obscures
        the client source IP and may cause a second hop to another node, but should have
        good overall load-spreading.
    healthCheckNodePort: healthCheckNodePort specifies the healthcheck nodePort for the
        service. If not specified, HealthCheckNodePort is created by the service api
        backend with the allocated nodePort. Will use user-specified nodePort value if
        specified by the client. Only effects when Type is set to LoadBalancer and
        ExternalTrafficPolicy is set to Local.
    ipFamily: ipFamily specifies whether this Service has a preference for a particular IP
        family (e.g. IPv4 vs. IPv6). If a specific IP family is requested, the clusterIP
        field will be allocated from that family, if it is available in the cluster. If no
        IP family is requested, the cluster's primary IP family will be used. Other IP
        fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers
        which allocate external load-balancers should use the same IP family. Endpoints
        for this Service will be of this family. This field is immutable after creation.
        Assigning a ServiceIPFamily not available in the cluster (e.g. IPv6 in IPv4 only
        cluster) is an error condition and will fail during clusterIP assignment.
    loadBalancerIP: Only applies to Service Type: LoadBalancer LoadBalancer will get
        created with the IP specified in this field. This feature depends on whether the
        underlying cloud-provider supports specifying the loadBalancerIP when a load
        balancer is created. This field will be ignored if the cloud-provider does not
        support the feature.
    publishNotReadyAddresses: publishNotReadyAddresses, when set to true, indicates that
        DNS implementations must publish the notReadyAddresses of subsets for the
        Endpoints associated with the Service. The default value is false. The primary use
        case for setting this field is to use a StatefulSet's Headless Service to
        propagate SRV records for its Pods without respect to their readiness for purpose
        of peer discovery.
    sessionAffinity: Supports "ClientIP" and "None". Used to maintain session affinity.
        Enable client IP based session affinity. Must be ClientIP or None. Defaults to
        None. More info:
        https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
    sessionAffinityConfig: sessionAffinityConfig contains the configurations of session
        affinity.
    type: type determines how the Service is exposed. Defaults to ClusterIP. Valid options
        are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to
        the specified externalName. "ClusterIP" allocates a cluster-internal IP address
        for load-balancing to endpoints. Endpoints are determined by the selector or if
        that is not specified, by manual construction of an Endpoints object. If clusterIP
        is "None", no virtual IP is allocated and the endpoints are published as a set of
        endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a
        port on every node which routes to the clusterIP. "LoadBalancer" builds on
        NodePort and creates an external load-balancer (if supported in the current cloud)
        which routes to the clusterIP. More info:
        https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
    externalIPs: externalIPs is a list of IP addresses for which nodes in the cluster will
        also accept traffic for this service. These IPs are not managed by Kubernetes. The
        user is responsible for ensuring that traffic arrives at a node with this IP. A
        common example is external load-balancers that are not part of the Kubernetes
        system.
    loadBalancerSourceRanges: If specified and supported by the platform, this will
        restrict traffic through the cloud-provider load-balancer will be restricted to
        the specified client IPs. This field will be ignored if the cloud-provider does
        not support the feature." More info:
        https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
    ports: The list of ports that are exposed by this service. More info:
        https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
    selector: Route service traffic to pods with label keys and values matching this
        selector. If empty or not present, the service is assumed to have an external
        process managing its endpoints, which Kubernetes will not modify. Only applies to
        types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More
        info: https://kubernetes.io/docs/concepts/services-networking/service/
    topologyKeys: topologyKeys is a preference-order list of topology keys which
        implementations of services should use to preferentially sort endpoints when
        accessing this Service, it can not be used at the same time as
        externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16
        keys may be specified. Endpoints are chosen based on the first topology key with
        available backends. If this field is specified and all entries have no backends
        that match the topology of the client, the service has no backends for that client
        and connections should fail. The special value "*" may be used to mean "any
        topology". This catch-all value, if used, only makes sense as the last value in
        the list. If this is not specified or empty, no topology constraints will be
        applied.
    """

    clusterIP: Optional[str] = None
    externalName: Optional[str] = None
    externalTrafficPolicy: Optional[str] = None
    healthCheckNodePort: Optional[int] = None
    ipFamily: Optional[str] = None
    loadBalancerIP: Optional[str] = None
    publishNotReadyAddresses: Optional[bool] = None
    sessionAffinity: Optional[str] = None
    sessionAffinityConfig: Optional["SessionAffinityConfig"] = None
    type: Optional[str] = None
    externalIPs: Optional[List[str]] = field(default_factory=list)
    loadBalancerSourceRanges: Optional[List[str]] = field(default_factory=list)
    ports: Optional[List["ServicePort"]] = field(default_factory=list)
    selector: Optional[Dict[str, str]] = field(default_factory=dict)
    topologyKeys: Optional[List[str]] = field(default_factory=list)


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

    Full name: v1.EventSeries

    Attributes:
    count: Number of occurrences in this series up to the last heartbeat time
    lastObservedTime: Time of the last occurrence observed
    state: State of this Series: Ongoing or Finished Deprecated. Planned removal for 1.18
    """

    count: Optional[int] = None
    lastObservedTime: Optional[str] = None
    state: Optional[str] = None


@dataclass
class TopologySelectorLabelRequirement(HikaruBase):
    r"""
    A topology selector requirement is a selector that matches given label. This is an
    alpha feature and may change in the future.

    Full name: v1.TopologySelectorLabelRequirement

    Attributes:
    key: The label key that the selector applies to.
    values: An array of string values. One value must match the label to be selected. Each
        entry in Values is ORed.
    """

    key: str
    values: List[str]


@dataclass
class LabelSelectorRequirement(HikaruBase):
    r"""
    A label selector requirement is a selector that contains values, a key, and an
    operator that relates the key and values.

    Full name: v1.LabelSelectorRequirement

    Attributes:
    key: key is the label key that the selector applies to.
    operator: operator represents a key's relationship to a set of values. Valid operators
        are In, NotIn, Exists and DoesNotExist.
    values: values is an array of string values. If the operator is In or NotIn, the
        values array must be non-empty. If the operator is Exists or DoesNotExist, the
        values array must be empty. This array is replaced during a strategic merge patch.
    """

    key: str
    operator: str
    values: Optional[List[str]] = field(default_factory=list)


@dataclass
class JSONSchemaProps(HikaruBase):
    r"""
    JSONSchemaProps is a JSON-Schema following Specification Draft 4
    (http://json-schema.org/).

    Full name: v1.JSONSchemaProps

    Attributes:
    description:
    dollar_ref:
    dollar_schema:
    exclusiveMaximum:
    exclusiveMinimum:
    externalDocs:
    format: format is an OpenAPI v3 format string. Unknown formats are ignored. The
        following formats are validated: - bsonobjectid: a bson object ID, i.e. a 24
        characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI -
        email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a
        valid representation for an Internet host name, as defined by RFC 1034, section
        3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6
        IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang
        net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an
        UUID that allows uppercase defined by the regex
        (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an
        UUID3 that allows uppercase defined by the regex
        (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4:
        an UUID4 that allows uppercase defined by the regex
        (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ -
        uuid5: an UUID5 that allows uppercase defined by the regex
        (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ -
        isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" -
        isbn10: an ISBN10 number string like "0321751043" - isbn13: an ISBN13 number
        string like "978-0321751041" - creditcard: a credit card number defined by the
        regex
        ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$
        with any non digit characters mixed in - ssn: a U.S. social security number
        following the regex ^\d{3}[- ]?\d{2}[- ]?\d{4}$ - hexcolor: an hexadecimal color
        code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ -
        rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - byte: base64
        encoded binary data - password: any kind of string - date: a date string like
        "2006-01-02" as defined by full-date in RFC3339 - duration: a duration string like
        "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration
        format - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined
        by date-time in RFC3339.
    id:
    maxItems:
    maxLength:
    maxProperties:
    maximum:
    minItems:
    minLength:
    minProperties:
    minimum:
    multipleOf:
    not_:
    nullable:
    pattern:
    title:
    type:
    uniqueItems:
    x_kubernetes_embedded_resource: x-kubernetes-embedded-resource defines that the value
        is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type
        must be object. It is allowed to further restrict the embedded object. kind,
        apiVersion and metadata are validated automatically.
        x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to
        be if the object is fully specified (up to kind, apiVersion, metadata).
    x_kubernetes_int_or_string: x-kubernetes-int-or-string specifies that this value is
        either an integer or a string. If this is true, an empty type is allowed and type
        as child of anyOf is permitted if following one of the following patterns: 1)
        anyOf: - type: integer - type: string 2) allOf: - anyOf: - type: integer - type:
        string - ... zero or more
    x_kubernetes_list_type: x-kubernetes-list-type annotates an array to further describe
        its topology. This extension must only be used on lists and may have 3 possible
        values: 1) `atomic`: the list is treated as a single entity, like a scalar. Atomic
        lists will be entirely replaced when updated. This extension may be used on any
        type of list (struct, scalar, ...). 2) `set`: Sets are lists that must not have
        multiple items with the same value. Each value must be a scalar, an object with
        x-kubernetes-map-type `atomic` or an array with x-kubernetes-list-type `atomic`.
        3) `map`: These lists are like maps in that their elements have a non-index key
        used to identify them. Order is preserved upon merge. The map tag must only be
        used on a list with elements of type object. Defaults to atomic for arrays.
    x_kubernetes_map_type: x-kubernetes-map-type annotates an object to further describe
        its topology. This extension must only be used when type is object and may have 2
        possible values: 1) `granular`: These maps are actual maps (key-value pairs) and
        each fields are independent from each other (they can each be manipulated by
        separate actors). This is the default behaviour for all maps. 2) `atomic`: the
        list is treated as a single entity, like a scalar. Atomic maps will be entirely
        replaced when updated.
    x_kubernetes_preserve_unknown_fields: x-kubernetes-preserve-unknown-fields stops the
        API server decoding step from pruning fields which are not specified in the
        validation schema. This affects fields recursively, but switches back to normal
        pruning behaviour if nested properties or additionalProperties are specified in
        the schema. This can either be true or undefined. False is forbidden.
    additionalItems: JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value.
        Defaults to true for the boolean property.
    additionalProperties: JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean
        value. Defaults to true for the boolean property.
    allOf:
    anyOf:
    default: default is a default value for undefined object fields. Defaulting is a beta
        feature under the CustomResourceDefaulting feature gate. Defaulting requires
        spec.preserveUnknownFields to be false.
    definitions:
    dependencies:
    enum:
    example: JSON represents any valid JSON value. These types are supported: bool, int64,
        float64, string, []interface{}, map[string]interface{} and nil.
    items: JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps
        or an array of JSONSchemaProps. Mainly here for serialization purposes.
    oneOf:
    patternProperties:
    properties:
    required:
    x_kubernetes_list_map_keys: x-kubernetes-list-map-keys annotates an array with the
        x-kubernetes-list-type `map` by specifying the keys used as the index of the map.
        This tag MUST only be used on lists that have the "x-kubernetes-list-type"
        extension set to "map". Also, the values specified for this attribute must be a
        scalar typed field of the child structure (no nesting is supported).
    """

    description: Optional[str] = None
    dollar_ref: Optional[str] = None
    dollar_schema: Optional[str] = None
    exclusiveMaximum: Optional[bool] = None
    exclusiveMinimum: Optional[bool] = None
    externalDocs: Optional["ExternalDocumentation"] = None
    format: Optional[str] = None
    id: Optional[str] = None
    maxItems: Optional[int] = None
    maxLength: Optional[int] = None
    maxProperties: Optional[int] = None
    maximum: Optional[float] = None
    minItems: Optional[int] = None
    minLength: Optional[int] = None
    minProperties: Optional[int] = None
    minimum: Optional[float] = None
    multipleOf: Optional[float] = None
    not_: Optional["JSONSchemaProps"] = None
    nullable: Optional[bool] = None
    pattern: Optional[str] = None
    title: Optional[str] = None
    type: Optional[str] = None
    uniqueItems: Optional[bool] = None
    x_kubernetes_embedded_resource: Optional[bool] = None
    x_kubernetes_int_or_string: Optional[bool] = None
    x_kubernetes_list_type: Optional[str] = None
    x_kubernetes_map_type: Optional[str] = None
    x_kubernetes_preserve_unknown_fields: Optional[bool] = None
    additionalItems: Optional[object] = field(default_factory=dict)
    additionalProperties: Optional[object] = field(default_factory=dict)
    allOf: Optional[List["JSONSchemaProps"]] = field(default_factory=list)
    anyOf: Optional[List["JSONSchemaProps"]] = field(default_factory=list)
    default: Optional[object] = field(default_factory=dict)
    definitions: Optional[Dict[str, str]] = field(default_factory=dict)
    dependencies: Optional[Dict[str, str]] = field(default_factory=dict)
    enum: Optional[List[object]] = field(default_factory=list)
    example: Optional[object] = field(default_factory=dict)
    items: Optional[object] = field(default_factory=dict)
    oneOf: Optional[List["JSONSchemaProps"]] = field(default_factory=list)
    patternProperties: Optional[Dict[str, str]] = field(default_factory=dict)
    properties: Optional[Dict[str, str]] = field(default_factory=dict)
    required: Optional[List[str]] = field(default_factory=list)
    x_kubernetes_list_map_keys: Optional[List[str]] = field(default_factory=list)


@dataclass
class JobCondition(HikaruBase):
    r"""
    JobCondition describes current state of a job.

    Full name: v1.JobCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of job condition, Complete or Failed.
    lastProbeTime: Last time the condition was checked.
    lastTransitionTime: Last time the condition transit from one status to another.
    message: Human readable message indicating details about last transition.
    reason: (brief) reason for the condition's last transition.
    """

    status: str
    type: str
    lastProbeTime: Optional[str] = None
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class CustomResourceDefinition(HikaruDocumentBase):
    r"""
    CustomResourceDefinition represents a resource that should be exposed on the API
    server. Its name MUST be in the format <.spec.name>.<.spec.group>.

    Full name: v1.CustomResourceDefinition

    Attributes:
    spec: spec describes how the user wants the resources to appear
    apiVersion: 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: 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:
    status: status indicates the actual state of the CustomResourceDefinition
    """

    _version = "v1"
    spec: "CustomResourceDefinitionSpec"
    apiVersion: Optional[str] = "apiextensions.k8s.io/v1"
    kind: Optional[str] = "CustomResourceDefinition"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["CustomResourceDefinitionStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class IPBlock(HikaruBase):
    r"""
    IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed to the pods
    matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that
    should not be included within this rule.

    Full name: v1.IPBlock

    Attributes:
    cidr: CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24"
    except_: Except is a slice of CIDRs that should not be included within an IP Block
        Valid examples are "192.168.1.1/24" Except values will be rejected if they are
        outside the CIDR range
    """

    cidr: str
    except_: Optional[List[str]] = field(default_factory=list)


@dataclass
class NonResourceRule(HikaruBase):
    r"""
    NonResourceRule holds information that describes a rule for the non-resource

    Full name: v1.NonResourceRule

    Attributes:
    verbs: Verb is a list of kubernetes non-resource API verbs, like: get, post, put,
        delete, patch, head, options. "*" means all.
    nonResourceURLs: NonResourceURLs is a set of partial urls that a user should have
        access to. *s are allowed, but only as the full, final step in the path. "*" means
        all.
    """

    verbs: List[str]
    nonResourceURLs: Optional[List[str]] = field(default_factory=list)


@dataclass
class StatefulSetCondition(HikaruBase):
    r"""
    StatefulSetCondition describes the state of a statefulset at a certain point.

    Full name: v1beta2.StatefulSetCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of statefulset condition.
    lastTransitionTime: Last time the condition transitioned from one status to another.
    message: A human readable message indicating details about the transition.
    reason: The reason for the condition's last transition.
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class SecretEnvSource(HikaruBase):
    r"""
    SecretEnvSource selects a Secret to populate the environment variables with. The
    contents of the target Secret's Data field will represent the key-value pairs as
    environment variables.

    Full name: v1.SecretEnvSource

    Attributes:
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    optional: Specify whether the Secret must be defined
    """

    name: Optional[str] = None
    optional: Optional[bool] = None


@dataclass
class CustomResourceSubresources(HikaruBase):
    r"""
    CustomResourceSubresources defines the status and scale subresources for
    CustomResources.

    Full name: v1.CustomResourceSubresources

    Attributes:
    scale: scale indicates the custom resource should serve a `/scale` subresource that
        returns an `autoscaling/v1` Scale object.
    status: status indicates the custom resource should serve a `/status` subresource.
        When enabled: 1. requests to the custom resource primary endpoint ignore changes
        to the `status` stanza of the object. 2. requests to the custom resource `/status`
        subresource ignore changes to anything other than the `status` stanza of the
        object.
    """

    scale: Optional["CustomResourceSubresourceScale"] = None
    status: Optional[object] = field(default_factory=dict)


@dataclass
class CustomResourceSubresourceScale(HikaruBase):
    r"""
    CustomResourceSubresourceScale defines how to serve the scale subresource for
    CustomResources.

    Full name: v1.CustomResourceSubresourceScale

    Attributes:
    specReplicasPath: specReplicasPath defines the JSON path inside of a custom resource
        that corresponds to Scale `spec.replicas`. Only JSON paths without the array
        notation are allowed. Must be a JSON Path under `.spec`. If there is no value
        under the given path in the custom resource, the `/scale` subresource will return
        an error on GET.
    statusReplicasPath: statusReplicasPath defines the JSON path inside of a custom
        resource that corresponds to Scale `status.replicas`. Only JSON paths without the
        array notation are allowed. Must be a JSON Path under `.status`. If there is no
        value under the given path in the custom resource, the `status.replicas` value in
        the `/scale` subresource will default to 0.
    labelSelectorPath: labelSelectorPath defines the JSON path inside of a custom resource
        that corresponds to Scale `status.selector`. Only JSON paths without the array
        notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set
        to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be
        a string field (not a complex selector struct) which contains a serialized label
        selector in string form. More info:
        https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource
        If there is no value under the given path in the custom resource, the
        `status.selector` value in the `/scale` subresource will default to the empty
        string.
    """

    specReplicasPath: str
    statusReplicasPath: str
    labelSelectorPath: Optional[str] = None


@dataclass
class SecretProjection(HikaruBase):
    r"""
    Adapts a secret into a projected volume. The contents of the target Secret's Data
    field will be presented in a projected volume as files using the keys in the Data
    field as the file names. Note that this is identical to a secret volume source without
    the default mode.

    Full name: v1.SecretProjection

    Attributes:
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    optional: Specify whether the Secret or its key must be defined
    items: If unspecified, each key-value pair in the Data field of the referenced Secret
        will be projected into the volume as a file whose name is the key and content is
        the value. If specified, the listed keys will be projected into the specified
        paths, and unlisted keys will not be present. If a key is specified which is not
        present in the Secret, the volume setup will error unless it is marked optional.
        Paths must be relative and may not contain the '..' path or start with '..'.
    """

    name: Optional[str] = None
    optional: Optional[bool] = None
    items: Optional[List["KeyToPath"]] = field(default_factory=list)


@dataclass
class ServiceAccountTokenProjection(HikaruBase):
    r"""
    ServiceAccountTokenProjection represents a projected service account token volume.
    This projection can be used to insert a service account token into the pods runtime
    filesystem for use against APIs (Kubernetes API Server or otherwise).

    Full name: v1.ServiceAccountTokenProjection

    Attributes:
    path: Path is the path relative to the mount point of the file to project the token
        into.
    audience: Audience is the intended audience of the token. A recipient of a token must
        identify itself with an identifier specified in the audience of the token, and
        otherwise should reject the token. The audience defaults to the identifier of the
        apiserver.
    expirationSeconds: ExpirationSeconds is the requested duration of validity of the
        service account token. As the token approaches expiration, the kubelet volume
        plugin will proactively rotate the service account token. The kubelet will start
        trying to rotate the token if the token is older than 80 percent of its time to
        live or if the token is older than 24 hours.Defaults to 1 hour and must be at
        least 10 minutes.
    """

    path: str
    audience: Optional[str] = None
    expirationSeconds: Optional[int] = None


@dataclass
class NodeSelector(HikaruBase):
    r"""
    A node selector represents the union of the results of one or more label queries over
    a set of nodes; that is, it represents the OR of the selectors represented by the node
    selector terms.

    Full name: v1.NodeSelector

    Attributes:
    nodeSelectorTerms: Required. A list of node selector terms. The terms are ORed.
    """

    nodeSelectorTerms: List["NodeSelectorTerm"]


@dataclass
class VolumeAttachment(HikaruDocumentBase):
    r"""
    VolumeAttachment captures the intent to attach or detach the specified volume to/from
    the specified node. VolumeAttachment objects are non-namespaced.

    Full name: v1.VolumeAttachment

    Attributes:
    spec: Specification of the desired attach/detach volume behavior. Populated by the
        Kubernetes system.
    apiVersion: 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: 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: Standard object metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    status: Status of the VolumeAttachment request. Populated by the entity completing the
        attach or detach operation, i.e. the external-attacher.
    """

    _version = "v1"
    spec: "VolumeAttachmentSpec"
    apiVersion: Optional[str] = "storage.k8s.io/v1"
    kind: Optional[str] = "VolumeAttachment"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["VolumeAttachmentStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class VolumeAttachmentSpec(HikaruBase):
    r"""
    VolumeAttachmentSpec is the specification of a VolumeAttachment request.

    Full name: v1.VolumeAttachmentSpec

    Attributes:
    attacher: Attacher indicates the name of the volume driver that MUST handle this
        request. This is the name returned by GetPluginName().
    nodeName: The node that the volume should be attached to.
    source: Source represents the volume that should be attached.
    """

    attacher: str
    nodeName: str
    source: "VolumeAttachmentSource"


@dataclass
class PreferredSchedulingTerm(HikaruBase):
    r"""
    An empty preferred scheduling term matches all objects with implicit weight 0 (i.e.
    it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a
    no-op).

    Full name: v1.PreferredSchedulingTerm

    Attributes:
    preference: A node selector term, associated with the corresponding weight.
    weight: Weight associated with matching the corresponding nodeSelectorTerm, in the
        range 1-100.
    """

    preference: "NodeSelectorTerm"
    weight: int


@dataclass
class PersistentVolumeStatus(HikaruBase):
    r"""
    PersistentVolumeStatus is the current status of a persistent volume.

    Full name: v1.PersistentVolumeStatus

    Attributes:
    message: A human-readable message indicating details about why the volume is in this
        state.
    phase: Phase indicates if a volume is available, bound to a claim, or released by a
        claim. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
    reason: Reason is a brief CamelCase string that describes any failure and is meant for
        machine parsing and tidy display in the CLI.
    """

    message: Optional[str] = None
    phase: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class DaemonSetStatus(HikaruBase):
    r"""
    DaemonSetStatus represents the current status of a daemon set.

    Full name: v1beta2.DaemonSetStatus

    Attributes:
    currentNumberScheduled: The number of nodes that are running at least 1 daemon pod and
        are supposed to run the daemon pod. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
    desiredNumberScheduled: The total number of nodes that should be running the daemon
        pod (including nodes correctly running the daemon pod). More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
    numberMisscheduled: The number of nodes that are running the daemon pod, but are not
        supposed to run the daemon pod. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
    numberReady: The number of nodes that should be running the daemon pod and have one or
        more of the daemon pod running and ready.
    collisionCount: Count of hash collisions for the DaemonSet. The DaemonSet controller
        uses this field as a collision avoidance mechanism when it needs to create the
        name for the newest ControllerRevision.
    numberAvailable: The number of nodes that should be running the daemon pod and have
        one or more of the daemon pod running and available (ready for at least
        spec.minReadySeconds)
    numberUnavailable: The number of nodes that should be running the daemon pod and have
        none of the daemon pod running and available (ready for at least
        spec.minReadySeconds)
    observedGeneration: The most recent generation observed by the daemon set controller.
    updatedNumberScheduled: The total number of nodes that are running updated daemon pod
    conditions: Represents the latest available observations of a DaemonSet's current
        state.
    """

    currentNumberScheduled: int
    desiredNumberScheduled: int
    numberMisscheduled: int
    numberReady: int
    collisionCount: Optional[int] = None
    numberAvailable: Optional[int] = None
    numberUnavailable: Optional[int] = None
    observedGeneration: Optional[int] = None
    updatedNumberScheduled: Optional[int] = None
    conditions: Optional[List["DaemonSetCondition"]] = field(default_factory=list)


@dataclass
class DaemonSetCondition(HikaruBase):
    r"""
    DaemonSetCondition describes the state of a DaemonSet at a certain point.

    Full name: v1beta2.DaemonSetCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of DaemonSet condition.
    lastTransitionTime: Last time the condition transitioned from one status to another.
    message: A human readable message indicating details about the transition.
    reason: The reason for the condition's last transition.
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class UserInfo(HikaruBase):
    r"""
    UserInfo holds the information about the user needed to implement the user.Info
    interface.

    Full name: v1.UserInfo

    Attributes:
    uid: A unique value that identifies this user across time. If this user is deleted and
        another user by the same name is added, they will have different UIDs.
    username: The name that uniquely identifies this user among all active users.
    extra: Any additional information provided by the authenticator.
    groups: The names of groups this user is a part of.
    """

    uid: Optional[str] = None
    username: Optional[str] = None
    extra: Optional[Dict[str, str]] = field(default_factory=dict)
    groups: Optional[List[str]] = field(default_factory=list)


@dataclass
class Deployment(HikaruDocumentBase):
    r"""
    DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See
    the release notes for more information. Deployment enables declarative updates for
    Pods and ReplicaSets.

    Full name: v1beta2.Deployment

    Attributes:
    apiVersion: 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: 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: Standard object metadata.
    spec: Specification of the desired behavior of the Deployment.
    status: Most recently observed status of the Deployment.
    """

    _version = "v1beta2"
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "Deployment"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["DeploymentSpec"] = None
    status: Optional["DeploymentStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def deleteCollectionNamespacedDeployment(
        namespace: str,
        continue_: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_selector: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete collection of Deployment

        operationID: deleteCollectionNamespacedDeployment
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments

        :param namespace: namespace for the resource
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "delete_collection_namespaced_deployment_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_collection_namespaced_deployment_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["_continue"] = continue_
        all_args["dry_run"] = dry_run
        all_args["field_selector"] = field_selector
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def createNamespacedDeployment(
        self,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        create a Deployment

        operationID: createNamespacedDeployment
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments

        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Deployment    OK
          201   Deployment    Created
          202   Deployment    Accepted
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "create_namespaced_deployment_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "create_namespaced_deployment_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201, 202)
        return Response(result, codes_returning_objects)

    def create(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
    ) -> "Deployment":
        r"""
            create a Deployment

            operationID: createNamespacedDeployment
            path: /apis/apps/v1beta2/namespaces/{namespace}/deployments

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to create() or in a "
                "Deployment's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.createNamespacedDeployment(
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def deleteNamespacedDeployment(
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete a Deployment

        operationID: deleteNamespacedDeployment
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          202   Status    Accepted
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "delete_namespaced_deployment_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_namespaced_deployment_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 202)
        return Response(result, codes_returning_objects)

    def delete(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        client: ApiClient = None,
    ) -> "Deployment":
        r"""
            delete a Deployment

            operationID: deleteNamespacedDeployment
            path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param grace_period_seconds: The duration in seconds before the object should
                be deleted. Value must be non-negative integer. The value zero
                indicates delete immediately. If this value is nil, the default
                grace period for the specified type will be used. Defaults to a per
                object value if not specified. zero means delete immediately.
            :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
                field will be deprecated in 1.7. Should the dependent objects be
                orphaned. If true/false, the "orphan" finalizer will be added
                to/removed from the object's finalizers list. Either this field or
                PropagationPolicy may be set, but not both.
            :param propagation_policy: Whether and how garbage collection will be
                performed. Either this field or OrphanDependents may be set, but not
                both. The default policy is decided by the existing finalizer set in
                the metadata.finalizers and the resource-specific default policy.
                Acceptable values are: 'Orphan' - orphan the dependents;
                'Background' - allow the garbage collector to delete the dependents
                in the background; 'Foreground' - a cascading policy that deletes
                all dependents in the foreground.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to delete() or in a "
                "Deployment's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to delete() or in a "
                "Deployment's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.deleteNamespacedDeployment(
            name=effective_name,
            namespace=effective_namespace,
            dry_run=dry_run,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def readNamespacedDeployment(
        name: str,
        namespace: str,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read the specified Deployment

        operationID: readNamespacedDeployment
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param exact: Should the export be exact. Exact export maintains
            cluster-specific fields like 'Namespace'. Deprecated. Planned for
            removal in 1.18.
        :param export: Should this value be exported. Export strips fields that a user
            can not specify. Deprecated. Planned for removal in 1.18.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Deployment    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_deployment_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_deployment_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["exact"] = exact
        all_args["export"] = export
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def read(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
    ) -> "Deployment":
        r"""
            read the specified Deployment

            operationID: readNamespacedDeployment
            path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param exact: Should the export be exact. Exact export maintains
                cluster-specific fields like 'Namespace'. Deprecated. Planned for
                removal in 1.18.
            :param export: Should this value be exported. Export strips fields that a user
                can not specify. Deprecated. Planned for removal in 1.18.
            :param pretty: If 'true', then the output is pretty printed.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to read() or in a "
                "Deployment's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to read() or in a "
                "Deployment's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.readNamespacedDeployment(
            name=effective_name,
            namespace=effective_namespace,
            exact=exact,
            export=export,
            pretty=pretty,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def patchNamespacedDeployment(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update the specified Deployment

        operationID: patchNamespacedDeployment
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Deployment    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "patch_namespaced_deployment_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_deployment_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def update(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
    ) -> "Deployment":
        r"""
            partially update the specified Deployment

            operationID: patchNamespacedDeployment
            path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint. This field is
                required for apply requests (application/apply-patch) but optional
                for non-apply patch types (JsonPatch, MergePatch,
                StrategicMergePatch).
            :param force: Force is going to "force" Apply requests. It means user will
                re-acquire conflicting fields owned by other people. Force flag must
                be unset for non-apply patch requests.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to update() or in a "
                "Deployment's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.patchNamespacedDeployment(
            name=self.metadata.name,
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            force=force,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def __enter__(self):
        return self

    def __exit__(self, ex_type, ex_value, ex_traceback):
        passed = ex_type is None and ex_value is None and ex_traceback is None
        has_rollback = hasattr(self, "__rollback")
        if passed:
            try:
                self.update()
            except Exception:
                if has_rollback:
                    self.merge(getattr(self, "__rollback"), overwrite=True)
                    delattr(self, "__rollback")
                raise
        if has_rollback:
            if not passed:
                self.merge(getattr(self, "__rollback"), overwrite=True)
            delattr(self, "__rollback")
        return False

    def replaceNamespacedDeployment(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace the specified Deployment

        operationID: replaceNamespacedDeployment
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Deployment    OK
          201   Deployment    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "replace_namespaced_deployment_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_deployment_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)

    def replaceNamespacedDeploymentStatus(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace status of the specified Deployment

        operationID: replaceNamespacedDeploymentStatus
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Deployment    OK
          201   Deployment    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "replace_namespaced_deployment_status_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_deployment_status_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)


@dataclass
class DeploymentStatus(HikaruBase):
    r"""
    DeploymentStatus is the most recently observed status of the Deployment.

    Full name: v1beta2.DeploymentStatus

    Attributes:
    availableReplicas: Total number of available pods (ready for at least minReadySeconds)
        targeted by this deployment.
    collisionCount: Count of hash collisions for the Deployment. The Deployment controller
        uses this field as a collision avoidance mechanism when it needs to create the
        name for the newest ReplicaSet.
    observedGeneration: The generation observed by the deployment controller.
    readyReplicas: Total number of ready pods targeted by this deployment.
    replicas: Total number of non-terminated pods targeted by this deployment (their
        labels match the selector).
    unavailableReplicas: Total number of unavailable pods targeted by this deployment.
        This is the total number of pods that are still required for the deployment to
        have 100% available capacity. They may either be pods that are running but not yet
        available or pods that still have not been created.
    updatedReplicas: Total number of non-terminated pods targeted by this deployment that
        have the desired template spec.
    conditions: Represents the latest available observations of a deployment's current
        state.
    """

    availableReplicas: Optional[int] = None
    collisionCount: Optional[int] = None
    observedGeneration: Optional[int] = None
    readyReplicas: Optional[int] = None
    replicas: Optional[int] = None
    unavailableReplicas: Optional[int] = None
    updatedReplicas: Optional[int] = None
    conditions: Optional[List["DeploymentCondition"]] = field(default_factory=list)


@dataclass
class SelfSubjectAccessReview(HikaruDocumentBase):
    r"""
    SelfSubjectAccessReview checks whether or the current user can perform an action. Not
    filling in a spec.namespace means "in all namespaces". Self is a special case, because
    users should always be able to check whether they can perform an action

    Full name: v1.SelfSubjectAccessReview

    Attributes:
    spec: Spec holds information about the request being evaluated. user and groups must
        be empty
    apiVersion: 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: 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:
    status: Status is filled in by the server and indicates whether the request is allowed
        or not
    """

    _version = "v1"
    spec: "SelfSubjectAccessReviewSpec"
    apiVersion: Optional[str] = "authorization.k8s.io/v1"
    kind: Optional[str] = "SelfSubjectAccessReview"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["SubjectAccessReviewStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class APIServiceSpec(HikaruBase):
    r"""
    APIServiceSpec contains information for locating and communicating with a server. Only
    https is supported, though you are able to disable certificate verification.

    Full name: v1.APIServiceSpec

    Attributes:
    groupPriorityMinimum: GroupPriorityMininum is the priority this group should have at
        least. Higher priority means that the group is preferred by clients over lower
        priority ones. Note that other versions of this group might specify even higher
        GroupPriorityMininum values such that the whole group gets a higher priority. The
        primary sort is based on GroupPriorityMinimum, ordered highest number to lowest
        (20 before 10). The secondary sort is based on the alphabetical comparison of the
        name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io
        (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in
        the 2000s
    service: Service is a reference to the service for this API server. It must
        communicate on port 443 If the Service is nil, that means the handling for the API
        groupversion is handled locally on this server. The call will simply delegate to
        the normal handler chain to be fulfilled.
    versionPriority: VersionPriority controls the ordering of this API version inside of
        its group. Must be greater than zero. The primary sort is based on
        VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a
        group, the number can be small, probably in the 10s. In case of equal version
        priorities, the version string will be used to compute the order inside a group.
        If the version string is "kube-like", it will sort above non "kube-like" version
        strings, which are ordered lexicographically. "Kube-like" versions start with a
        "v", then are followed by a number (the major version), then optionally the string
        "alpha" or "beta" and another number (the minor version). These are sorted first
        by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha),
        and then by comparing major version, then minor version. An example sorted list of
        versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1,
        foo10.
    caBundle: CABundle is a PEM encoded CA bundle which will be used to validate an API
        server's serving certificate. If unspecified, system trust roots on the apiserver
        are used.
    group: Group is the API group name this server hosts
    insecureSkipTLSVerify: InsecureSkipTLSVerify disables TLS certificate verification
        when communicating with this server. This is strongly discouraged. You should use
        the CABundle instead.
    version: Version is the API version this server hosts. For example, "v1"
    """

    groupPriorityMinimum: int
    service: "ServiceReference"
    versionPriority: int
    caBundle: Optional[str] = None
    group: Optional[str] = None
    insecureSkipTLSVerify: Optional[bool] = None
    version: Optional[str] = None


@dataclass
class HorizontalPodAutoscalerStatus(HikaruBase):
    r"""
    current status of a horizontal pod autoscaler

    Full name: v1.HorizontalPodAutoscalerStatus

    Attributes:
    currentReplicas: current number of replicas of pods managed by this autoscaler.
    desiredReplicas: desired number of replicas of pods managed by this autoscaler.
    currentCPUUtilizationPercentage: current average CPU utilization over all pods,
        represented as a percentage of requested CPU, e.g. 70 means that an average pod is
        using now 70% of its requested CPU.
    lastScaleTime: last time the HorizontalPodAutoscaler scaled the number of pods; used
        by the autoscaler to control how often the number of pods is changed.
    observedGeneration: most recent generation observed by this autoscaler.
    """

    currentReplicas: int
    desiredReplicas: int
    currentCPUUtilizationPercentage: Optional[int] = None
    lastScaleTime: Optional[str] = None
    observedGeneration: Optional[int] = None


@dataclass
class NamespaceCondition(HikaruBase):
    r"""
    NamespaceCondition contains details about state of namespace.

    Full name: v1.NamespaceCondition

    Attributes:
    status: Status of the condition, one of True, False, Unknown.
    type: Type of namespace controller condition.
    lastTransitionTime: Time is a wrapper around time.Time which supports correct
        marshaling to YAML and JSON. Wrappers are provided for many of the factory methods
        that the time package offers.
    message:
    reason:
    """

    status: str
    type: str
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class DaemonSet(HikaruDocumentBase):
    r"""
    DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See
    the release notes for more information. DaemonSet represents the configuration of a
    daemon set.

    Full name: v1beta2.DaemonSet

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: The desired behavior of this daemon set. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: The current status of this daemon set. This data may be out of date by some
        window of time. Populated by the system. Read-only. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1beta2"
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "DaemonSet"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["DaemonSetSpec"] = None
    status: Optional["DaemonSetStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def deleteCollectionNamespacedDaemonSet(
        namespace: str,
        continue_: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_selector: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete collection of DaemonSet

        operationID: deleteCollectionNamespacedDaemonSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets

        :param namespace: namespace for the resource
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "delete_collection_namespaced_daemon_set_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_collection_namespaced_daemon_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["_continue"] = continue_
        all_args["dry_run"] = dry_run
        all_args["field_selector"] = field_selector
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def createNamespacedDaemonSet(
        self,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        create a DaemonSet

        operationID: createNamespacedDaemonSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets

        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DaemonSet    OK
          201   DaemonSet    Created
          202   DaemonSet    Accepted
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "create_namespaced_daemon_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "create_namespaced_daemon_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201, 202)
        return Response(result, codes_returning_objects)

    def create(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
    ) -> "DaemonSet":
        r"""
            create a DaemonSet

            operationID: createNamespacedDaemonSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to create() or in a "
                "DaemonSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.createNamespacedDaemonSet(
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def deleteNamespacedDaemonSet(
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete a DaemonSet

        operationID: deleteNamespacedDaemonSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          202   Status    Accepted
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "delete_namespaced_daemon_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_namespaced_daemon_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 202)
        return Response(result, codes_returning_objects)

    def delete(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        client: ApiClient = None,
    ) -> "DaemonSet":
        r"""
            delete a DaemonSet

            operationID: deleteNamespacedDaemonSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param grace_period_seconds: The duration in seconds before the object should
                be deleted. Value must be non-negative integer. The value zero
                indicates delete immediately. If this value is nil, the default
                grace period for the specified type will be used. Defaults to a per
                object value if not specified. zero means delete immediately.
            :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
                field will be deprecated in 1.7. Should the dependent objects be
                orphaned. If true/false, the "orphan" finalizer will be added
                to/removed from the object's finalizers list. Either this field or
                PropagationPolicy may be set, but not both.
            :param propagation_policy: Whether and how garbage collection will be
                performed. Either this field or OrphanDependents may be set, but not
                both. The default policy is decided by the existing finalizer set in
                the metadata.finalizers and the resource-specific default policy.
                Acceptable values are: 'Orphan' - orphan the dependents;
                'Background' - allow the garbage collector to delete the dependents
                in the background; 'Foreground' - a cascading policy that deletes
                all dependents in the foreground.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to delete() or in a "
                "DaemonSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to delete() or in a "
                "DaemonSet's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.deleteNamespacedDaemonSet(
            name=effective_name,
            namespace=effective_namespace,
            dry_run=dry_run,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def readNamespacedDaemonSet(
        name: str,
        namespace: str,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read the specified DaemonSet

        operationID: readNamespacedDaemonSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param exact: Should the export be exact. Exact export maintains
            cluster-specific fields like 'Namespace'. Deprecated. Planned for
            removal in 1.18.
        :param export: Should this value be exported. Export strips fields that a user
            can not specify. Deprecated. Planned for removal in 1.18.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DaemonSet    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_daemon_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_daemon_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["exact"] = exact
        all_args["export"] = export
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def read(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
    ) -> "DaemonSet":
        r"""
            read the specified DaemonSet

            operationID: readNamespacedDaemonSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param exact: Should the export be exact. Exact export maintains
                cluster-specific fields like 'Namespace'. Deprecated. Planned for
                removal in 1.18.
            :param export: Should this value be exported. Export strips fields that a user
                can not specify. Deprecated. Planned for removal in 1.18.
            :param pretty: If 'true', then the output is pretty printed.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to read() or in a "
                "DaemonSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to read() or in a "
                "DaemonSet's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.readNamespacedDaemonSet(
            name=effective_name,
            namespace=effective_namespace,
            exact=exact,
            export=export,
            pretty=pretty,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def patchNamespacedDaemonSet(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update the specified DaemonSet

        operationID: patchNamespacedDaemonSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DaemonSet    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "patch_namespaced_daemon_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_daemon_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def update(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
    ) -> "DaemonSet":
        r"""
            partially update the specified DaemonSet

            operationID: patchNamespacedDaemonSet
            path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint. This field is
                required for apply requests (application/apply-patch) but optional
                for non-apply patch types (JsonPatch, MergePatch,
                StrategicMergePatch).
            :param force: Force is going to "force" Apply requests. It means user will
                re-acquire conflicting fields owned by other people. Force flag must
                be unset for non-apply patch requests.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to update() or in a "
                "DaemonSet's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.patchNamespacedDaemonSet(
            name=self.metadata.name,
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            force=force,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def __enter__(self):
        return self

    def __exit__(self, ex_type, ex_value, ex_traceback):
        passed = ex_type is None and ex_value is None and ex_traceback is None
        has_rollback = hasattr(self, "__rollback")
        if passed:
            try:
                self.update()
            except Exception:
                if has_rollback:
                    self.merge(getattr(self, "__rollback"), overwrite=True)
                    delattr(self, "__rollback")
                raise
        if has_rollback:
            if not passed:
                self.merge(getattr(self, "__rollback"), overwrite=True)
            delattr(self, "__rollback")
        return False

    def replaceNamespacedDaemonSet(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace the specified DaemonSet

        operationID: replaceNamespacedDaemonSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DaemonSet    OK
          201   DaemonSet    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "replace_namespaced_daemon_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_daemon_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)

    def replaceNamespacedDaemonSetStatus(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace status of the specified DaemonSet

        operationID: replaceNamespacedDaemonSetStatus
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DaemonSet    OK
          201   DaemonSet    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "replace_namespaced_daemon_set_status_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_daemon_set_status_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)


@dataclass
class DaemonSetSpec(HikaruBase):
    r"""
    DaemonSetSpec is the specification of a daemon set.

    Full name: v1beta2.DaemonSetSpec

    Attributes:
    selector: A label query over pods that are managed by the daemon set. Must match in
        order to be controlled. It must match the pod template's labels. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
    template: An object that describes the pod that will be created. The DaemonSet will
        create exactly one copy of this pod on every node that matches the template's node
        selector (or on every node if no node selector is specified). More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
    minReadySeconds: The minimum number of seconds for which a newly created DaemonSet pod
        should be ready without any of its container crashing, for it to be considered
        available. Defaults to 0 (pod will be considered available as soon as it is
        ready).
    revisionHistoryLimit: The number of old history to retain to allow rollback. This is a
        pointer to distinguish between explicit zero and not specified. Defaults to 10.
    updateStrategy: An update strategy to replace existing DaemonSet pods with new pods.
    """

    selector: "LabelSelector"
    template: "PodTemplateSpec"
    minReadySeconds: Optional[int] = None
    revisionHistoryLimit: Optional[int] = None
    updateStrategy: Optional["DaemonSetUpdateStrategy"] = None


@dataclass
class Event(HikaruDocumentBase):
    r"""
    Event is a report of an event somewhere in the cluster.

    Full name: v1.Event

    Attributes:
    involvedObject: The object that this event is about.
    metadata: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    action: What action was taken/failed regarding to the Regarding object.
    apiVersion: 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
    count: The number of times this event has occurred.
    eventTime: Time when this Event was first observed.
    firstTimestamp: The time at which the event was first recorded. (Time of server
        receipt is in TypeMeta.)
    kind: 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
    lastTimestamp: The time at which the most recent occurrence of this event was
        recorded.
    message: A human-readable description of the status of this operation.
    reason: This should be a short, machine understandable string that gives the reason
        for the transition into the object's current status.
    related: Optional secondary object for more complex actions.
    reportingComponent: Name of the controller that emitted this Event, e.g.
        `kubernetes.io/kubelet`.
    reportingInstance: ID of the controller instance, e.g. `kubelet-xyzf`.
    series: Data about the Event series this event represents or nil if it's a singleton
        Event.
    source: The component reporting this event. Should be a short machine understandable
        string.
    type: Type of this event (Normal, Warning), new types could be added in the future
    """

    _version = "v1"
    involvedObject: "ObjectReference"
    metadata: "ObjectMeta"
    action: Optional[str] = None
    apiVersion: Optional[str] = "v1"
    count: Optional[int] = None
    eventTime: Optional[str] = None
    firstTimestamp: Optional[str] = None
    kind: Optional[str] = "Event"
    lastTimestamp: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None
    related: Optional["ObjectReference"] = None
    reportingComponent: Optional[str] = None
    reportingInstance: Optional[str] = None
    series: Optional["EventSeries"] = None
    source: Optional["EventSource"] = None
    type: Optional[str] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class EventSource(HikaruBase):
    r"""
    EventSource contains information for an event.

    Full name: v1.EventSource

    Attributes:
    component: Component from which the event is generated.
    host: Node name on which the event is generated.
    """

    component: Optional[str] = None
    host: Optional[str] = None


@dataclass
class ConfigMapEnvSource(HikaruBase):
    r"""
    ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The
    contents of the target ConfigMap's Data field will represent the key-value pairs as
    environment variables.

    Full name: v1.ConfigMapEnvSource

    Attributes:
    name: Name of the referent. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    optional: Specify whether the ConfigMap must be defined
    """

    name: Optional[str] = None
    optional: Optional[bool] = None


@dataclass
class DeleteOptions(HikaruDocumentBase):
    r"""
    DeleteOptions may be provided when deleting an API object.

    Full name: v1.DeleteOptions

    Attributes:
    apiVersion: 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
    gracePeriodSeconds: The duration in seconds before the object should be deleted. Value
        must be non-negative integer. The value zero indicates delete immediately. If this
        value is nil, the default grace period for the specified type will be used.
        Defaults to a per object value if not specified. zero means delete immediately.
    kind: 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
    orphanDependents: Deprecated: please use the PropagationPolicy, this field will be
        deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the
        "orphan" finalizer will be added to/removed from the object's finalizers list.
        Either this field or PropagationPolicy may be set, but not both.
    preconditions: Must be fulfilled before a deletion is carried out. If not possible, a
        409 Conflict status will be returned.
    propagationPolicy: Whether and how garbage collection will be performed. Either this
        field or OrphanDependents may be set, but not both. The default policy is decided
        by the existing finalizer set in the metadata.finalizers and the resource-specific
        default policy. Acceptable values are: 'Orphan' - orphan the dependents;
        'Background' - allow the garbage collector to delete the dependents in the
        background; 'Foreground' - a cascading policy that deletes all dependents in the
        foreground.
    dryRun: When present, indicates that modifications should not be persisted. An invalid
        or unrecognized dryRun directive will result in an error response and no further
        processing of the request. Valid values are: - All: all dry run stages will be
        processed
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    gracePeriodSeconds: Optional[int] = None
    kind: Optional[str] = "DeleteOptions"
    orphanDependents: Optional[bool] = None
    preconditions: Optional["Preconditions"] = None
    propagationPolicy: Optional[str] = None
    dryRun: Optional[List[str]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class RollingUpdateDeployment(HikaruBase):
    r"""
    Spec to control the desired behavior of rolling update.

    Full name: v1beta2.RollingUpdateDeployment

    Attributes:
    maxSurge: The maximum number of pods that can be scheduled above the desired number of
        pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex:
        10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from
        percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the
        new ReplicaSet can be scaled up immediately when the rolling update starts, such
        that the total number of old and new pods do not exceed 130% of desired pods. Once
        old pods have been killed, new ReplicaSet can be scaled up further, ensuring that
        total number of pods running at any time during the update is at most 130% of
        desired pods.
    maxUnavailable: The maximum number of pods that can be unavailable during the update.
        Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
        Absolute number is calculated from percentage by rounding down. This can not be 0
        if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old
        ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling
        update starts. Once new pods are ready, old ReplicaSet can be scaled down further,
        followed by scaling up the new ReplicaSet, ensuring that the total number of pods
        available at all times during the update is at least 70% of desired pods.
    """

    maxSurge: Optional[object] = field(default_factory=dict)
    maxUnavailable: Optional[object] = field(default_factory=dict)


@dataclass
class ReplicaSetSpec(HikaruBase):
    r"""
    ReplicaSetSpec is the specification of a ReplicaSet.

    Full name: v1beta2.ReplicaSetSpec

    Attributes:
    selector: Selector is a label query over pods that should match the replica count.
        Label keys and values that must match in order to be controlled by this replica
        set. It must match the pod template's labels. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
    minReadySeconds: Minimum number of seconds for which a newly created pod should be
        ready without any of its container crashing, for it to be considered available.
        Defaults to 0 (pod will be considered available as soon as it is ready)
    replicas: Replicas is the number of desired replicas. This is a pointer to distinguish
        between explicit zero and unspecified. Defaults to 1. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
    template: Template is the object that describes the pod that will be created if
        insufficient replicas are detected. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
    """

    selector: "LabelSelector"
    minReadySeconds: Optional[int] = None
    replicas: Optional[int] = None
    template: Optional["PodTemplateSpec"] = None


@dataclass
class PodDNSConfig(HikaruBase):
    r"""
    PodDNSConfig defines the DNS parameters of a pod in addition to those generated from
    DNSPolicy.

    Full name: v1.PodDNSConfig

    Attributes:
    nameservers: A list of DNS name server IP addresses. This will be appended to the base
        nameservers generated from DNSPolicy. Duplicated nameservers will be removed.
    options: A list of DNS resolver options. This will be merged with the base options
        generated from DNSPolicy. Duplicated entries will be removed. Resolution options
        given in Options will override those that appear in the base DNSPolicy.
    searches: A list of DNS search domains for host-name lookup. This will be appended to
        the base search paths generated from DNSPolicy. Duplicated search paths will be
        removed.
    """

    nameservers: Optional[List[str]] = field(default_factory=list)
    options: Optional[List["PodDNSConfigOption"]] = field(default_factory=list)
    searches: Optional[List[str]] = field(default_factory=list)


@dataclass
class Handler(HikaruBase):
    r"""
    Handler defines a specific action that should be taken

    Full name: v1.Handler

    Attributes:
    exec: One and only one of the following should be specified. Exec specifies the action
        to take.
    httpGet: HTTPGet specifies the http request to perform.
    tcpSocket: TCPSocket specifies an action involving a TCP port. TCP hooks not yet
        supported
    """

    exec: Optional["ExecAction"] = None
    httpGet: Optional["HTTPGetAction"] = None
    tcpSocket: Optional["TCPSocketAction"] = None


@dataclass
class Node(HikaruDocumentBase):
    r"""
    Node is a worker node in Kubernetes. Each node will have a unique identifier in the
    cache (i.e. in etcd).

    Full name: Node

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Spec defines the behavior of a node.
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Most recently observed status of the node. Populated by the system. Read-only.
        More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "Node"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["NodeSpec"] = None
    status: Optional["NodeStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class NodeList(HikaruDocumentBase):
    r"""
    NodeList is the whole list of all Nodes which have been registered with master.

    Full name: v1.NodeList

    Attributes:
    items: List of nodes
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["Node"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "NodeList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class WatchEvent(HikaruBase):
    r"""
    Event represents a single event to a watched resource.

    Full name: v1.WatchEvent

    Attributes:
    object: Object is: * If Type is Added or Modified: the new state of the object. * If
        Type is Deleted: the state of the object immediately before deletion. * If Type is
        Error: *Status is recommended; other types may make sense depending on context.
    type:
    """

    object: object
    type: str


@dataclass
class HTTPHeader(HikaruBase):
    r"""
    HTTPHeader describes a custom header to be used in HTTP probes

    Full name: v1.HTTPHeader

    Attributes:
    name: The header field name
    value: The header field value
    """

    name: str
    value: str


@dataclass
class TypedLocalObjectReference(HikaruBase):
    r"""
    TypedLocalObjectReference contains enough information to let you locate the typed
    referenced object inside the same namespace.

    Full name: v1.TypedLocalObjectReference

    Attributes:
    kind: Kind is the type of resource being referenced
    name: Name is the name of resource being referenced
    apiGroup: APIGroup is the group for the resource being referenced. If APIGroup is not
        specified, the specified Kind must be in the core API group. For any other
        third-party types, APIGroup is required.
    """

    kind: str
    name: str
    apiGroup: Optional[str] = None


@dataclass
class ReplicationControllerSpec(HikaruBase):
    r"""
    ReplicationControllerSpec is the specification of a replication controller.

    Full name: v1.ReplicationControllerSpec

    Attributes:
    minReadySeconds: Minimum number of seconds for which a newly created pod should be
        ready without any of its container crashing, for it to be considered available.
        Defaults to 0 (pod will be considered available as soon as it is ready)
    replicas: Replicas is the number of desired replicas. This is a pointer to distinguish
        between explicit zero and unspecified. Defaults to 1. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
    template: Template is the object that describes the pod that will be created if
        insufficient replicas are detected. This takes precedence over a TemplateRef. More
        info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
    selector: Selector is a label query over pods that should match the Replicas count. If
        Selector is empty, it is defaulted to the labels present on the Pod template.
        Label keys and values that must match in order to be controlled by this
        replication controller, if empty defaulted to labels on Pod template. More info:
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
    """

    minReadySeconds: Optional[int] = None
    replicas: Optional[int] = None
    template: Optional["PodTemplateSpec"] = None
    selector: Optional[Dict[str, str]] = field(default_factory=dict)


@dataclass
class TokenRequest(HikaruDocumentBase):
    r"""
    TokenRequest requests a token for a given service account.

    Full name: v1.TokenRequest

    Attributes:
    spec:
    apiVersion: 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: 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:
    status:
    """

    _version = "v1"
    spec: "TokenRequestSpec"
    apiVersion: Optional[str] = "authentication.k8s.io/v1"
    kind: Optional[str] = "TokenRequest"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["TokenRequestStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class TokenRequestStatus(HikaruBase):
    r"""
    TokenRequestStatus is the result of a token request.

    Full name: v1.TokenRequestStatus

    Attributes:
    expirationTimestamp: ExpirationTimestamp is the time of expiration of the returned
        token.
    token: Token is the opaque bearer token.
    """

    expirationTimestamp: str
    token: str


@dataclass
class CustomResourceDefinitionList(HikaruDocumentBase):
    r"""
    CustomResourceDefinitionList is a list of CustomResourceDefinition objects.

    Full name: v1.CustomResourceDefinitionList

    Attributes:
    items: items list individual CustomResourceDefinition objects
    apiVersion: 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: 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:
    """

    _version = "v1"
    items: List["CustomResourceDefinition"]
    apiVersion: Optional[str] = "apiextensions.k8s.io/v1"
    kind: Optional[str] = "CustomResourceDefinitionList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Preconditions(HikaruBase):
    r"""
    Preconditions must be fulfilled before an operation (update, delete, etc.) is carried
    out.

    Full name: v1.Preconditions

    Attributes:
    resourceVersion: Specifies the target ResourceVersion
    uid: Specifies the target UID.
    """

    resourceVersion: Optional[str] = None
    uid: Optional[str] = None


@dataclass
class NetworkPolicyPeer(HikaruBase):
    r"""
    NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of
    fields are allowed

    Full name: v1.NetworkPolicyPeer

    Attributes:
    ipBlock: IPBlock defines policy on a particular IPBlock. If this field is set then
        neither of the other fields can be.
    namespaceSelector: Selects Namespaces using cluster-scoped labels. This field follows
        standard label selector semantics; if present but empty, it selects all
        namespaces. If PodSelector is also set, then the NetworkPolicyPeer as a whole
        selects the Pods matching PodSelector in the Namespaces selected by
        NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by
        NamespaceSelector.
    podSelector: This is a label selector which selects Pods. This field follows standard
        label selector semantics; if present but empty, it selects all pods. If
        NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the
        Pods matching PodSelector in the Namespaces selected by NamespaceSelector.
        Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.
    """

    ipBlock: Optional["IPBlock"] = None
    namespaceSelector: Optional["LabelSelector"] = None
    podSelector: Optional["LabelSelector"] = None


@dataclass
class NetworkPolicyPort(HikaruBase):
    r"""
    NetworkPolicyPort describes a port to allow traffic on

    Full name: v1.NetworkPolicyPort

    Attributes:
    protocol: The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified,
        this field defaults to TCP.
    port: The port on the given protocol. This can either be a numerical or named port on
        a pod. If this field is not provided, this matches all port names and numbers.
    """

    protocol: Optional[str] = None
    port: Optional[object] = field(default_factory=dict)


@dataclass
class NamespaceStatus(HikaruBase):
    r"""
    NamespaceStatus is information about the current status of a Namespace.

    Full name: v1.NamespaceStatus

    Attributes:
    phase: Phase is the current lifecycle phase of the namespace. More info:
        https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
    conditions: Represents the latest available observations of a namespace's current
        state.
    """

    phase: Optional[str] = None
    conditions: Optional[List["NamespaceCondition"]] = field(default_factory=list)


@dataclass
class Affinity(HikaruBase):
    r"""
    Affinity is a group of affinity scheduling rules.

    Full name: v1.Affinity

    Attributes:
    nodeAffinity: Describes node affinity scheduling rules for the pod.
    podAffinity: Describes pod affinity scheduling rules (e.g. co-locate this pod in the
        same node, zone, etc. as some other pod(s)).
    podAntiAffinity: Describes pod anti-affinity scheduling rules (e.g. avoid putting this
        pod in the same node, zone, etc. as some other pod(s)).
    """

    nodeAffinity: Optional["NodeAffinity"] = None
    podAffinity: Optional["PodAffinity"] = None
    podAntiAffinity: Optional["PodAntiAffinity"] = None


@dataclass
class NodeAffinity(HikaruBase):
    r"""
    Node affinity is a group of node affinity scheduling rules.

    Full name: v1.NodeAffinity

    Attributes:
    requiredDuringSchedulingIgnoredDuringExecution: If the affinity requirements specified
        by this field are not met at scheduling time, the pod will not be scheduled onto
        the node. If the affinity requirements specified by this field cease to be met at
        some point during pod execution (e.g. due to an update), the system may or may not
        try to eventually evict the pod from its node.
    preferredDuringSchedulingIgnoredDuringExecution: The scheduler will prefer to schedule
        pods to nodes that satisfy the affinity expressions specified by this field, but
        it may choose a node that violates one or more of the expressions. The node that
        is most preferred is the one with the greatest sum of weights, i.e. for each node
        that meets all of the scheduling requirements (resource request,
        requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating
        through the elements of this field and adding "weight" to the sum if the node
        matches the corresponding matchExpressions; the node(s) with the highest sum are
        the most preferred.
    """

    requiredDuringSchedulingIgnoredDuringExecution: Optional["NodeSelector"] = None
    preferredDuringSchedulingIgnoredDuringExecution: Optional[
        List["PreferredSchedulingTerm"]
    ] = field(default_factory=list)


@dataclass
class TokenReviewStatus(HikaruBase):
    r"""
    TokenReviewStatus is the result of the token authentication request.

    Full name: v1.TokenReviewStatus

    Attributes:
    authenticated: Authenticated indicates that the token was associated with a known
        user.
    error: Error indicates that the token couldn't be checked
    user: User is the UserInfo associated with the provided token.
    audiences: Audiences are audience identifiers chosen by the authenticator that are
        compatible with both the TokenReview and token. An identifier is any identifier in
        the intersection of the TokenReviewSpec audiences and the token's audiences. A
        client of the TokenReview API that sets the spec.audiences field should validate
        that a compatible audience identifier is returned in the status.audiences field to
        ensure that the TokenReview server is audience aware. If a TokenReview returns an
        empty status.audience field where status.authenticated is "true", the token is
        valid against the audience of the Kubernetes API server.
    """

    authenticated: Optional[bool] = None
    error: Optional[str] = None
    user: Optional["UserInfo"] = None
    audiences: Optional[List[str]] = field(default_factory=list)


@dataclass
class VolumeNodeResources(HikaruBase):
    r"""
    VolumeNodeResources is a set of resource limits for scheduling of volumes.

    Full name: v1.VolumeNodeResources

    Attributes:
    count: Maximum number of unique volumes managed by the CSI driver that can be used on
        a node. A volume that is both attached and mounted on a node is considered to be
        used once, not twice. The same rule applies for a unique volume that is shared
        among multiple pods on the same node. If this field is not specified, then the
        supported number of volumes on this node is unbounded.
    """

    count: Optional[int] = None


@dataclass
class ControllerRevision(HikaruDocumentBase):
    r"""
    DEPRECATED - This group version of ControllerRevision is deprecated by
    apps/v1/ControllerRevision. See the release notes for more information.
    ControllerRevision implements an immutable snapshot of state data. Clients are
    responsible for serializing and deserializing the objects that contain their internal
    state. Once a ControllerRevision has been successfully created, it can not be updated.
    The API Server will fail validation of all requests that attempt to mutate the Data
    field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
    the DaemonSet and StatefulSet controllers for update and rollback, this object is
    beta. However, it may be subject to name and representation changes in future
    releases, and clients should not depend on its stability. It is primarily for internal
    use by controllers.

    Full name: v1beta2.ControllerRevision

    Attributes:
    revision: Revision indicates the revision of the state represented by Data.
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    data: Data is the serialized representation of the state.
    """

    _version = "v1beta2"
    revision: int
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "ControllerRevision"
    metadata: Optional["ObjectMeta"] = None
    data: Optional[object] = field(default_factory=dict)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def deleteCollectionNamespacedControllerRevision(
        namespace: str,
        continue_: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_selector: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete collection of ControllerRevision

        operationID: deleteCollectionNamespacedControllerRevision
        path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions

        :param namespace: namespace for the resource
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "delete_collection_namespaced_controller_revision_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_collection_namespaced_controller_revision_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["_continue"] = continue_
        all_args["dry_run"] = dry_run
        all_args["field_selector"] = field_selector
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def createNamespacedControllerRevision(
        self,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        create a ControllerRevision

        operationID: createNamespacedControllerRevision
        path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions

        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ControllerRevision    OK
          201   ControllerRevision    Created
          202   ControllerRevision    Accepted
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "create_namespaced_controller_revision_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "create_namespaced_controller_revision_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201, 202)
        return Response(result, codes_returning_objects)

    def create(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
    ) -> "ControllerRevision":
        r"""
            create a ControllerRevision

            operationID: createNamespacedControllerRevision
            path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to create() or in a "
                "ControllerRevision's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.createNamespacedControllerRevision(
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def deleteNamespacedControllerRevision(
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        body: Optional["DeleteOptions"] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        delete a ControllerRevision

        operationID: deleteNamespacedControllerRevision
        path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param grace_period_seconds: The duration in seconds before the object should
            be deleted. Value must be non-negative integer. The value zero
            indicates delete immediately. If this value is nil, the default
            grace period for the specified type will be used. Defaults to a per
            object value if not specified. zero means delete immediately.
        :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
            field will be deprecated in 1.7. Should the dependent objects be
            orphaned. If true/false, the "orphan" finalizer will be added
            to/removed from the object's finalizers list. Either this field or
            PropagationPolicy may be set, but not both.
        :param propagation_policy: Whether and how garbage collection will be
            performed. Either this field or OrphanDependents may be set, but not
            both. The default policy is decided by the existing finalizer set in
            the metadata.finalizers and the resource-specific default policy.
            Acceptable values are: 'Orphan' - orphan the dependents;
            'Background' - allow the garbage collector to delete the dependents
            in the background; 'Foreground' - a cascading policy that deletes
            all dependents in the foreground.
        :param body:
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Status    OK
          202   Status    Accepted
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "delete_namespaced_controller_revision_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "delete_namespaced_controller_revision_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["grace_period_seconds"] = grace_period_seconds
        all_args["orphan_dependents"] = orphan_dependents
        all_args["propagation_policy"] = propagation_policy
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 202)
        return Response(result, codes_returning_objects)

    def delete(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        grace_period_seconds: Optional[int] = None,
        orphan_dependents: Optional[bool] = None,
        propagation_policy: Optional[str] = None,
        client: ApiClient = None,
    ) -> "ControllerRevision":
        r"""
            delete a ControllerRevision

            operationID: deleteNamespacedControllerRevision
            path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param grace_period_seconds: The duration in seconds before the object should
                be deleted. Value must be non-negative integer. The value zero
                indicates delete immediately. If this value is nil, the default
                grace period for the specified type will be used. Defaults to a per
                object value if not specified. zero means delete immediately.
            :param orphan_dependents: Deprecated: please use the PropagationPolicy, this
                field will be deprecated in 1.7. Should the dependent objects be
                orphaned. If true/false, the "orphan" finalizer will be added
                to/removed from the object's finalizers list. Either this field or
                PropagationPolicy may be set, but not both.
            :param propagation_policy: Whether and how garbage collection will be
                performed. Either this field or OrphanDependents may be set, but not
                both. The default policy is decided by the existing finalizer set in
                the metadata.finalizers and the resource-specific default policy.
                Acceptable values are: 'Orphan' - orphan the dependents;
                'Background' - allow the garbage collector to delete the dependents
                in the background; 'Foreground' - a cascading policy that deletes
                all dependents in the foreground.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to delete() or in a "
                "ControllerRevision's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to delete() or in a "
                "ControllerRevision's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.deleteNamespacedControllerRevision(
            name=effective_name,
            namespace=effective_namespace,
            dry_run=dry_run,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    @staticmethod
    def readNamespacedControllerRevision(
        name: str,
        namespace: str,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read the specified ControllerRevision

        operationID: readNamespacedControllerRevision
        path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param exact: Should the export be exact. Exact export maintains
            cluster-specific fields like 'Namespace'. Deprecated. Planned for
            removal in 1.18.
        :param export: Should this value be exported. Export strips fields that a user
            can not specify. Deprecated. Planned for removal in 1.18.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ControllerRevision    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_controller_revision_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_controller_revision_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["exact"] = exact
        all_args["export"] = export
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def read(
        self,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        exact: Optional[bool] = None,
        export: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
    ) -> "ControllerRevision":
        r"""
            read the specified ControllerRevision

            operationID: readNamespacedControllerRevision
            path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}

            :param name: name for the resource. NOTE: if you leave out the name from the
                arguments you *must* have filled in the name attribute in the
                metadata for the resource!
            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param exact: Should the export be exact. Exact export maintains
                cluster-specific fields like 'Namespace'. Deprecated. Planned for
                removal in 1.18.
            :param export: Should this value be exported. Export strips fields that a user
                can not specify. Deprecated. Planned for removal in 1.18.
            :param pretty: If 'true', then the output is pretty printed.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to read() or in a "
                "ControllerRevision's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace

        if name is not None:
            effective_name = name
        elif not self.metadata or not self.metadata.name:
            raise RuntimeError(
                "There must be a name supplied in either "
                "the arguments to read() or in a "
                "ControllerRevision's metadata"
            )
        else:
            effective_name = self.metadata.name
        res = self.readNamespacedControllerRevision(
            name=effective_name,
            namespace=effective_namespace,
            exact=exact,
            export=export,
            pretty=pretty,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def patchNamespacedControllerRevision(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update the specified ControllerRevision

        operationID: patchNamespacedControllerRevision
        path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ControllerRevision    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "patch_namespaced_controller_revision_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_controller_revision_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def update(
        self,
        namespace: Optional[str] = None,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
    ) -> "ControllerRevision":
        r"""
            partially update the specified ControllerRevision

            operationID: patchNamespacedControllerRevision
            path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}

            :param namespace: namespace for the resource. NOTE: if you leave out the
                namespace from the arguments you *must* have filled in the namespace
                attribute in the metadata for the resource!
            :param dry_run: When present, indicates that modifications should not be
                persisted. An invalid or unrecognized dryRun directive will result
                in an error response and no further processing of the request. Valid
                values are: - All: all dry run stages will be processed
            :param field_manager: fieldManager is a name associated with the actor or
                entity that is making these changes. The value must be less than or
                128 characters long, and only contain printable characters, as
                defined by https://golang.org/pkg/unicode/#IsPrint. This field is
                required for apply requests (application/apply-patch) but optional
                for non-apply patch types (JsonPatch, MergePatch,
                StrategicMergePatch).
            :param force: Force is going to "force" Apply requests. It means user will
                re-acquire conflicting fields owned by other people. Force flag must
                be unset for non-apply patch requests.
            :param client: optional; instance of kubernetes.client.api_client.ApiClient
            :return: returns self; the state of self may be permuted with a returned
                HikaruDocumentBase object, whose values will be merged into self
        (if of the same type).
            :raises: KubernetesException. Raised only by the CRUD methods to signal
                that a return code of 400 or higher was returned by the underlying
                Kubernetes library.
        """

        # noinspection PyDataclass
        client = client or self.client

        if namespace is not None:
            effective_namespace = namespace
        elif not self.metadata or not self.metadata.namespace:
            raise RuntimeError(
                "There must be a namespace supplied in either "
                "the arguments to update() or in a "
                "ControllerRevision's metadata"
            )
        else:
            effective_namespace = self.metadata.namespace
        res = self.patchNamespacedControllerRevision(
            name=self.metadata.name,
            namespace=effective_namespace,
            dry_run=dry_run,
            field_manager=field_manager,
            force=force,
            client=client,
        )
        if not 200 <= res.code <= 299:
            raise KubernetesException("Kubernetes returned error " + str(res.code))
        if self.__class__.__name__ == res.obj.__class__.__name__:
            self.merge(res.obj, overwrite=True)
        return self

    def __enter__(self):
        return self

    def __exit__(self, ex_type, ex_value, ex_traceback):
        passed = ex_type is None and ex_value is None and ex_traceback is None
        has_rollback = hasattr(self, "__rollback")
        if passed:
            try:
                self.update()
            except Exception:
                if has_rollback:
                    self.merge(getattr(self, "__rollback"), overwrite=True)
                    delattr(self, "__rollback")
                raise
        if has_rollback:
            if not passed:
                self.merge(getattr(self, "__rollback"), overwrite=True)
            delattr(self, "__rollback")
        return False

    def replaceNamespacedControllerRevision(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace the specified ControllerRevision

        operationID: replaceNamespacedControllerRevision
        path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ControllerRevision    OK
          201   ControllerRevision    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "replace_namespaced_controller_revision_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_controller_revision_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)


@dataclass
class ComponentCondition(HikaruBase):
    r"""
    Information about the condition of a component.

    Full name: v1.ComponentCondition

    Attributes:
    status: Status of the condition for a component. Valid values for "Healthy": "True",
        "False", or "Unknown".
    type: Type of condition for a component. Valid value: "Healthy"
    error: Condition error code for a component. For example, a health check error code.
    message: Message about the condition for a component. For example, information about a
        health check.
    """

    status: str
    type: str
    error: Optional[str] = None
    message: Optional[str] = None


@dataclass
class ClusterRoleBindingList(HikaruDocumentBase):
    r"""
    ClusterRoleBindingList is a collection of ClusterRoleBindings

    Full name: v1.ClusterRoleBindingList

    Attributes:
    items: Items is a list of ClusterRoleBindings
    apiVersion: 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: 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: Standard object's metadata.
    """

    _version = "v1"
    items: List["ClusterRoleBinding"]
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "ClusterRoleBindingList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class DaemonEndpoint(HikaruBase):
    r"""
    DaemonEndpoint contains information about a single Daemon endpoint.

    Full name: v1.DaemonEndpoint

    Attributes:
    Port: Port number of the given endpoint.
    """

    Port: int


@dataclass
class MutatingWebhook(HikaruBase):
    r"""
    MutatingWebhook describes an admission webhook and the resources and operations it
    applies to.

    Full name: v1.MutatingWebhook

    Attributes:
    admissionReviewVersions: AdmissionReviewVersions is an ordered list of preferred
        `AdmissionReview` versions the Webhook expects. API server will try to use first
        version in the list which it supports. If none of the versions specified in this
        list supported by API server, validation will fail for this object. If a persisted
        webhook configuration specifies allowed versions and does not include any versions
        known to the API Server, calls to the webhook will fail and be subject to the
        failure policy.
    clientConfig: ClientConfig defines how to communicate with the hook. Required
    name: The name of the admission webhook. Name should be fully qualified, e.g.,
        imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and
        kubernetes.io is the name of the organization. Required.
    sideEffects: SideEffects states whether this webhook has side effects. Acceptable
        values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some
        or Unknown). Webhooks with side effects MUST implement a reconciliation system,
        since a request may be rejected by a future step in the admission change and the
        side effects therefore need to be undone. Requests with the dryRun attribute will
        be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
    failurePolicy: FailurePolicy defines how unrecognized errors from the admission
        endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.
    matchPolicy: matchPolicy defines how the "rules" list is used to match incoming
        requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request
        only if it exactly matches a specified rule. For example, if deployments can be
        modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only
        included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a
        request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. -
        Equivalent: match a request if modifies a resource listed in rules, even via
        another API group or version. For example, if deployments can be modified via
        apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included
        `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to
        apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the
        webhook. Defaults to "Equivalent"
    namespaceSelector: NamespaceSelector decides whether to run the webhook on an object
        based on whether the namespace for that object matches the selector. If the object
        itself is a namespace, the matching is performed on object.metadata.labels. If the
        object is another cluster scoped resource, it never skips the webhook. For
        example, to run the webhook on any objects whose namespace is not associated with
        "runlevel" of "0" or "1"; you will set the selector as follows:
        "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator":
        "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the webhook
        on any objects whose namespace is associated with the "environment" of "prod" or
        "staging"; you will set the selector as follows: "namespaceSelector": {
        "matchExpressions": [ { "key": "environment", "operator": "In", "values": [
        "prod", "staging" ] } ] } See
        https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more
        examples of label selectors. Default to the empty LabelSelector, which matches
        everything.
    objectSelector: ObjectSelector decides whether to run the webhook based on if the
        object has matching labels. objectSelector is evaluated against both the oldObject
        and newObject that would be sent to the webhook, and is considered to match if
        either object matches the selector. A null object (oldObject in the case of
        create, or newObject in the case of delete) or an object that cannot have labels
        (like a DeploymentRollback or a PodProxyOptions object) is not considered to
        match. Use the object selector only if the webhook is opt-in, because end users
        may skip the admission webhook by setting the labels. Default to the empty
        LabelSelector, which matches everything.
    reinvocationPolicy: reinvocationPolicy indicates whether this webhook should be called
        multiple times as part of a single admission evaluation. Allowed values are
        "Never" and "IfNeeded". Never: the webhook will not be called more than once in a
        single admission evaluation. IfNeeded: the webhook will be called at least one
        additional time as part of the admission evaluation if the object being admitted
        is modified by other admission plugins after the initial webhook call. Webhooks
        that specify this option *must* be idempotent, able to process objects they
        previously admitted. Note: * the number of additional invocations is not
        guaranteed to be exactly one. * if additional invocations result in further
        modifications to the object, webhooks are not guaranteed to be invoked again. *
        webhooks that use this option may be reordered to minimize the number of
        additional invocations. * to validate an object after all mutations are guaranteed
        complete, use a validating admission webhook instead. Defaults to "Never".
    timeoutSeconds: TimeoutSeconds specifies the timeout for this webhook. After the
        timeout passes, the webhook call will be ignored or the API call will fail based
        on the failure policy. The timeout value must be between 1 and 30 seconds. Default
        to 10 seconds.
    rules: Rules describes what operations on what resources/subresources the webhook
        cares about. The webhook cares about an operation if it matches _any_ Rule.
        However, in order to prevent ValidatingAdmissionWebhooks and
        MutatingAdmissionWebhooks from putting the cluster in a state which cannot be
        recovered from without completely disabling the plugin,
        ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on
        admission requests for ValidatingWebhookConfiguration and
        MutatingWebhookConfiguration objects.
    """

    admissionReviewVersions: List[str]
    clientConfig: "WebhookClientConfig"
    name: str
    sideEffects: str
    failurePolicy: Optional[str] = None
    matchPolicy: Optional[str] = None
    namespaceSelector: Optional["LabelSelector"] = None
    objectSelector: Optional["LabelSelector"] = None
    reinvocationPolicy: Optional[str] = None
    timeoutSeconds: Optional[int] = None
    rules: Optional[List["RuleWithOperations"]] = field(default_factory=list)


@dataclass
class PodSpec(HikaruBase):
    r"""
    PodSpec is a description of a pod.

    Full name: v1.PodSpec

    Attributes:
    containers: List of containers belonging to the pod. Containers cannot currently be
        added or removed. There must be at least one container in a Pod. Cannot be
        updated.
    activeDeadlineSeconds: Optional duration in seconds the pod may be active on the node
        relative to StartTime before the system will actively try to mark it failed and
        kill associated containers. Value must be a positive integer.
    affinity: If specified, the pod's scheduling constraints
    automountServiceAccountToken: AutomountServiceAccountToken indicates whether a service
        account token should be automatically mounted.
    dnsConfig: Specifies the DNS parameters of a pod. Parameters specified here will be
        merged to the generated DNS configuration based on DNSPolicy.
    dnsPolicy: Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are
        'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters
        given in DNSConfig will be merged with the policy selected with DNSPolicy. To have
        DNS options set along with hostNetwork, you have to specify DNS policy explicitly
        to 'ClusterFirstWithHostNet'.
    enableServiceLinks: EnableServiceLinks indicates whether information about services
        should be injected into pod's environment variables, matching the syntax of Docker
        links. Optional: Defaults to true.
    hostIPC: Use the host's ipc namespace. Optional: Default to false.
    hostNetwork: Host networking requested for this pod. Use the host's network namespace.
        If this option is set, the ports that will be used must be specified. Default to
        false.
    hostPID: Use the host's pid namespace. Optional: Default to false.
    hostname: Specifies the hostname of the Pod If not specified, the pod's hostname will
        be set to a system-defined value.
    nodeName: NodeName is a request to schedule this pod onto a specific node. If it is
        non-empty, the scheduler simply schedules this pod onto that node, assuming that
        it fits resource requirements.
    preemptionPolicy: PreemptionPolicy is the Policy for preempting pods with lower
        priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if
        unset. This field is alpha-level and is only honored by servers that enable the
        NonPreemptingPriority feature.
    priority: The priority value. Various system components use this field to find the
        priority of the pod. When Priority Admission Controller is enabled, it prevents
        users from setting this field. The admission controller populates this field from
        PriorityClassName. The higher the value, the higher the priority.
    priorityClassName: If specified, indicates the pod's priority. "system-node-critical"
        and "system-cluster-critical" are two special keywords which indicate the highest
        priorities with the former being the highest priority. Any other name must be
        defined by creating a PriorityClass object with that name. If not specified, the
        pod priority will be default or zero if there is no default.
    restartPolicy: Restart policy for all containers within the pod. One of Always,
        OnFailure, Never. Default to Always. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
    runtimeClassName: RuntimeClassName refers to a RuntimeClass object in the node.k8s.io
        group, which should be used to run this pod. If no RuntimeClass resource matches
        the named class, the pod will not be run. If unset or empty, the "legacy"
        RuntimeClass will be used, which is an implicit class with an empty definition
        that uses the default runtime handler. More info:
        https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta
        feature as of Kubernetes v1.14.
    schedulerName: If specified, the pod will be dispatched by specified scheduler. If not
        specified, the pod will be dispatched by default scheduler.
    securityContext: SecurityContext holds pod-level security attributes and common
        container settings. Optional: Defaults to empty. See type description for default
        values of each field.
    serviceAccount: DeprecatedServiceAccount is a depreciated alias for
        ServiceAccountName. Deprecated: Use serviceAccountName instead.
    serviceAccountName: ServiceAccountName is the name of the ServiceAccount to use to run
        this pod. More info:
        https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
    shareProcessNamespace: Share a single process namespace between all of the containers
        in a pod. When this is set containers will be able to view and signal processes
        from other containers in the same pod, and the first process in each container
        will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set.
        Optional: Default to false.
    subdomain: If specified, the fully qualified Pod hostname will be
        "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>". If not specified,
        the pod will not have a domainname at all.
    terminationGracePeriodSeconds: Optional duration in seconds the pod needs to terminate
        gracefully. May be decreased in delete request. Value must be non-negative
        integer. The value zero indicates delete immediately. If this value is nil, the
        default grace period will be used instead. The grace period is the duration in
        seconds after the processes running in the pod are sent a termination signal and
        the time when the processes are forcibly halted with a kill signal. Set this value
        longer than the expected cleanup time for your process. Defaults to 30 seconds.
    ephemeralContainers: List of ephemeral containers run in this pod. Ephemeral
        containers may be run in an existing pod to perform user-initiated actions such as
        debugging. This list cannot be specified when creating a pod, and it cannot be
        modified by updating the pod spec. In order to add an ephemeral container to an
        existing pod, use the pod's ephemeralcontainers subresource. This field is
        alpha-level and is only honored by servers that enable the EphemeralContainers
        feature.
    hostAliases: HostAliases is an optional list of hosts and IPs that will be injected
        into the pod's hosts file if specified. This is only valid for non-hostNetwork
        pods.
    imagePullSecrets: ImagePullSecrets is an optional list of references to secrets in the
        same namespace to use for pulling any of the images used by this PodSpec. If
        specified, these secrets will be passed to individual puller implementations for
        them to use. For example, in the case of docker, only DockerConfig type secrets
        are honored. More info:
        https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
    initContainers: List of initialization containers belonging to the pod. Init
        containers are executed in order prior to containers being started. If any init
        container fails, the pod is considered to have failed and is handled according to
        its restartPolicy. The name for an init container or normal container must be
        unique among all containers. Init containers may not have Lifecycle actions,
        Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of
        an init container are taken into account during scheduling by finding the highest
        request/limit for each resource type, and then using the max of of that value or
        the sum of the normal containers. Limits are applied to init containers in a
        similar fashion. Init containers cannot currently be added or removed. Cannot be
        updated. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
    nodeSelector: NodeSelector is a selector which must be true for the pod to fit on a
        node. Selector which must match a node's labels for the pod to be scheduled on
        that node. More info:
        https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
    overhead: Overhead represents the resource overhead associated with running a pod for
        a given RuntimeClass. This field will be autopopulated at admission time by the
        RuntimeClass admission controller. If the RuntimeClass admission controller is
        enabled, overhead must not be set in Pod create requests. The RuntimeClass
        admission controller will reject Pod create requests which have the overhead
        already set. If RuntimeClass is configured and selected in the PodSpec, Overhead
        will be set to the value defined in the corresponding RuntimeClass, otherwise it
        will remain unset and treated as zero. More info:
        https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field
        is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable
        the PodOverhead feature.
    readinessGates: If specified, all readiness gates will be evaluated for pod readiness.
        A pod is ready when all its containers are ready AND all conditions specified in
        the readiness gates have status equal to "True" More info:
        https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md
    tolerations: If specified, the pod's tolerations.
    topologySpreadConstraints: TopologySpreadConstraints describes how a group of pods
        ought to spread across topology domains. Scheduler will schedule pods in a way
        which abides by the constraints. This field is alpha-level and is only honored by
        clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints
        are ANDed.
    volumes: List of volumes that can be mounted by containers belonging to the pod. More
        info: https://kubernetes.io/docs/concepts/storage/volumes
    """

    containers: List["Container"]
    activeDeadlineSeconds: Optional[int] = None
    affinity: Optional["Affinity"] = None
    automountServiceAccountToken: Optional[bool] = None
    dnsConfig: Optional["PodDNSConfig"] = None
    dnsPolicy: Optional[str] = None
    enableServiceLinks: Optional[bool] = None
    hostIPC: Optional[bool] = None
    hostNetwork: Optional[bool] = None
    hostPID: Optional[bool] = None
    hostname: Optional[str] = None
    nodeName: Optional[str] = None
    preemptionPolicy: Optional[str] = None
    priority: Optional[int] = None
    priorityClassName: Optional[str] = None
    restartPolicy: Optional[str] = None
    runtimeClassName: Optional[str] = None
    schedulerName: Optional[str] = None
    securityContext: Optional["PodSecurityContext"] = None
    serviceAccount: Optional[str] = None
    serviceAccountName: Optional[str] = None
    shareProcessNamespace: Optional[bool] = None
    subdomain: Optional[str] = None
    terminationGracePeriodSeconds: Optional[int] = None
    ephemeralContainers: Optional[List["EphemeralContainer"]] = field(
        default_factory=list
    )
    hostAliases: Optional[List["HostAlias"]] = field(default_factory=list)
    imagePullSecrets: Optional[List["LocalObjectReference"]] = field(
        default_factory=list
    )
    initContainers: Optional[List["Container"]] = field(default_factory=list)
    nodeSelector: Optional[Dict[str, str]] = field(default_factory=dict)
    overhead: Optional[Dict[str, str]] = field(default_factory=dict)
    readinessGates: Optional[List["PodReadinessGate"]] = field(default_factory=list)
    tolerations: Optional[List["Toleration"]] = field(default_factory=list)
    topologySpreadConstraints: Optional[List["TopologySpreadConstraint"]] = field(
        default_factory=list
    )
    volumes: Optional[List["Volume"]] = field(default_factory=list)


@dataclass
class PodStatus(HikaruBase):
    r"""
    PodStatus represents information about the status of a pod. Status may trail the
    actual state of a system, especially if the node that hosts the pod cannot contact the
    control plane.

    Full name: v1.PodStatus

    Attributes:
    hostIP: IP address of the host to which the pod is assigned. Empty if not yet
        scheduled.
    message: A human readable message indicating details about why the pod is in this
        condition.
    nominatedNodeName: nominatedNodeName is set only when this pod preempts other pods on
        the node, but it cannot be scheduled right away as preemption victims receive
        their graceful termination periods. This field does not guarantee that the pod
        will be scheduled on this node. Scheduler may decide to place the pod elsewhere if
        other nodes become available sooner. Scheduler may also decide to give the
        resources on this node to a higher priority pod that is created after preemption.
        As a result, this field may be different than PodSpec.nodeName when the pod is
        scheduled.
    phase: The phase of a Pod is a simple, high-level summary of where the Pod is in its
        lifecycle. The conditions array, the reason and message fields, and the individual
        container status arrays contain more detail about the pod's status. There are five
        possible phase values: Pending: The pod has been accepted by the Kubernetes
        system, but one or more of the container images has not been created. This
        includes time before being scheduled as well as time spent downloading images over
        the network, which could take a while. Running: The pod has been bound to a node,
        and all of the containers have been created. At least one container is still
        running, or is in the process of starting or restarting. Succeeded: All containers
        in the pod have terminated in success, and will not be restarted. Failed: All
        containers in the pod have terminated, and at least one container has terminated
        in failure. The container either exited with non-zero status or was terminated by
        the system. Unknown: For some reason the state of the pod could not be obtained,
        typically due to an error in communicating with the host of the pod. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
    podIP: IP address allocated to the pod. Routable at least within the cluster. Empty if
        not yet allocated.
    qosClass: The Quality of Service (QOS) classification assigned to the pod based on
        resource requirements See PodQOSClass type for available QOS classes More info:
        https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md
    reason: A brief CamelCase message indicating details about why the pod is in this
        state. e.g. 'Evicted'
    startTime: RFC 3339 date and time at which the object was acknowledged by the Kubelet.
        This is before the Kubelet pulled the container image(s) for the pod.
    conditions: Current service state of pod. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
    containerStatuses: The list has one entry per container in the manifest. Each entry is
        currently the output of `docker inspect`. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
    ephemeralContainerStatuses: Status for any ephemeral containers that have run in this
        pod. This field is alpha-level and is only populated by servers that enable the
        EphemeralContainers feature.
    initContainerStatuses: The list has one entry per init container in the manifest. The
        most recent successful init container will have ready = true, the most recently
        started container will have startTime set. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
    podIPs: podIPs holds the IP addresses allocated to the pod. If this field is
        specified, the 0th entry must match the podIP field. Pods may be allocated at most
        1 value for each of IPv4 and IPv6. This list is empty if no IPs have been
        allocated yet.
    """

    hostIP: Optional[str] = None
    message: Optional[str] = None
    nominatedNodeName: Optional[str] = None
    phase: Optional[str] = None
    podIP: Optional[str] = None
    qosClass: Optional[str] = None
    reason: Optional[str] = None
    startTime: Optional[str] = None
    conditions: Optional[List["PodCondition"]] = field(default_factory=list)
    containerStatuses: Optional[List["ContainerStatus"]] = field(default_factory=list)
    ephemeralContainerStatuses: Optional[List["ContainerStatus"]] = field(
        default_factory=list
    )
    initContainerStatuses: Optional[List["ContainerStatus"]] = field(
        default_factory=list
    )
    podIPs: Optional[List["PodIP"]] = field(default_factory=list)


@dataclass
class MutatingWebhookConfiguration(HikaruDocumentBase):
    r"""
    MutatingWebhookConfiguration describes the configuration of and admission webhook that
    accept or reject and may change the object.

    Full name: MutatingWebhookConfiguration

    Attributes:
    apiVersion: 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: 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: Standard object metadata; More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
    webhooks: Webhooks is a list of webhooks and the affected resources and operations.
    """

    _version = "v1"
    apiVersion: Optional[str] = "admissionregistration.k8s.io/v1"
    kind: Optional[str] = "MutatingWebhookConfiguration"
    metadata: Optional["ObjectMeta"] = None
    webhooks: Optional[List["MutatingWebhook"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class MutatingWebhookConfigurationList(HikaruDocumentBase):
    r"""
    MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.

    Full name: v1.MutatingWebhookConfigurationList

    Attributes:
    items: List of MutatingWebhookConfiguration.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["MutatingWebhookConfiguration"]
    apiVersion: Optional[str] = "admissionregistration.k8s.io/v1"
    kind: Optional[str] = "MutatingWebhookConfigurationList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Job(HikaruDocumentBase):
    r"""
    Job represents the configuration of a single job.

    Full name: v1.Job

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Specification of the desired behavior of a job. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    status: Current status of a job. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "batch/v1"
    kind: Optional[str] = "Job"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["JobSpec"] = None
    status: Optional["JobStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class JobStatus(HikaruBase):
    r"""
    JobStatus represents the current state of a Job.

    Full name: v1.JobStatus

    Attributes:
    active: The number of actively running pods.
    completionTime: Represents time when the job was completed. It is not guaranteed to be
        set in happens-before order across separate operations. It is represented in
        RFC3339 form and is in UTC.
    failed: The number of pods which reached phase Failed.
    startTime: Represents time when the job was acknowledged by the job controller. It is
        not guaranteed to be set in happens-before order across separate operations. It is
        represented in RFC3339 form and is in UTC.
    succeeded: The number of pods which reached phase Succeeded.
    conditions: The latest available observations of an object's current state. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
    """

    active: Optional[int] = None
    completionTime: Optional[str] = None
    failed: Optional[int] = None
    startTime: Optional[str] = None
    succeeded: Optional[int] = None
    conditions: Optional[List["JobCondition"]] = field(default_factory=list)


@dataclass
class ServerAddressByClientCIDR(HikaruBase):
    r"""
    ServerAddressByClientCIDR helps the client to determine the server address that they
    should use, depending on the clientCIDR that they match.

    Full name: v1.ServerAddressByClientCIDR

    Attributes:
    clientCIDR: The CIDR with which clients can match their IP to figure out the server
        address that they should use.
    serverAddress: Address of this server, suitable for a client that matches the above
        CIDR. This can be a hostname, hostname:port, IP or IP:port.
    """

    clientCIDR: str
    serverAddress: str


@dataclass
class HorizontalPodAutoscaler(HikaruDocumentBase):
    r"""
    configuration of a horizontal pod autoscaler.

    Full name: v1.HorizontalPodAutoscaler

    Attributes:
    apiVersion: 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: 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: Standard object metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: behaviour of autoscaler. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
    status: current information about the autoscaler.
    """

    _version = "v1"
    apiVersion: Optional[str] = "autoscaling/v1"
    kind: Optional[str] = "HorizontalPodAutoscaler"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["HorizontalPodAutoscalerSpec"] = None
    status: Optional["HorizontalPodAutoscalerStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class StorageClassList(HikaruDocumentBase):
    r"""
    StorageClassList is a collection of storage classes.

    Full name: v1.StorageClassList

    Attributes:
    items: Items is the list of StorageClasses
    apiVersion: 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: 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: Standard list metadata More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["StorageClass"]
    apiVersion: Optional[str] = "storage.k8s.io/v1"
    kind: Optional[str] = "StorageClassList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Role(HikaruDocumentBase):
    r"""
    Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit
    by a RoleBinding.

    Full name: v1.Role

    Attributes:
    apiVersion: 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: 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: Standard object's metadata.
    rules: Rules holds all the PolicyRules for this Role
    """

    _version = "v1"
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "Role"
    metadata: Optional["ObjectMeta"] = None
    rules: Optional[List["PolicyRule"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ServiceList(HikaruDocumentBase):
    r"""
    ServiceList holds a list of services.

    Full name: v1.ServiceList

    Attributes:
    items: List of services
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["Service"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ServiceList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class RoleList(HikaruDocumentBase):
    r"""
    RoleList is a collection of Roles

    Full name: v1.RoleList

    Attributes:
    items: Items is a list of Roles
    apiVersion: 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: 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: Standard object's metadata.
    """

    _version = "v1"
    items: List["Role"]
    apiVersion: Optional[str] = "rbac.authorization.k8s.io/v1"
    kind: Optional[str] = "RoleList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ValidatingWebhookConfigurationList(HikaruDocumentBase):
    r"""
    ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.

    Full name: v1.ValidatingWebhookConfigurationList

    Attributes:
    items: List of ValidatingWebhookConfiguration.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["ValidatingWebhookConfiguration"]
    apiVersion: Optional[str] = "admissionregistration.k8s.io/v1"
    kind: Optional[str] = "ValidatingWebhookConfigurationList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class StatefulSetList(HikaruDocumentBase):
    r"""
    StatefulSetList is a collection of StatefulSets.

    Full name: v1beta2.StatefulSetList

    Attributes:
    items:
    apiVersion: 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: 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:
    """

    _version = "v1beta2"
    items: List["StatefulSet"]
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "StatefulSetList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def listNamespacedStatefulSet(
        namespace: str,
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind StatefulSet

        operationID: listNamespacedStatefulSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets

        :param namespace: namespace for the resource
        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   StatefulSetList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_namespaced_stateful_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_namespaced_stateful_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _namespaced_watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_namespaced_stateful_set",
    )

    @staticmethod
    def listStatefulSetForAllNamespaces(
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        pretty: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind StatefulSet

        operationID: listStatefulSetForAllNamespaces
        path: /apis/apps/v1beta2/statefulsets

        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param pretty: If 'true', then the output is pretty printed.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   StatefulSetList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "list_stateful_set_for_all_namespaces_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_stateful_set_for_all_namespaces_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["pretty"] = pretty
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_stateful_set_for_all_namespaces",
    )


@dataclass
class ServiceAccount(HikaruDocumentBase):
    r"""
    ServiceAccount binds together: * a name, understood by users, and perhaps by
    peripheral systems, for an identity * a principal that can be authenticated and
    authorized * a set of secrets

    Full name: ServiceAccount

    Attributes:
    apiVersion: 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
    automountServiceAccountToken: AutomountServiceAccountToken indicates whether pods
        running as this service account should have an API token automatically mounted.
        Can be overridden at the pod level.
    kind: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    imagePullSecrets: ImagePullSecrets is a list of references to secrets in the same
        namespace to use for pulling any images in pods that reference this
        ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be
        mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More
        info:
        https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
    secrets: Secrets is the list of secrets allowed to be used by pods running using this
        ServiceAccount. More info:
        https://kubernetes.io/docs/concepts/configuration/secret
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    automountServiceAccountToken: Optional[bool] = None
    kind: Optional[str] = "ServiceAccount"
    metadata: Optional["ObjectMeta"] = None
    imagePullSecrets: Optional[List["LocalObjectReference"]] = field(
        default_factory=list
    )
    secrets: Optional[List["ObjectReference"]] = field(default_factory=list)
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ServiceAccountList(HikaruDocumentBase):
    r"""
    ServiceAccountList is a list of ServiceAccount objects

    Full name: v1.ServiceAccountList

    Attributes:
    items: List of ServiceAccounts. More info:
        https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["ServiceAccount"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ServiceAccountList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class VolumeAttachmentSource(HikaruBase):
    r"""
    VolumeAttachmentSource represents a volume that should be attached. Right now only
    PersistenVolumes can be attached via external attacher, in future we may allow also
    inline volumes in pods. Exactly one member can be set.

    Full name: v1.VolumeAttachmentSource

    Attributes:
    inlineVolumeSpec: inlineVolumeSpec contains all the information necessary to attach a
        persistent volume defined by a pod's inline VolumeSource. This field is populated
        only for the CSIMigration feature. It contains translated fields from a pod's
        inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is
        only honored by servers that enabled the CSIMigration feature.
    persistentVolumeName: Name of the persistent volume to attach.
    """

    inlineVolumeSpec: Optional["PersistentVolumeSpec"] = None
    persistentVolumeName: Optional[str] = None


@dataclass
class EventList(HikaruDocumentBase):
    r"""
    EventList is a list of events.

    Full name: v1.EventList

    Attributes:
    items: List of events
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["Event"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "EventList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class APIVersions(HikaruDocumentBase):
    r"""
    APIVersions lists the versions that are available, to allow clients to discover the
    API at /api, which is the root path of the legacy v1 API.

    Full name: v1.APIVersions

    Attributes:
    serverAddressByClientCIDRs: a map of client CIDR to server address that is serving
        this group. This is to help clients reach servers in the most network-efficient
        way possible. Clients can use the appropriate server address as per the CIDR that
        they match. In case of multiple matches, clients should use the longest matching
        CIDR. The server returns only those CIDRs that it thinks that the client can
        match. For example: the master will return an internal IP CIDR only, if the client
        reaches the server using an internal IP. Server looks at X-Forwarded-For header or
        X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
    versions: versions are the api versions that are available.
    apiVersion: 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: 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
    """

    _version = "v1"
    serverAddressByClientCIDRs: List["ServerAddressByClientCIDR"]
    versions: List[str]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "APIVersions"
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class TokenReview(HikaruDocumentBase):
    r"""
    TokenReview attempts to authenticate a token to a known user. Note: TokenReview
    requests may be cached by the webhook token authenticator plugin in the
    kube-apiserver.

    Full name: v1.TokenReview

    Attributes:
    spec: Spec holds information about the request being evaluated
    apiVersion: 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: 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:
    status: Status is filled in by the server and indicates whether the request can be
        authenticated.
    """

    _version = "v1"
    spec: "TokenReviewSpec"
    apiVersion: Optional[str] = "authentication.k8s.io/v1"
    kind: Optional[str] = "TokenReview"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["TokenReviewStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class TokenReviewSpec(HikaruBase):
    r"""
    TokenReviewSpec is a description of the token authentication request.

    Full name: v1.TokenReviewSpec

    Attributes:
    token: Token is the opaque bearer token.
    audiences: Audiences is a list of the identifiers that the resource server presented
        with the token identifies as. Audience-aware token authenticators will verify that
        the token was intended for at least one of the audiences in this list. If no
        audiences are provided, the audience will default to the audience of the
        Kubernetes apiserver.
    """

    token: Optional[str] = None
    audiences: Optional[List[str]] = field(default_factory=list)


@dataclass
class PriorityClass(HikaruDocumentBase):
    r"""
    PriorityClass defines mapping from a priority class name to the priority integer
    value. The value can be any valid integer.

    Full name: v1.PriorityClass

    Attributes:
    value: The value of this priority class. This is the actual priority that pods receive
        when they have the name of this class in their pod spec.
    apiVersion: 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
    description: description is an arbitrary string that usually provides guidelines on
        when this priority class should be used.
    globalDefault: globalDefault specifies whether this PriorityClass should be considered
        as the default priority for pods that do not have any priority class. Only one
        PriorityClass can be marked as `globalDefault`. However, if more than one
        PriorityClasses exists with their `globalDefault` field set to true, the smallest
        value of such global default PriorityClasses will be used as the default priority.
    kind: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    preemptionPolicy: PreemptionPolicy is the Policy for preempting pods with lower
        priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if
        unset. This field is alpha-level and is only honored by servers that enable the
        NonPreemptingPriority feature.
    """

    _version = "v1"
    value: int
    apiVersion: Optional[str] = "scheduling.k8s.io/v1"
    description: Optional[str] = None
    globalDefault: Optional[bool] = None
    kind: Optional[str] = "PriorityClass"
    metadata: Optional["ObjectMeta"] = None
    preemptionPolicy: Optional[str] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class NetworkPolicy(HikaruDocumentBase):
    r"""
    NetworkPolicy describes what network traffic is allowed for a set of Pods

    Full name: v1.NetworkPolicy

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    spec: Specification of the desired behavior for this NetworkPolicy.
    """

    _version = "v1"
    apiVersion: Optional[str] = "networking.k8s.io/v1"
    kind: Optional[str] = "NetworkPolicy"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["NetworkPolicySpec"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class EndpointSubset(HikaruBase):
    r"""
    EndpointSubset is a group of addresses with a common set of ports. The expanded set of
    endpoints is the Cartesian product of Addresses x Ports. For example, given: {
    Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port":
    8675}, {"name": "b", "port": 309}] } The resulting set of endpoints can be viewed as:
    a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]

    Full name: v1.EndpointSubset

    Attributes:
    addresses: IP addresses which offer the related ports that are marked as ready. These
        endpoints should be considered safe for load balancers and clients to utilize.
    notReadyAddresses: IP addresses which offer the related ports but are not currently
        marked as ready because they have not yet finished starting, have recently failed
        a readiness check, or have recently failed a liveness check.
    ports: Port numbers available on the related IP addresses.
    """

    addresses: Optional[List["EndpointAddress"]] = field(default_factory=list)
    notReadyAddresses: Optional[List["EndpointAddress"]] = field(default_factory=list)
    ports: Optional[List["EndpointPort"]] = field(default_factory=list)


@dataclass
class PodTemplate(HikaruDocumentBase):
    r"""
    PodTemplate describes a template for creating copies of a predefined pod.

    Full name: v1.PodTemplate

    Attributes:
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    template: Template defines the pods that will be created from this pod template.
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    """

    _version = "v1"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "PodTemplate"
    metadata: Optional["ObjectMeta"] = None
    template: Optional["PodTemplateSpec"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class JobList(HikaruDocumentBase):
    r"""
    JobList is a collection of jobs.

    Full name: v1.JobList

    Attributes:
    items: items is the list of Jobs.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["Job"]
    apiVersion: Optional[str] = "batch/v1"
    kind: Optional[str] = "JobList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PodReadinessGate(HikaruBase):
    r"""
    PodReadinessGate contains the reference to a pod condition

    Full name: v1.PodReadinessGate

    Attributes:
    conditionType: ConditionType refers to a condition in the pod's condition list with
        matching type.
    """

    conditionType: str


@dataclass
class APIResource(HikaruBase):
    r"""
    APIResource specifies the name of a resource and whether it is namespaced.

    Full name: APIResource

    Attributes:
    kind: kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
    name: name is the plural name of the resource.
    namespaced: namespaced indicates if a resource is namespaced or not.
    singularName: singularName is the singular name of the resource. This allows clients
        to handle plural and singular opaquely. The singularName is more correct for
        reporting status on a single item and both singular and plural are allowed from
        the kubectl CLI interface.
    verbs: verbs is a list of supported kube verbs (this includes get, list, watch,
        create, update, patch, delete, deletecollection, and proxy)
    group: group is the preferred group of the resource. Empty implies the group of the
        containing resource list. For subresources, this may have a different value, for
        example: Scale".
    storageVersionHash: The hash value of the storage version, the version this resource
        is converted to when written to the data store. Value must be treated as opaque by
        clients. Only equality comparison on the value is valid. This is an alpha feature
        and may change or be removed in the future. The field is populated by the
        apiserver only if the StorageVersionHash feature gate is enabled. This field will
        remain optional even if it graduates.
    version: version is the preferred version of the resource. Empty implies the version
        of the containing resource list For subresources, this may have a different value,
        for example: v1 (while inside a v1beta1 version of the core resource's group)".
    categories: categories is a list of the grouped resources this resource belongs to
        (e.g. 'all')
    shortNames: shortNames is a list of suggested short names of the resource.
    """

    kind: str
    name: str
    namespaced: bool
    singularName: str
    verbs: List[str]
    group: Optional[str] = None
    storageVersionHash: Optional[str] = None
    version: Optional[str] = None
    categories: Optional[List[str]] = field(default_factory=list)
    shortNames: Optional[List[str]] = field(default_factory=list)


@dataclass
class APIResourceList(HikaruDocumentBase):
    r"""
    APIResourceList is a list of APIResource, it is used to expose the name of the
    resources supported in a specific group and version, and if the resource is
    namespaced.

    Full name: v1.APIResourceList

    Attributes:
    groupVersion: groupVersion is the group and version this APIResourceList is for.
    resources: resources contains the name of the resources and if they are namespaced.
    apiVersion: 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: 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
    """

    _version = "v1"
    groupVersion: str
    resources: List["APIResource"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "APIResourceList"
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PodTemplateList(HikaruDocumentBase):
    r"""
    PodTemplateList is a list of PodTemplates.

    Full name: v1.PodTemplateList

    Attributes:
    items: List of pod templates
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    """

    _version = "v1"
    items: List["PodTemplate"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "PodTemplateList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class CustomResourceColumnDefinition(HikaruBase):
    r"""
    CustomResourceColumnDefinition specifies a column for server side printing.

    Full name: v1.CustomResourceColumnDefinition

    Attributes:
    jsonPath: jsonPath is a simple JSON path (i.e. with array notation) which is evaluated
        against each custom resource to produce the value for this column.
    name: name is a human readable name for the column.
    type: type is an OpenAPI type definition for this column. See
        https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
        for details.
    description: description is a human readable description of this column.
    format: format is an optional OpenAPI type definition for this column. The 'name'
        format is applied to the primary identifier column to assist in clients
        identifying column is the resource name. See
        https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
        for details.
    priority: priority is an integer defining the relative importance of this column
        compared to others. Lower numbers are considered higher priority. Columns that may
        be omitted in limited space scenarios should be given a priority greater than 0.
    """

    jsonPath: str
    name: str
    type: str
    description: Optional[str] = None
    format: Optional[str] = None
    priority: Optional[int] = None


@dataclass
class ResourceRule(HikaruBase):
    r"""
    ResourceRule is the list of actions the subject is allowed to perform on resources.
    The list ordering isn't significant, may contain duplicates, and possibly be
    incomplete.

    Full name: v1.ResourceRule

    Attributes:
    verbs: Verb is a list of kubernetes resource API verbs, like: get, list, watch,
        create, update, delete, proxy. "*" means all.
    apiGroups: APIGroups is the name of the APIGroup that contains the resources. If
        multiple API groups are specified, any action requested against one of the
        enumerated resources in any API group will be allowed. "*" means all.
    resourceNames: ResourceNames is an optional white list of names that the rule applies
        to. An empty set means that everything is allowed. "*" means all.
    resources: Resources is a list of resources this rule applies to. "*" means all in the
        specified apiGroups. "*/foo" represents the subresource 'foo' for all resources in
        the specified apiGroups.
    """

    verbs: List[str]
    apiGroups: Optional[List[str]] = field(default_factory=list)
    resourceNames: Optional[List[str]] = field(default_factory=list)
    resources: Optional[List[str]] = field(default_factory=list)


@dataclass
class HorizontalPodAutoscalerList(HikaruDocumentBase):
    r"""
    list of horizontal pod autoscaler objects.

    Full name: v1.HorizontalPodAutoscalerList

    Attributes:
    items: list of horizontal pod autoscaler objects.
    apiVersion: 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: 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: Standard list metadata.
    """

    _version = "v1"
    items: List["HorizontalPodAutoscaler"]
    apiVersion: Optional[str] = "autoscaling/v1"
    kind: Optional[str] = "HorizontalPodAutoscalerList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Binding(HikaruDocumentBase):
    r"""
    Binding ties one object to another; for example, a pod is bound to a node by a
    scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.

    Full name: v1.Binding

    Attributes:
    target: The target object that you want to bind to the standard object.
    apiVersion: 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: 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: Standard object's metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    target: "ObjectReference"
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "Binding"
    metadata: Optional["ObjectMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class RollingUpdateDaemonSet(HikaruBase):
    r"""
    Spec to control the desired behavior of daemon set rolling update.

    Full name: v1beta2.RollingUpdateDaemonSet

    Attributes:
    maxUnavailable: The maximum number of DaemonSet pods that can be unavailable during
        the update. Value can be an absolute number (ex: 5) or a percentage of total
        number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is
        calculated from percentage by rounding up. This cannot be 0. Default value is 1.
        Example: when this is set to 30%, at most 30% of the total number of nodes that
        should be running the daemon pod (i.e. status.desiredNumberScheduled) can have
        their pods stopped for an update at any given time. The update starts by stopping
        at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their
        place. Once the new pods are available, it then proceeds onto other DaemonSet
        pods, thus ensuring that at least 70% of original number of DaemonSet pods are
        available at all times during the update.
    """

    maxUnavailable: Optional[object] = field(default_factory=dict)


@dataclass
class DeploymentList(HikaruDocumentBase):
    r"""
    DeploymentList is a list of Deployments.

    Full name: v1beta2.DeploymentList

    Attributes:
    items: Items is the list of Deployments.
    apiVersion: 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: 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: Standard list metadata.
    """

    _version = "v1beta2"
    items: List["Deployment"]
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "DeploymentList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def listDeploymentForAllNamespaces(
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        pretty: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind Deployment

        operationID: listDeploymentForAllNamespaces
        path: /apis/apps/v1beta2/deployments

        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param pretty: If 'true', then the output is pretty printed.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DeploymentList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_deployment_for_all_namespaces_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_deployment_for_all_namespaces_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["pretty"] = pretty
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_deployment_for_all_namespaces",
    )

    @staticmethod
    def listNamespacedDeployment(
        namespace: str,
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind Deployment

        operationID: listNamespacedDeployment
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments

        :param namespace: namespace for the resource
        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DeploymentList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_namespaced_deployment_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_namespaced_deployment_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _namespaced_watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_namespaced_deployment",
    )


@dataclass
class EphemeralContainer(HikaruBase):
    r"""
    An EphemeralContainer is a container that may be added temporarily to an existing pod
    for user-initiated activities such as debugging. Ephemeral containers have no resource
    or scheduling guarantees, and they will not be restarted when they exit or when a pod
    is removed or restarted. If an ephemeral container causes a pod to exceed its resource
    allocation, the pod may be evicted. Ephemeral containers may not be added by directly
    updating the pod spec. They must be added via the pod's ephemeralcontainers
    subresource, and they will appear in the pod spec once added. This is an alpha feature
    enabled by the EphemeralContainers feature flag.

    Full name: v1.EphemeralContainer

    Attributes:
    name: Name of the ephemeral container specified as a DNS_LABEL. This name must be
        unique among all containers, init containers and ephemeral containers.
    image: Docker image name. More info:
        https://kubernetes.io/docs/concepts/containers/images
    imagePullPolicy: Image pull policy. One of Always, Never, IfNotPresent. Defaults to
        Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.
        More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
    lifecycle: Lifecycle is not allowed for ephemeral containers.
    livenessProbe: Probes are not allowed for ephemeral containers.
    readinessProbe: Probes are not allowed for ephemeral containers.
    resources: Resources are not allowed for ephemeral containers. Ephemeral containers
        use spare resources already allocated to the pod.
    securityContext: SecurityContext is not allowed for ephemeral containers.
    startupProbe: Probes are not allowed for ephemeral containers.
    stdin: Whether this container should allocate a buffer for stdin in the container
        runtime. If this is not set, reads from stdin in the container will always result
        in EOF. Default is false.
    stdinOnce: Whether the container runtime should close the stdin channel after it has
        been opened by a single attach. When stdin is true the stdin stream will remain
        open across multiple attach sessions. If stdinOnce is set to true, stdin is opened
        on container start, is empty until the first client attaches to stdin, and then
        remains open and accepts data until the client disconnects, at which time stdin is
        closed and remains closed until the container is restarted. If this flag is false,
        a container processes that reads from stdin will never receive an EOF. Default is
        false
    targetContainerName: If set, the name of the container from PodSpec that this
        ephemeral container targets. The ephemeral container will be run in the namespaces
        (IPC, PID, etc) of this container. If not set then the ephemeral container is run
        in whatever namespaces are shared for the pod. Note that the container runtime
        must support this feature.
    terminationMessagePath: Optional: Path at which the file to which the container's
        termination message will be written is mounted into the container's filesystem.
        Message written is intended to be brief final status, such as an assertion failure
        message. Will be truncated by the node if greater than 4096 bytes. The total
        message length across all containers will be limited to 12kb. Defaults to
        /dev/termination-log. Cannot be updated.
    terminationMessagePolicy: Indicate how the termination message should be populated.
        File will use the contents of terminationMessagePath to populate the container
        status message on both success and failure. FallbackToLogsOnError will use the
        last chunk of container log output if the termination message file is empty and
        the container exited with an error. The log output is limited to 2048 bytes or 80
        lines, whichever is smaller. Defaults to File. Cannot be updated.
    tty: Whether this container should allocate a TTY for itself, also requires 'stdin' to
        be true. Default is false.
    workingDir: Container's working directory. If not specified, the container runtime's
        default will be used, which might be configured in the container image. Cannot be
        updated.
    args: Arguments to the entrypoint. The docker image's CMD is used if this is not
        provided. Variable references $(VAR_NAME) are expanded using the container's
        environment. If a variable cannot be resolved, the reference in the input string
        will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie:
        $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the
        variable exists or not. Cannot be updated. More info:
        https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
    command: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT
        is used if this is not provided. Variable references $(VAR_NAME) are expanded
        using the container's environment. If a variable cannot be resolved, the reference
        in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with
        a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
        regardless of whether the variable exists or not. Cannot be updated. More info:
        https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
    env: List of environment variables to set in the container. Cannot be updated.
    envFrom: List of sources to populate environment variables in the container. The keys
        defined within a source must be a C_IDENTIFIER. All invalid keys will be reported
        as an event when the container is starting. When a key exists in multiple sources,
        the value associated with the last source will take precedence. Values defined by
        an Env with a duplicate key will take precedence. Cannot be updated.
    ports: Ports are not allowed for ephemeral containers.
    volumeDevices: volumeDevices is the list of block devices to be used by the container.
        This is a beta feature.
    volumeMounts: Pod volumes to mount into the container's filesystem. Cannot be updated.
    """

    name: str
    image: Optional[str] = None
    imagePullPolicy: Optional[str] = None
    lifecycle: Optional["Lifecycle"] = None
    livenessProbe: Optional["Probe"] = None
    readinessProbe: Optional["Probe"] = None
    resources: Optional["ResourceRequirements"] = None
    securityContext: Optional["SecurityContext"] = None
    startupProbe: Optional["Probe"] = None
    stdin: Optional[bool] = None
    stdinOnce: Optional[bool] = None
    targetContainerName: Optional[str] = None
    terminationMessagePath: Optional[str] = None
    terminationMessagePolicy: Optional[str] = None
    tty: Optional[bool] = None
    workingDir: Optional[str] = None
    args: Optional[List[str]] = field(default_factory=list)
    command: Optional[List[str]] = field(default_factory=list)
    env: Optional[List["EnvVar"]] = field(default_factory=list)
    envFrom: Optional[List["EnvFromSource"]] = field(default_factory=list)
    ports: Optional[List["ContainerPort"]] = field(default_factory=list)
    volumeDevices: Optional[List["VolumeDevice"]] = field(default_factory=list)
    volumeMounts: Optional[List["VolumeMount"]] = field(default_factory=list)


@dataclass
class PodIP(HikaruBase):
    r"""
    IP address information for entries in the (plural) PodIPs field. Each entry includes:
    IP: An IP address allocated to the pod. Routable at least within the cluster.

    Full name: v1.PodIP

    Attributes:
    ip: ip is an IP address (IPv4 or IPv6) assigned to the pod
    """

    ip: Optional[str] = None


@dataclass
class PodCondition(HikaruBase):
    r"""
    PodCondition contains details for the current condition of this pod.

    Full name: v1.PodCondition

    Attributes:
    status: Status is the status of the condition. Can be True, False, Unknown. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
    type: Type is the type of the condition. More info:
        https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
    lastProbeTime: Last time we probed the condition.
    lastTransitionTime: Last time the condition transitioned from one status to another.
    message: Human-readable message indicating details about last transition.
    reason: Unique, one-word, CamelCase reason for the condition's last transition.
    """

    status: str
    type: str
    lastProbeTime: Optional[str] = None
    lastTransitionTime: Optional[str] = None
    message: Optional[str] = None
    reason: Optional[str] = None


@dataclass
class NetworkPolicyList(HikaruDocumentBase):
    r"""
    NetworkPolicyList is a list of NetworkPolicy objects.

    Full name: v1.NetworkPolicyList

    Attributes:
    items: Items is a list of schema objects.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["NetworkPolicy"]
    apiVersion: Optional[str] = "networking.k8s.io/v1"
    kind: Optional[str] = "NetworkPolicyList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class CSINode(HikaruDocumentBase):
    r"""
    CSINode holds information about all CSI drivers installed on a node. CSI drivers do
    not need to create the CSINode object directly. As long as they use the
    node-driver-registrar sidecar container, the kubelet will automatically populate the
    CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has
    the same name as a node. If the object is missing, it means either there are no CSI
    Drivers available on the node, or the Kubelet version is low enough that it doesn't
    create this object. CSINode has an OwnerReference that points to the corresponding
    node object.

    Full name: v1.CSINode

    Attributes:
    spec: spec is the specification of CSINode
    apiVersion: 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: 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: metadata.name must be the Kubernetes node name.
    """

    _version = "v1"
    spec: "CSINodeSpec"
    apiVersion: Optional[str] = "storage.k8s.io/v1"
    kind: Optional[str] = "CSINode"
    metadata: Optional["ObjectMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ReplicaSetStatus(HikaruBase):
    r"""
    ReplicaSetStatus represents the current status of a ReplicaSet.

    Full name: v1beta2.ReplicaSetStatus

    Attributes:
    replicas: Replicas is the most recently oberved number of replicas. More info:
        https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
    availableReplicas: The number of available replicas (ready for at least
        minReadySeconds) for this replica set.
    fullyLabeledReplicas: The number of pods that have labels matching the labels of the
        pod template of the replicaset.
    observedGeneration: ObservedGeneration reflects the generation of the most recently
        observed ReplicaSet.
    readyReplicas: The number of ready replicas for this replica set.
    conditions: Represents the latest available observations of a replica set's current
        state.
    """

    replicas: int
    availableReplicas: Optional[int] = None
    fullyLabeledReplicas: Optional[int] = None
    observedGeneration: Optional[int] = None
    readyReplicas: Optional[int] = None
    conditions: Optional[List["ReplicaSetCondition"]] = field(default_factory=list)


@dataclass
class VolumeAttachmentList(HikaruDocumentBase):
    r"""
    VolumeAttachmentList is a collection of VolumeAttachment objects.

    Full name: v1.VolumeAttachmentList

    Attributes:
    items: Items is the list of VolumeAttachments
    apiVersion: 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: 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: Standard list metadata More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["VolumeAttachment"]
    apiVersion: Optional[str] = "storage.k8s.io/v1"
    kind: Optional[str] = "VolumeAttachmentList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class ControllerRevisionList(HikaruDocumentBase):
    r"""
    ControllerRevisionList is a resource containing a list of ControllerRevision objects.

    Full name: v1beta2.ControllerRevisionList

    Attributes:
    items: Items is the list of ControllerRevisions
    apiVersion: 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: 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: More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1beta2"
    items: List["ControllerRevision"]
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "ControllerRevisionList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def listControllerRevisionForAllNamespaces(
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        pretty: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind ControllerRevision

        operationID: listControllerRevisionForAllNamespaces
        path: /apis/apps/v1beta2/controllerrevisions

        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param pretty: If 'true', then the output is pretty printed.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ControllerRevisionList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "list_controller_revision_for_all_namespaces_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_controller_revision_for_all_namespaces_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["pretty"] = pretty
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_controller_revision_for_all_namespaces",
    )

    @staticmethod
    def listNamespacedControllerRevision(
        namespace: str,
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind ControllerRevision

        operationID: listNamespacedControllerRevision
        path: /apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions

        :param namespace: namespace for the resource
        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   ControllerRevisionList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_namespaced_controller_revision_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_namespaced_controller_revision_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _namespaced_watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_namespaced_controller_revision",
    )


@dataclass
class DaemonSetUpdateStrategy(HikaruBase):
    r"""
    DaemonSetUpdateStrategy is a struct used to control the update strategy for a
    DaemonSet.

    Full name: v1beta2.DaemonSetUpdateStrategy

    Attributes:
    rollingUpdate: Rolling update config params. Present only if type = "RollingUpdate".
    type: Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is
        RollingUpdate.
    """

    rollingUpdate: Optional["RollingUpdateDaemonSet"] = None
    type: Optional[str] = None


@dataclass
class WebhookConversion(HikaruBase):
    r"""
    WebhookConversion describes how to call a conversion webhook

    Full name: v1.WebhookConversion

    Attributes:
    conversionReviewVersions: conversionReviewVersions is an ordered list of preferred
        `ConversionReview` versions the Webhook expects. The API server will use the first
        version in the list which it supports. If none of the versions specified in this
        list are supported by API server, conversion will fail for the custom resource. If
        a persisted Webhook configuration specifies allowed versions and does not include
        any versions known to the API Server, calls to the webhook will fail.
    clientConfig: clientConfig is the instructions for how to call the webhook if strategy
        is `Webhook`.
    """

    conversionReviewVersions: List[str]
    clientConfig: Optional["WebhookClientConfig"] = None


@dataclass
class ConfigMapList(HikaruDocumentBase):
    r"""
    ConfigMapList is a resource containing a list of ConfigMap objects.

    Full name: v1.ConfigMapList

    Attributes:
    items: Items is the list of ConfigMaps.
    apiVersion: 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: 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: More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["ConfigMap"]
    apiVersion: Optional[str] = "v1"
    kind: Optional[str] = "ConfigMapList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class CustomResourceValidation(HikaruBase):
    r"""
    CustomResourceValidation is a list of validation methods for CustomResources.

    Full name: v1.CustomResourceValidation

    Attributes:
    openAPIV3Schema: openAPIV3Schema is the OpenAPI v3 schema to use for validation and
        pruning.
    """

    openAPIV3Schema: Optional["JSONSchemaProps"] = None


@dataclass
class SubjectAccessReview(HikaruDocumentBase):
    r"""
    SubjectAccessReview checks whether or not a user or group can perform an action.

    Full name: v1.SubjectAccessReview

    Attributes:
    spec: Spec holds information about the request being evaluated
    apiVersion: 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: 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:
    status: Status is filled in by the server and indicates whether the request is allowed
        or not
    """

    _version = "v1"
    spec: "SubjectAccessReviewSpec"
    apiVersion: Optional[str] = "authorization.k8s.io/v1"
    kind: Optional[str] = "SubjectAccessReview"
    metadata: Optional["ObjectMeta"] = None
    status: Optional["SubjectAccessReviewStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class Scale(HikaruDocumentBase):
    r"""
    Scale represents a scaling request for a resource.

    Full name: v1beta2.Scale

    Attributes:
    apiVersion: 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: 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: Standard object metadata; More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
    spec: defines the behavior of the scale. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
    status: current status of the scale. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
        Read-only.
    """

    _version = "v1beta2"
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "Scale"
    metadata: Optional["ObjectMeta"] = None
    spec: Optional["ScaleSpec"] = None
    status: Optional["ScaleStatus"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def readNamespacedDeploymentScale(
        name: str,
        namespace: str,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read scale of the specified Deployment

        operationID: readNamespacedDeploymentScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_deployment_scale_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_deployment_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def patchNamespacedDeploymentScale(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update scale of the specified Deployment

        operationID: patchNamespacedDeploymentScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "patch_namespaced_deployment_scale_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_deployment_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def replaceNamespacedDeploymentScale(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace scale of the specified Deployment

        operationID: replaceNamespacedDeploymentScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          201   Scale    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "replace_namespaced_deployment_scale_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_deployment_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)

    @staticmethod
    def readNamespacedReplicaSetScale(
        name: str,
        namespace: str,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read scale of the specified ReplicaSet

        operationID: readNamespacedReplicaSetScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_replica_set_scale_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_replica_set_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def patchNamespacedReplicaSetScale(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update scale of the specified ReplicaSet

        operationID: patchNamespacedReplicaSetScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "patch_namespaced_replica_set_scale_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_replica_set_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def replaceNamespacedReplicaSetScale(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace scale of the specified ReplicaSet

        operationID: replaceNamespacedReplicaSetScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          201   Scale    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "replace_namespaced_replica_set_scale_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_replica_set_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)

    @staticmethod
    def readNamespacedStatefulSetScale(
        name: str,
        namespace: str,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        read scale of the specified StatefulSet

        operationID: readNamespacedStatefulSetScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "read_namespaced_stateful_set_scale_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "read_namespaced_stateful_set_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def patchNamespacedStatefulSetScale(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        force: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        partially update scale of the specified StatefulSet

        operationID: patchNamespacedStatefulSetScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint. This field is
            required for apply requests (application/apply-patch) but optional
            for non-apply patch types (JsonPatch, MergePatch,
            StrategicMergePatch).
        :param force: Force is going to "force" Apply requests. It means user will
            re-acquire conflicting fields owned by other people. Force flag must
            be unset for non-apply patch requests.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "patch_namespaced_stateful_set_scale_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "patch_namespaced_stateful_set_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        all_args["force"] = force
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    def replaceNamespacedStatefulSetScale(
        self,
        name: str,
        namespace: str,
        dry_run: Optional[str] = None,
        field_manager: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        replace scale of the specified StatefulSet

        operationID: replaceNamespacedStatefulSetScale
        path: /apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale

        :param name: name for the resource
        :param namespace: namespace for the resource
        :param dry_run: When present, indicates that modifications should not be
            persisted. An invalid or unrecognized dryRun directive will result
            in an error response and no further processing of the request. Valid
            values are: - All: all dry run stages will be processed
        :param field_manager: fieldManager is a name associated with the actor or
            entity that is making these changes. The value must be less than or
            128 characters long, and only contain printable characters, as
            defined by https://golang.org/pkg/unicode/#IsPrint.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   Scale    OK
          201   Scale    Created
          401   None    Unauthorized
        """
        if client is not None:
            client_to_use = client
        else:
            # noinspection PyDataclass
            client_to_use = self.client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(
            inst, "replace_namespaced_stateful_set_scale_with_http_info"
        )
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "replace_namespaced_stateful_set_scale_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["name"] = name
        all_args["namespace"] = namespace
        all_args["dry_run"] = dry_run
        all_args["field_manager"] = field_manager
        body = get_clean_dict(self)
        all_args["body"] = body
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200, 201)
        return Response(result, codes_returning_objects)


@dataclass
class ScaleSpec(HikaruBase):
    r"""
    ScaleSpec describes the attributes of a scale subresource

    Full name: v1beta2.ScaleSpec

    Attributes:
    replicas: desired number of instances for the scaled object.
    """

    replicas: Optional[int] = None


@dataclass
class EndpointAddress(HikaruBase):
    r"""
    EndpointAddress is a tuple that describes single IP address.

    Full name: v1.EndpointAddress

    Attributes:
    ip: The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local
        (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted
        but not fully supported on all platforms. Also, certain kubernetes components,
        like kube-proxy, are not IPv6 ready.
    hostname: The Hostname of this endpoint
    nodeName: Optional: Node hosting this endpoint. This can be used to determine
        endpoints local to a node.
    targetRef: Reference to object providing the endpoint.
    """

    ip: str
    hostname: Optional[str] = None
    nodeName: Optional[str] = None
    targetRef: Optional["ObjectReference"] = None


@dataclass
class CSINodeList(HikaruDocumentBase):
    r"""
    CSINodeList is a collection of CSINode objects.

    Full name: v1.CSINodeList

    Attributes:
    items: items is the list of CSINode
    apiVersion: 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: 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: Standard list metadata More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["CSINode"]
    apiVersion: Optional[str] = "storage.k8s.io/v1"
    kind: Optional[str] = "CSINodeList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PriorityClassList(HikaruDocumentBase):
    r"""
    PriorityClassList is a collection of priority classes.

    Full name: v1.PriorityClassList

    Attributes:
    items: items is the list of PriorityClasses
    apiVersion: 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: 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: Standard list metadata More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1"
    items: List["PriorityClass"]
    apiVersion: Optional[str] = "scheduling.k8s.io/v1"
    kind: Optional[str] = "PriorityClassList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None


@dataclass
class PodSecurityContext(HikaruBase):
    r"""
    PodSecurityContext holds pod-level security attributes and common container settings.
    Some fields are also present in container.securityContext. Field values of
    container.securityContext take precedence over field values of PodSecurityContext.

    Full name: v1.PodSecurityContext

    Attributes:
    fsGroup: A special supplemental group that applies to all containers in a pod. Some
        volume types allow the Kubelet to change the ownership of that volume to be owned
        by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new
        files created in the volume will be owned by FSGroup) 3. The permission bits are
        OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and
        permissions of any volume.
    runAsGroup: The GID to run the entrypoint of the container process. Uses runtime
        default if unset. May also be set in SecurityContext. If set in both
        SecurityContext and PodSecurityContext, the value specified in SecurityContext
        takes precedence for that container.
    runAsNonRoot: Indicates that the container must run as a non-root user. If true, the
        Kubelet will validate the image at runtime to ensure that it does not run as UID 0
        (root) and fail to start the container if it does. If unset or false, no such
        validation will be performed. May also be set in SecurityContext. If set in both
        SecurityContext and PodSecurityContext, the value specified in SecurityContext
        takes precedence.
    runAsUser: The UID to run the entrypoint of the container process. Defaults to user
        specified in image metadata if unspecified. May also be set in SecurityContext. If
        set in both SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence for that container.
    seLinuxOptions: The SELinux context to be applied to all containers. If unspecified,
        the container runtime will allocate a random SELinux context for each container.
        May also be set in SecurityContext. If set in both SecurityContext and
        PodSecurityContext, the value specified in SecurityContext takes precedence for
        that container.
    windowsOptions: The Windows specific settings applied to all containers. If
        unspecified, the options within a container's SecurityContext will be used. If set
        in both SecurityContext and PodSecurityContext, the value specified in
        SecurityContext takes precedence.
    supplementalGroups: A list of groups applied to the first process run in each
        container, in addition to the container's primary GID. If unspecified, no groups
        will be added to any container.
    sysctls: Sysctls hold a list of namespaced sysctls used for the pod. Pods with
        unsupported sysctls (by the container runtime) might fail to launch.
    """

    fsGroup: Optional[int] = None
    runAsGroup: Optional[int] = None
    runAsNonRoot: Optional[bool] = None
    runAsUser: Optional[int] = None
    seLinuxOptions: Optional["SELinuxOptions"] = None
    windowsOptions: Optional["WindowsSecurityContextOptions"] = None
    supplementalGroups: Optional[List[int]] = field(default_factory=list)
    sysctls: Optional[List["Sysctl"]] = field(default_factory=list)


@dataclass
class DaemonSetList(HikaruDocumentBase):
    r"""
    DaemonSetList is a collection of daemon sets.

    Full name: v1beta2.DaemonSetList

    Attributes:
    items: A list of daemon sets.
    apiVersion: 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: 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: Standard list metadata. More info:
        https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    """

    _version = "v1beta2"
    items: List["DaemonSet"]
    apiVersion: Optional[str] = "apps/v1beta2"
    kind: Optional[str] = "DaemonSetList"
    metadata: Optional["ListMeta"] = None
    # noinspection PyDataclass
    client: InitVar[Optional[ApiClient]] = None

    @staticmethod
    def listDaemonSetForAllNamespaces(
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        pretty: Optional[str] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind DaemonSet

        operationID: listDaemonSetForAllNamespaces
        path: /apis/apps/v1beta2/daemonsets

        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param pretty: If 'true', then the output is pretty printed.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DaemonSetList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_daemon_set_for_all_namespaces_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_daemon_set_for_all_namespaces_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["pretty"] = pretty
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_daemon_set_for_all_namespaces",
    )

    @staticmethod
    def listNamespacedDaemonSet(
        namespace: str,
        allow_watch_bookmarks: Optional[bool] = None,
        continue_: Optional[str] = None,
        field_selector: Optional[str] = None,
        label_selector: Optional[str] = None,
        limit: Optional[int] = None,
        resource_version: Optional[str] = None,
        timeout_seconds: Optional[int] = None,
        watch: Optional[bool] = None,
        pretty: Optional[str] = None,
        client: ApiClient = None,
        async_req: bool = False,
    ) -> Response:
        r"""
        list or watch objects of kind DaemonSet

        operationID: listNamespacedDaemonSet
        path: /apis/apps/v1beta2/namespaces/{namespace}/daemonsets

        :param namespace: namespace for the resource
        :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with
            type "BOOKMARK". Servers that do not implement bookmarks may ignore
            this flag and bookmarks are sent at the server's discretion. Clients
            should not assume bookmarks are returned at any specific interval,
            nor may they assume the server will send any BOOKMARK event during a
            session. If this is not a watch, this field is ignored. If the
            feature gate WatchBookmarks is not enabled in apiserver, this field
            is ignored.
        :param continue_: The continue option should be set when retrieving more
            results from the server. Since this value is server defined, clients
            may only use the continue value from a previous query result with
            identical query parameters (except for the value of continue) and
            the server may reject a continue value it does not recognize. If the
            specified continue value is no longer valid whether due to
            expiration (generally five to fifteen minutes) or a configuration
            change on the server, the server will respond with a 410
            ResourceExpired error together with a continue token. If the client
            needs a consistent list, it must restart their list without the
            continue field. Otherwise, the client may send another list request
            with the token received with the 410 error, the server will respond
            with a list starting from the next key, but from the latest
            snapshot, which is inconsistent from the previous list results -
            objects that are created, modified, or deleted after the first list
            request will be included in the response, as long as their keys are
            after the "next key". This field is not supported when watch is
            true. Clients may start a watch from the last resourceVersion value
            returned by the server and not miss any modifications.
        :param field_selector: A selector to restrict the list of returned objects by
            their fields. Defaults to everything.
        :param label_selector: A selector to restrict the list of returned objects by
            their labels. Defaults to everything.
        :param limit: limit is a maximum number of responses to return for a list call.
            If more items exist, the server will set the `continue` field on the
            list metadata to a value that can be used with the same initial
            query to retrieve the next set of results. Setting a limit may
            return fewer than the requested amount of items (up to zero items)
            in the event all requested objects are filtered out and clients
            should only use the presence of the continue field to determine
            whether more results are available. Servers may choose not to
            support the limit argument and will return all of the available
            results. If limit is specified and the continue field is empty,
            clients may assume that no more results are available. This field is
            not supported if watch is true. The server guarantees that the
            objects returned when using continue will be identical to issuing a
            single list call without a limit - that is, no objects created,
            modified, or deleted after the first request is issued will be
            included in any subsequent continued requests. This is sometimes
            referred to as a consistent snapshot, and ensures that a client that
            is using limit to receive smaller chunks of a very large result can
            ensure they see all possible objects. If objects are updated during
            a chunked list the version of the object that was present at the
            time the first list result was calculated is returned.
        :param resource_version: When specified with a watch call, shows changes that
            occur after that particular version of a resource. Defaults to
            changes from the beginning of history. When specified for list: - if
            unset, then the result is returned from remote storage based on
            quorum-read flag; - if it's 0, then we simply return what we
            currently have in cache, no guarantee; - if set to non zero, then
            the result is at least as fresh as given rv.
        :param timeout_seconds: Timeout for the list/watch call. This limits the
            duration of the call, regardless of any activity or inactivity.
        :param watch: Watch for changes to the described resources and return them as a
            stream of add, update, and remove notifications. Specify
            resourceVersion.
        :param pretty: If 'true', then the output is pretty printed.
        :param client: optional; instance of kubernetes.client.api_client.ApiClient
        :param async_req: bool; if True, call is async and the caller must invoke
            .get() on the returned Response object. Default is False, which makes
            the call blocking.

        :return: hikaru.utils.Response instance with the following codes and
            obj value types:
          Code  ObjType    Description
          -----------------------------
          200   DaemonSetList    OK
          401   None    Unauthorized
        """
        client_to_use = client
        inst = AppsV1beta2Api(api_client=client_to_use)
        the_method = getattr(inst, "list_namespaced_daemon_set_with_http_info")
        if the_method is None:  # pragma: no cover
            raise RuntimeError(
                "Unable to locate method "
                "list_namespaced_daemon_set_with_http_info "
                "on AppsV1beta2Api; possible release mismatch?"
            )
        all_args = dict()
        all_args["namespace"] = namespace
        all_args["allow_watch_bookmarks"] = allow_watch_bookmarks
        all_args["_continue"] = continue_
        all_args["field_selector"] = field_selector
        all_args["label_selector"] = label_selector
        all_args["limit"] = limit
        all_args["resource_version"] = resource_version
        all_args["timeout_seconds"] = timeout_seconds
        all_args["watch"] = watch
        all_args["pretty"] = pretty
        all_args["async_req"] = async_req
        result = the_method(**all_args)
        codes_returning_objects = (200,)
        return Response(result, codes_returning_objects)

    _namespaced_watcher = WatcherDescriptor(
        "kubernetes.client.api",
        ".apps_v1beta2_api",
        "AppsV1beta2Api",
        "list_namespaced_daemon_set",
    )


Pod._watcher_cls = PodList
Secret._watcher_cls = SecretList
ReplicationController._watcher_cls = ReplicationControllerList
ClusterRole._watcher_cls = ClusterRoleList
ComponentStatus._watcher_cls = ComponentStatusList
RoleBinding._watcher_cls = RoleBindingList
APIService._watcher_cls = APIServiceList
ResourceQuota._watcher_cls = ResourceQuotaList
PersistentVolumeClaim._watcher_cls = PersistentVolumeClaimList
PersistentVolume._watcher_cls = PersistentVolumeList
Lease._watcher_cls = LeaseList
Namespace._watcher_cls = NamespaceList
Endpoints._watcher_cls = EndpointsList
LimitRange._watcher_cls = LimitRangeList
ReplicaSet._watcher_cls = ReplicaSetList
Node._watcher_cls = NodeList
CustomResourceDefinition._watcher_cls = CustomResourceDefinitionList
ClusterRoleBinding._watcher_cls = ClusterRoleBindingList
MutatingWebhookConfiguration._watcher_cls = MutatingWebhookConfigurationList
StorageClass._watcher_cls = StorageClassList
Service._watcher_cls = ServiceList
Role._watcher_cls = RoleList
ValidatingWebhookConfiguration._watcher_cls = ValidatingWebhookConfigurationList
StatefulSet._watcher_cls = StatefulSetList
ServiceAccount._watcher_cls = ServiceAccountList
Event._watcher_cls = EventList
Job._watcher_cls = JobList
PodTemplate._watcher_cls = PodTemplateList
HorizontalPodAutoscaler._watcher_cls = HorizontalPodAutoscalerList
Deployment._watcher_cls = DeploymentList
NetworkPolicy._watcher_cls = NetworkPolicyList
VolumeAttachment._watcher_cls = VolumeAttachmentList
ControllerRevision._watcher_cls = ControllerRevisionList
ConfigMap._watcher_cls = ConfigMapList
CSINode._watcher_cls = CSINodeList
PriorityClass._watcher_cls = PriorityClassList
DaemonSet._watcher_cls = DaemonSetList


globs = dict(globals())
__all__ = [c.__name__ for c in globs.values()
           if type(c) == type]
del globs
