# coding: utf-8

"""
    ESnet implementation of the IRI api

     A simple implementation of the IRI facility API using python and the fastApi library.  For more information, see: [https://iri.science/](https://iri.science/)  <img src=\"https://iri.science/images/doe-icon-old.png\" height=50 /> 

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

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

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

from datetime import datetime
from pydantic import Field, StrictStr
from typing import List, Optional
from typing_extensions import Annotated
from esnet_iri.models.allocation_unit import AllocationUnit
from esnet_iri.models.event import Event
from esnet_iri.models.incident import Incident
from esnet_iri.models.incident_type import IncidentType
from esnet_iri.models.resolution import Resolution
from esnet_iri.models.resource import Resource
from esnet_iri.models.resource_type import ResourceType
from esnet_iri.models.status import Status

from esnet_iri.api_client import ApiClient, RequestSerialized
from esnet_iri.api_response import ApiResponse
from esnet_iri.rest import RESTResponseType


class StatusApi:
    """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:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def get_event_by_incident(
        self,
        incident_id: StrictStr,
        event_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> Event:
        """Get a specific event

        Get a specific event for a given id

        :param incident_id: (required)
        :type incident_id: str
        :param event_id: (required)
        :type event_id: str
        :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_event_by_incident_serialize(
            incident_id=incident_id,
            event_id=event_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_event_by_incident_with_http_info(
        self,
        incident_id: StrictStr,
        event_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> ApiResponse[Event]:
        """Get a specific event

        Get a specific event for a given id

        :param incident_id: (required)
        :type incident_id: str
        :param event_id: (required)
        :type event_id: str
        :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_event_by_incident_serialize(
            incident_id=incident_id,
            event_id=event_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_event_by_incident_without_preload_content(
        self,
        incident_id: StrictStr,
        event_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> RESTResponseType:
        """Get a specific event

        Get a specific event for a given id

        :param incident_id: (required)
        :type incident_id: str
        :param event_id: (required)
        :type event_id: str
        :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_event_by_incident_serialize(
            incident_id=incident_id,
            event_id=event_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Event",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_event_by_incident_serialize(
        self,
        incident_id,
        event_id,
        _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 incident_id is not None:
            _path_params['incident_id'] = incident_id
        if event_id is not None:
            _path_params['event_id'] = event_id
        # 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] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/status/incidents/{incident_id}/events/{event_id}',
            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
    def get_events_by_incident(
        self,
        incident_id: StrictStr,
        resource_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        status: Optional[Status] = None,
        var_from: Optional[datetime] = None,
        time: Optional[datetime] = None,
        to: Optional[datetime] = None,
        modified_since: Optional[datetime] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> List[Event]:
        """Get all events for an incident

        Get a list of all events in this incident.  You can optionally filter the returned list by specifying attribtes.

        :param incident_id: (required)
        :type incident_id: str
        :param resource_id:
        :type resource_id: str
        :param name:
        :type name: str
        :param description:
        :type description: str
        :param status:
        :type status: Status
        :param var_from:
        :type var_from: datetime
        :param time:
        :type time: datetime
        :param to:
        :type to: datetime
        :param modified_since:
        :type modified_since: datetime
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :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_events_by_incident_serialize(
            incident_id=incident_id,
            resource_id=resource_id,
            name=name,
            description=description,
            status=status,
            var_from=var_from,
            time=time,
            to=to,
            modified_since=modified_since,
            offset=offset,
            limit=limit,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Event]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_events_by_incident_with_http_info(
        self,
        incident_id: StrictStr,
        resource_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        status: Optional[Status] = None,
        var_from: Optional[datetime] = None,
        time: Optional[datetime] = None,
        to: Optional[datetime] = None,
        modified_since: Optional[datetime] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> ApiResponse[List[Event]]:
        """Get all events for an incident

        Get a list of all events in this incident.  You can optionally filter the returned list by specifying attribtes.

        :param incident_id: (required)
        :type incident_id: str
        :param resource_id:
        :type resource_id: str
        :param name:
        :type name: str
        :param description:
        :type description: str
        :param status:
        :type status: Status
        :param var_from:
        :type var_from: datetime
        :param time:
        :type time: datetime
        :param to:
        :type to: datetime
        :param modified_since:
        :type modified_since: datetime
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :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_events_by_incident_serialize(
            incident_id=incident_id,
            resource_id=resource_id,
            name=name,
            description=description,
            status=status,
            var_from=var_from,
            time=time,
            to=to,
            modified_since=modified_since,
            offset=offset,
            limit=limit,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Event]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_events_by_incident_without_preload_content(
        self,
        incident_id: StrictStr,
        resource_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        status: Optional[Status] = None,
        var_from: Optional[datetime] = None,
        time: Optional[datetime] = None,
        to: Optional[datetime] = None,
        modified_since: Optional[datetime] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> RESTResponseType:
        """Get all events for an incident

        Get a list of all events in this incident.  You can optionally filter the returned list by specifying attribtes.

        :param incident_id: (required)
        :type incident_id: str
        :param resource_id:
        :type resource_id: str
        :param name:
        :type name: str
        :param description:
        :type description: str
        :param status:
        :type status: Status
        :param var_from:
        :type var_from: datetime
        :param time:
        :type time: datetime
        :param to:
        :type to: datetime
        :param modified_since:
        :type modified_since: datetime
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :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_events_by_incident_serialize(
            incident_id=incident_id,
            resource_id=resource_id,
            name=name,
            description=description,
            status=status,
            var_from=var_from,
            time=time,
            to=to,
            modified_since=modified_since,
            offset=offset,
            limit=limit,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Event]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_events_by_incident_serialize(
        self,
        incident_id,
        resource_id,
        name,
        description,
        status,
        var_from,
        time,
        to,
        modified_since,
        offset,
        limit,
        _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 incident_id is not None:
            _path_params['incident_id'] = incident_id
        # process the query parameters
        if resource_id is not None:
            
            _query_params.append(('resource_id', resource_id))
            
        if name is not None:
            
            _query_params.append(('name', name))
            
        if description is not None:
            
            _query_params.append(('description', description))
            
        if status is not None:
            
            _query_params.append(('status', status.value))
            
        if var_from is not None:
            if isinstance(var_from, datetime):
                _query_params.append(
                    (
                        'from',
                        var_from.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('from', var_from))
            
        if time is not None:
            if isinstance(time, datetime):
                _query_params.append(
                    (
                        'time',
                        time.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('time', time))
            
        if to is not None:
            if isinstance(to, datetime):
                _query_params.append(
                    (
                        'to',
                        to.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('to', to))
            
        if modified_since is not None:
            if isinstance(modified_since, datetime):
                _query_params.append(
                    (
                        'modified_since',
                        modified_since.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('modified_since', modified_since))
            
        if offset is not None:
            
            _query_params.append(('offset', offset))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        # 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] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/status/incidents/{incident_id}/events',
            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
    def get_incident(
        self,
        incident_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> Incident:
        """Get a specific incident and its events

        Get a specific incident for a given id. The incident's events will also be included.  You can optionally filter the returned list by specifying attributes.

        :param incident_id: (required)
        :type incident_id: str
        :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_incident_serialize(
            incident_id=incident_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Incident",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_incident_with_http_info(
        self,
        incident_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> ApiResponse[Incident]:
        """Get a specific incident and its events

        Get a specific incident for a given id. The incident's events will also be included.  You can optionally filter the returned list by specifying attributes.

        :param incident_id: (required)
        :type incident_id: str
        :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_incident_serialize(
            incident_id=incident_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Incident",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_incident_without_preload_content(
        self,
        incident_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> RESTResponseType:
        """Get a specific incident and its events

        Get a specific incident for a given id. The incident's events will also be included.  You can optionally filter the returned list by specifying attributes.

        :param incident_id: (required)
        :type incident_id: str
        :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_incident_serialize(
            incident_id=incident_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Incident",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_incident_serialize(
        self,
        incident_id,
        _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 incident_id is not None:
            _path_params['incident_id'] = incident_id
        # 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] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/status/incidents/{incident_id}',
            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
    def get_incidents(
        self,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        status: Optional[Status] = None,
        type: Optional[IncidentType] = None,
        var_from: Optional[datetime] = None,
        time: Optional[datetime] = None,
        to: Optional[datetime] = None,
        modified_since: Optional[datetime] = None,
        resource_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        resolution: Optional[Resolution] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> List[Incident]:
        """Get all incidents without their events

        Get a list of all incidents. Each incident will be returned without its events.  You can optionally filter the returned list by specifying attributes.

        :param name:
        :type name: str
        :param description:
        :type description: str
        :param status:
        :type status: Status
        :param type:
        :type type: IncidentType
        :param var_from:
        :type var_from: datetime
        :param time:
        :type time: datetime
        :param to:
        :type to: datetime
        :param modified_since:
        :type modified_since: datetime
        :param resource_id:
        :type resource_id: str
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :param resolution:
        :type resolution: Resolution
        :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_incidents_serialize(
            name=name,
            description=description,
            status=status,
            type=type,
            var_from=var_from,
            time=time,
            to=to,
            modified_since=modified_since,
            resource_id=resource_id,
            offset=offset,
            limit=limit,
            resolution=resolution,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Incident]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_incidents_with_http_info(
        self,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        status: Optional[Status] = None,
        type: Optional[IncidentType] = None,
        var_from: Optional[datetime] = None,
        time: Optional[datetime] = None,
        to: Optional[datetime] = None,
        modified_since: Optional[datetime] = None,
        resource_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        resolution: Optional[Resolution] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> ApiResponse[List[Incident]]:
        """Get all incidents without their events

        Get a list of all incidents. Each incident will be returned without its events.  You can optionally filter the returned list by specifying attributes.

        :param name:
        :type name: str
        :param description:
        :type description: str
        :param status:
        :type status: Status
        :param type:
        :type type: IncidentType
        :param var_from:
        :type var_from: datetime
        :param time:
        :type time: datetime
        :param to:
        :type to: datetime
        :param modified_since:
        :type modified_since: datetime
        :param resource_id:
        :type resource_id: str
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :param resolution:
        :type resolution: Resolution
        :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_incidents_serialize(
            name=name,
            description=description,
            status=status,
            type=type,
            var_from=var_from,
            time=time,
            to=to,
            modified_since=modified_since,
            resource_id=resource_id,
            offset=offset,
            limit=limit,
            resolution=resolution,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Incident]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_incidents_without_preload_content(
        self,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        status: Optional[Status] = None,
        type: Optional[IncidentType] = None,
        var_from: Optional[datetime] = None,
        time: Optional[datetime] = None,
        to: Optional[datetime] = None,
        modified_since: Optional[datetime] = None,
        resource_id: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        resolution: Optional[Resolution] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> RESTResponseType:
        """Get all incidents without their events

        Get a list of all incidents. Each incident will be returned without its events.  You can optionally filter the returned list by specifying attributes.

        :param name:
        :type name: str
        :param description:
        :type description: str
        :param status:
        :type status: Status
        :param type:
        :type type: IncidentType
        :param var_from:
        :type var_from: datetime
        :param time:
        :type time: datetime
        :param to:
        :type to: datetime
        :param modified_since:
        :type modified_since: datetime
        :param resource_id:
        :type resource_id: str
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :param resolution:
        :type resolution: Resolution
        :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_incidents_serialize(
            name=name,
            description=description,
            status=status,
            type=type,
            var_from=var_from,
            time=time,
            to=to,
            modified_since=modified_since,
            resource_id=resource_id,
            offset=offset,
            limit=limit,
            resolution=resolution,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Incident]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_incidents_serialize(
        self,
        name,
        description,
        status,
        type,
        var_from,
        time,
        to,
        modified_since,
        resource_id,
        offset,
        limit,
        resolution,
        _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
        # process the query parameters
        if name is not None:
            
            _query_params.append(('name', name))
            
        if description is not None:
            
            _query_params.append(('description', description))
            
        if status is not None:
            
            _query_params.append(('status', status.value))
            
        if type is not None:
            
            _query_params.append(('type', type.value))
            
        if var_from is not None:
            if isinstance(var_from, datetime):
                _query_params.append(
                    (
                        'from',
                        var_from.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('from', var_from))
            
        if time is not None:
            if isinstance(time, datetime):
                _query_params.append(
                    (
                        'time',
                        time.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('time', time))
            
        if to is not None:
            if isinstance(to, datetime):
                _query_params.append(
                    (
                        'to',
                        to.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('to', to))
            
        if modified_since is not None:
            if isinstance(modified_since, datetime):
                _query_params.append(
                    (
                        'modified_since',
                        modified_since.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('modified_since', modified_since))
            
        if resource_id is not None:
            
            _query_params.append(('resource_id', resource_id))
            
        if offset is not None:
            
            _query_params.append(('offset', offset))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if resolution is not None:
            
            _query_params.append(('resolution', resolution.value))
            
        # 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] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/status/incidents',
            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
    def get_resource(
        self,
        resource_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> Resource:
        """Get a specific resource

        Get a specific resource for a given id

        :param resource_id: (required)
        :type resource_id: str
        :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_resource_serialize(
            resource_id=resource_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Resource",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_resource_with_http_info(
        self,
        resource_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> ApiResponse[Resource]:
        """Get a specific resource

        Get a specific resource for a given id

        :param resource_id: (required)
        :type resource_id: str
        :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_resource_serialize(
            resource_id=resource_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Resource",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_resource_without_preload_content(
        self,
        resource_id: StrictStr,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> RESTResponseType:
        """Get a specific resource

        Get a specific resource for a given id

        :param resource_id: (required)
        :type resource_id: str
        :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_resource_serialize(
            resource_id=resource_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Resource",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_resource_serialize(
        self,
        resource_id,
        _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 resource_id is not None:
            _path_params['resource_id'] = resource_id
        # 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] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/status/resources/{resource_id}',
            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
    def get_resources(
        self,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        group: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        modified_since: Optional[datetime] = None,
        resource_type: Optional[ResourceType] = None,
        current_status: Optional[Status] = None,
        capability: Optional[Annotated[List[AllocationUnit], Field(min_length=1)]] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> List[Resource]:
        """Get all resources

        Get a list of all resources at this facility. You can optionally filter the returned list by specifying attribtes.

        :param name:
        :type name: str
        :param description:
        :type description: str
        :param group:
        :type group: str
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :param modified_since:
        :type modified_since: datetime
        :param resource_type:
        :type resource_type: ResourceType
        :param current_status:
        :type current_status: Status
        :param capability:
        :type capability: List[AllocationUnit]
        :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_resources_serialize(
            name=name,
            description=description,
            group=group,
            offset=offset,
            limit=limit,
            modified_since=modified_since,
            resource_type=resource_type,
            current_status=current_status,
            capability=capability,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Resource]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_resources_with_http_info(
        self,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        group: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        modified_since: Optional[datetime] = None,
        resource_type: Optional[ResourceType] = None,
        current_status: Optional[Status] = None,
        capability: Optional[Annotated[List[AllocationUnit], Field(min_length=1)]] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> ApiResponse[List[Resource]]:
        """Get all resources

        Get a list of all resources at this facility. You can optionally filter the returned list by specifying attribtes.

        :param name:
        :type name: str
        :param description:
        :type description: str
        :param group:
        :type group: str
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :param modified_since:
        :type modified_since: datetime
        :param resource_type:
        :type resource_type: ResourceType
        :param current_status:
        :type current_status: Status
        :param capability:
        :type capability: List[AllocationUnit]
        :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_resources_serialize(
            name=name,
            description=description,
            group=group,
            offset=offset,
            limit=limit,
            modified_since=modified_since,
            resource_type=resource_type,
            current_status=current_status,
            capability=capability,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Resource]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_resources_without_preload_content(
        self,
        name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        group: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None,
        offset: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = None,
        modified_since: Optional[datetime] = None,
        resource_type: Optional[ResourceType] = None,
        current_status: Optional[Status] = None,
        capability: Optional[Annotated[List[AllocationUnit], Field(min_length=1)]] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, 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,
    ) -> RESTResponseType:
        """Get all resources

        Get a list of all resources at this facility. You can optionally filter the returned list by specifying attribtes.

        :param name:
        :type name: str
        :param description:
        :type description: str
        :param group:
        :type group: str
        :param offset:
        :type offset: int
        :param limit:
        :type limit: int
        :param modified_since:
        :type modified_since: datetime
        :param resource_type:
        :type resource_type: ResourceType
        :param current_status:
        :type current_status: Status
        :param capability:
        :type capability: List[AllocationUnit]
        :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_resources_serialize(
            name=name,
            description=description,
            group=group,
            offset=offset,
            limit=limit,
            modified_since=modified_since,
            resource_type=resource_type,
            current_status=current_status,
            capability=capability,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[Resource]",
            '400': "Problem",
            '401': "Problem",
            '403': "Problem",
            '404': "Problem",
            '405': "Problem",
            '409': "Problem",
            '422': "Problem",
            '500': "Problem",
            '501': "Problem",
            '503': "Problem",
            '504': "Problem",
            '304': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_resources_serialize(
        self,
        name,
        description,
        group,
        offset,
        limit,
        modified_since,
        resource_type,
        current_status,
        capability,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
            'capability': 'multi',
        }

        _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
        # process the query parameters
        if name is not None:
            
            _query_params.append(('name', name))
            
        if description is not None:
            
            _query_params.append(('description', description))
            
        if group is not None:
            
            _query_params.append(('group', group))
            
        if offset is not None:
            
            _query_params.append(('offset', offset))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if modified_since is not None:
            if isinstance(modified_since, datetime):
                _query_params.append(
                    (
                        'modified_since',
                        modified_since.strftime(
                            self.api_client.configuration.datetime_format
                        )
                    )
                )
            else:
                _query_params.append(('modified_since', modified_since))
            
        if resource_type is not None:
            
            _query_params.append(('resource_type', resource_type.value))
            
        if current_status is not None:
            
            _query_params.append(('current_status', current_status.value))
            
        if capability is not None:
            
            _query_params.append(('capability', capability))
            
        # 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] = [
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/api/v1/status/resources',
            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
        )


