From e4d76e91c52e549d5460cd4c5f708753c4fb2585 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 22:36:18 +0000 Subject: [PATCH] 9f757494fe907fa70a35ebe4b5454753a556121a --- README.md | 3 + docs/AnalysesApi.md | 66 ++++++++++++ docs/AnnotationsApi.md | 66 ++++++++++++ docs/StoreApi.md | 66 ++++++++++++ neurostore_sdk/api/analyses_api.py | 146 +++++++++++++++++++++++++- neurostore_sdk/api/annotations_api.py | 146 +++++++++++++++++++++++++- neurostore_sdk/api/store_api.py | 146 +++++++++++++++++++++++++- 7 files changed, 636 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index edd0bb5..45e8db0 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,11 @@ Class | Method | HTTP request | Description *AnalysesApi* | [**annotation_analyses_get**](docs/AnalysesApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses *AnalysesApi* | [**annotation_analyses_id_get**](docs/AnalysesApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint *AnalysesApi* | [**annotation_analyses_id_put**](docs/AnalysesApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint +*AnalysesApi* | [**annotation_analyses_put**](docs/AnalysesApi.md#annotation_analyses_put) | **PUT** /annotation-analyses/ | Your PUT endpoint *AnnotationsApi* | [**annotation_analyses_get**](docs/AnnotationsApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses *AnnotationsApi* | [**annotation_analyses_id_get**](docs/AnnotationsApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint *AnnotationsApi* | [**annotation_analyses_id_put**](docs/AnnotationsApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint +*AnnotationsApi* | [**annotation_analyses_put**](docs/AnnotationsApi.md#annotation_analyses_put) | **PUT** /annotation-analyses/ | Your PUT endpoint *AnnotationsApi* | [**annotations_get**](docs/AnnotationsApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint *AnnotationsApi* | [**annotations_id_delete**](docs/AnnotationsApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation *AnnotationsApi* | [**annotations_id_get**](docs/AnnotationsApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint @@ -132,6 +134,7 @@ Class | Method | HTTP request | Description *StoreApi* | [**annotation_analyses_get**](docs/StoreApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses *StoreApi* | [**annotation_analyses_id_get**](docs/StoreApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint *StoreApi* | [**annotation_analyses_id_put**](docs/StoreApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint +*StoreApi* | [**annotation_analyses_put**](docs/StoreApi.md#annotation_analyses_put) | **PUT** /annotation-analyses/ | Your PUT endpoint *StoreApi* | [**annotations_get**](docs/StoreApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint *StoreApi* | [**annotations_id_delete**](docs/StoreApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation *StoreApi* | [**annotations_id_get**](docs/StoreApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint diff --git a/docs/AnalysesApi.md b/docs/AnalysesApi.md index 4f773ac..b29939c 100644 --- a/docs/AnalysesApi.md +++ b/docs/AnalysesApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**annotation_analyses_get**](AnalysesApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses [**annotation_analyses_id_get**](AnalysesApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint [**annotation_analyses_id_put**](AnalysesApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint +[**annotation_analyses_put**](AnalysesApi.md#annotation_analyses_put) | **PUT** /annotation-analyses/ | Your PUT endpoint # **analyses_get** @@ -605,3 +606,68 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **annotation_analyses_put** +> NoteCollectionReturn annotation_analyses_put(note_collection_request=note_collection_request) + +Your PUT endpoint + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn +from neurostore_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://neurostore.org/api +# See configuration.py for a list of all supported configuration parameters. +configuration = neurostore_sdk.Configuration( + host = "https://neurostore.org/api" +) + + +# Enter a context with an instance of the API client +with neurostore_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = neurostore_sdk.AnalysesApi(api_client) + note_collection_request = [neurostore_sdk.NoteCollectionRequest()] # List[NoteCollectionRequest] | (optional) + + try: + # Your PUT endpoint + api_response = api_instance.annotation_analyses_put(note_collection_request=note_collection_request) + print("The response of AnalysesApi->annotation_analyses_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesApi->annotation_analyses_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **note_collection_request** | [**List[NoteCollectionRequest]**](NoteCollectionRequest.md)| | [optional] + +### Return type + +[**NoteCollectionReturn**](NoteCollectionReturn.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AnnotationsApi.md b/docs/AnnotationsApi.md index 5240ad8..20e2609 100644 --- a/docs/AnnotationsApi.md +++ b/docs/AnnotationsApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**annotation_analyses_get**](AnnotationsApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses [**annotation_analyses_id_get**](AnnotationsApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint [**annotation_analyses_id_put**](AnnotationsApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint +[**annotation_analyses_put**](AnnotationsApi.md#annotation_analyses_put) | **PUT** /annotation-analyses/ | Your PUT endpoint [**annotations_get**](AnnotationsApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint [**annotations_id_delete**](AnnotationsApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation [**annotations_id_get**](AnnotationsApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint @@ -226,6 +227,71 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **annotation_analyses_put** +> NoteCollectionReturn annotation_analyses_put(note_collection_request=note_collection_request) + +Your PUT endpoint + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn +from neurostore_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://neurostore.org/api +# See configuration.py for a list of all supported configuration parameters. +configuration = neurostore_sdk.Configuration( + host = "https://neurostore.org/api" +) + + +# Enter a context with an instance of the API client +with neurostore_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = neurostore_sdk.AnnotationsApi(api_client) + note_collection_request = [neurostore_sdk.NoteCollectionRequest()] # List[NoteCollectionRequest] | (optional) + + try: + # Your PUT endpoint + api_response = api_instance.annotation_analyses_put(note_collection_request=note_collection_request) + print("The response of AnnotationsApi->annotation_analyses_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnnotationsApi->annotation_analyses_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **note_collection_request** | [**List[NoteCollectionRequest]**](NoteCollectionRequest.md)| | [optional] + +### Return type + +[**NoteCollectionReturn**](NoteCollectionReturn.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **annotations_get** > AnnotationList annotations_get(studyset_id=studyset_id) diff --git a/docs/StoreApi.md b/docs/StoreApi.md index d8ec853..1781ed7 100644 --- a/docs/StoreApi.md +++ b/docs/StoreApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**annotation_analyses_get**](StoreApi.md#annotation_analyses_get) | **GET** /annotation-analyses/ | Get annotation analyses [**annotation_analyses_id_get**](StoreApi.md#annotation_analyses_id_get) | **GET** /annotation-analyses/{id} | Your GET endpoint [**annotation_analyses_id_put**](StoreApi.md#annotation_analyses_id_put) | **PUT** /annotation-analyses/{id} | Your PUT endpoint +[**annotation_analyses_put**](StoreApi.md#annotation_analyses_put) | **PUT** /annotation-analyses/ | Your PUT endpoint [**annotations_get**](StoreApi.md#annotations_get) | **GET** /annotations/ | Your GET endpoint [**annotations_id_delete**](StoreApi.md#annotations_id_delete) | **DELETE** /annotations/{id} | DELETE an annotation [**annotations_id_get**](StoreApi.md#annotations_id_get) | **GET** /annotations/{id} | Your GET endpoint @@ -638,6 +639,71 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **annotation_analyses_put** +> NoteCollectionReturn annotation_analyses_put(note_collection_request=note_collection_request) + +Your PUT endpoint + +### Example + +```python +import time +import os +import neurostore_sdk +from neurostore_sdk.models.note_collection_request import NoteCollectionRequest +from neurostore_sdk.models.note_collection_return import NoteCollectionReturn +from neurostore_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://neurostore.org/api +# See configuration.py for a list of all supported configuration parameters. +configuration = neurostore_sdk.Configuration( + host = "https://neurostore.org/api" +) + + +# Enter a context with an instance of the API client +with neurostore_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = neurostore_sdk.StoreApi(api_client) + note_collection_request = [neurostore_sdk.NoteCollectionRequest()] # List[NoteCollectionRequest] | (optional) + + try: + # Your PUT endpoint + api_response = api_instance.annotation_analyses_put(note_collection_request=note_collection_request) + print("The response of StoreApi->annotation_analyses_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StoreApi->annotation_analyses_put: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **note_collection_request** | [**List[NoteCollectionRequest]**](NoteCollectionRequest.md)| | [optional] + +### Return type + +[**NoteCollectionReturn**](NoteCollectionReturn.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **annotations_get** > AnnotationList annotations_get(studyset_id=studyset_id) diff --git a/neurostore_sdk/api/analyses_api.py b/neurostore_sdk/api/analyses_api.py index c2d4e0a..d60ceef 100644 --- a/neurostore_sdk/api/analyses_api.py +++ b/neurostore_sdk/api/analyses_api.py @@ -20,7 +20,7 @@ from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, conint, constr +from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr from typing import Optional @@ -1246,3 +1246,147 @@ def annotation_analyses_id_put_with_http_info(self, id : StrictStr, note_collect _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + + @validate_arguments + def annotation_analyses_put(self, note_collection_request : Optional[conlist(NoteCollectionRequest)] = None, **kwargs) -> NoteCollectionReturn: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_put(note_collection_request, async_req=True) + >>> result = thread.get() + + :param note_collection_request: + :type note_collection_request: List[NoteCollectionRequest] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_put_with_http_info(note_collection_request, **kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_put_with_http_info(self, note_collection_request : Optional[conlist(NoteCollectionRequest)] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_put_with_http_info(note_collection_request, async_req=True) + >>> result = thread.get() + + :param note_collection_request: + :type note_collection_request: List[NoteCollectionRequest] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'note_collection_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['note_collection_request'] is not None: + _body_params = _params['note_collection_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionReturn", + } + + return self.api_client.call_api( + '/annotation-analyses/', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/neurostore_sdk/api/annotations_api.py b/neurostore_sdk/api/annotations_api.py index 75442c1..c876155 100644 --- a/neurostore_sdk/api/annotations_api.py +++ b/neurostore_sdk/api/annotations_api.py @@ -20,7 +20,7 @@ from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictStr, conlist from typing import Optional @@ -470,6 +470,150 @@ def annotation_analyses_id_put_with_http_info(self, id : StrictStr, note_collect collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def annotation_analyses_put(self, note_collection_request : Optional[conlist(NoteCollectionRequest)] = None, **kwargs) -> NoteCollectionReturn: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_put(note_collection_request, async_req=True) + >>> result = thread.get() + + :param note_collection_request: + :type note_collection_request: List[NoteCollectionRequest] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_put_with_http_info(note_collection_request, **kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_put_with_http_info(self, note_collection_request : Optional[conlist(NoteCollectionRequest)] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_put_with_http_info(note_collection_request, async_req=True) + >>> result = thread.get() + + :param note_collection_request: + :type note_collection_request: List[NoteCollectionRequest] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'note_collection_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['note_collection_request'] is not None: + _body_params = _params['note_collection_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionReturn", + } + + return self.api_client.call_api( + '/annotation-analyses/', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def annotations_get(self, studyset_id : Annotated[Optional[StrictStr], Field(description="see all annotations connected to this studyset")] = None, **kwargs) -> AnnotationList: # noqa: E501 """Your GET endpoint # noqa: E501 diff --git a/neurostore_sdk/api/store_api.py b/neurostore_sdk/api/store_api.py index 06558f4..e38a36b 100644 --- a/neurostore_sdk/api/store_api.py +++ b/neurostore_sdk/api/store_api.py @@ -20,7 +20,7 @@ from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, conint, constr +from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr from typing import Any, Optional @@ -1269,6 +1269,150 @@ def annotation_analyses_id_put_with_http_info(self, id : StrictStr, note_collect collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def annotation_analyses_put(self, note_collection_request : Optional[conlist(NoteCollectionRequest)] = None, **kwargs) -> NoteCollectionReturn: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_put(note_collection_request, async_req=True) + >>> result = thread.get() + + :param note_collection_request: + :type note_collection_request: List[NoteCollectionRequest] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :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: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: NoteCollectionReturn + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the annotation_analyses_put_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.annotation_analyses_put_with_http_info(note_collection_request, **kwargs) # noqa: E501 + + @validate_arguments + def annotation_analyses_put_with_http_info(self, note_collection_request : Optional[conlist(NoteCollectionRequest)] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Your PUT endpoint # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.annotation_analyses_put_with_http_info(note_collection_request, async_req=True) + >>> result = thread.get() + + :param note_collection_request: + :type note_collection_request: List[NoteCollectionRequest] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :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. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NoteCollectionReturn, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'note_collection_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method annotation_analyses_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['note_collection_request'] is not None: + _body_params = _params['note_collection_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NoteCollectionReturn", + } + + return self.api_client.call_api( + '/annotation-analyses/', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def annotations_get(self, studyset_id : Annotated[Optional[StrictStr], Field(description="see all annotations connected to this studyset")] = None, **kwargs) -> AnnotationList: # noqa: E501 """Your GET endpoint # noqa: E501