-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4ccde1b596b4e2ab78376e19f99a78daf5d46b71
- Loading branch information
1 parent
08bb1c8
commit b407f27
Showing
9 changed files
with
176 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# StudyRequestAllOf | ||
|
||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**pmcid** | **str** | | [optional] | ||
|
||
## Example | ||
|
||
```python | ||
from neurostore_sdk.models.study_request_all_of import StudyRequestAllOf | ||
|
||
# TODO update the JSON string below | ||
json = "{}" | ||
# create an instance of StudyRequestAllOf from a JSON string | ||
study_request_all_of_instance = StudyRequestAllOf.from_json(json) | ||
# print the JSON string representation of the object | ||
print StudyRequestAllOf.to_json() | ||
|
||
# convert the object into a dict | ||
study_request_all_of_dict = study_request_all_of_instance.to_dict() | ||
# create an instance of StudyRequestAllOf from a dict | ||
study_request_all_of_form_dict = study_request_all_of.from_dict(study_request_all_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) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
neurostore api | ||
Create studysets for meta-analysis # noqa: E501 | ||
The version of the OpenAPI document: 1.0 | ||
Contact: [email protected] | ||
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 StudyRequestAllOf(BaseModel): | ||
""" | ||
StudyRequestAllOf | ||
""" | ||
pmcid: Optional[StrictStr] = None | ||
__properties = ["pmcid"] | ||
|
||
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) -> StudyRequestAllOf: | ||
"""Create an instance of StudyRequestAllOf 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 pmcid (nullable) is None | ||
# and __fields_set__ contains the field | ||
if self.pmcid is None and "pmcid" in self.__fields_set__: | ||
_dict['pmcid'] = None | ||
|
||
return _dict | ||
|
||
@classmethod | ||
def from_dict(cls, obj: dict) -> StudyRequestAllOf: | ||
"""Create an instance of StudyRequestAllOf from a dict""" | ||
if obj is None: | ||
return None | ||
|
||
if not isinstance(obj, dict): | ||
return StudyRequestAllOf.parse_obj(obj) | ||
|
||
_obj = StudyRequestAllOf.parse_obj({ | ||
"pmcid": obj.get("pmcid") | ||
}) | ||
return _obj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
neurostore api | ||
Create studysets for meta-analysis # noqa: E501 | ||
The version of the OpenAPI document: 1.0 | ||
Contact: [email protected] | ||
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_request_all_of import StudyRequestAllOf # noqa: E501 | ||
from neurostore_sdk.rest import ApiException | ||
|
||
class TestStudyRequestAllOf(unittest.TestCase): | ||
"""StudyRequestAllOf unit test stubs""" | ||
|
||
def setUp(self): | ||
pass | ||
|
||
def tearDown(self): | ||
pass | ||
|
||
def make_instance(self, include_optional): | ||
"""Test StudyRequestAllOf | ||
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 `StudyRequestAllOf` | ||
""" | ||
model = neurostore_sdk.models.study_request_all_of.StudyRequestAllOf() # noqa: E501 | ||
if include_optional : | ||
return StudyRequestAllOf( | ||
pmcid = '' | ||
) | ||
else : | ||
return StudyRequestAllOf( | ||
) | ||
""" | ||
|
||
def testStudyRequestAllOf(self): | ||
"""Test StudyRequestAllOf""" | ||
# inst_req_only = self.make_instance(include_optional=False) | ||
# inst_req_and_optional = self.make_instance(include_optional=True) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |