Esempio n. 1
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __user_pay_rates_create_pay_rate(
            self,
            x_chronosheets_auth,
            request,
            **kwargs
        ):
            """Create a new pay rate for a particular user, archiving the previous pay rate.    Requires the 'ManageOrganisationUsers' permission.  # noqa: E501

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

            >>> thread = api.user_pay_rates_create_pay_rate(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (InsertUserHourlyRateRequest): An Insert UserHourlyRate Request object containing values for the new UserHourlyRate to create

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.user_pay_rates_create_pay_rate = Endpoint(
            settings={
                'response_type': (ApiResponseInt32,),
                'auth': [],
                'endpoint_path': '/UserPayRates/CreatePayRate',
                'operation_id': 'user_pay_rates_create_pay_rate',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'request':
                        (InsertUserHourlyRateRequest,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__user_pay_rates_create_pay_rate
        )

        def __user_pay_rates_get_pay_rates(
            self,
            user_id,
            x_chronosheets_auth,
            **kwargs
        ):
            """Get a collection of pay rates for a particular user, specified by user id.    Requires the 'ManageOrganisationUsers' permission.  # noqa: E501

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

            >>> thread = api.user_pay_rates_get_pay_rates(user_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                user_id (int): The ID of the User for which you want to get UserHourlyRate objects
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListUserHourlyRate
                    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['user_id'] = \
                user_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.user_pay_rates_get_pay_rates = Endpoint(
            settings={
                'response_type': (ApiResponseListUserHourlyRate,),
                'auth': [],
                'endpoint_path': '/UserPayRates/GetPayRates',
                'operation_id': 'user_pay_rates_get_pay_rates',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'user_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'user_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'user_id':
                        (int,),
                    'x_chronosheets_auth':
                        (str,),
                },
                'attribute_map': {
                    'user_id': 'UserId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'user_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__user_pay_rates_get_pay_rates
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __timesheets_create_single_timesheet(self, x_chronosheets_auth,
                                                 request, **kwargs):
            """Inserts a single timesheet record.    Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.timesheets_create_single_timesheet(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (Timesheet): A Timesheet Request object containing values for the new Timesheet to create

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.timesheets_create_single_timesheet = Endpoint(
            settings={
                'response_type': (ApiResponseInt32, ),
                'auth': [],
                'endpoint_path': '/Timesheets/CreateSingleTimesheet',
                'operation_id': 'timesheets_create_single_timesheet',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (Timesheet, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__timesheets_create_single_timesheet)

        def __timesheets_delete_timesheet(self, timesheet_id,
                                          x_chronosheets_auth, **kwargs):
            """Delete a timesheet.    Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.timesheets_delete_timesheet(timesheet_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                timesheet_id (int): The ID of the Timesheet you want to delete
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseBoolean
                    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['timesheet_id'] = \
                timesheet_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.timesheets_delete_timesheet = Endpoint(
            settings={
                'response_type': (ApiResponseBoolean, ),
                'auth': [],
                'endpoint_path': '/Timesheets/DeleteTimesheet',
                'operation_id': 'timesheets_delete_timesheet',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'timesheet_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'timesheet_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'timesheet_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'timesheet_id': 'TimesheetId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'timesheet_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__timesheets_delete_timesheet)

        def __timesheets_get_timesheets(self, start_date, end_date,
                                        x_chronosheets_auth, **kwargs):
            """Get timesheets between start and end dates.  Note: the date range cannot exceed 24 hours.  This method is generally used to get timesheets for a particular day.    Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.timesheets_get_timesheets(start_date, end_date, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                start_date (datetime): The start date of the date range
                end_date (datetime): The end date of the date range
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListTimesheet
                    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['start_date'] = \
                start_date
            kwargs['end_date'] = \
                end_date
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.timesheets_get_timesheets = Endpoint(
            settings={
                'response_type': (ApiResponseListTimesheet, ),
                'auth': [],
                'endpoint_path': '/Timesheets/GetTimesheets',
                'operation_id': 'timesheets_get_timesheets',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'start_date',
                    'end_date',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'start_date',
                    'end_date',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'start_date': (datetime, ),
                    'end_date': (datetime, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'start_date': 'StartDate',
                    'end_date': 'EndDate',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'start_date': 'query',
                    'end_date': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__timesheets_get_timesheets)

        def __timesheets_update_timesheets(self, x_chronosheets_auth, request,
                                           **kwargs):
            """Batch update timesheets.    Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.timesheets_update_timesheets(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (BatchUpdateTimesheetRequest): A BatchUpdateTimesheet Request object containing values for the new Timesheets to create or update.  If the timesheet Id is specified, then an update will be performed, else the timesheet record will be created.

            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:
                ApiResponseListInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.timesheets_update_timesheets = Endpoint(
            settings={
                'response_type': (ApiResponseListInt32, ),
                'auth': [],
                'endpoint_path': '/Timesheets/UpdateTimesheets',
                'operation_id': 'timesheets_update_timesheets',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (BatchUpdateTimesheetRequest, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__timesheets_update_timesheets)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __organisation_groups_create_organisation_group(
                self, x_chronosheets_auth, request, **kwargs):
            """Create an organisation group.    Requires the 'ManageOrganisationGroups' permissions.  # noqa: E501

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

            >>> thread = api.organisation_groups_create_organisation_group(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (InsertOrganisationGroupRequest): An Insert OrganisationGroup Request object containing values for the new OrganisationGroup to create

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.organisation_groups_create_organisation_group = Endpoint(
            settings={
                'response_type': (ApiResponseInt32, ),
                'auth': [],
                'endpoint_path': '/OrganisationGroups/CreateOrganisationGroup',
                'operation_id':
                'organisation_groups_create_organisation_group',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (InsertOrganisationGroupRequest, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__organisation_groups_create_organisation_group)

        def __organisation_groups_delete_organisation_group(
                self, organisation_group_id, x_chronosheets_auth, **kwargs):
            """organisation_groups_delete_organisation_group  # noqa: E501

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

            >>> thread = api.organisation_groups_delete_organisation_group(organisation_group_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                organisation_group_id (int):
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseBoolean
                    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['organisation_group_id'] = \
                organisation_group_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.organisation_groups_delete_organisation_group = Endpoint(
            settings={
                'response_type': (ApiResponseBoolean, ),
                'auth': [],
                'endpoint_path': '/OrganisationGroups/DeleteOrganisationGroup',
                'operation_id':
                'organisation_groups_delete_organisation_group',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'organisation_group_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'organisation_group_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'organisation_group_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'organisation_group_id': 'OrganisationGroupId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'organisation_group_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__organisation_groups_delete_organisation_group)

        def __organisation_groups_get_organisation_group(
                self, organisation_group_id, x_chronosheets_auth, **kwargs):
            """Get a particular organisation group.    Requires the 'ManageOrganisationGroups', 'ManageJobsAndTask', 'ManageClientsAndProjects' or 'ManageOrganisationUsers' permissions.  # noqa: E501

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

            >>> thread = api.organisation_groups_get_organisation_group(organisation_group_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                organisation_group_id (int): The ID of the OrganisationGroup you want to get
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseOrganisationGroup
                    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['organisation_group_id'] = \
                organisation_group_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.organisation_groups_get_organisation_group = Endpoint(
            settings={
                'response_type': (ApiResponseOrganisationGroup, ),
                'auth': [],
                'endpoint_path': '/OrganisationGroups/GetOrganisationGroup',
                'operation_id': 'organisation_groups_get_organisation_group',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'organisation_group_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'organisation_group_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'organisation_group_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'organisation_group_id': 'OrganisationGroupId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'organisation_group_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__organisation_groups_get_organisation_group)

        def __organisation_groups_get_organisation_groups(
                self, x_chronosheets_auth, **kwargs):
            """Get a collection of organisation groups that are under your organisation.    Requires the 'ManageOrganisationGroups', 'ManageJobsAndTask', 'ManageClientsAndProjects' or 'ManageOrganisationUsers' permissions.  # noqa: E501

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

            >>> thread = api.organisation_groups_get_organisation_groups(x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListOrganisationGroup
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.organisation_groups_get_organisation_groups = Endpoint(
            settings={
                'response_type': (ApiResponseListOrganisationGroup, ),
                'auth': [],
                'endpoint_path': '/OrganisationGroups/GetOrganisationGroups',
                'operation_id': 'organisation_groups_get_organisation_groups',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                ],
                'required': [
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__organisation_groups_get_organisation_groups)

        def __organisation_groups_get_organisation_groups_for_job(
                self, job_id, x_chronosheets_auth, **kwargs):
            """Get org groups for a particular job.    Requires the 'ManageOrganisationGroups', 'ManageJobsAndTask', 'ManageClientsAndProjects' or 'ManageOrganisationUsers' permissions.  # noqa: E501

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

            >>> thread = api.organisation_groups_get_organisation_groups_for_job(job_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                job_id (int): The ID of the job
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListOrganisationGroup
                    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['job_id'] = \
                job_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.organisation_groups_get_organisation_groups_for_job = Endpoint(
            settings={
                'response_type': (ApiResponseListOrganisationGroup, ),
                'auth': [],
                'endpoint_path':
                '/OrganisationGroups/GetOrganisationGroupsForJob',
                'operation_id':
                'organisation_groups_get_organisation_groups_for_job',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'job_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'job_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'job_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'job_id': 'JobId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'job_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__organisation_groups_get_organisation_groups_for_job)

        def __organisation_groups_get_organisation_groups_for_vehicle(
                self, vehicle_id, x_chronosheets_auth, **kwargs):
            """Get org groups for a particular vehicle.    Requires the 'ManageOrganisationGroups', 'ManageFleet' or 'ManageOrganisationUsers' permissions.  # noqa: E501

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

            >>> thread = api.organisation_groups_get_organisation_groups_for_vehicle(vehicle_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                vehicle_id (int): The ID of the vehicle
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListOrganisationGroup
                    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['vehicle_id'] = \
                vehicle_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.organisation_groups_get_organisation_groups_for_vehicle = Endpoint(
            settings={
                'response_type': (ApiResponseListOrganisationGroup, ),
                'auth': [],
                'endpoint_path':
                '/OrganisationGroups/GetOrganisationGroupsForVehicle',
                'operation_id':
                'organisation_groups_get_organisation_groups_for_vehicle',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'vehicle_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'vehicle_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'vehicle_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'vehicle_id': 'VehicleId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'vehicle_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__organisation_groups_get_organisation_groups_for_vehicle)

        def __organisation_groups_update_organisation_group(
                self, x_chronosheets_auth, request, **kwargs):
            """Update an organisation group.    Requires the 'ManageOrganisationGroups' permissions.  # noqa: E501

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

            >>> thread = api.organisation_groups_update_organisation_group(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (SaveOrganisationGroupRequest): A Save OrganisationGroup Request object containing updated fields.  Make sure to specify the OrganisationGroup Id in the request object so that ChronoSheets knows which OrganisationGroup to update

            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:
                ApiResponseBoolean
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.organisation_groups_update_organisation_group = Endpoint(
            settings={
                'response_type': (ApiResponseBoolean, ),
                'auth': [],
                'endpoint_path': '/OrganisationGroups/UpdateOrganisationGroup',
                'operation_id':
                'organisation_groups_update_organisation_group',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (SaveOrganisationGroupRequest, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__organisation_groups_update_organisation_group)
Esempio n. 4
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __fleet_create_vehicle(
            self,
            x_chronosheets_auth,
            request,
            **kwargs
        ):
            """Create a vehicle.    Requires the 'ManageFleet' permission.  # noqa: E501

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

            >>> thread = api.fleet_create_vehicle(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (InsertVehicleRequest): An Insert Vehicle Request object containing values for the new Vehicle to create

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.fleet_create_vehicle = Endpoint(
            settings={
                'response_type': (ApiResponseInt32,),
                'auth': [],
                'endpoint_path': '/Fleet/CreateVehicle',
                'operation_id': 'fleet_create_vehicle',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'request':
                        (InsertVehicleRequest,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__fleet_create_vehicle
        )

        def __fleet_delete_vehicle(
            self,
            vehicle_id,
            x_chronosheets_auth,
            **kwargs
        ):
            """Delete a vehicle from the fleet.  Requires the 'ManageFleet' permission.  # noqa: E501

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

            >>> thread = api.fleet_delete_vehicle(vehicle_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                vehicle_id (int): The unique ID of the vehicle you wish to delete
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseBoolean
                    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['vehicle_id'] = \
                vehicle_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.fleet_delete_vehicle = Endpoint(
            settings={
                'response_type': (ApiResponseBoolean,),
                'auth': [],
                'endpoint_path': '/Fleet/DeleteVehicle',
                'operation_id': 'fleet_delete_vehicle',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'vehicle_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'vehicle_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'vehicle_id':
                        (int,),
                    'x_chronosheets_auth':
                        (str,),
                },
                'attribute_map': {
                    'vehicle_id': 'VehicleId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'vehicle_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__fleet_delete_vehicle
        )

        def __fleet_get_vehicle_by_id(
            self,
            vehicle_id,
            x_chronosheets_auth,
            **kwargs
        ):
            """Get a particular vehicle.  Does not require any special permission.  # noqa: E501

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

            >>> thread = api.fleet_get_vehicle_by_id(vehicle_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                vehicle_id (int): The ID of the Vehicle you want to get
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseFleetVehicle
                    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['vehicle_id'] = \
                vehicle_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.fleet_get_vehicle_by_id = Endpoint(
            settings={
                'response_type': (ApiResponseFleetVehicle,),
                'auth': [],
                'endpoint_path': '/Fleet/GetVehicleById',
                'operation_id': 'fleet_get_vehicle_by_id',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'vehicle_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'vehicle_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'vehicle_id':
                        (int,),
                    'x_chronosheets_auth':
                        (str,),
                },
                'attribute_map': {
                    'vehicle_id': 'VehicleId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'vehicle_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__fleet_get_vehicle_by_id
        )

        def __fleet_get_vehicles(
            self,
            x_chronosheets_auth,
            **kwargs
        ):
            """Get a collection of vehicles that are under your organisation.    Does not require any special permission.  # noqa: E501

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

            >>> thread = api.fleet_get_vehicles(x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            Keyword Args:
                include_deleted (bool): Whether or not to include deleted vehicles. [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:
                ApiResponseListFleetVehicle
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.fleet_get_vehicles = Endpoint(
            settings={
                'response_type': (ApiResponseListFleetVehicle,),
                'auth': [],
                'endpoint_path': '/Fleet/GetVehicles',
                'operation_id': 'fleet_get_vehicles',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'include_deleted',
                ],
                'required': [
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'include_deleted':
                        (bool,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                    'include_deleted': 'IncludeDeleted',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'include_deleted': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__fleet_get_vehicles
        )

        def __fleet_update_vehicle(
            self,
            x_chronosheets_auth,
            request,
            **kwargs
        ):
            """Update a vehicle.    Requires the 'ManageFleet' permission.  # noqa: E501

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

            >>> thread = api.fleet_update_vehicle(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (SaveVehicleRequest): A Save Vehicle Request object containing updated fields.  Make sure to specify the Vehicle Id in the request object so that ChronoSheets knows which Vehicle to update

            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:
                ApiResponseBoolean
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.fleet_update_vehicle = Endpoint(
            settings={
                'response_type': (ApiResponseBoolean,),
                'auth': [],
                'endpoint_path': '/Fleet/UpdateVehicle',
                'operation_id': 'fleet_update_vehicle',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'request':
                        (SaveVehicleRequest,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__fleet_update_vehicle
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __organisation_group_users_get_organisation_group_users(
                self, org_group_id, x_chronosheets_auth, **kwargs):
            """Get a collection of organisation group users that belong to an organisation group.    Requires the 'ManageOrganisationGroups' or 'ManageOrganisationUsers' permissions.  # noqa: E501

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

            >>> thread = api.organisation_group_users_get_organisation_group_users(org_group_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                org_group_id (int): An OrganisationGroup Id
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListUserForManagement
                    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['org_group_id'] = \
                org_group_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.organisation_group_users_get_organisation_group_users = Endpoint(
            settings={
                'response_type': (ApiResponseListUserForManagement, ),
                'auth': [],
                'endpoint_path':
                '/OrganisationGroupUsers/GetOrganisationGroupUsers',
                'operation_id':
                'organisation_group_users_get_organisation_group_users',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'org_group_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'org_group_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'org_group_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'org_group_id': 'orgGroupId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'org_group_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__organisation_group_users_get_organisation_group_users)

        def __organisation_group_users_update_organisation_group_users(
                self, x_chronosheets_auth, request, **kwargs):
            """Set the users who belong to an organisation group.    Requires the 'ManageOrganisationGroups' permissions.  # noqa: E501

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

            >>> thread = api.organisation_group_users_update_organisation_group_users(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (SetOrganisationGroupUsersRequest): A request object specifying which users belong to an organisation group.  Make sure to specify the OrganisationGroup Id in the request object so that ChronoSheets knows which OrganisationGroup to update. CsvUserIds is a comma separated list of User Ids, e.g. 1,2,3,4

            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:
                ApiResponseBoolean
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.organisation_group_users_update_organisation_group_users = Endpoint(
            settings={
                'response_type': (ApiResponseBoolean, ),
                'auth': [],
                'endpoint_path':
                '/OrganisationGroupUsers/UpdateOrganisationGroupUsers',
                'operation_id':
                'organisation_group_users_update_organisation_group_users',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (SetOrganisationGroupUsersRequest, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__organisation_group_users_update_organisation_group_users
        )
Esempio n. 6
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __projects_create_project(self, x_chronosheets_auth, request,
                                      **kwargs):
            """Create a project.    Requires the 'ManageClientsAndProjects' permission.  # noqa: E501

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

            >>> thread = api.projects_create_project(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (InsertProjectRequest): An Insert Project Request object containing values for the new Project to create.  Make sure to specify a correct Client Id - this will be used to attach the new project under that client.

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.projects_create_project = Endpoint(
            settings={
                'response_type': (ApiResponseInt32, ),
                'auth': [],
                'endpoint_path': '/Projects/CreateProject',
                'operation_id': 'projects_create_project',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (InsertProjectRequest, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__projects_create_project)

        def __projects_get_project_by_id(self, project_id, x_chronosheets_auth,
                                         **kwargs):
            """Get a project by its Id.    Requires the 'ManageClientsAndProjects' or 'ManageJobsAndTask' permissions.  # noqa: E501

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

            >>> thread = api.projects_get_project_by_id(project_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                project_id (int): The ID of the Project you want to get
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseProject
                    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['project_id'] = \
                project_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.projects_get_project_by_id = Endpoint(
            settings={
                'response_type': (ApiResponseProject, ),
                'auth': [],
                'endpoint_path': '/Projects/GetProjectById',
                'operation_id': 'projects_get_project_by_id',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'project_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'project_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'project_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'project_id': 'ProjectId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'project_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__projects_get_project_by_id)

        def __projects_get_projects_for_client(self, client_id,
                                               x_chronosheets_auth, **kwargs):
            """Get projects for a particular client.    Requires the 'ManageClientsAndProjects' or 'ManageJobsAndTask' permissions.  # noqa: E501

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

            >>> thread = api.projects_get_projects_for_client(client_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                client_id (int): The ID of the client
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListProject
                    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['client_id'] = \
                client_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.projects_get_projects_for_client = Endpoint(
            settings={
                'response_type': (ApiResponseListProject, ),
                'auth': [],
                'endpoint_path': '/Projects/GetProjectsForClient',
                'operation_id': 'projects_get_projects_for_client',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'client_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'client_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'client_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'client_id': 'ClientId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'client_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__projects_get_projects_for_client)

        def __projects_update_project(self, x_chronosheets_auth, request,
                                      **kwargs):
            """Update a project.    Requires the 'ManageClientsAndProjects' permission.  # noqa: E501

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

            >>> thread = api.projects_update_project(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (UpdateProjectRequest): An Update Project Request object containing updated fields.  Make sure to specify the Project Id in the request object so that ChronoSheets knows which Project to update

            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:
                ApiResponseBoolean
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.projects_update_project = Endpoint(
            settings={
                'response_type': (ApiResponseBoolean, ),
                'auth': [],
                'endpoint_path': '/Projects/UpdateProject',
                'operation_id': 'projects_update_project',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (UpdateProjectRequest, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__projects_update_project)
Esempio n. 7
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __transcripts_get_my_transcript(self, file_attachment_id,
                                            x_chronosheets_auth, **kwargs):
            """Get an audio to text transcript for a particular audio file attachment  # noqa: E501

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

            >>> thread = api.transcripts_get_my_transcript(file_attachment_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                file_attachment_id (int): The ID of the file attachment that has a transcript.  It should be an audio file attachment.
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseTranscription
                    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['file_attachment_id'] = \
                file_attachment_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.transcripts_get_my_transcript = Endpoint(
            settings={
                'response_type': (ApiResponseTranscription, ),
                'auth': [],
                'endpoint_path': '/Transcripts/GetMyTranscript',
                'operation_id': 'transcripts_get_my_transcript',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'file_attachment_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'file_attachment_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'file_attachment_id': (int, ),
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'file_attachment_id': 'FileAttachmentId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'file_attachment_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__transcripts_get_my_transcript)

        def __transcripts_get_my_transcripts(self, start_date, end_date,
                                             x_chronosheets_auth, **kwargs):
            """Get my file transcripts.  Get audio to text transcripts that you've created.  # noqa: E501

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

            >>> thread = api.transcripts_get_my_transcripts(start_date, end_date, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                start_date (datetime): The Start date of the date range.  Transcripts after this date will be obtained.
                end_date (datetime): The End date of the date range.  Transcripts before this date will be obtained.
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            Keyword Args:
                skip (int): Skip this many transcripts. [optional]
                take (int): Take this many transcripts. [optional]
                keyword (str): Search the text content of the transcript keywords. [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:
                ApiResponseForPaginatedListOrgReportTranscript
                    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['start_date'] = \
                start_date
            kwargs['end_date'] = \
                end_date
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.transcripts_get_my_transcripts = Endpoint(
            settings={
                'response_type':
                (ApiResponseForPaginatedListOrgReportTranscript, ),
                'auth': [],
                'endpoint_path': '/Transcripts/GetMyTranscripts',
                'operation_id': 'transcripts_get_my_transcripts',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'start_date',
                    'end_date',
                    'x_chronosheets_auth',
                    'skip',
                    'take',
                    'keyword',
                ],
                'required': [
                    'start_date',
                    'end_date',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'start_date': (datetime, ),
                    'end_date': (datetime, ),
                    'x_chronosheets_auth': (str, ),
                    'skip': (int, ),
                    'take': (int, ),
                    'keyword': (str, ),
                },
                'attribute_map': {
                    'start_date': 'StartDate',
                    'end_date': 'EndDate',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                    'skip': 'Skip',
                    'take': 'Take',
                    'keyword': 'Keyword',
                },
                'location_map': {
                    'start_date': 'query',
                    'end_date': 'query',
                    'x_chronosheets_auth': 'header',
                    'skip': 'query',
                    'take': 'query',
                    'keyword': 'query',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__transcripts_get_my_transcripts)
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __trips_create_trip(
            self,
            x_chronosheets_auth,
            request,
            **kwargs
        ):
            """Create a new trip.  Important: create a timesheet record before calling this, passing in the new timesheet record id as a reference.    Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.trips_create_trip(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (CreateTripRequest): A Create Trip Request object containing values for the new Trip to create

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.trips_create_trip = Endpoint(
            settings={
                'response_type': (ApiResponseInt32,),
                'auth': [],
                'endpoint_path': '/Trips/CreateTrip',
                'operation_id': 'trips_create_trip',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'request':
                        (CreateTripRequest,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__trips_create_trip
        )

        def __trips_get_my_trip_by_id(
            self,
            trip_id,
            x_chronosheets_auth,
            **kwargs
        ):
            """Get trip by Id.    Requires the 'ViewMyTrips' permission.  # noqa: E501

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

            >>> thread = api.trips_get_my_trip_by_id(trip_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                trip_id (int): The ID of the Trip you want to get
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseTrip
                    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['trip_id'] = \
                trip_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.trips_get_my_trip_by_id = Endpoint(
            settings={
                'response_type': (ApiResponseTrip,),
                'auth': [],
                'endpoint_path': '/Trips/GetMyTripById',
                'operation_id': 'trips_get_my_trip_by_id',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'trip_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'trip_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'trip_id':
                        (int,),
                    'x_chronosheets_auth':
                        (str,),
                },
                'attribute_map': {
                    'trip_id': 'TripId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'trip_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__trips_get_my_trip_by_id
        )

        def __trips_get_my_trips(
            self,
            start_date,
            end_date,
            x_chronosheets_auth,
            **kwargs
        ):
            """Get my trips.  Get the GPS trips you've recorded and submitted.    Requires the 'ViewMyTrips' permission.  # noqa: E501

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

            >>> thread = api.trips_get_my_trips(start_date, end_date, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                start_date (datetime): The Start date of the date range.  Trips after this date will be obtained.
                end_date (datetime): The End date of the date range.  Trips before this date will be obtained.
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            Keyword Args:
                skip (int): Skip this many Trips. [optional]
                take (int): Take this many Trips. [optional]
                vehicle_id (int): Filter by a particular Vehicle (get trips made with a particular vehicle), specified by VehicleId. [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:
                ApiResponseForPaginatedListTrip
                    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['start_date'] = \
                start_date
            kwargs['end_date'] = \
                end_date
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.trips_get_my_trips = Endpoint(
            settings={
                'response_type': (ApiResponseForPaginatedListTrip,),
                'auth': [],
                'endpoint_path': '/Trips/GetMyTrips',
                'operation_id': 'trips_get_my_trips',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'start_date',
                    'end_date',
                    'x_chronosheets_auth',
                    'skip',
                    'take',
                    'vehicle_id',
                ],
                'required': [
                    'start_date',
                    'end_date',
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'start_date':
                        (datetime,),
                    'end_date':
                        (datetime,),
                    'x_chronosheets_auth':
                        (str,),
                    'skip':
                        (int,),
                    'take':
                        (int,),
                    'vehicle_id':
                        (int,),
                },
                'attribute_map': {
                    'start_date': 'StartDate',
                    'end_date': 'EndDate',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                    'skip': 'Skip',
                    'take': 'Take',
                    'vehicle_id': 'VehicleId',
                },
                'location_map': {
                    'start_date': 'query',
                    'end_date': 'query',
                    'x_chronosheets_auth': 'header',
                    'skip': 'query',
                    'take': 'query',
                    'vehicle_id': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__trips_get_my_trips
        )
Esempio n. 9
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __timesheet_automation_create_automation_step(
                self, x_chronosheets_auth, request, **kwargs):
            """Creates an automation step.  Timesheet automation is determined by looking at steps taken by the user.  Create a step to log some automation action, such as entering a geofence or tapping on an NFC badge.  Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.timesheet_automation_create_automation_step(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (CreateAutomationStepRequest):

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.timesheet_automation_create_automation_step = Endpoint(
            settings={
                'response_type': (ApiResponseInt32, ),
                'auth': [],
                'endpoint_path': '/TimesheetAutomation/CreateAutomationStep',
                'operation_id': 'timesheet_automation_create_automation_step',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                    'request': (CreateAutomationStepRequest, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__timesheet_automation_create_automation_step)

        def __timesheet_automation_get_timesheet_automation_audit_trail(
                self, geofence_id, nfc_id, user_id, sort, order,
                x_chronosheets_auth, **kwargs):
            """Retrieve the timesheet automation / alerts for geofences activities or NFC tap on/off.  Requires the 'ManageGeofencing' permission.  # noqa: E501

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

            >>> thread = api.timesheet_automation_get_timesheet_automation_audit_trail(geofence_id, nfc_id, user_id, sort, order, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                geofence_id (int): The ID of the Geofence
                nfc_id (int):
                user_id (int):
                sort (str):
                order (str):
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            Keyword Args:
                skip (int): Skip this many records. [optional]
                take (int): Take this many records. [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:
                ApiResponseForPaginatedListTimesheetAutomationWithOrgAndGeofence
                    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['geofence_id'] = \
                geofence_id
            kwargs['nfc_id'] = \
                nfc_id
            kwargs['user_id'] = \
                user_id
            kwargs['sort'] = \
                sort
            kwargs['order'] = \
                order
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.timesheet_automation_get_timesheet_automation_audit_trail = Endpoint(
            settings={
                'response_type':
                (ApiResponseForPaginatedListTimesheetAutomationWithOrgAndGeofence,
                 ),
                'auth': [],
                'endpoint_path':
                '/TimesheetAutomation/GetTimesheetAutomationAuditTrail',
                'operation_id':
                'timesheet_automation_get_timesheet_automation_audit_trail',
                'http_method':
                'GET',
                'servers':
                None,
            },
            params_map={
                'all': [
                    'geofence_id',
                    'nfc_id',
                    'user_id',
                    'sort',
                    'order',
                    'x_chronosheets_auth',
                    'skip',
                    'take',
                ],
                'required': [
                    'geofence_id',
                    'nfc_id',
                    'user_id',
                    'sort',
                    'order',
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [
                    'sort',
                    'order',
                ],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {
                    ('sort', ): {
                        "USERNAME": "******",
                        "AUTOMATIONACTIONTYPE": "AutomationActionType",
                        "CLIENTDATETIME": "ClientDateTime",
                        "ISPROCESSED": "IsProcessed"
                    },
                    ('order', ): {
                        "ASCENDING": "Ascending",
                        "DESCENDING": "Descending"
                    },
                },
                'openapi_types': {
                    'geofence_id': (int, ),
                    'nfc_id': (int, ),
                    'user_id': (int, ),
                    'sort': (str, ),
                    'order': (str, ),
                    'x_chronosheets_auth': (str, ),
                    'skip': (int, ),
                    'take': (int, ),
                },
                'attribute_map': {
                    'geofence_id': 'GeofenceId',
                    'nfc_id': 'NfcId',
                    'user_id': 'UserId',
                    'sort': 'Sort',
                    'order': 'Order',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                    'skip': 'Skip',
                    'take': 'Take',
                },
                'location_map': {
                    'geofence_id': 'query',
                    'nfc_id': 'query',
                    'user_id': 'query',
                    'sort': 'query',
                    'order': 'query',
                    'x_chronosheets_auth': 'header',
                    'skip': 'query',
                    'take': 'query',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__timesheet_automation_get_timesheet_automation_audit_trail
        )
Esempio n. 10
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __geo_fencing_create_geofence(
            self,
            x_chronosheets_auth,
            request,
            **kwargs
        ):
            """Create a geofencing with rules to be used for clock on/off automation.  Requires the 'ManageGeofencing' permission.  # noqa: E501

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

            >>> thread = api.geo_fencing_create_geofence(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (CreateGeoFenceRequest):

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.geo_fencing_create_geofence = Endpoint(
            settings={
                'response_type': (ApiResponseInt32,),
                'auth': [],
                'endpoint_path': '/GeoFencing/CreateGeofence',
                'operation_id': 'geo_fencing_create_geofence',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'request':
                        (CreateGeoFenceRequest,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__geo_fencing_create_geofence
        )

        def __geo_fencing_delete_geofence(
            self,
            geofence_id,
            x_chronosheets_auth,
            **kwargs
        ):
            """Deletes a geofence.  Requires the 'ManageGeofencing' permission.  # noqa: E501

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

            >>> thread = api.geo_fencing_delete_geofence(geofence_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                geofence_id (int): Specify the geofence you want to delete with the geofence ID.
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseGeofence
                    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['geofence_id'] = \
                geofence_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.geo_fencing_delete_geofence = Endpoint(
            settings={
                'response_type': (ApiResponseGeofence,),
                'auth': [],
                'endpoint_path': '/GeoFencing/DeleteGeofence',
                'operation_id': 'geo_fencing_delete_geofence',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'geofence_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'geofence_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'geofence_id':
                        (int,),
                    'x_chronosheets_auth':
                        (str,),
                },
                'attribute_map': {
                    'geofence_id': 'GeofenceId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'geofence_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__geo_fencing_delete_geofence
        )

        def __geo_fencing_get_geofence_by_id(
            self,
            geofence_id,
            x_chronosheets_auth,
            **kwargs
        ):
            """Get a geofence by ID  Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.geo_fencing_get_geofence_by_id(geofence_id, x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                geofence_id (int): The ID of the geofence you want to obtain
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseGeofence
                    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['geofence_id'] = \
                geofence_id
            kwargs['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.geo_fencing_get_geofence_by_id = Endpoint(
            settings={
                'response_type': (ApiResponseGeofence,),
                'auth': [],
                'endpoint_path': '/GeoFencing/GetGeofenceById',
                'operation_id': 'geo_fencing_get_geofence_by_id',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'geofence_id',
                    'x_chronosheets_auth',
                ],
                'required': [
                    'geofence_id',
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'geofence_id':
                        (int,),
                    'x_chronosheets_auth':
                        (str,),
                },
                'attribute_map': {
                    'geofence_id': 'GeofenceId',
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'geofence_id': 'query',
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__geo_fencing_get_geofence_by_id
        )

        def __geo_fencing_get_geofences(
            self,
            x_chronosheets_auth,
            **kwargs
        ):
            """Get geofences belonging to your organisation  Requires the 'SubmitTimesheets' permission.  # noqa: E501

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

            >>> thread = api.geo_fencing_get_geofences(x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            Keyword Args:
                skip (int): Number of records to skip. [optional]
                take (int): Number of records to take. [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:
                ApiResponseForPaginatedListExtendedGeofence
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.geo_fencing_get_geofences = Endpoint(
            settings={
                'response_type': (ApiResponseForPaginatedListExtendedGeofence,),
                'auth': [],
                'endpoint_path': '/GeoFencing/GetGeofences',
                'operation_id': 'geo_fencing_get_geofences',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'skip',
                    'take',
                ],
                'required': [
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'skip':
                        (int,),
                    'take':
                        (int,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                    'skip': 'Skip',
                    'take': 'Take',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'skip': 'query',
                    'take': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__geo_fencing_get_geofences
        )

        def __geo_fencing_get_geofences_basic_info(
            self,
            x_chronosheets_auth,
            **kwargs
        ):
            """Gets a list of all geofences in your organisation, including just the name and ID.  # noqa: E501

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

            >>> thread = api.geo_fencing_get_geofences_basic_info(x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseForPaginatedListBasicGeofence
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.geo_fencing_get_geofences_basic_info = Endpoint(
            settings={
                'response_type': (ApiResponseForPaginatedListBasicGeofence,),
                'auth': [],
                'endpoint_path': '/GeoFencing/GetGeofencesBasicInfo',
                'operation_id': 'geo_fencing_get_geofences_basic_info',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                ],
                'required': [
                    'x_chronosheets_auth',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__geo_fencing_get_geofences_basic_info
        )

        def __geo_fencing_update_geofence(
            self,
            x_chronosheets_auth,
            request,
            **kwargs
        ):
            """Updates a geofencing with rules to be used for clock on/off automation.  Requires the 'ManageGeofencing' permission.  # noqa: E501

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

            >>> thread = api.geo_fencing_update_geofence(x_chronosheets_auth, request, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token
                request (UpdateGeoFenceRequest):

            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:
                ApiResponseInt32
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            kwargs['request'] = \
                request
            return self.call_with_http_info(**kwargs)

        self.geo_fencing_update_geofence = Endpoint(
            settings={
                'response_type': (ApiResponseInt32,),
                'auth': [],
                'endpoint_path': '/GeoFencing/UpdateGeofence',
                'operation_id': 'geo_fencing_update_geofence',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'required': [
                    'x_chronosheets_auth',
                    'request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'x_chronosheets_auth':
                        (str,),
                    'request':
                        (UpdateGeoFenceRequest,),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                    'request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'multipart/form-data'
                ],
                'content_type': [
                    'application/json',
                    'text/json',
                    'application/xml',
                    'text/xml',
                    'application/x-www-form-urlencoded',
                    'multipart/form-data'
                ]
            },
            api_client=api_client,
            callable=__geo_fencing_update_geofence
        )
Esempio n. 11
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __aggregate_job_tasks_get_aggregate_job_tasks(
                self, x_chronosheets_auth, **kwargs):
            """Get jobs and tasks information, aggregated.    Requires the 'SubmitTimesheets' or 'ManageJobsAndTask' permissions.  # noqa: E501

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

            >>> thread = api.aggregate_job_tasks_get_aggregate_job_tasks(x_chronosheets_auth, async_req=True)
            >>> result = thread.get()

            Args:
                x_chronosheets_auth (str): The ChronoSheets Auth Token

            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:
                ApiResponseListAggregateJobCode
                    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['x_chronosheets_auth'] = \
                x_chronosheets_auth
            return self.call_with_http_info(**kwargs)

        self.aggregate_job_tasks_get_aggregate_job_tasks = Endpoint(
            settings={
                'response_type': (ApiResponseListAggregateJobCode, ),
                'auth': [],
                'endpoint_path': '/AggregateJobTasks/GetAggregateJobTasks',
                'operation_id': 'aggregate_job_tasks_get_aggregate_job_tasks',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'x_chronosheets_auth',
                ],
                'required': [
                    'x_chronosheets_auth',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'x_chronosheets_auth': (str, ),
                },
                'attribute_map': {
                    'x_chronosheets_auth': 'x-chronosheets-auth',
                },
                'location_map': {
                    'x_chronosheets_auth': 'header',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/json', 'text/json', 'application/xml',
                    'text/xml', 'multipart/form-data'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__aggregate_job_tasks_get_aggregate_job_tasks)