From 9cd168c421e39849a6e0c14aace082944a18aba2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 17 Feb 2024 02:56:49 +0000 Subject: [PATCH] 93cf38b069bc7be6d27d21e8e58940d1c47d1ec1 --- docs/AnalysisCommon.md | 1 + docs/AnalysisRequest.md | 1 + docs/AnalysisReturn.md | 1 + neurostore_sdk/models/analysis_common.py | 13 ++++++++++--- neurostore_sdk/models/analysis_request.py | 11 +++++++++-- neurostore_sdk/models/analysis_return.py | 11 +++++++++-- 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/docs/AnalysisCommon.md b/docs/AnalysisCommon.md index 90f412a..398d9ff 100644 --- a/docs/AnalysisCommon.md +++ b/docs/AnalysisCommon.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **study** | **str** | | [optional] **entities** | [**List[Entity]**](Entity.md) | | [optional] +**analysis** | **int** | | [optional] ## Example diff --git a/docs/AnalysisRequest.md b/docs/AnalysisRequest.md index 260d532..b8f651f 100644 --- a/docs/AnalysisRequest.md +++ b/docs/AnalysisRequest.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **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] **entities** | [**List[Entity]**](Entity.md) | | [optional] +**analysis** | **int** | | [optional] ## Example diff --git a/docs/AnalysisReturn.md b/docs/AnalysisReturn.md index 054f1dc..0434917 100644 --- a/docs/AnalysisReturn.md +++ b/docs/AnalysisReturn.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **points** | [**AnalysisReturnRelationshipsPoints**](AnalysisReturnRelationshipsPoints.md) | | [optional] **conditions** | [**AnalysisReturnRelationshipsConditions**](AnalysisReturnRelationshipsConditions.md) | | [optional] **entities** | [**List[Entity]**](Entity.md) | | [optional] +**analysis** | **int** | | [optional] ## Example diff --git a/neurostore_sdk/models/analysis_common.py b/neurostore_sdk/models/analysis_common.py index e0ce1a4..06fa72a 100644 --- a/neurostore_sdk/models/analysis_common.py +++ b/neurostore_sdk/models/analysis_common.py @@ -20,7 +20,7 @@ from typing import List, Optional -from pydantic import BaseModel, StrictStr, conlist +from pydantic import BaseModel, StrictInt, StrictStr, conlist from neurostore_sdk.models.entity import Entity class AnalysisCommon(BaseModel): @@ -29,7 +29,8 @@ class AnalysisCommon(BaseModel): """ study: Optional[StrictStr] = None entities: Optional[conlist(Entity)] = None - __properties = ["study", "entities"] + analysis: Optional[StrictInt] = None + __properties = ["study", "entities", "analysis"] class Config: """Pydantic configuration""" @@ -62,6 +63,11 @@ def to_dict(self): if _item: _items.append(_item.to_dict()) _dict['entities'] = _items + # set to None if analysis (nullable) is None + # and __fields_set__ contains the field + if self.analysis is None and "analysis" in self.__fields_set__: + _dict['analysis'] = None + return _dict @classmethod @@ -75,7 +81,8 @@ def from_dict(cls, obj: dict) -> AnalysisCommon: _obj = AnalysisCommon.parse_obj({ "study": obj.get("study"), - "entities": [Entity.from_dict(_item) for _item in obj.get("entities")] if obj.get("entities") is not None else None + "entities": [Entity.from_dict(_item) for _item in obj.get("entities")] if obj.get("entities") is not None else None, + "analysis": obj.get("analysis") }) return _obj diff --git a/neurostore_sdk/models/analysis_request.py b/neurostore_sdk/models/analysis_request.py index 96fd9bf..d9607fc 100644 --- a/neurostore_sdk/models/analysis_request.py +++ b/neurostore_sdk/models/analysis_request.py @@ -40,7 +40,8 @@ class AnalysisRequest(BaseModel): id: Optional[constr(strict=True, max_length=12, min_length=12)] = Field(None, description="short UUID specifying the location of this resource") public: Optional[StrictBool] = Field(True, description="whether the resource is listed in public searches or not") entities: Optional[conlist(Entity)] = None - __properties = ["name", "description", "weights", "study", "images", "points", "conditions", "id", "public", "entities"] + analysis: Optional[StrictInt] = None + __properties = ["name", "description", "weights", "study", "images", "points", "conditions", "id", "public", "entities", "analysis"] class Config: """Pydantic configuration""" @@ -92,6 +93,11 @@ def to_dict(self): if self.description is None and "description" in self.__fields_set__: _dict['description'] = None + # set to None if analysis (nullable) is None + # and __fields_set__ contains the field + if self.analysis is None and "analysis" in self.__fields_set__: + _dict['analysis'] = None + return _dict @classmethod @@ -113,7 +119,8 @@ def from_dict(cls, obj: dict) -> AnalysisRequest: "conditions": AnalysisRequestRelationshipsConditions.from_dict(obj.get("conditions")) if obj.get("conditions") is not None else None, "id": obj.get("id"), "public": obj.get("public") if obj.get("public") is not None else True, - "entities": [Entity.from_dict(_item) for _item in obj.get("entities")] if obj.get("entities") is not None else None + "entities": [Entity.from_dict(_item) for _item in obj.get("entities")] if obj.get("entities") is not None else None, + "analysis": obj.get("analysis") }) return _obj diff --git a/neurostore_sdk/models/analysis_return.py b/neurostore_sdk/models/analysis_return.py index 49be015..b601959 100644 --- a/neurostore_sdk/models/analysis_return.py +++ b/neurostore_sdk/models/analysis_return.py @@ -44,7 +44,8 @@ class AnalysisReturn(BaseModel): points: Optional[AnalysisReturnRelationshipsPoints] = None conditions: Optional[AnalysisReturnRelationshipsConditions] = None entities: Optional[conlist(Entity)] = None - __properties = ["name", "description", "weights", "created_at", "updated_at", "id", "public", "user", "username", "study", "images", "points", "conditions", "entities"] + analysis: Optional[StrictInt] = None + __properties = ["name", "description", "weights", "created_at", "updated_at", "id", "public", "user", "username", "study", "images", "points", "conditions", "entities", "analysis"] class Config: """Pydantic configuration""" @@ -114,6 +115,11 @@ def to_dict(self): if self.username is None and "username" in self.__fields_set__: _dict['username'] = None + # set to None if analysis (nullable) is None + # and __fields_set__ contains the field + if self.analysis is None and "analysis" in self.__fields_set__: + _dict['analysis'] = None + return _dict @classmethod @@ -139,7 +145,8 @@ def from_dict(cls, obj: dict) -> AnalysisReturn: "images": AnalysisReturnRelationshipsImages.from_dict(obj.get("images")) if obj.get("images") is not None else None, "points": AnalysisReturnRelationshipsPoints.from_dict(obj.get("points")) if obj.get("points") is not None else None, "conditions": AnalysisReturnRelationshipsConditions.from_dict(obj.get("conditions")) if obj.get("conditions") is not None else None, - "entities": [Entity.from_dict(_item) for _item in obj.get("entities")] if obj.get("entities") is not None else None + "entities": [Entity.from_dict(_item) for _item in obj.get("entities")] if obj.get("entities") is not None else None, + "analysis": obj.get("analysis") }) return _obj