Esempio n. 1
0
    def invitations_read_my_invitations_with_http_info(self,
                                                       **kwargs):  # noqa: E501
        """Returns all the invitations sent to me.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.invitations_read_my_invitations_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[Invitation], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method invitations_read_my_invitations" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/invitations',
            'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[Invitation]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 2
0
    def invitations_accept_invitation_with_http_info(self, org_id,
                                                     handle_invitation,
                                                     **kwargs):  # noqa: E501
        """Accepts or rejects an invitation sent to the user.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.invitations_accept_invitation_with_http_info(org_id, handle_invitation, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str org_id: Organisation to accept invitation for. (required)
        :param HandleInvitation handle_invitation: Invitation information to accept or reject. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(HandleInvitation, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['org_id', 'handle_invitation']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method invitations_accept_invitation" %
                                   key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'handle_invitation' is set
        if self.api_client.client_side_validation and (
                'handle_invitation' not in local_var_params or  # noqa: E501
                local_var_params['handle_invitation'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `handle_invitation` when calling `invitations_accept_invitation`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'org_id' in local_var_params:
            path_params['orgId'] = local_var_params['org_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'handle_invitation' in local_var_params:
            body_params = local_var_params['handle_invitation']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            'Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
                ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/invitations/{orgId}',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='HandleInvitation',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 3
0
    def search_search_amphora_with_http_info(self, **kwargs):  # noqa: E501
        """Searches for Amphorae.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_search_amphora_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str term: Gets or sets the free text search term.
        :param str labels: Gets or sets the comma separated labels that must be included in results.
        :param str org_id: Gets or sets the Organisation ID for the Amphora.
        :param float lat: Gets or sets the latitude (center of search area).
        :param float lon: Gets or sets the longitude (center of search area).
        :param float dist: Gets or sets the distance from center of search area (describing a circle).
        :param int take: Gets or sets how many items to return. Defaults to 64.
        :param int skip: Gets or sets how many items to skip before returning. Defaults to 0.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(SearchResponseOfBasicAmphora, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            'term', 'labels', 'org_id', 'lat', 'lon', 'dist', 'take', 'skip'
        ]  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method search_search_amphora" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        if self.api_client.client_side_validation and 'take' in local_var_params and local_var_params[
                'take'] > 256:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `take` when calling `search_search_amphora`, must be a value less than or equal to `256`"
            )  # noqa: E501
        if self.api_client.client_side_validation and 'take' in local_var_params and local_var_params[
                'take'] < 1:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `take` when calling `search_search_amphora`, must be a value greater than or equal to `1`"
            )  # noqa: E501
        if self.api_client.client_side_validation and 'skip' in local_var_params and local_var_params[
                'skip'] > 2147483647:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `skip` when calling `search_search_amphora`, must be a value less than or equal to `2147483647`"
            )  # noqa: E501
        if self.api_client.client_side_validation and 'skip' in local_var_params and local_var_params[
                'skip'] < 0:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `skip` when calling `search_search_amphora`, must be a value greater than or equal to `0`"
            )  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'term' in local_var_params and local_var_params[
                'term'] is not None:  # noqa: E501
            query_params.append(
                ('Term', local_var_params['term']))  # noqa: E501
        if 'labels' in local_var_params and local_var_params[
                'labels'] is not None:  # noqa: E501
            query_params.append(
                ('Labels', local_var_params['labels']))  # noqa: E501
        if 'org_id' in local_var_params and local_var_params[
                'org_id'] is not None:  # noqa: E501
            query_params.append(
                ('OrgId', local_var_params['org_id']))  # noqa: E501
        if 'lat' in local_var_params and local_var_params[
                'lat'] is not None:  # noqa: E501
            query_params.append(('Lat', local_var_params['lat']))  # noqa: E501
        if 'lon' in local_var_params and local_var_params[
                'lon'] is not None:  # noqa: E501
            query_params.append(('Lon', local_var_params['lon']))  # noqa: E501
        if 'dist' in local_var_params and local_var_params[
                'dist'] is not None:  # noqa: E501
            query_params.append(
                ('Dist', local_var_params['dist']))  # noqa: E501
        if 'take' in local_var_params and local_var_params[
                'take'] is not None:  # noqa: E501
            query_params.append(
                ('Take', local_var_params['take']))  # noqa: E501
        if 'skip' in local_var_params and local_var_params[
                'skip'] is not None:  # noqa: E501
            query_params.append(
                ('Skip', local_var_params['skip']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/search-v2/amphorae',
            'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchResponseOfBasicAmphora',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 4
0
    def invoices_download_invoice_with_http_info(self, id,
                                                 **kwargs):  # noqa: E501
        """Downloads an invoice in a specified format.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.invoices_download_invoice_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: Invoice Id. (required)
        :param str format: Only csv is supported.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(file, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id', 'format']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method invoices_download_invoice" %
                                   key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501

        query_params = []
        if 'format' in local_var_params and local_var_params[
                'format'] is not None:  # noqa: E501
            query_params.append(
                ('format', local_var_params['format']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/octet-stream', 'application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/account/invoices/{id}/download',
            'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='file',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 5
0
    def terms_of_use_list_with_http_info(self, **kwargs):  # noqa: E501
        """Returns all Terms of Use.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.terms_of_use_list_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int take: Gets or sets how many items to return. Defaults to 64.
        :param int skip: Gets or sets how many items to skip before returning. Defaults to 0.
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[TermsOfUse], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['take', 'skip']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method terms_of_use_list" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        if self.api_client.client_side_validation and 'take' in local_var_params and local_var_params[
                'take'] > 256:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `take` when calling `terms_of_use_list`, must be a value less than or equal to `256`"
            )  # noqa: E501
        if self.api_client.client_side_validation and 'take' in local_var_params and local_var_params[
                'take'] < 1:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `take` when calling `terms_of_use_list`, must be a value greater than or equal to `1`"
            )  # noqa: E501
        if self.api_client.client_side_validation and 'skip' in local_var_params and local_var_params[
                'skip'] > 2147483647:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `skip` when calling `terms_of_use_list`, must be a value less than or equal to `2147483647`"
            )  # noqa: E501
        if self.api_client.client_side_validation and 'skip' in local_var_params and local_var_params[
                'skip'] < 0:  # noqa: E501
            raise ApiValueError(
                "Invalid value for parameter `skip` when calling `terms_of_use_list`, must be a value greater than or equal to `0`"
            )  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'take' in local_var_params and local_var_params[
                'take'] is not None:  # noqa: E501
            query_params.append(
                ('Take', local_var_params['take']))  # noqa: E501
        if 'skip' in local_var_params and local_var_params[
                'skip'] is not None:  # noqa: E501
            query_params.append(
                ('Skip', local_var_params['skip']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/TermsOfUse',
            'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[TermsOfUse]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 6
0
    def terms_of_use_delete_with_http_info(self, id, **kwargs):  # noqa: E501
        """Deletes a Terms of Use object.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.terms_of_use_delete_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: The terms of use id to delete. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method terms_of_use_delete" % key)
            local_var_params[key] = val
        del local_var_params['kwargs']

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/TermsOfUse/{id}',
            'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 7
0
    def activities_reference_amphora_with_http_info(self, id, run_id,
                                                    amphora_id,
                                                    amphora_reference,
                                                    **kwargs):  # noqa: E501
        """References an Amphora during a run.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.activities_reference_amphora_with_http_info(id, run_id, amphora_id, amphora_reference, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: The activity Id. (required)
        :param str run_id: The run Id. (required)
        :param str amphora_id: The Id of the Amphora to reference. (required)
        :param AmphoraReference amphora_reference: Information about the reference. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(AmphoraReference, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['id', 'run_id', 'amphora_id',
                      'amphora_reference']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method activities_reference_amphora" %
                                   key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'amphora_reference' is set
        if self.api_client.client_side_validation and (
                'amphora_reference' not in local_var_params or  # noqa: E501
                local_var_params['amphora_reference'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `amphora_reference` when calling `activities_reference_amphora`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in local_var_params:
            path_params['id'] = local_var_params['id']  # noqa: E501
        if 'run_id' in local_var_params:
            path_params['runId'] = local_var_params['run_id']  # noqa: E501
        if 'amphora_id' in local_var_params:
            path_params['amphoraId'] = local_var_params[
                'amphora_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'amphora_reference' in local_var_params:
            body_params = local_var_params['amphora_reference']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            'Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
                ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/activities/{id}/Runs/{runId}/amphorae/{amphoraId}',
            'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AmphoraReference',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 8
0
    def time_series_query_time_series_with_http_info(self, query_request,
                                                     **kwargs):  # noqa: E501
        """Updates the details of an Amphora by 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.time_series_query_time_series_with_http_info(query_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param QueryRequest query_request: Time Series query. See https://github.com/microsoft/tsiclient/blob/master/docs/Server.md#functions . (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(QueryResultPage, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['query_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method time_series_query_time_series" %
                                   key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'query_request' is set
        if self.api_client.client_side_validation and (
                'query_request' not in local_var_params or  # noqa: E501
                local_var_params['query_request'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `query_request` when calling `time_series_query_time_series`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'query_request' in local_var_params:
            body_params = local_var_params['query_request']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            'Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
                ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/timeseries/query',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QueryResultPage',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Esempio n. 9
0
    def permission_get_permissions_with_http_info(self, permissions_request,
                                                  **kwargs):  # noqa: E501
        """The permission level for each object id in the request.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.permission_get_permissions_with_http_info(permissions_request, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param PermissionsRequest permissions_request: A request object containing the list of ids to check. (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(PermissionsResponse, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['permissions_request']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method permission_get_permissions" %
                                   key)
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'permissions_request' is set
        if self.api_client.client_side_validation and (
                'permissions_request' not in local_var_params or  # noqa: E501
                local_var_params['permissions_request'] is None):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `permissions_request` when calling `permission_get_permissions`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'permissions_request' in local_var_params:
            body_params = local_var_params['permissions_request']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            'Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
                ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['Bearer']  # noqa: E501

        return self.api_client.call_api(
            '/api/permissions',
            'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PermissionsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get(
                '_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)