"""
    Kubernetes

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: release-1.37
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import warnings
from pydantic import BaseModel, validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictInt, StrictStr
from typing import Any, Dict, Optional
from typing_extensions import Annotated
from kubernetes.client.models.v1_api_resource_list import V1APIResourceList
from kubernetes.client.models.v1_delete_options import V1DeleteOptions

from kubernetes.client.api_client import ApiClient, RequestSerialized
from kubernetes.client.api_response import ApiResponse
from kubernetes.client.rest import RESTResponseType


class CustomObjectsApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        # api_client remains publicly assignable. Retain the client acquired at
        # construction so reassignment cannot transfer or discard ownership.
        if api_client is None:
            api_client, owns_api_client = ApiClient._get_default_or_new()
        else:
            owns_api_client = False
        self.api_client = api_client
        self._owned_api_client: Optional[ApiClient] = (
            api_client if owns_api_client else None
        )


    def close(self) -> None:
        owned_api_client = self._owned_api_client
        self._owned_api_client = None
        if owned_api_client is not None:
            owned_api_client.close()

    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_value, traceback):
        self.close()


    @validate_call(config={'defer_build': True})
    def create_cluster_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to create.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """create_cluster_custom_object

        Creates a cluster scoped Custom object

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param body: The JSON schema of the Resource to create. (required)
        :type body: object
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            body=body,
            pretty=pretty,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def create_cluster_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to create.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """create_cluster_custom_object

        Creates a cluster scoped Custom object

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param body: The JSON schema of the Resource to create. (required)
        :type body: object
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            body=body,
            pretty=pretty,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _create_cluster_custom_object_serialize(
        self,
        group,
        version,
        plural,
        body,
        pretty,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        # process the query parameters
        if pretty is not None:

            _query_params.append(('pretty', pretty))

        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/apis/{group}/{version}/{plural}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def create_namespaced_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to create.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """create_namespaced_custom_object

        Creates a namespace scoped Custom object

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param body: The JSON schema of the Resource to create. (required)
        :type body: object
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            body=body,
            pretty=pretty,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def create_namespaced_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to create.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """create_namespaced_custom_object

        Creates a namespace scoped Custom object

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param body: The JSON schema of the Resource to create. (required)
        :type body: object
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            body=body,
            pretty=pretty,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _create_namespaced_custom_object_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        body,
        pretty,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        # process the query parameters
        if pretty is not None:

            _query_params.append(('pretty', pretty))

        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def delete_cluster_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """delete_cluster_custom_object

        Deletes the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def delete_cluster_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """delete_cluster_custom_object

        Deletes the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _delete_cluster_custom_object_serialize(
        self,
        group,
        version,
        plural,
        name,
        grace_period_seconds,
        orphan_dependents,
        propagation_policy,
        dry_run,
        body,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if grace_period_seconds is not None:

            _query_params.append(('gracePeriodSeconds', grace_period_seconds))

        if orphan_dependents is not None:

            _query_params.append(('orphanDependents', orphan_dependents))

        if propagation_policy is not None:

            _query_params.append(('propagationPolicy', propagation_policy))

        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/apis/{group}/{version}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def delete_collection_cluster_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """delete_collection_cluster_custom_object

        Delete collection of cluster scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_collection_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            pretty=pretty,
            label_selector=label_selector,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def delete_collection_cluster_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """delete_collection_cluster_custom_object

        Delete collection of cluster scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_collection_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            pretty=pretty,
            label_selector=label_selector,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _delete_collection_cluster_custom_object_serialize(
        self,
        group,
        version,
        plural,
        pretty,
        label_selector,
        grace_period_seconds,
        orphan_dependents,
        propagation_policy,
        dry_run,
        body,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        # process the query parameters
        if pretty is not None:

            _query_params.append(('pretty', pretty))

        if label_selector is not None:

            _query_params.append(('labelSelector', label_selector))

        if grace_period_seconds is not None:

            _query_params.append(('gracePeriodSeconds', grace_period_seconds))

        if orphan_dependents is not None:

            _query_params.append(('orphanDependents', orphan_dependents))

        if propagation_policy is not None:

            _query_params.append(('propagationPolicy', propagation_policy))

        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/apis/{group}/{version}/{plural}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def delete_collection_namespaced_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """delete_collection_namespaced_custom_object

        Delete collection of namespace scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_collection_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            pretty=pretty,
            label_selector=label_selector,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            field_selector=field_selector,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def delete_collection_namespaced_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """delete_collection_namespaced_custom_object

        Delete collection of namespace scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_collection_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            pretty=pretty,
            label_selector=label_selector,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            field_selector=field_selector,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _delete_collection_namespaced_custom_object_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        pretty,
        label_selector,
        grace_period_seconds,
        orphan_dependents,
        propagation_policy,
        dry_run,
        field_selector,
        body,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        # process the query parameters
        if pretty is not None:

            _query_params.append(('pretty', pretty))

        if label_selector is not None:

            _query_params.append(('labelSelector', label_selector))

        if grace_period_seconds is not None:

            _query_params.append(('gracePeriodSeconds', grace_period_seconds))

        if orphan_dependents is not None:

            _query_params.append(('orphanDependents', orphan_dependents))

        if propagation_policy is not None:

            _query_params.append(('propagationPolicy', propagation_policy))

        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_selector is not None:

            _query_params.append(('fieldSelector', field_selector))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def delete_namespaced_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """delete_namespaced_custom_object

        Deletes the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def delete_namespaced_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        grace_period_seconds: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        orphan_dependents: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        propagation_policy: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        body: Optional[V1DeleteOptions] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """delete_namespaced_custom_object

        Deletes the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :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.
        :type grace_period_seconds: int
        :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.
        :type orphan_dependents: bool
        :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.
        :type propagation_policy: str
        :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
        :type dry_run: str
        :param body:
        :type body: V1DeleteOptions
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            grace_period_seconds=grace_period_seconds,
            orphan_dependents=orphan_dependents,
            propagation_policy=propagation_policy,
            dry_run=dry_run,
            body=body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _delete_namespaced_custom_object_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        grace_period_seconds,
        orphan_dependents,
        propagation_policy,
        dry_run,
        body,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if grace_period_seconds is not None:

            _query_params.append(('gracePeriodSeconds', grace_period_seconds))

        if orphan_dependents is not None:

            _query_params.append(('orphanDependents', orphan_dependents))

        if propagation_policy is not None:

            _query_params.append(('propagationPolicy', propagation_policy))

        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def get_api_resources(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> V1APIResourceList:
        """get_api_resources

        get available resources

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_api_resources_serialize(
            group=group,
            version=version,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "V1APIResourceList",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def get_api_resources_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[V1APIResourceList, int, Any]:
        """get_api_resources

        get available resources

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_api_resources_serialize(
            group=group,
            version=version,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "V1APIResourceList",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _get_api_resources_serialize(
        self,
        group,
        version,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def get_cluster_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """get_cluster_custom_object

        Returns a cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def get_cluster_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """get_cluster_custom_object

        Returns a cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _get_cluster_custom_object_serialize(
        self,
        group,
        version,
        plural,
        name,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def get_cluster_custom_object_scale(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """get_cluster_custom_object_scale

        read scale of the specified custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_cluster_custom_object_scale_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def get_cluster_custom_object_scale_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """get_cluster_custom_object_scale

        read scale of the specified custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_cluster_custom_object_scale_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _get_cluster_custom_object_scale_serialize(
        self,
        group,
        version,
        plural,
        name,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/{plural}/{name}/scale',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def get_cluster_custom_object_status(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """get_cluster_custom_object_status

        read status of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_cluster_custom_object_status_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def get_cluster_custom_object_status_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """get_cluster_custom_object_status

        read status of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_cluster_custom_object_status_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _get_cluster_custom_object_status_serialize(
        self,
        group,
        version,
        plural,
        name,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/{plural}/{name}/status',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def get_namespaced_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """get_namespaced_custom_object

        Returns a namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def get_namespaced_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """get_namespaced_custom_object

        Returns a namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _get_namespaced_custom_object_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def get_namespaced_custom_object_scale(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """get_namespaced_custom_object_scale

        read scale of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_namespaced_custom_object_scale_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def get_namespaced_custom_object_scale_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """get_namespaced_custom_object_scale

        read scale of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_namespaced_custom_object_scale_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _get_namespaced_custom_object_scale_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def get_namespaced_custom_object_status(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """get_namespaced_custom_object_status

        read status of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_namespaced_custom_object_status_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def get_namespaced_custom_object_status_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """get_namespaced_custom_object_status

        read status of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_namespaced_custom_object_status_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _get_namespaced_custom_object_status_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def list_cluster_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        allow_watch_bookmarks: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        _continue: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        resource_version: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        resource_version_match: Annotated[Optional[StrictStr], Field(description="resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset")] = None,
        timeout_seconds: Annotated[Optional[StrictInt], Field(description="Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.")] = None,
        watch: Annotated[Optional[StrictBool], Field(description="Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """list_cluster_custom_object

        list or watch cluster scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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.
        :type allow_watch_bookmarks: bool
        :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.
        :type _continue: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type limit: int
        :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.
        :type resource_version: str
        :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
        :type resource_version_match: str
        :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
        :type timeout_seconds: int
        :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
        :type watch: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            pretty=pretty,
            allow_watch_bookmarks=allow_watch_bookmarks,
            _continue=_continue,
            field_selector=field_selector,
            label_selector=label_selector,
            limit=limit,
            resource_version=resource_version,
            resource_version_match=resource_version_match,
            timeout_seconds=timeout_seconds,
            watch=watch,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def list_cluster_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        allow_watch_bookmarks: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        _continue: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        resource_version: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        resource_version_match: Annotated[Optional[StrictStr], Field(description="resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset")] = None,
        timeout_seconds: Annotated[Optional[StrictInt], Field(description="Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.")] = None,
        watch: Annotated[Optional[StrictBool], Field(description="Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """list_cluster_custom_object

        list or watch cluster scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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.
        :type allow_watch_bookmarks: bool
        :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.
        :type _continue: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type limit: int
        :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.
        :type resource_version: str
        :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
        :type resource_version_match: str
        :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
        :type timeout_seconds: int
        :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
        :type watch: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            pretty=pretty,
            allow_watch_bookmarks=allow_watch_bookmarks,
            _continue=_continue,
            field_selector=field_selector,
            label_selector=label_selector,
            limit=limit,
            resource_version=resource_version,
            resource_version_match=resource_version_match,
            timeout_seconds=timeout_seconds,
            watch=watch,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _list_cluster_custom_object_serialize(
        self,
        group,
        version,
        plural,
        pretty,
        allow_watch_bookmarks,
        _continue,
        field_selector,
        label_selector,
        limit,
        resource_version,
        resource_version_match,
        timeout_seconds,
        watch,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        # process the query parameters
        if pretty is not None:

            _query_params.append(('pretty', pretty))

        if allow_watch_bookmarks is not None:

            _query_params.append(('allowWatchBookmarks', allow_watch_bookmarks))

        if _continue is not None:

            _query_params.append(('continue', _continue))

        if field_selector is not None:

            _query_params.append(('fieldSelector', field_selector))

        if label_selector is not None:

            _query_params.append(('labelSelector', label_selector))

        if limit is not None:

            _query_params.append(('limit', limit))

        if resource_version is not None:

            _query_params.append(('resourceVersion', resource_version))

        if resource_version_match is not None:

            _query_params.append(('resourceVersionMatch', resource_version_match))

        if timeout_seconds is not None:

            _query_params.append(('timeoutSeconds', timeout_seconds))

        if watch is not None:

            _query_params.append(('watch', watch))

        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/json;stream=watch'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/{plural}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def list_custom_object_for_all_namespaces(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        resource_plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        allow_watch_bookmarks: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        _continue: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        resource_version: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        resource_version_match: Annotated[Optional[StrictStr], Field(description="resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset")] = None,
        timeout_seconds: Annotated[Optional[StrictInt], Field(description="Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.")] = None,
        watch: Annotated[Optional[StrictBool], Field(description="Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """list_custom_object_for_all_namespaces

        list or watch namespace scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param resource_plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type resource_plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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.
        :type allow_watch_bookmarks: bool
        :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.
        :type _continue: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type limit: int
        :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.
        :type resource_version: str
        :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
        :type resource_version_match: str
        :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
        :type timeout_seconds: int
        :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
        :type watch: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_custom_object_for_all_namespaces_serialize(
            group=group,
            version=version,
            resource_plural=resource_plural,
            pretty=pretty,
            allow_watch_bookmarks=allow_watch_bookmarks,
            _continue=_continue,
            field_selector=field_selector,
            label_selector=label_selector,
            limit=limit,
            resource_version=resource_version,
            resource_version_match=resource_version_match,
            timeout_seconds=timeout_seconds,
            watch=watch,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def list_custom_object_for_all_namespaces_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        resource_plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        allow_watch_bookmarks: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        _continue: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        resource_version: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        resource_version_match: Annotated[Optional[StrictStr], Field(description="resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset")] = None,
        timeout_seconds: Annotated[Optional[StrictInt], Field(description="Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.")] = None,
        watch: Annotated[Optional[StrictBool], Field(description="Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """list_custom_object_for_all_namespaces

        list or watch namespace scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param resource_plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type resource_plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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.
        :type allow_watch_bookmarks: bool
        :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.
        :type _continue: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type limit: int
        :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.
        :type resource_version: str
        :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
        :type resource_version_match: str
        :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
        :type timeout_seconds: int
        :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
        :type watch: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_custom_object_for_all_namespaces_serialize(
            group=group,
            version=version,
            resource_plural=resource_plural,
            pretty=pretty,
            allow_watch_bookmarks=allow_watch_bookmarks,
            _continue=_continue,
            field_selector=field_selector,
            label_selector=label_selector,
            limit=limit,
            resource_version=resource_version,
            resource_version_match=resource_version_match,
            timeout_seconds=timeout_seconds,
            watch=watch,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _list_custom_object_for_all_namespaces_serialize(
        self,
        group,
        version,
        resource_plural,
        pretty,
        allow_watch_bookmarks,
        _continue,
        field_selector,
        label_selector,
        limit,
        resource_version,
        resource_version_match,
        timeout_seconds,
        watch,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if resource_plural is not None:
            _path_params['resource_plural'] = resource_plural
        # process the query parameters
        if pretty is not None:

            _query_params.append(('pretty', pretty))

        if allow_watch_bookmarks is not None:

            _query_params.append(('allowWatchBookmarks', allow_watch_bookmarks))

        if _continue is not None:

            _query_params.append(('continue', _continue))

        if field_selector is not None:

            _query_params.append(('fieldSelector', field_selector))

        if label_selector is not None:

            _query_params.append(('labelSelector', label_selector))

        if limit is not None:

            _query_params.append(('limit', limit))

        if resource_version is not None:

            _query_params.append(('resourceVersion', resource_version))

        if resource_version_match is not None:

            _query_params.append(('resourceVersionMatch', resource_version_match))

        if timeout_seconds is not None:

            _query_params.append(('timeoutSeconds', timeout_seconds))

        if watch is not None:

            _query_params.append(('watch', watch))

        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/json;stream=watch'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/{resource_plural}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def list_namespaced_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        allow_watch_bookmarks: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        _continue: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        resource_version: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        resource_version_match: Annotated[Optional[StrictStr], Field(description="resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset")] = None,
        timeout_seconds: Annotated[Optional[StrictInt], Field(description="Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.")] = None,
        watch: Annotated[Optional[StrictBool], Field(description="Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """list_namespaced_custom_object

        list or watch namespace scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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.
        :type allow_watch_bookmarks: bool
        :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.
        :type _continue: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type limit: int
        :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.
        :type resource_version: str
        :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
        :type resource_version_match: str
        :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
        :type timeout_seconds: int
        :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
        :type watch: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            pretty=pretty,
            allow_watch_bookmarks=allow_watch_bookmarks,
            _continue=_continue,
            field_selector=field_selector,
            label_selector=label_selector,
            limit=limit,
            resource_version=resource_version,
            resource_version_match=resource_version_match,
            timeout_seconds=timeout_seconds,
            watch=watch,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def list_namespaced_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="The custom resource's group name")],
        version: Annotated[StrictStr, Field(description="The custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="The custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        pretty: Annotated[Optional[StrictStr], Field(description="If 'true', then the output is pretty printed.")] = None,
        allow_watch_bookmarks: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        _continue: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields. Defaults to everything.")] = None,
        label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="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.")] = None,
        resource_version: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        resource_version_match: Annotated[Optional[StrictStr], Field(description="resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset")] = None,
        timeout_seconds: Annotated[Optional[StrictInt], Field(description="Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.")] = None,
        watch: Annotated[Optional[StrictBool], Field(description="Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """list_namespaced_custom_object

        list or watch namespace scoped custom objects

        :param group: The custom resource's group name (required)
        :type group: str
        :param version: The custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param pretty: If 'true', then the output is pretty printed.
        :type pretty: str
        :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.
        :type allow_watch_bookmarks: bool
        :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.
        :type _continue: str
        :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
        :type field_selector: str
        :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
        :type label_selector: str
        :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.
        :type limit: int
        :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.
        :type resource_version: str
        :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.  Defaults to unset
        :type resource_version_match: str
        :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
        :type timeout_seconds: int
        :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.
        :type watch: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            pretty=pretty,
            allow_watch_bookmarks=allow_watch_bookmarks,
            _continue=_continue,
            field_selector=field_selector,
            label_selector=label_selector,
            limit=limit,
            resource_version=resource_version,
            resource_version_match=resource_version_match,
            timeout_seconds=timeout_seconds,
            watch=watch,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _list_namespaced_custom_object_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        pretty,
        allow_watch_bookmarks,
        _continue,
        field_selector,
        label_selector,
        limit,
        resource_version,
        resource_version_match,
        timeout_seconds,
        watch,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        # process the query parameters
        if pretty is not None:

            _query_params.append(('pretty', pretty))

        if allow_watch_bookmarks is not None:

            _query_params.append(('allowWatchBookmarks', allow_watch_bookmarks))

        if _continue is not None:

            _query_params.append(('continue', _continue))

        if field_selector is not None:

            _query_params.append(('fieldSelector', field_selector))

        if label_selector is not None:

            _query_params.append(('labelSelector', label_selector))

        if limit is not None:

            _query_params.append(('limit', limit))

        if resource_version is not None:

            _query_params.append(('resourceVersion', resource_version))

        if resource_version_match is not None:

            _query_params.append(('resourceVersionMatch', resource_version_match))

        if timeout_seconds is not None:

            _query_params.append(('timeoutSeconds', timeout_seconds))

        if watch is not None:

            _query_params.append(('watch', watch))

        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/json;stream=watch'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def patch_cluster_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Union[Dict[str, Any], List[Dict[str, Any]], BaseModel], Field(description="The JSON schema of the Resource to patch.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """patch_cluster_custom_object

        patch the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to patch. (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def patch_cluster_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Union[Dict[str, Any], List[Dict[str, Any]], BaseModel], Field(description="The JSON schema of the Resource to patch.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """patch_cluster_custom_object

        patch the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to patch. (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _patch_cluster_custom_object_serialize(
        self,
        group,
        version,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        force,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        if force is not None:

            _query_params.append(('force', force))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/merge-patch+json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/apis/{group}/{version}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def patch_cluster_custom_object_scale(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """patch_cluster_custom_object_scale

        partially update scale of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_cluster_custom_object_scale_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def patch_cluster_custom_object_scale_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """patch_cluster_custom_object_scale

        partially update scale of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_cluster_custom_object_scale_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _patch_cluster_custom_object_scale_serialize(
        self,
        group,
        version,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        force,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        if force is not None:

            _query_params.append(('force', force))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/merge-patch+json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/apis/{group}/{version}/{plural}/{name}/scale',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def patch_cluster_custom_object_status(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """patch_cluster_custom_object_status

        partially update status of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_cluster_custom_object_status_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def patch_cluster_custom_object_status_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """patch_cluster_custom_object_status

        partially update status of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_cluster_custom_object_status_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _patch_cluster_custom_object_status_serialize(
        self,
        group,
        version,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        force,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        if force is not None:

            _query_params.append(('force', force))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/merge-patch+json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/apis/{group}/{version}/{plural}/{name}/status',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def patch_namespaced_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Union[Dict[str, Any], List[Dict[str, Any]], BaseModel], Field(description="The JSON schema of the Resource to patch.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """patch_namespaced_custom_object

        patch the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to patch. (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def patch_namespaced_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Union[Dict[str, Any], List[Dict[str, Any]], BaseModel], Field(description="The JSON schema of the Resource to patch.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """patch_namespaced_custom_object

        patch the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to patch. (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _patch_namespaced_custom_object_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        force,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        if force is not None:

            _query_params.append(('force', force))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/merge-patch+json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def patch_namespaced_custom_object_scale(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """patch_namespaced_custom_object_scale

        partially update scale of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_namespaced_custom_object_scale_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def patch_namespaced_custom_object_scale_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """patch_namespaced_custom_object_scale

        partially update scale of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_namespaced_custom_object_scale_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _patch_namespaced_custom_object_scale_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        force,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        if force is not None:

            _query_params.append(('force', force))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/merge-patch+json',
                        'application/apply-patch+yaml'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def patch_namespaced_custom_object_status(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """patch_namespaced_custom_object_status

        partially update status of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_namespaced_custom_object_status_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def patch_namespaced_custom_object_status_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Union[Dict[str, Any], List[Dict[str, Any]], BaseModel],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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).")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        force: Annotated[Optional[StrictBool], Field(description="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.")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """patch_namespaced_custom_object_status

        partially update status of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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).
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :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.
        :type force: bool
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._patch_namespaced_custom_object_status_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            force=force,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _patch_namespaced_custom_object_status_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        force,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        if force is not None:

            _query_params.append(('force', force))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/merge-patch+json',
                        'application/apply-patch+yaml'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PATCH',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def replace_cluster_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to replace.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """replace_cluster_custom_object

        replace the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to replace. (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def replace_cluster_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom object's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to replace.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """replace_cluster_custom_object

        replace the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to replace. (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_cluster_custom_object_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _replace_cluster_custom_object_serialize(
        self,
        group,
        version,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/apis/{group}/{version}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def replace_cluster_custom_object_scale(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """replace_cluster_custom_object_scale

        replace scale of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_cluster_custom_object_scale_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def replace_cluster_custom_object_scale_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """replace_cluster_custom_object_scale

        replace scale of the specified cluster scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_cluster_custom_object_scale_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _replace_cluster_custom_object_scale_serialize(
        self,
        group,
        version,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/apis/{group}/{version}/{plural}/{name}/scale',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def replace_cluster_custom_object_status(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """replace_cluster_custom_object_status

        replace status of the cluster scoped specified custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_cluster_custom_object_status_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def replace_cluster_custom_object_status_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """replace_cluster_custom_object_status

        replace status of the cluster scoped specified custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_cluster_custom_object_status_serialize(
            group=group,
            version=version,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _replace_cluster_custom_object_status_serialize(
        self,
        group,
        version,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/apis/{group}/{version}/{plural}/{name}/status',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def replace_namespaced_custom_object(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to replace.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """replace_namespaced_custom_object

        replace the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to replace. (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def replace_namespaced_custom_object_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Annotated[Dict[str, Any], Field(description="The JSON schema of the Resource to replace.")],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """replace_namespaced_custom_object

        replace the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: The JSON schema of the Resource to replace. (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_namespaced_custom_object_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _replace_namespaced_custom_object_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def replace_namespaced_custom_object_scale(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """replace_namespaced_custom_object_scale

        replace scale of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_namespaced_custom_object_scale_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def replace_namespaced_custom_object_scale_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """replace_namespaced_custom_object_scale

        replace scale of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_namespaced_custom_object_scale_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _replace_namespaced_custom_object_scale_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call(config={'defer_build': True})
    def replace_namespaced_custom_object_status(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> object:
        """replace_namespaced_custom_object_status

        replace status of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_namespaced_custom_object_status_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            True,
        )


    @validate_call(config={'defer_build': True})
    def replace_namespaced_custom_object_status_with_http_info(
        self,
        group: Annotated[StrictStr, Field(description="the custom resource's group")],
        version: Annotated[StrictStr, Field(description="the custom resource's version")],
        namespace: Annotated[StrictStr, Field(description="The custom resource's namespace")],
        plural: Annotated[StrictStr, Field(description="the custom resource's plural name. For TPRs this would be lowercase plural kind.")],
        name: Annotated[StrictStr, Field(description="the custom object's name")],
        body: Dict[str, Any],
        dry_run: Annotated[Optional[StrictStr], Field(description="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")] = None,
        field_manager: Annotated[Optional[StrictStr], Field(description="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.")] = None,
        field_validation: Annotated[Optional[StrictStr], Field(description="fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)")] = None,
        async_req: Optional[bool] = None,
        _return_http_data_only: Optional[bool] = None,
        _preload_content: bool = True,
        _request_timeout: Union[
            None,
            Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
            Tuple[
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)],
                Annotated[Union[StrictFloat, StrictInt], Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Tuple[object, int, Any]:
        """replace_namespaced_custom_object_status

        replace status of the specified namespace scoped custom object

        :param group: the custom resource's group (required)
        :type group: str
        :param version: the custom resource's version (required)
        :type version: str
        :param namespace: The custom resource's namespace (required)
        :type namespace: str
        :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
        :type plural: str
        :param name: the custom object's name (required)
        :type name: str
        :param body: (required)
        :type body: object
        :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
        :type dry_run: str
        :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.
        :type field_manager: str
        :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)
        :type field_validation: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: only affects with_http_info; ordinary
                                       methods always return data only.
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._replace_namespaced_custom_object_status_serialize(
            group=group,
            version=version,
            namespace=namespace,
            plural=plural,
            name=name,
            body=body,
            dry_run=dry_run,
            field_manager=field_manager,
            field_validation=field_validation,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "object",
            '201': "object",
            '401': None,
        }
        return self.api_client._call_with_legacy_options(
            _param,
            _response_types_map,
            async_req,
            _preload_content,
            _request_timeout,
            _return_http_data_only,
        )


    def _replace_namespaced_custom_object_status_serialize(
        self,
        group,
        version,
        namespace,
        plural,
        name,
        body,
        dry_run,
        field_manager,
        field_validation,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if group is not None:
            _path_params['group'] = group
        if version is not None:
            _path_params['version'] = version
        if namespace is not None:
            _path_params['namespace'] = namespace
        if plural is not None:
            _path_params['plural'] = plural
        if name is not None:
            _path_params['name'] = name
        # process the query parameters
        if dry_run is not None:

            _query_params.append(('dryRun', dry_run))

        if field_manager is not None:

            _query_params.append(('fieldManager', field_manager))

        if field_validation is not None:

            _query_params.append(('fieldValidation', field_validation))

        # process the header parameters
        # process the form parameters
        # process the body parameter
        if body is not None:
            _body_params = body


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json',
                    'application/yaml',
                    'application/vnd.kubernetes.protobuf'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'BearerToken'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )
