"""
    HW Mux Reservation System

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

    The version of the OpenAPI document: 2.0.1
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from hwmux_client.api_client import ApiClient, Endpoint as _Endpoint
from hwmux_client.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from hwmux_client.model.log import Log
from hwmux_client.model.paginated_log_list import PaginatedLogList


class LogsApi(object):
    """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):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.logs_destroy_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'cookieAuth',
                    'tokenAuth'
                ],
                'endpoint_path': '/api/logs/{id}',
                'operation_id': 'logs_destroy',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (str,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [],
            },
            api_client=api_client
        )
        self.logs_list_endpoint = _Endpoint(
            settings={
                'response_type': (PaginatedLogList,),
                'auth': [
                    'cookieAuth',
                    'tokenAuth'
                ],
                'endpoint_path': '/api/logs/',
                'operation_id': 'logs_list',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'caused_by',
                    'date_after',
                    'date_before',
                    'datetime',
                    'details',
                    'device',
                    'device__sn_or_name',
                    'device_group',
                    'device_group__name',
                    'device_group_label',
                    'event',
                    'owner',
                    'page',
                    'search',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                    'event',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('event',): {

                        "CR": "CR",
                        "ERR": "ERR",
                        "MOD": "MOD",
                        "OFF": "OFF",
                        "ON": "ON",
                        "QUE": "QUE",
                        "REL": "REL",
                        "RES": "RES"
                    },
                },
                'openapi_types': {
                    'caused_by':
                        (int,),
                    'date_after':
                        (date,),
                    'date_before':
                        (date,),
                    'datetime':
                        (datetime,),
                    'details':
                        (str,),
                    'device':
                        (int,),
                    'device__sn_or_name':
                        (str,),
                    'device_group':
                        (int,),
                    'device_group__name':
                        (str,),
                    'device_group_label':
                        (int,),
                    'event':
                        (str,),
                    'owner':
                        (str,),
                    'page':
                        (int,),
                    'search':
                        (str,),
                },
                'attribute_map': {
                    'caused_by': 'caused_by',
                    'date_after': 'date_after',
                    'date_before': 'date_before',
                    'datetime': 'datetime',
                    'details': 'details',
                    'device': 'device',
                    'device__sn_or_name': 'device__sn_or_name',
                    'device_group': 'device_group',
                    'device_group__name': 'device_group__name',
                    'device_group_label': 'device_group_label',
                    'event': 'event',
                    'owner': 'owner',
                    'page': 'page',
                    'search': 'search',
                },
                'location_map': {
                    'caused_by': 'query',
                    'date_after': 'query',
                    'date_before': 'query',
                    'datetime': 'query',
                    'details': 'query',
                    'device': 'query',
                    'device__sn_or_name': 'query',
                    'device_group': 'query',
                    'device_group__name': 'query',
                    'device_group_label': 'query',
                    'event': 'query',
                    'owner': 'query',
                    'page': 'query',
                    'search': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.logs_retrieve_endpoint = _Endpoint(
            settings={
                'response_type': (Log,),
                'auth': [
                    'cookieAuth',
                    'tokenAuth'
                ],
                'endpoint_path': '/api/logs/{id}/',
                'operation_id': 'logs_retrieve',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )

    def logs_destroy(
        self,
        id,
        **kwargs
    ):
        """logs_destroy  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.logs_destroy(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (str):

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            None
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.logs_destroy_endpoint.call_with_http_info(**kwargs)

    def logs_list(
        self,
        **kwargs
    ):
        """logs_list  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.logs_list(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            caused_by (int): [optional]
            date_after (date): [optional]
            date_before (date): [optional]
            datetime (datetime): [optional]
            details (str): [optional]
            device (int): [optional]
            device__sn_or_name (str): [optional]
            device_group (int): [optional]
            device_group__name (str): [optional]
            device_group_label (int): [optional]
            event (str): [optional]
            owner (str): Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.. [optional]
            page (int): A page number within the paginated result set.. [optional]
            search (str): A search term.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            PaginatedLogList
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        return self.logs_list_endpoint.call_with_http_info(**kwargs)

    def logs_retrieve(
        self,
        id,
        **kwargs
    ):
        """logs_retrieve  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.logs_retrieve(id, async_req=True)
        >>> result = thread.get()

        Args:
            id (int): A unique integer value identifying this log.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): 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.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Log
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['id'] = \
            id
        return self.logs_retrieve_endpoint.call_with_http_info(**kwargs)

