4
4
5
5
from __future__ import annotations
6
6
7
- from typing import ClassVar , List , Optional , overload
7
+ from typing import ClassVar , List , Optional , Set , overload
8
8
9
9
from pydantic .v1 import Field , validator
10
10
11
- from pyatlan .model .enums import AIApplicationDevelopmentStage , CertificateStatus
11
+ from pyatlan .model .enums import (
12
+ AIApplicationDevelopmentStage ,
13
+ AtlanConnectorType ,
14
+ CertificateStatus ,
15
+ )
12
16
from pyatlan .model .fields .atlan_fields import KeywordField , RelationField
13
- from pyatlan .utils import init_guid , validate_required_fields , to_camel_case
17
+ from pyatlan .utils import init_guid , to_camel_case , validate_required_fields
14
18
15
19
from .a_i import AI
16
20
@@ -36,9 +40,9 @@ def creator(
36
40
name : str ,
37
41
ai_application_version : str ,
38
42
ai_application_development_stage : AIApplicationDevelopmentStage ,
39
- owner_groups : set [str ],
40
- owner_users : set [str ],
41
- models : list [AIModel ],
43
+ owner_groups : Set [str ],
44
+ owner_users : Set [str ],
45
+ models : List [AIModel ],
42
46
) -> AIApplication : ...
43
47
44
48
@classmethod
@@ -49,9 +53,9 @@ def creator(
49
53
name : str ,
50
54
ai_application_version : str ,
51
55
ai_application_development_stage : AIApplicationDevelopmentStage ,
52
- owner_groups : Optional [set [str ]] = set (),
53
- owner_users : Optional [set [str ]] = set (),
54
- models : Optional [list [AIModel ]] = [],
56
+ owner_groups : Optional [Set [str ]] = set (),
57
+ owner_users : Optional [Set [str ]] = set (),
58
+ models : Optional [List [AIModel ]] = [],
55
59
) -> AIApplication :
56
60
validate_required_fields (
57
61
["name" , "ai_application_version" , "ai_application_development_stage" ],
@@ -163,9 +167,9 @@ def creator(
163
167
name : str ,
164
168
ai_application_version : str ,
165
169
ai_application_development_stage : AIApplicationDevelopmentStage ,
166
- owner_groups : Optional [set [str ]] = set (),
167
- owner_users : Optional [set [str ]] = set (),
168
- models : Optional [list [AIModel ]] = [],
170
+ owner_groups : Optional [Set [str ]] = set (),
171
+ owner_users : Optional [Set [str ]] = set (),
172
+ models : Optional [List [AIModel ]] = [],
169
173
) -> AIApplication .Attributes :
170
174
validate_required_fields (
171
175
["name" , "ai_application_version" , "ai_application_development_stage" ],
@@ -175,7 +179,7 @@ def creator(
175
179
return AIApplication .Attributes (
176
180
name = name ,
177
181
qualified_name = f"default/ai/aiapplication/{ name_camel_case } " ,
178
- connector_name = "ai" ,
182
+ connector_name = AtlanConnectorType . AI . value ,
179
183
ai_application_version = ai_application_version ,
180
184
ai_application_development_stage = ai_application_development_stage ,
181
185
owner_groups = owner_groups ,
0 commit comments