1919import json
2020
2121from datetime import datetime
22- from pydantic import BaseModel , ConfigDict , Field , StrictBool , StrictStr
22+ from pydantic import BaseModel , ConfigDict , Field , StrictBool , StrictStr , field_validator
2323from typing import Any , ClassVar , Dict , List , Optional
2424from neurosynth_compose_sdk .models .neurostore_study import NeurostoreStudy
2525from neurosynth_compose_sdk .models .project_meta_analyses import ProjectMetaAnalyses
@@ -39,13 +39,24 @@ class ProjectReturn(BaseModel):
3939 meta_analyses : Optional [ProjectMetaAnalyses ] = None
4040 name : Optional [StrictStr ] = None
4141 description : Optional [StrictStr ] = None
42+ type : Optional [StrictStr ] = None
4243 neurostore_studyset_id : Optional [StrictStr ] = Field (default = None , description = "ID of the project’s linked Neurostore studyset reference." )
4344 neurostore_annotation_id : Optional [StrictStr ] = Field (default = None , description = "ID of the project’s linked Neurostore annotation reference." )
4445 public : Optional [StrictBool ] = Field (default = None , description = "whether the project is public or private" )
4546 neurostore_study : Optional [NeurostoreStudy ] = None
4647 neurostore_url : Optional [StrictStr ] = None
4748 draft : Optional [StrictBool ] = None
48- __properties : ClassVar [List [str ]] = ["id" , "updated_at" , "created_at" , "user" , "username" , "provenance" , "meta_analyses" , "name" , "description" , "neurostore_studyset_id" , "neurostore_annotation_id" , "public" , "neurostore_study" , "neurostore_url" , "draft" ]
49+ __properties : ClassVar [List [str ]] = ["id" , "updated_at" , "created_at" , "user" , "username" , "provenance" , "meta_analyses" , "name" , "description" , "type" , "neurostore_studyset_id" , "neurostore_annotation_id" , "public" , "neurostore_study" , "neurostore_url" , "draft" ]
50+
51+ @field_validator ('type' )
52+ def type_validate_enum (cls , value ):
53+ """Validates the enum"""
54+ if value is None :
55+ return value
56+
57+ if value not in set (['CBMA' , 'IBMA' ]):
58+ raise ValueError ("must be one of enum values ('CBMA', 'IBMA')" )
59+ return value
4960
5061 model_config = ConfigDict (
5162 populate_by_name = True ,
@@ -161,6 +172,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
161172 "meta_analyses" : ProjectMetaAnalyses .from_dict (obj ["meta_analyses" ]) if obj .get ("meta_analyses" ) is not None else None ,
162173 "name" : obj .get ("name" ),
163174 "description" : obj .get ("description" ),
175+ "type" : obj .get ("type" ),
164176 "neurostore_studyset_id" : obj .get ("neurostore_studyset_id" ),
165177 "neurostore_annotation_id" : obj .get ("neurostore_annotation_id" ),
166178 "public" : obj .get ("public" ),
0 commit comments