From 0bdf40a35b01ca09cca2e28b0674c28e09b40f06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 08:11:24 +0000 Subject: [PATCH] ce4a2897012a8a9abff21dcdbd190f15cd68a97b --- docs/StudyReturn.md | 1 + docs/StudyReturnAllOf.md | 1 + neurostore_sdk/models/study_return.py | 11 +++++++++-- neurostore_sdk/models/study_return_all_of.py | 13 ++++++++++--- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/StudyReturn.md b/docs/StudyReturn.md index 4612cfb..fb78e5f 100644 --- a/docs/StudyReturn.md +++ b/docs/StudyReturn.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **studysets** | [**List[StudyReturnAllOfStudysetsInner]**](StudyReturnAllOfStudysetsInner.md) | | [optional] **has_coordinates** | **bool** | | [optional] **has_images** | **bool** | | [optional] +**base_study** | **str** | | [optional] ## Example diff --git a/docs/StudyReturnAllOf.md b/docs/StudyReturnAllOf.md index 37c1f68..7335027 100644 --- a/docs/StudyReturnAllOf.md +++ b/docs/StudyReturnAllOf.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **studysets** | [**List[StudyReturnAllOfStudysetsInner]**](StudyReturnAllOfStudysetsInner.md) | | [optional] **has_coordinates** | **bool** | | [optional] **has_images** | **bool** | | [optional] +**base_study** | **str** | | [optional] ## Example diff --git a/neurostore_sdk/models/study_return.py b/neurostore_sdk/models/study_return.py index 56aadd6..5957186 100644 --- a/neurostore_sdk/models/study_return.py +++ b/neurostore_sdk/models/study_return.py @@ -49,7 +49,8 @@ class StudyReturn(BaseModel): 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"] + base_study: Optional[StrictStr] = 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", "base_study"] class Config: """Pydantic configuration""" @@ -159,6 +160,11 @@ def to_dict(self): if self.source_updated_at is None and "source_updated_at" in self.__fields_set__: _dict['source_updated_at'] = None + # set to None if base_study (nullable) is None + # and __fields_set__ contains the field + if self.base_study is None and "base_study" in self.__fields_set__: + _dict['base_study'] = None + return _dict @classmethod @@ -191,7 +197,8 @@ def from_dict(cls, obj: dict) -> StudyReturn: "analyses": StudyReturnRelationshipsAnalyses.from_dict(obj.get("analyses")) if obj.get("analyses") 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") + "has_images": obj.get("has_images"), + "base_study": obj.get("base_study") }) return _obj diff --git a/neurostore_sdk/models/study_return_all_of.py b/neurostore_sdk/models/study_return_all_of.py index 0057b5e..cdac52d 100644 --- a/neurostore_sdk/models/study_return_all_of.py +++ b/neurostore_sdk/models/study_return_all_of.py @@ -20,7 +20,7 @@ from typing import List, Optional -from pydantic import BaseModel, StrictBool, conlist +from pydantic import BaseModel, StrictBool, StrictStr, conlist from neurostore_sdk.models.study_return_all_of_studysets_inner import StudyReturnAllOfStudysetsInner class StudyReturnAllOf(BaseModel): @@ -30,7 +30,8 @@ class StudyReturnAllOf(BaseModel): studysets: Optional[conlist(StudyReturnAllOfStudysetsInner)] = None has_coordinates: Optional[StrictBool] = None has_images: Optional[StrictBool] = None - __properties = ["studysets", "has_coordinates", "has_images"] + base_study: Optional[StrictStr] = None + __properties = ["studysets", "has_coordinates", "has_images", "base_study"] class Config: """Pydantic configuration""" @@ -63,6 +64,11 @@ def to_dict(self): if _item: _items.append(_item.to_dict()) _dict['studysets'] = _items + # set to None if base_study (nullable) is None + # and __fields_set__ contains the field + if self.base_study is None and "base_study" in self.__fields_set__: + _dict['base_study'] = None + return _dict @classmethod @@ -77,7 +83,8 @@ def from_dict(cls, obj: dict) -> StudyReturnAllOf: _obj = StudyReturnAllOf.parse_obj({ "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") + "has_images": obj.get("has_images"), + "base_study": obj.get("base_study") }) return _obj