diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3fd1d43..61b1db7 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -31,6 +31,8 @@ docs/AnnotationReturnOneOf1.md docs/AnnotationReturnRelationships.md docs/AnnotationReturnRelationshipsNotes.md docs/AnnotationsApi.md +docs/BaseStudiesPost200Response.md +docs/BaseStudiesPostRequest.md docs/BaseStudy.md docs/BaseStudyList.md docs/BaseStudyReturn.md @@ -79,7 +81,8 @@ docs/StudyRequestRelationships.md docs/StudyRequestRelationshipsAnalyses.md docs/StudyReturn.md docs/StudyReturnAllOf.md -docs/StudyReturnAllOfStudysets.md +docs/StudyReturnAllOfStudysetsInner.md +docs/StudyReturnAllOfStudysetsInnerOneOf.md docs/StudyReturnRelationships.md docs/StudyReturnRelationshipsAnalyses.md docs/StudysetBase.md @@ -143,6 +146,8 @@ neurostore_sdk/models/annotation_return_one_of.py neurostore_sdk/models/annotation_return_one_of1.py neurostore_sdk/models/annotation_return_relationships.py neurostore_sdk/models/annotation_return_relationships_notes.py +neurostore_sdk/models/base_studies_post200_response.py +neurostore_sdk/models/base_studies_post_request.py neurostore_sdk/models/base_study.py neurostore_sdk/models/base_study_list.py neurostore_sdk/models/base_study_return.py @@ -185,7 +190,8 @@ neurostore_sdk/models/study_request_relationships.py neurostore_sdk/models/study_request_relationships_analyses.py neurostore_sdk/models/study_return.py neurostore_sdk/models/study_return_all_of.py -neurostore_sdk/models/study_return_all_of_studysets.py +neurostore_sdk/models/study_return_all_of_studysets_inner.py +neurostore_sdk/models/study_return_all_of_studysets_inner_one_of.py neurostore_sdk/models/study_return_relationships.py neurostore_sdk/models/study_return_relationships_analyses.py neurostore_sdk/models/studyset_base.py @@ -210,4 +216,8 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_base_studies_post200_response.py +test/test_base_studies_post_request.py +test/test_study_return_all_of_studysets_inner.py +test/test_study_return_all_of_studysets_inner_one_of.py tox.ini diff --git a/README.md b/README.md index 023ff3c..06333d2 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,8 @@ Class | Method | HTTP request | Description - [AnnotationReturnOneOf1](docs/AnnotationReturnOneOf1.md) - [AnnotationReturnRelationships](docs/AnnotationReturnRelationships.md) - [AnnotationReturnRelationshipsNotes](docs/AnnotationReturnRelationshipsNotes.md) + - [BaseStudiesPost200Response](docs/BaseStudiesPost200Response.md) + - [BaseStudiesPostRequest](docs/BaseStudiesPostRequest.md) - [BaseStudy](docs/BaseStudy.md) - [BaseStudyList](docs/BaseStudyList.md) - [BaseStudyReturn](docs/BaseStudyReturn.md) @@ -242,7 +244,8 @@ Class | Method | HTTP request | Description - [StudyRequestRelationshipsAnalyses](docs/StudyRequestRelationshipsAnalyses.md) - [StudyReturn](docs/StudyReturn.md) - [StudyReturnAllOf](docs/StudyReturnAllOf.md) - - [StudyReturnAllOfStudysets](docs/StudyReturnAllOfStudysets.md) + - [StudyReturnAllOfStudysetsInner](docs/StudyReturnAllOfStudysetsInner.md) + - [StudyReturnAllOfStudysetsInnerOneOf](docs/StudyReturnAllOfStudysetsInnerOneOf.md) - [StudyReturnRelationships](docs/StudyReturnRelationships.md) - [StudyReturnRelationshipsAnalyses](docs/StudyReturnRelationshipsAnalyses.md) - [StudysetBase](docs/StudysetBase.md) diff --git a/docs/BaseStudiesPost200Response.md b/docs/BaseStudiesPost200Response.md new file mode 100644 index 0000000..949ac67 --- /dev/null +++ b/docs/BaseStudiesPost200Response.md @@ -0,0 +1,43 @@ +# BaseStudiesPost200Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **object** | | [optional] +**versions** | [**BaseStudyVersions**](BaseStudyVersions.md) | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**publication** | **str** | | [optional] +**doi** | **str** | | [optional] +**pmid** | **str** | | [optional] +**authors** | **str** | | [optional] +**year** | **int** | | [optional] +**level** | **str** | | [optional] +**created_at** | **datetime** | time the resource was created on the database | [optional] [readonly] +**updated_at** | **str** | when was the resource last modified/updated. | [optional] [readonly] +**id** | **str** | short UUID specifying the location of this resource | [optional] +**public** | **bool** | whether the resource is listed in public searches or not | [optional] [default to True] +**user** | **str** | who owns the resource | [optional] [readonly] +**username** | **str** | human readable username | [optional] + +## Example + +```python +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseStudiesPost200Response from a JSON string +base_studies_post200_response_instance = BaseStudiesPost200Response.from_json(json) +# print the JSON string representation of the object +print BaseStudiesPost200Response.to_json() + +# convert the object into a dict +base_studies_post200_response_dict = base_studies_post200_response_instance.to_dict() +# create an instance of BaseStudiesPost200Response from a dict +base_studies_post200_response_form_dict = base_studies_post200_response.from_dict(base_studies_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseStudiesPostRequest.md b/docs/BaseStudiesPostRequest.md new file mode 100644 index 0000000..df991cf --- /dev/null +++ b/docs/BaseStudiesPostRequest.md @@ -0,0 +1,37 @@ +# BaseStudiesPostRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **object** | | [optional] +**versions** | [**BaseStudyVersions**](BaseStudyVersions.md) | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**publication** | **str** | | [optional] +**doi** | **str** | | [optional] +**pmid** | **str** | | [optional] +**authors** | **str** | | [optional] +**year** | **int** | | [optional] +**level** | **str** | | [optional] + +## Example + +```python +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseStudiesPostRequest from a JSON string +base_studies_post_request_instance = BaseStudiesPostRequest.from_json(json) +# print the JSON string representation of the object +print BaseStudiesPostRequest.to_json() + +# convert the object into a dict +base_studies_post_request_dict = base_studies_post_request_instance.to_dict() +# create an instance of BaseStudiesPostRequest from a dict +base_studies_post_request_form_dict = base_studies_post_request.from_dict(base_studies_post_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 64459f1..227d8d1 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -258,7 +258,7 @@ 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) # **base_studies_post** -> BaseStudyReturn base_studies_post(base_study=base_study) +> BaseStudiesPost200Response base_studies_post(base_studies_post_request=base_studies_post_request) @@ -269,8 +269,8 @@ Name | Type | Description | Notes import time import os import neurostore_sdk -from neurostore_sdk.models.base_study import BaseStudy -from neurostore_sdk.models.base_study_return import BaseStudyReturn +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest from neurostore_sdk.rest import ApiException from pprint import pprint @@ -294,11 +294,11 @@ configuration = neurostore_sdk.Configuration( with neurostore_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = neurostore_sdk.DefaultApi(api_client) - base_study = neurostore_sdk.BaseStudy() # BaseStudy | (optional) + base_studies_post_request = neurostore_sdk.BaseStudiesPostRequest() # BaseStudiesPostRequest | (optional) try: # - api_response = api_instance.base_studies_post(base_study=base_study) + api_response = api_instance.base_studies_post(base_studies_post_request=base_studies_post_request) print("The response of DefaultApi->base_studies_post:\n") pprint(api_response) except Exception as e: @@ -310,11 +310,11 @@ with neurostore_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **base_study** | [**BaseStudy**](BaseStudy.md)| | [optional] + **base_studies_post_request** | [**BaseStudiesPostRequest**](BaseStudiesPostRequest.md)| | [optional] ### Return type -[**BaseStudyReturn**](BaseStudyReturn.md) +[**BaseStudiesPost200Response**](BaseStudiesPost200Response.md) ### Authorization diff --git a/docs/StudyReturn.md b/docs/StudyReturn.md index 74d30de..4612cfb 100644 --- a/docs/StudyReturn.md +++ b/docs/StudyReturn.md @@ -22,7 +22,9 @@ Name | Type | Description | Notes **source_id** | **str** | | [optional] **source_updated_at** | **str** | | [optional] [readonly] **analyses** | [**StudyReturnRelationshipsAnalyses**](StudyReturnRelationshipsAnalyses.md) | | [optional] -**studysets** | [**List[StudyReturnAllOfStudysets]**](StudyReturnAllOfStudysets.md) | | [optional] +**studysets** | [**List[StudyReturnAllOfStudysetsInner]**](StudyReturnAllOfStudysetsInner.md) | | [optional] +**has_coordinates** | **bool** | | [optional] +**has_images** | **bool** | | [optional] ## Example diff --git a/docs/StudyReturnAllOf.md b/docs/StudyReturnAllOf.md index ed5b977..37c1f68 100644 --- a/docs/StudyReturnAllOf.md +++ b/docs/StudyReturnAllOf.md @@ -4,7 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**studysets** | [**List[StudyReturnAllOfStudysets]**](StudyReturnAllOfStudysets.md) | | [optional] +**studysets** | [**List[StudyReturnAllOfStudysetsInner]**](StudyReturnAllOfStudysetsInner.md) | | [optional] +**has_coordinates** | **bool** | | [optional] +**has_images** | **bool** | | [optional] ## Example diff --git a/docs/StudyReturnAllOfStudysetsInner.md b/docs/StudyReturnAllOfStudysetsInner.md new file mode 100644 index 0000000..2ad15a6 --- /dev/null +++ b/docs/StudyReturnAllOfStudysetsInner.md @@ -0,0 +1,30 @@ +# StudyReturnAllOfStudysetsInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**id** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from neurostore_sdk.models.study_return_all_of_studysets_inner import StudyReturnAllOfStudysetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of StudyReturnAllOfStudysetsInner from a JSON string +study_return_all_of_studysets_inner_instance = StudyReturnAllOfStudysetsInner.from_json(json) +# print the JSON string representation of the object +print StudyReturnAllOfStudysetsInner.to_json() + +# convert the object into a dict +study_return_all_of_studysets_inner_dict = study_return_all_of_studysets_inner_instance.to_dict() +# create an instance of StudyReturnAllOfStudysetsInner from a dict +study_return_all_of_studysets_inner_form_dict = study_return_all_of_studysets_inner.from_dict(study_return_all_of_studysets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StudyReturnAllOfStudysetsInnerOneOf.md b/docs/StudyReturnAllOfStudysetsInnerOneOf.md new file mode 100644 index 0000000..04f57f9 --- /dev/null +++ b/docs/StudyReturnAllOfStudysetsInnerOneOf.md @@ -0,0 +1,30 @@ +# StudyReturnAllOfStudysetsInnerOneOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**id** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from neurostore_sdk.models.study_return_all_of_studysets_inner_one_of import StudyReturnAllOfStudysetsInnerOneOf + +# TODO update the JSON string below +json = "{}" +# create an instance of StudyReturnAllOfStudysetsInnerOneOf from a JSON string +study_return_all_of_studysets_inner_one_of_instance = StudyReturnAllOfStudysetsInnerOneOf.from_json(json) +# print the JSON string representation of the object +print StudyReturnAllOfStudysetsInnerOneOf.to_json() + +# convert the object into a dict +study_return_all_of_studysets_inner_one_of_dict = study_return_all_of_studysets_inner_one_of_instance.to_dict() +# create an instance of StudyReturnAllOfStudysetsInnerOneOf from a dict +study_return_all_of_studysets_inner_one_of_form_dict = study_return_all_of_studysets_inner_one_of.from_dict(study_return_all_of_studysets_inner_one_of_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/neurostore_sdk/__init__.py b/neurostore_sdk/__init__.py index d75afaa..3c08ad6 100644 --- a/neurostore_sdk/__init__.py +++ b/neurostore_sdk/__init__.py @@ -67,6 +67,8 @@ from neurostore_sdk.models.annotation_return_one_of1 import AnnotationReturnOneOf1 from neurostore_sdk.models.annotation_return_relationships import AnnotationReturnRelationships from neurostore_sdk.models.annotation_return_relationships_notes import AnnotationReturnRelationshipsNotes +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest from neurostore_sdk.models.base_study import BaseStudy from neurostore_sdk.models.base_study_list import BaseStudyList from neurostore_sdk.models.base_study_return import BaseStudyReturn @@ -109,7 +111,8 @@ from neurostore_sdk.models.study_request_relationships_analyses import StudyRequestRelationshipsAnalyses from neurostore_sdk.models.study_return import StudyReturn from neurostore_sdk.models.study_return_all_of import StudyReturnAllOf -from neurostore_sdk.models.study_return_all_of_studysets import StudyReturnAllOfStudysets +from neurostore_sdk.models.study_return_all_of_studysets_inner import StudyReturnAllOfStudysetsInner +from neurostore_sdk.models.study_return_all_of_studysets_inner_one_of import StudyReturnAllOfStudysetsInnerOneOf from neurostore_sdk.models.study_return_relationships import StudyReturnRelationships from neurostore_sdk.models.study_return_relationships_analyses import StudyReturnRelationshipsAnalyses from neurostore_sdk.models.studyset_base import StudysetBase diff --git a/neurostore_sdk/api/default_api.py b/neurostore_sdk/api/default_api.py index c9a8c44..c16147c 100644 --- a/neurostore_sdk/api/default_api.py +++ b/neurostore_sdk/api/default_api.py @@ -24,6 +24,8 @@ from typing import Optional +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest from neurostore_sdk.models.base_study import BaseStudy from neurostore_sdk.models.base_study_list import BaseStudyList from neurostore_sdk.models.base_study_return import BaseStudyReturn @@ -603,17 +605,17 @@ def base_studies_id_put_with_http_info(self, id : StrictStr, base_study : Option _request_auth=_params.get('_request_auth')) @validate_arguments - def base_studies_post(self, base_study : Optional[BaseStudy] = None, **kwargs) -> BaseStudyReturn: # noqa: E501 + def base_studies_post(self, base_studies_post_request : Optional[BaseStudiesPostRequest] = None, **kwargs) -> BaseStudiesPost200Response: # noqa: E501 """ # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.base_studies_post(base_study, async_req=True) + >>> thread = api.base_studies_post(base_studies_post_request, async_req=True) >>> result = thread.get() - :param base_study: - :type base_study: BaseStudy + :param base_studies_post_request: + :type base_studies_post_request: BaseStudiesPostRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one @@ -623,25 +625,25 @@ def base_studies_post(self, base_study : Optional[BaseStudy] = None, **kwargs) - :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: BaseStudyReturn + :rtype: BaseStudiesPost200Response """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: raise ValueError("Error! Please call the base_studies_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") - return self.base_studies_post_with_http_info(base_study, **kwargs) # noqa: E501 + return self.base_studies_post_with_http_info(base_studies_post_request, **kwargs) # noqa: E501 @validate_arguments - def base_studies_post_with_http_info(self, base_study : Optional[BaseStudy] = None, **kwargs) -> ApiResponse: # noqa: E501 + def base_studies_post_with_http_info(self, base_studies_post_request : Optional[BaseStudiesPostRequest] = None, **kwargs) -> ApiResponse: # noqa: E501 """ # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.base_studies_post_with_http_info(base_study, async_req=True) + >>> thread = api.base_studies_post_with_http_info(base_studies_post_request, async_req=True) >>> result = thread.get() - :param base_study: - :type base_study: BaseStudy + :param base_studies_post_request: + :type base_studies_post_request: BaseStudiesPostRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will @@ -664,13 +666,13 @@ def base_studies_post_with_http_info(self, base_study : Optional[BaseStudy] = No :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(BaseStudyReturn, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(BaseStudiesPost200Response, status_code(int), headers(HTTPHeaderDict)) """ _params = locals() _all_params = [ - 'base_study' + 'base_studies_post_request' ] _all_params.extend( [ @@ -708,8 +710,8 @@ def base_studies_post_with_http_info(self, base_study : Optional[BaseStudy] = No _files = {} # process the body parameter _body_params = None - if _params['base_study'] is not None: - _body_params = _params['base_study'] + if _params['base_studies_post_request'] is not None: + _body_params = _params['base_studies_post_request'] # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( @@ -726,7 +728,7 @@ def base_studies_post_with_http_info(self, base_study : Optional[BaseStudy] = No _auth_settings = ['JSON-Web-Token'] # noqa: E501 _response_types_map = { - '200': "BaseStudyReturn", + '200': "BaseStudiesPost200Response", } return self.api_client.call_api( diff --git a/neurostore_sdk/models/__init__.py b/neurostore_sdk/models/__init__.py index 696d56f..51e6d81 100644 --- a/neurostore_sdk/models/__init__.py +++ b/neurostore_sdk/models/__init__.py @@ -41,6 +41,8 @@ from neurostore_sdk.models.annotation_return_one_of1 import AnnotationReturnOneOf1 from neurostore_sdk.models.annotation_return_relationships import AnnotationReturnRelationships from neurostore_sdk.models.annotation_return_relationships_notes import AnnotationReturnRelationshipsNotes +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest from neurostore_sdk.models.base_study import BaseStudy from neurostore_sdk.models.base_study_list import BaseStudyList from neurostore_sdk.models.base_study_return import BaseStudyReturn @@ -83,7 +85,8 @@ from neurostore_sdk.models.study_request_relationships_analyses import StudyRequestRelationshipsAnalyses from neurostore_sdk.models.study_return import StudyReturn from neurostore_sdk.models.study_return_all_of import StudyReturnAllOf -from neurostore_sdk.models.study_return_all_of_studysets import StudyReturnAllOfStudysets +from neurostore_sdk.models.study_return_all_of_studysets_inner import StudyReturnAllOfStudysetsInner +from neurostore_sdk.models.study_return_all_of_studysets_inner_one_of import StudyReturnAllOfStudysetsInnerOneOf from neurostore_sdk.models.study_return_relationships import StudyReturnRelationships from neurostore_sdk.models.study_return_relationships_analyses import StudyReturnRelationshipsAnalyses from neurostore_sdk.models.studyset_base import StudysetBase diff --git a/neurostore_sdk/models/base_studies_post200_response.py b/neurostore_sdk/models/base_studies_post200_response.py new file mode 100644 index 0000000..2d82586 --- /dev/null +++ b/neurostore_sdk/models/base_studies_post200_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Any, List, Optional +from pydantic import BaseModel, Field, StrictStr, ValidationError, conlist, validator +from neurostore_sdk.models.base_study_return import BaseStudyReturn +from typing import Any, List +from pydantic import StrictStr, Field + +BASESTUDIESPOST200RESPONSE_ONE_OF_SCHEMAS = ["BaseStudyReturn", "List[BaseStudyReturn]"] + +class BaseStudiesPost200Response(BaseModel): + """ + BaseStudiesPost200Response + """ + # data type: BaseStudyReturn + oneof_schema_1_validator: Optional[BaseStudyReturn] = None + # data type: List[BaseStudyReturn] + oneof_schema_2_validator: Optional[conlist(BaseStudyReturn)] = None + actual_instance: Any + one_of_schemas: List[str] = Field(BASESTUDIESPOST200RESPONSE_ONE_OF_SCHEMAS, const=True) + + class Config: + validate_assignment = True + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BaseStudiesPost200Response.construct() + error_messages = [] + match = 0 + # validate data type: BaseStudyReturn + if not isinstance(v, BaseStudyReturn): + error_messages.append(f"Error! Input type `{type(v)}` is not `BaseStudyReturn`") + else: + match += 1 + # validate data type: List[BaseStudyReturn] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BaseStudiesPost200Response with oneOf schemas: BaseStudyReturn, List[BaseStudyReturn]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BaseStudiesPost200Response with oneOf schemas: BaseStudyReturn, List[BaseStudyReturn]. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> BaseStudiesPost200Response: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> BaseStudiesPost200Response: + """Returns the object represented by the json string""" + instance = BaseStudiesPost200Response.construct() + error_messages = [] + match = 0 + + # deserialize data into BaseStudyReturn + try: + instance.actual_instance = BaseStudyReturn.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[BaseStudyReturn] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BaseStudiesPost200Response with oneOf schemas: BaseStudyReturn, List[BaseStudyReturn]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BaseStudiesPost200Response with oneOf schemas: BaseStudyReturn, List[BaseStudyReturn]. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + diff --git a/neurostore_sdk/models/base_studies_post_request.py b/neurostore_sdk/models/base_studies_post_request.py new file mode 100644 index 0000000..ad0044d --- /dev/null +++ b/neurostore_sdk/models/base_studies_post_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Any, List, Optional +from pydantic import BaseModel, Field, StrictStr, ValidationError, conlist, validator +from neurostore_sdk.models.base_study import BaseStudy +from typing import Any, List +from pydantic import StrictStr, Field + +BASESTUDIESPOSTREQUEST_ONE_OF_SCHEMAS = ["BaseStudy", "List[BaseStudy]"] + +class BaseStudiesPostRequest(BaseModel): + """ + BaseStudiesPostRequest + """ + # data type: BaseStudy + oneof_schema_1_validator: Optional[BaseStudy] = None + # data type: List[BaseStudy] + oneof_schema_2_validator: Optional[conlist(BaseStudy)] = None + actual_instance: Any + one_of_schemas: List[str] = Field(BASESTUDIESPOSTREQUEST_ONE_OF_SCHEMAS, const=True) + + class Config: + validate_assignment = True + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BaseStudiesPostRequest.construct() + error_messages = [] + match = 0 + # validate data type: BaseStudy + if not isinstance(v, BaseStudy): + error_messages.append(f"Error! Input type `{type(v)}` is not `BaseStudy`") + else: + match += 1 + # validate data type: List[BaseStudy] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BaseStudiesPostRequest with oneOf schemas: BaseStudy, List[BaseStudy]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BaseStudiesPostRequest with oneOf schemas: BaseStudy, List[BaseStudy]. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> BaseStudiesPostRequest: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> BaseStudiesPostRequest: + """Returns the object represented by the json string""" + instance = BaseStudiesPostRequest.construct() + error_messages = [] + match = 0 + + # deserialize data into BaseStudy + try: + instance.actual_instance = BaseStudy.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[BaseStudy] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BaseStudiesPostRequest with oneOf schemas: BaseStudy, List[BaseStudy]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BaseStudiesPostRequest with oneOf schemas: BaseStudy, List[BaseStudy]. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + diff --git a/neurostore_sdk/models/study_return.py b/neurostore_sdk/models/study_return.py index 3a9664b..56aadd6 100644 --- a/neurostore_sdk/models/study_return.py +++ b/neurostore_sdk/models/study_return.py @@ -21,7 +21,7 @@ from datetime import datetime from typing import Any, Dict, List, Optional from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, conlist, constr -from neurostore_sdk.models.study_return_all_of_studysets import StudyReturnAllOfStudysets +from neurostore_sdk.models.study_return_all_of_studysets_inner import StudyReturnAllOfStudysetsInner from neurostore_sdk.models.study_return_relationships_analyses import StudyReturnRelationshipsAnalyses class StudyReturn(BaseModel): @@ -46,8 +46,10 @@ class StudyReturn(BaseModel): source_id: Optional[StrictStr] = None source_updated_at: Optional[StrictStr] = None analyses: Optional[StudyReturnRelationshipsAnalyses] = None - studysets: Optional[conlist(StudyReturnAllOfStudysets)] = None - __properties = ["doi", "name", "metadata", "description", "publication", "pmid", "authors", "year", "created_at", "updated_at", "id", "public", "user", "username", "source", "source_id", "source_updated_at", "analyses", "studysets"] + studysets: Optional[conlist(StudyReturnAllOfStudysetsInner)] = None + has_coordinates: Optional[StrictBool] = None + has_images: Optional[StrictBool] = None + __properties = ["doi", "name", "metadata", "description", "publication", "pmid", "authors", "year", "created_at", "updated_at", "id", "public", "user", "username", "source", "source_id", "source_updated_at", "analyses", "studysets", "has_coordinates", "has_images"] class Config: """Pydantic configuration""" @@ -187,7 +189,9 @@ def from_dict(cls, obj: dict) -> StudyReturn: "source_id": obj.get("source_id"), "source_updated_at": obj.get("source_updated_at"), "analyses": StudyReturnRelationshipsAnalyses.from_dict(obj.get("analyses")) if obj.get("analyses") is not None else None, - "studysets": [StudyReturnAllOfStudysets.from_dict(_item) for _item in obj.get("studysets")] if obj.get("studysets") is not None else None + "studysets": [StudyReturnAllOfStudysetsInner.from_dict(_item) for _item in obj.get("studysets")] if obj.get("studysets") is not None else None, + "has_coordinates": obj.get("has_coordinates"), + "has_images": obj.get("has_images") }) return _obj diff --git a/neurostore_sdk/models/study_return_all_of.py b/neurostore_sdk/models/study_return_all_of.py index a703051..0057b5e 100644 --- a/neurostore_sdk/models/study_return_all_of.py +++ b/neurostore_sdk/models/study_return_all_of.py @@ -20,15 +20,17 @@ from typing import List, Optional -from pydantic import BaseModel, conlist -from neurostore_sdk.models.study_return_all_of_studysets import StudyReturnAllOfStudysets +from pydantic import BaseModel, StrictBool, conlist +from neurostore_sdk.models.study_return_all_of_studysets_inner import StudyReturnAllOfStudysetsInner class StudyReturnAllOf(BaseModel): """ StudyReturnAllOf """ - studysets: Optional[conlist(StudyReturnAllOfStudysets)] = None - __properties = ["studysets"] + studysets: Optional[conlist(StudyReturnAllOfStudysetsInner)] = None + has_coordinates: Optional[StrictBool] = None + has_images: Optional[StrictBool] = None + __properties = ["studysets", "has_coordinates", "has_images"] class Config: """Pydantic configuration""" @@ -73,7 +75,9 @@ def from_dict(cls, obj: dict) -> StudyReturnAllOf: return StudyReturnAllOf.parse_obj(obj) _obj = StudyReturnAllOf.parse_obj({ - "studysets": [StudyReturnAllOfStudysets.from_dict(_item) for _item in obj.get("studysets")] if obj.get("studysets") is not None else None + "studysets": [StudyReturnAllOfStudysetsInner.from_dict(_item) for _item in obj.get("studysets")] if obj.get("studysets") is not None else None, + "has_coordinates": obj.get("has_coordinates"), + "has_images": obj.get("has_images") }) return _obj diff --git a/neurostore_sdk/models/study_return_all_of_studysets_inner.py b/neurostore_sdk/models/study_return_all_of_studysets_inner.py new file mode 100644 index 0000000..3b130f4 --- /dev/null +++ b/neurostore_sdk/models/study_return_all_of_studysets_inner.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 + +from typing import Any, List, Optional +from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +from neurostore_sdk.models.study_return_all_of_studysets_inner_one_of import StudyReturnAllOfStudysetsInnerOneOf +from typing import Any, List +from pydantic import StrictStr, Field + +STUDYRETURNALLOFSTUDYSETSINNER_ONE_OF_SCHEMAS = ["StudyReturnAllOfStudysetsInnerOneOf", "str"] + +class StudyReturnAllOfStudysetsInner(BaseModel): + """ + StudyReturnAllOfStudysetsInner + """ + # data type: StudyReturnAllOfStudysetsInnerOneOf + oneof_schema_1_validator: Optional[StudyReturnAllOfStudysetsInnerOneOf] = None + # data type: str + oneof_schema_2_validator: Optional[StrictStr] = None + actual_instance: Any + one_of_schemas: List[str] = Field(STUDYRETURNALLOFSTUDYSETSINNER_ONE_OF_SCHEMAS, const=True) + + class Config: + validate_assignment = True + + def __init__(self, *args, **kwargs): + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = StudyReturnAllOfStudysetsInner.construct() + error_messages = [] + match = 0 + # validate data type: StudyReturnAllOfStudysetsInnerOneOf + if not isinstance(v, StudyReturnAllOfStudysetsInnerOneOf): + error_messages.append(f"Error! Input type `{type(v)}` is not `StudyReturnAllOfStudysetsInnerOneOf`") + else: + match += 1 + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in StudyReturnAllOfStudysetsInner with oneOf schemas: StudyReturnAllOfStudysetsInnerOneOf, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in StudyReturnAllOfStudysetsInner with oneOf schemas: StudyReturnAllOfStudysetsInnerOneOf, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: dict) -> StudyReturnAllOfStudysetsInner: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> StudyReturnAllOfStudysetsInner: + """Returns the object represented by the json string""" + instance = StudyReturnAllOfStudysetsInner.construct() + error_messages = [] + match = 0 + + # deserialize data into StudyReturnAllOfStudysetsInnerOneOf + try: + instance.actual_instance = StudyReturnAllOfStudysetsInnerOneOf.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into StudyReturnAllOfStudysetsInner with oneOf schemas: StudyReturnAllOfStudysetsInnerOneOf, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into StudyReturnAllOfStudysetsInner with oneOf schemas: StudyReturnAllOfStudysetsInnerOneOf, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + to_json = getattr(self.actual_instance, "to_json", None) + if callable(to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + to_dict = getattr(self.actual_instance, "to_dict", None) + if callable(to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.dict()) + diff --git a/neurostore_sdk/models/study_return_all_of_studysets_inner_one_of.py b/neurostore_sdk/models/study_return_all_of_studysets_inner_one_of.py new file mode 100644 index 0000000..91e8499 --- /dev/null +++ b/neurostore_sdk/models/study_return_all_of_studysets_inner_one_of.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import Optional +from pydantic import BaseModel, StrictStr + +class StudyReturnAllOfStudysetsInnerOneOf(BaseModel): + """ + StudyReturnAllOfStudysetsInnerOneOf + """ + name: Optional[StrictStr] = None + id: Optional[StrictStr] = None + description: Optional[StrictStr] = None + __properties = ["name", "id", "description"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StudyReturnAllOfStudysetsInnerOneOf: + """Create an instance of StudyReturnAllOfStudysetsInnerOneOf from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + # set to None if name (nullable) is None + # and __fields_set__ contains the field + if self.name is None and "name" in self.__fields_set__: + _dict['name'] = None + + # set to None if description (nullable) is None + # and __fields_set__ contains the field + if self.description is None and "description" in self.__fields_set__: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StudyReturnAllOfStudysetsInnerOneOf: + """Create an instance of StudyReturnAllOfStudysetsInnerOneOf from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StudyReturnAllOfStudysetsInnerOneOf.parse_obj(obj) + + _obj = StudyReturnAllOfStudysetsInnerOneOf.parse_obj({ + "name": obj.get("name"), + "id": obj.get("id"), + "description": obj.get("description") + }) + return _obj + diff --git a/test/test_base_studies_post200_response.py b/test/test_base_studies_post200_response.py new file mode 100644 index 0000000..8a62f21 --- /dev/null +++ b/test/test_base_studies_post200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +import unittest +import datetime + +import neurostore_sdk +from neurostore_sdk.models.base_studies_post200_response import BaseStudiesPost200Response # noqa: E501 +from neurostore_sdk.rest import ApiException + +class TestBaseStudiesPost200Response(unittest.TestCase): + """BaseStudiesPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BaseStudiesPost200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseStudiesPost200Response` + """ + model = neurostore_sdk.models.base_studies_post200_response.BaseStudiesPost200Response() # noqa: E501 + if include_optional : + return BaseStudiesPost200Response( + metadata = neurostore_sdk.models.metadata.metadata(), + versions = None, + name = '', + description = '', + publication = '', + doi = '', + pmid = '', + authors = '', + year = 56, + level = '', + created_at = '2021-01-16T20:50:38.009318Z', + updated_at = '', + id = '38jobTomPDqt', + public = True, + user = '', + username = '' + ) + else : + return BaseStudiesPost200Response( + ) + """ + + def testBaseStudiesPost200Response(self): + """Test BaseStudiesPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_studies_post_request.py b/test/test_base_studies_post_request.py new file mode 100644 index 0000000..203aec7 --- /dev/null +++ b/test/test_base_studies_post_request.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +import unittest +import datetime + +import neurostore_sdk +from neurostore_sdk.models.base_studies_post_request import BaseStudiesPostRequest # noqa: E501 +from neurostore_sdk.rest import ApiException + +class TestBaseStudiesPostRequest(unittest.TestCase): + """BaseStudiesPostRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BaseStudiesPostRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseStudiesPostRequest` + """ + model = neurostore_sdk.models.base_studies_post_request.BaseStudiesPostRequest() # noqa: E501 + if include_optional : + return BaseStudiesPostRequest( + metadata = neurostore_sdk.models.metadata.metadata(), + versions = None, + name = '', + description = '', + publication = '', + doi = '', + pmid = '', + authors = '', + year = 56, + level = '' + ) + else : + return BaseStudiesPostRequest( + ) + """ + + def testBaseStudiesPostRequest(self): + """Test BaseStudiesPostRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_study_return_all_of_studysets_inner.py b/test/test_study_return_all_of_studysets_inner.py new file mode 100644 index 0000000..b3397cb --- /dev/null +++ b/test/test_study_return_all_of_studysets_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +import unittest +import datetime + +import neurostore_sdk +from neurostore_sdk.models.study_return_all_of_studysets_inner import StudyReturnAllOfStudysetsInner # noqa: E501 +from neurostore_sdk.rest import ApiException + +class TestStudyReturnAllOfStudysetsInner(unittest.TestCase): + """StudyReturnAllOfStudysetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StudyReturnAllOfStudysetsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StudyReturnAllOfStudysetsInner` + """ + model = neurostore_sdk.models.study_return_all_of_studysets_inner.StudyReturnAllOfStudysetsInner() # noqa: E501 + if include_optional : + return StudyReturnAllOfStudysetsInner( + name = '', + id = '', + description = '' + ) + else : + return StudyReturnAllOfStudysetsInner( + ) + """ + + def testStudyReturnAllOfStudysetsInner(self): + """Test StudyReturnAllOfStudysetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_study_return_all_of_studysets_inner_one_of.py b/test/test_study_return_all_of_studysets_inner_one_of.py new file mode 100644 index 0000000..638851a --- /dev/null +++ b/test/test_study_return_all_of_studysets_inner_one_of.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + neurostore api + + Create studysets for meta-analysis # noqa: E501 + + The version of the OpenAPI document: 1.0 + Contact: jamesdkent21@gmail.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +import unittest +import datetime + +import neurostore_sdk +from neurostore_sdk.models.study_return_all_of_studysets_inner_one_of import StudyReturnAllOfStudysetsInnerOneOf # noqa: E501 +from neurostore_sdk.rest import ApiException + +class TestStudyReturnAllOfStudysetsInnerOneOf(unittest.TestCase): + """StudyReturnAllOfStudysetsInnerOneOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test StudyReturnAllOfStudysetsInnerOneOf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StudyReturnAllOfStudysetsInnerOneOf` + """ + model = neurostore_sdk.models.study_return_all_of_studysets_inner_one_of.StudyReturnAllOfStudysetsInnerOneOf() # noqa: E501 + if include_optional : + return StudyReturnAllOfStudysetsInnerOneOf( + name = '', + id = '', + description = '' + ) + else : + return StudyReturnAllOfStudysetsInnerOneOf( + ) + """ + + def testStudyReturnAllOfStudysetsInnerOneOf(self): + """Test StudyReturnAllOfStudysetsInnerOneOf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()