1
1
from typing import Any , Dict , List , Literal , Optional
2
2
3
- from pydantic import BaseModel
3
+ from pydantic import BaseModel , Field
4
4
5
5
6
6
class IoTCoreRegistryEventsBase (BaseModel ):
@@ -14,88 +14,77 @@ class IoTCoreRegistryEventsBase(BaseModel):
14
14
15
15
16
16
class IoTCoreThingEvent (IoTCoreRegistryEventsBase ):
17
- """The " Thing: created, updated, deleted" event"""
17
+ """The ' Thing: created, updated, deleted' event"""
18
18
19
19
operation : EVENT_CRUD_OPERATION
20
-
21
- thingId : str
22
- accountId : str
23
- thingName : str
24
- versionNumber : int
25
- thingTypeName : Optional [str ]
20
+ thing_id : str = Field (..., alias = "thingId" )
21
+ account_id : str = Field (..., alias = "accountId" )
22
+ thing_name : str = Field (..., alias = "thingName" )
23
+ version_number : int = Field (..., alias = "versionNumber" )
24
+ thing_type_name : Optional [str ] = Field (None , alias = "thingTypeName" )
26
25
attributes : Dict [str , Any ]
27
26
28
27
29
28
class IoTCoreThingTypeEvent (IoTCoreRegistryEventsBase ):
30
29
operation : EVENT_CRUD_OPERATION
31
- accountId : str
32
- thingTypeId : str
33
- thingTypeName : str
34
- isDeprecated : bool
35
- deprecationDate : Optional [str ]
36
- searchableAttributes : List [str ]
37
- propagatingAttributes : List [Dict [str , str ]]
30
+ account_id : str = Field (..., alias = "accountId" )
31
+ thing_type_id : str = Field (..., alias = "thingTypeId" )
32
+ thing_type_name : str = Field (..., alias = "thingTypeName" )
33
+ is_deprecated : bool = Field (..., alias = "isDeprecated" )
34
+ deprecation_date : Optional [str ] = Field ( None , alias = "deprecationDate" )
35
+ searchable_attributes : List [str ] = Field (..., alias = "searchableAttributes" )
36
+ propagating_attributes : List [Dict [str , str ]] = Field (..., alias = "propagatingAttributes" )
38
37
description : str
39
38
40
39
41
40
class IoTCoreThingTypeAssociationEvent (IoTCoreRegistryEventsBase ):
42
- """
43
- Thing Type Associated or Disassociated with a Thing
44
- """
41
+ """Thing Type Associated or Disassociated with a Thing"""
45
42
46
43
operation : EVENT_ADD_REMOVE_OPERATION
47
- thingId : str
48
- thingName : str
49
- thingTypeName : str
44
+ thing_id : str = Field (..., alias = "thingId" )
45
+ thing_name : str = Field (..., alias = "thingName" )
46
+ thing_type_name : str = Field (..., alias = "thingTypeName" )
50
47
51
48
52
49
class RootToParentThingGroup (BaseModel ):
53
- groupArn : str
54
- groupId : str
50
+ group_arn : str = Field (..., alias = "groupArn" )
51
+ group_id : str = Field (..., alias = "groupId" )
55
52
56
53
57
54
class IoTCoreThingGroupEvent (IoTCoreRegistryEventsBase ):
58
- """
59
- Thing Group Created/Updated/Deleted
60
- """
55
+ """Thing Group Created/Updated/Deleted"""
61
56
62
57
operation : EVENT_CRUD_OPERATION
63
- accountId : str
64
- thingGroupId : str
65
- thingGroupName : str
66
- versionNumber : int
67
- parentGroupName : Optional [str ]
68
- parentGroupId : Optional [str ]
58
+ account_id : str = Field (..., alias = "accountId" )
59
+ thing_group_id : str = Field (..., alias = "thingGroupId" )
60
+ thing_group_name : str = Field (..., alias = "thingGroupName" )
61
+ version_number : int = Field (..., alias = "versionNumber" )
62
+ parent_group_name : Optional [str ] = Field ( None , alias = "parentGroupName" )
63
+ parent_group_id : Optional [str ] = Field ( None , alias = "parentGroupId" )
69
64
description : str
70
- rootToParentThingGroups : List [RootToParentThingGroup ]
71
-
65
+ root_to_parent_thing_groups : List [RootToParentThingGroup ] = Field (..., alias = "rootToParentThingGroups" )
72
66
attributes : Dict [str , Any ]
73
-
74
- dynamicGroupMappingId : Optional [str ]
67
+ dynamic_group_mapping_id : Optional [str ] = Field (None , alias = "dynamicGroupMappingId" )
75
68
76
69
77
70
class IoTCoreAddOrRemoveFromThingGroupEvent (IoTCoreRegistryEventsBase ):
78
- """
79
- Thing Added to or Removed from a Thing Group
80
- """
71
+ """Thing Added to or Removed from a Thing Group"""
81
72
82
73
operation : EVENT_ADD_REMOVE_OPERATION
83
- accountId : str
84
- groupArn : str
85
- groupId : str
86
- thingArn : str
87
- thingId : str
88
- membershipId : str
74
+ account_id : str = Field (..., alias = "accountId" )
75
+ group_arn : str = Field (..., alias = "groupArn" )
76
+ group_id : str = Field (..., alias = "groupId" )
77
+ thing_arn : str = Field (..., alias = "thingArn" )
78
+ thing_id : str = Field (..., alias = "thingId" )
79
+ membership_id : str = Field (..., alias = "membershipId" )
89
80
90
81
91
82
class IoTCoreAddOrDeleteFromThingGroupEvent (IoTCoreRegistryEventsBase ):
92
- """
93
- Thing Group Added to or Deleted from a Thing Group
94
- """
83
+ """Thing Group Added to or Deleted from a Thing Group"""
95
84
96
85
operation : EVENT_ADD_REMOVE_OPERATION
97
- accountId : str
98
- thingGroupId : str
99
- thingGroupName : str
100
- childGroupId : str
101
- childGroupName : str
86
+ account_id : str = Field (..., alias = "accountId" )
87
+ thing_group_id : str = Field (..., alias = "thingGroupId" )
88
+ thing_group_name : str = Field (..., alias = "thingGroupName" )
89
+ child_group_id : str = Field (..., alias = "childGroupId" )
90
+ child_group_name : str = Field (..., alias = "childGroupName" )
0 commit comments