Skip to content

Commit

Permalink
93cf38b069bc7be6d27d21e8e58940d1c47d1ec1
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 17, 2024
1 parent 4f60411 commit 9cd168c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/AnalysisCommon.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**study** | **str** | | [optional]
**entities** | [**List[Entity]**](Entity.md) | | [optional]
**analysis** | **int** | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/AnalysisRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/AnalysisReturn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 10 additions & 3 deletions neurostore_sdk/models/analysis_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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"""
Expand Down Expand Up @@ -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
Expand All @@ -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

11 changes: 9 additions & 2 deletions neurostore_sdk/models/analysis_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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
Expand All @@ -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

11 changes: 9 additions & 2 deletions neurostore_sdk/models/analysis_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 9cd168c

Please sign in to comment.