"""
    BJR API V1

    API specification for the BJR job server.  # noqa: E501

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


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

from bjr4py.api_client import ApiClient, Endpoint as _Endpoint
from bjr4py.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from bjr4py.model.job_array_message import JobArrayMessage
from bjr4py.model.job_in import JobIn
from bjr4py.model.job_run_array_message import JobRunArrayMessage
from bjr4py.model.occurrence_message import OccurrenceMessage
from bjr4py.model.single_job_message import SingleJobMessage


class JobsApi(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

        def __create_job(
            self,
            **kwargs
        ):
            """Creates a job  # noqa: E501

            Creates a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                job_in (JobIn): [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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.create_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api',
                'operation_id': 'create_job',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'job_in',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'job_in':
                        (JobIn,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'job_in': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_job
        )

        def __delete_job(
            self,
            id,
            **kwargs
        ):
            """Deletes a job  # noqa: E501

            Deletes a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.delete_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}',
                'operation_id': 'delete_job',
                'http_method': 'DELETE',
                '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,
            callable=__delete_job
        )

        def __get_job(
            self,
            id,
            **kwargs
        ):
            """Retrieves a single job  # noqa: E501

            Retrieves a single job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.get_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}',
                'operation_id': 'get_job',
                '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,
            callable=__get_job
        )

        def __get_job_runs(
            self,
            id,
            **kwargs
        ):
            """Retrieve the runs for a job  # noqa: E501

            Retrieve the runs for a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            Keyword Args:
                per_page (int): [optional]
                page (int): [optional]
                succeeded (bool): [optional]
                start_date (str): [optional]
                end_date (str): [optional]
                timezone (str): [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 (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:
                JobRunArrayMessage
                    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.call_with_http_info(**kwargs)

        self.get_job_runs = _Endpoint(
            settings={
                'response_type': (JobRunArrayMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}/runs',
                'operation_id': 'get_job_runs',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'per_page',
                    'page',
                    'succeeded',
                    'start_date',
                    'end_date',
                    'timezone',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'per_page':
                        (int,),
                    'page':
                        (int,),
                    'succeeded':
                        (bool,),
                    'start_date':
                        (str,),
                    'end_date':
                        (str,),
                    'timezone':
                        (str,),
                },
                'attribute_map': {
                    'id': 'id',
                    'per_page': 'per_page',
                    'page': 'page',
                    'succeeded': 'succeeded',
                    'start_date': 'start_date',
                    'end_date': 'end_date',
                    'timezone': 'timezone',
                },
                'location_map': {
                    'id': 'path',
                    'per_page': 'query',
                    'page': 'query',
                    'succeeded': 'query',
                    'start_date': 'query',
                    'end_date': 'query',
                    'timezone': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_job_runs
        )

        def __get_jobs(
            self,
            **kwargs
        ):
            """Retrieves jobs  # noqa: E501

            Retrieves jobs  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                expression (str): A search expression to filter jobs.. [optional]
                timezone (str): [optional]
                per_page (int): [optional]
                page (int): [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 (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:
                JobArrayMessage
                    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.call_with_http_info(**kwargs)

        self.get_jobs = _Endpoint(
            settings={
                'response_type': (JobArrayMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api',
                'operation_id': 'get_jobs',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'expression',
                    'timezone',
                    'per_page',
                    'page',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'expression':
                        (str,),
                    'timezone':
                        (str,),
                    'per_page':
                        (int,),
                    'page':
                        (int,),
                },
                'attribute_map': {
                    'expression': 'expression',
                    'timezone': 'timezone',
                    'per_page': 'per_page',
                    'page': 'page',
                },
                'location_map': {
                    'expression': 'query',
                    'timezone': 'query',
                    'per_page': 'query',
                    'page': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_jobs
        )

        def __job_occurrences(
            self,
            id,
            end_date,
            **kwargs
        ):
            """Upcoming job occurrences  # noqa: E501

            Retrieves a list of upcoming occurrences for a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int): The id of the job to retrieve occurrences for
                end_date (str): The date to retrieve occurrences up to

            Keyword Args:
                per_page (int): [optional]
                page (int): [optional]
                timezone (str): [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 (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:
                OccurrenceMessage
                    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
            kwargs['end_date'] = \
                end_date
            return self.call_with_http_info(**kwargs)

        self.job_occurrences = _Endpoint(
            settings={
                'response_type': (OccurrenceMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}/occurrences/{end_date}',
                'operation_id': 'job_occurrences',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'end_date',
                    'per_page',
                    'page',
                    'timezone',
                ],
                'required': [
                    'id',
                    'end_date',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'end_date':
                        (str,),
                    'per_page':
                        (int,),
                    'page':
                        (int,),
                    'timezone':
                        (str,),
                },
                'attribute_map': {
                    'id': 'id',
                    'end_date': 'end_date',
                    'per_page': 'per_page',
                    'page': 'page',
                    'timezone': 'timezone',
                },
                'location_map': {
                    'id': 'path',
                    'end_date': 'path',
                    'per_page': 'query',
                    'page': 'query',
                    'timezone': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__job_occurrences
        )

        def __run_job_now(
            self,
            id,
            **kwargs
        ):
            """Run a job now  # noqa: E501

            Queues a job to run now  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int): The id of the job to execute now

            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 (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.call_with_http_info(**kwargs)

        self.run_job_now = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}/run_now',
                'operation_id': 'run_job_now',
                'http_method': 'POST',
                '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': [],
                'content_type': [],
            },
            api_client=api_client,
            callable=__run_job_now
        )

        def __update_job(
            self,
            id,
            **kwargs
        ):
            """Updates a single job  # noqa: E501

            Updates a single job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            Keyword Args:
                job_in (JobIn): [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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.update_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}',
                'operation_id': 'update_job',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'job_in',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'job_in':
                        (JobIn,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'job_in': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_job
        )

"""
    BJR API V1

    API specification for the BJR job server.  # noqa: E501

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


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

from bjr4py.api_client import ApiClient, Endpoint as _Endpoint
from bjr4py.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from bjr4py.model.job_array_message import JobArrayMessage
from bjr4py.model.job_in import JobIn
from bjr4py.model.job_run_array_message import JobRunArrayMessage
from bjr4py.model.occurrence_message import OccurrenceMessage
from bjr4py.model.single_job_message import SingleJobMessage


class JobsApi(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

        def __create_job(
            self,
            **kwargs
        ):
            """Creates a job  # noqa: E501

            Creates a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                job_in (JobIn): [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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.create_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api',
                'operation_id': 'create_job',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'job_in',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'job_in':
                        (JobIn,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'job_in': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_job
        )

        def __delete_job(
            self,
            id,
            **kwargs
        ):
            """Deletes a job  # noqa: E501

            Deletes a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.delete_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}',
                'operation_id': 'delete_job',
                'http_method': 'DELETE',
                '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,
            callable=__delete_job
        )

        def __get_job(
            self,
            id,
            **kwargs
        ):
            """Retrieves a single job  # noqa: E501

            Retrieves a single job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.get_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}',
                'operation_id': 'get_job',
                '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,
            callable=__get_job
        )

        def __get_job_runs(
            self,
            id,
            **kwargs
        ):
            """Retrieve the runs for a job  # noqa: E501

            Retrieve the runs for a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            Keyword Args:
                per_page (int): [optional]
                page (int): [optional]
                succeeded (bool): [optional]
                start_date (str): [optional]
                end_date (str): [optional]
                timezone (str): [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 (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:
                JobRunArrayMessage
                    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.call_with_http_info(**kwargs)

        self.get_job_runs = _Endpoint(
            settings={
                'response_type': (JobRunArrayMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}/runs',
                'operation_id': 'get_job_runs',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'per_page',
                    'page',
                    'succeeded',
                    'start_date',
                    'end_date',
                    'timezone',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'per_page':
                        (int,),
                    'page':
                        (int,),
                    'succeeded':
                        (bool,),
                    'start_date':
                        (str,),
                    'end_date':
                        (str,),
                    'timezone':
                        (str,),
                },
                'attribute_map': {
                    'id': 'id',
                    'per_page': 'per_page',
                    'page': 'page',
                    'succeeded': 'succeeded',
                    'start_date': 'start_date',
                    'end_date': 'end_date',
                    'timezone': 'timezone',
                },
                'location_map': {
                    'id': 'path',
                    'per_page': 'query',
                    'page': 'query',
                    'succeeded': 'query',
                    'start_date': 'query',
                    'end_date': 'query',
                    'timezone': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_job_runs
        )

        def __get_jobs(
            self,
            **kwargs
        ):
            """Retrieves jobs  # noqa: E501

            Retrieves jobs  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                expression (str): A search expression to filter jobs.. [optional]
                timezone (str): [optional]
                per_page (int): [optional]
                page (int): [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 (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:
                JobArrayMessage
                    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.call_with_http_info(**kwargs)

        self.get_jobs = _Endpoint(
            settings={
                'response_type': (JobArrayMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api',
                'operation_id': 'get_jobs',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'expression',
                    'timezone',
                    'per_page',
                    'page',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'expression':
                        (str,),
                    'timezone':
                        (str,),
                    'per_page':
                        (int,),
                    'page':
                        (int,),
                },
                'attribute_map': {
                    'expression': 'expression',
                    'timezone': 'timezone',
                    'per_page': 'per_page',
                    'page': 'page',
                },
                'location_map': {
                    'expression': 'query',
                    'timezone': 'query',
                    'per_page': 'query',
                    'page': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_jobs
        )

        def __job_occurrences(
            self,
            id,
            end_date,
            **kwargs
        ):
            """Upcoming job occurrences  # noqa: E501

            Retrieves a list of upcoming occurrences for a job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int): The id of the job to retrieve occurrences for
                end_date (str): The date to retrieve occurrences up to

            Keyword Args:
                per_page (int): [optional]
                page (int): [optional]
                timezone (str): [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 (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:
                OccurrenceMessage
                    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
            kwargs['end_date'] = \
                end_date
            return self.call_with_http_info(**kwargs)

        self.job_occurrences = _Endpoint(
            settings={
                'response_type': (OccurrenceMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}/occurrences/{end_date}',
                'operation_id': 'job_occurrences',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'end_date',
                    'per_page',
                    'page',
                    'timezone',
                ],
                'required': [
                    'id',
                    'end_date',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'end_date':
                        (str,),
                    'per_page':
                        (int,),
                    'page':
                        (int,),
                    'timezone':
                        (str,),
                },
                'attribute_map': {
                    'id': 'id',
                    'end_date': 'end_date',
                    'per_page': 'per_page',
                    'page': 'page',
                    'timezone': 'timezone',
                },
                'location_map': {
                    'id': 'path',
                    'end_date': 'path',
                    'per_page': 'query',
                    'page': 'query',
                    'timezone': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__job_occurrences
        )

        def __run_job_now(
            self,
            id,
            **kwargs
        ):
            """Run a job now  # noqa: E501

            Queues a job to run now  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int): The id of the job to execute now

            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 (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.call_with_http_info(**kwargs)

        self.run_job_now = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}/run_now',
                'operation_id': 'run_job_now',
                'http_method': 'POST',
                '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': [],
                'content_type': [],
            },
            api_client=api_client,
            callable=__run_job_now
        )

        def __update_job(
            self,
            id,
            **kwargs
        ):
            """Updates a single job  # noqa: E501

            Updates a single job  # noqa: E501
            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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

            Args:
                id (int):

            Keyword Args:
                job_in (JobIn): [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 (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:
                SingleJobMessage
                    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.call_with_http_info(**kwargs)

        self.update_job = _Endpoint(
            settings={
                'response_type': (SingleJobMessage,),
                'auth': [
                    'bearerAuth'
                ],
                'endpoint_path': '/job_api/{id}',
                'operation_id': 'update_job',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'id',
                    'job_in',
                ],
                'required': [
                    'id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'id':
                        (int,),
                    'job_in':
                        (JobIn,),
                },
                'attribute_map': {
                    'id': 'id',
                },
                'location_map': {
                    'id': 'path',
                    'job_in': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_job
        )

BJR API V1      API specification for the BJR job server.  # noqa: E501      The version of the OpenAPI document: v1     Generated by: https://openapi-generator.tech # noqa: F401 # noqa: F401 # noqa: F401 NOTE: This class is auto generated by OpenAPI Generator     Ref: https://openapi-generator.tech      Do not edit the class manually. Creates a job  # noqa: E501              Creates a job  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.create_job(async_req=True)             >>> result = thread.get()               Keyword Args:                 job_in (JobIn): [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 (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:                 SingleJobMessage                     If the method is called asynchronously, returns the request                     thread. Deletes a job  # noqa: E501              Deletes a job  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.delete_job(id, async_req=True)             >>> result = thread.get()              Args:                 id (int):              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 (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:                 SingleJobMessage                     If the method is called asynchronously, returns the request                     thread. Retrieves a single job  # noqa: E501              Retrieves a single job  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.get_job(id, async_req=True)             >>> result = thread.get()              Args:                 id (int):              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 (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:                 SingleJobMessage                     If the method is called asynchronously, returns the request                     thread. Retrieve the runs for a job  # noqa: E501              Retrieve the runs for a job  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.get_job_runs(id, async_req=True)             >>> result = thread.get()              Args:                 id (int):              Keyword Args:                 per_page (int): [optional]                 page (int): [optional]                 succeeded (bool): [optional]                 start_date (str): [optional]                 end_date (str): [optional]                 timezone (str): [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 (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:                 JobRunArrayMessage                     If the method is called asynchronously, returns the request                     thread. Retrieves jobs  # noqa: E501              Retrieves jobs  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.get_jobs(async_req=True)             >>> result = thread.get()               Keyword Args:                 expression (str): A search expression to filter jobs.. [optional]                 timezone (str): [optional]                 per_page (int): [optional]                 page (int): [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 (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:                 JobArrayMessage                     If the method is called asynchronously, returns the request                     thread. Upcoming job occurrences  # noqa: E501              Retrieves a list of upcoming occurrences for a job  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.job_occurrences(id, end_date, async_req=True)             >>> result = thread.get()              Args:                 id (int): The id of the job to retrieve occurrences for                 end_date (str): The date to retrieve occurrences up to              Keyword Args:                 per_page (int): [optional]                 page (int): [optional]                 timezone (str): [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 (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:                 OccurrenceMessage                     If the method is called asynchronously, returns the request                     thread. Run a job now  # noqa: E501              Queues a job to run now  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.run_job_now(id, async_req=True)             >>> result = thread.get()              Args:                 id (int): The id of the job to execute now              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 (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. Updates a single job  # noqa: E501              Updates a single job  # noqa: E501             This method makes a synchronous HTTP request by default. To make an             asynchronous HTTP request, please pass async_req=True              >>> thread = api.update_job(id, async_req=True)             >>> result = thread.get()              Args:                 id (int):              Keyword Args:                 job_in (JobIn): [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 (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:                 SingleJobMessage                     If the method is called asynchronously, returns the request                     thread.