1+ import warnings
12from typing import Optional , List
23from uuid import UUID
34
5+ from deprecation import deprecated
6+
47from citrine ._rest .engine_resource import ModuleEngineResource
58from citrine ._serialization import properties
69from citrine ._serialization .serializable import Serializable
@@ -25,26 +28,46 @@ class TemplateLink(Serializable["TemplateLink"]):
2528 Citrine ID referencing an on-platform material template.
2629 process_template: UUID
2730 Citrine ID referencing an on-platform process template.
28- template_name: Optional[str]
29- Optional name describing the combination of templates for display purposes.
30- The Citrine Platform by default uses the name of the material template.
31+ material_template_name: Optional[str]
32+ Optional name of the material template.
33+ process_template_name: Optional[str]
34+ Optional name of the process template.
3135
3236 """
3337
3438 material_template = properties .UUID ("material_template" )
3539 process_template = properties .UUID ("process_template" )
36- template_name = properties .Optional (properties .String , "name" )
40+ material_template_name = properties .Optional (properties .String , "material_template_name" )
41+ process_template_name = properties .Optional (properties .String , "process_template_name" )
3742
3843 def __init__ (
3944 self ,
4045 * ,
4146 material_template : UUID ,
4247 process_template : UUID ,
48+ material_template_name : Optional [str ] = None ,
49+ process_template_name : Optional [str ] = None ,
4350 template_name : Optional [str ] = None
4451 ):
4552 self .material_template : UUID = material_template
4653 self .process_template : UUID = process_template
47- self .template_name : Optional [str ] = template_name
54+ self .material_template_name : Optional [str ] = material_template_name
55+ self .process_template_name : Optional [str ] = process_template_name
56+
57+ if template_name is not None :
58+ warnings .warn (
59+ "The field 'template_name' has been deprecated in v2.36.0 and will be removed "
60+ "in v3.0.0. Please use the field 'material_template_name' instead." ,
61+ DeprecationWarning
62+ )
63+
64+ @property
65+ @deprecated (
66+ deprecated_in = "2.36.0" , removed_in = "3.0.0" , details = "Use material_template_name instead."
67+ )
68+ def template_name (self ) -> str :
69+ """Return the name of the material template."""
70+ return self .material_template_name
4871
4972
5073class MaterialNodeDefinition (Serializable ["MaterialNodeDefinition" ]):
0 commit comments