1818import re # noqa: F401
1919import json
2020
21- from pydantic import BaseModel , ConfigDict , Field , StrictBool , StrictInt , StrictStr
21+ from pydantic import BaseModel , ConfigDict , Field , StrictInt , StrictStr
2222from typing import Any , ClassVar , Dict , List , Optional
2323from typing_extensions import Annotated
2424from cosmotech_api .models .run_template_resource_sizing import RunTemplateResourceSizing
25- from cosmotech_api .models .run_template_step_source import RunTemplateStepSource
2625from typing import Optional , Set
2726from typing_extensions import Self
2827
@@ -34,24 +33,12 @@ class RunTemplate(BaseModel):
3433 name : Optional [Annotated [str , Field (min_length = 1 , strict = True , max_length = 50 )]] = Field (default = None , description = "The Run Template name" )
3534 labels : Optional [Dict [str , StrictStr ]] = Field (default = None , description = "a translated label with key as ISO 639-1 code" )
3635 description : Optional [StrictStr ] = Field (default = None , description = "The Run Template description" )
37- csm_simulation : Optional [StrictStr ] = Field (default = None , description = "The Cosmo Tech simulation name" , alias = "csmSimulation" )
3836 tags : Optional [List [StrictStr ]] = Field (default = None , description = "The list of Run Template tags" )
3937 compute_size : Optional [StrictStr ] = Field (default = None , description = "The compute size needed for this Run Template" , alias = "computeSize" )
4038 run_sizing : Optional [RunTemplateResourceSizing ] = Field (default = None , alias = "runSizing" )
41- no_data_ingestion_state : Optional [StrictBool ] = Field (default = None , description = "Set to true if the run template does not want to check data ingestion state" , alias = "noDataIngestionState" )
42- parameters_handler_source : Optional [RunTemplateStepSource ] = Field (default = None , alias = "parametersHandlerSource" )
43- dataset_validator_source : Optional [RunTemplateStepSource ] = Field (default = None , alias = "datasetValidatorSource" )
44- pre_run_source : Optional [RunTemplateStepSource ] = Field (default = None , alias = "preRunSource" )
45- run_source : Optional [RunTemplateStepSource ] = Field (default = None , alias = "runSource" )
46- post_run_source : Optional [RunTemplateStepSource ] = Field (default = None , alias = "postRunSource" )
47- scenariodata_transform_source : Optional [RunTemplateStepSource ] = Field (default = None , alias = "scenariodataTransformSource" )
4839 parameter_groups : Optional [List [StrictStr ]] = Field (default = None , description = "The ordered list of parameters groups for the Run Template" , alias = "parameterGroups" )
49- stack_steps : Optional [StrictBool ] = Field (default = None , description = "Whether or not to stack adjacent scenario run steps" , alias = "stackSteps" )
50- git_repository_url : Optional [StrictStr ] = Field (default = None , description = "An optional URL to the git repository" , alias = "gitRepositoryUrl" )
51- git_branch_name : Optional [StrictStr ] = Field (default = None , description = "An optional git branch name" , alias = "gitBranchName" )
52- run_template_source_dir : Optional [StrictStr ] = Field (default = None , description = "An optional directory where to find the run template source" , alias = "runTemplateSourceDir" )
5340 execution_timeout : Optional [StrictInt ] = Field (default = None , description = "An optional duration in seconds in which a workflow is allowed to run" , alias = "executionTimeout" )
54- __properties : ClassVar [List [str ]] = ["id" , "name" , "labels" , "description" , "csmSimulation" , " tags" , "computeSize" , "runSizing" , "noDataIngestionState" , "parametersHandlerSource" , "datasetValidatorSource" , "preRunSource" , "runSource" , "postRunSource" , "scenariodataTransformSource" , " parameterGroups" , "stackSteps" , "gitRepositoryUrl" , "gitBranchName" , "runTemplateSourceDir " , "executionTimeout" ]
41+ __properties : ClassVar [List [str ]] = ["id" , "name" , "labels" , "description" , "tags" , "computeSize" , "runSizing" , "parameterGroups" , "executionTimeout" ]
5542
5643 model_config = ConfigDict (
5744 populate_by_name = True ,
@@ -111,22 +98,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
11198 "name" : obj .get ("name" ),
11299 "labels" : obj .get ("labels" ),
113100 "description" : obj .get ("description" ),
114- "csmSimulation" : obj .get ("csmSimulation" ),
115101 "tags" : obj .get ("tags" ),
116102 "computeSize" : obj .get ("computeSize" ),
117103 "runSizing" : RunTemplateResourceSizing .from_dict (obj ["runSizing" ]) if obj .get ("runSizing" ) is not None else None ,
118- "noDataIngestionState" : obj .get ("noDataIngestionState" ),
119- "parametersHandlerSource" : obj .get ("parametersHandlerSource" ),
120- "datasetValidatorSource" : obj .get ("datasetValidatorSource" ),
121- "preRunSource" : obj .get ("preRunSource" ),
122- "runSource" : obj .get ("runSource" ),
123- "postRunSource" : obj .get ("postRunSource" ),
124- "scenariodataTransformSource" : obj .get ("scenariodataTransformSource" ),
125104 "parameterGroups" : obj .get ("parameterGroups" ),
126- "stackSteps" : obj .get ("stackSteps" ),
127- "gitRepositoryUrl" : obj .get ("gitRepositoryUrl" ),
128- "gitBranchName" : obj .get ("gitBranchName" ),
129- "runTemplateSourceDir" : obj .get ("runTemplateSourceDir" ),
130105 "executionTimeout" : obj .get ("executionTimeout" )
131106 })
132107 return _obj
0 commit comments