@@ -29,7 +29,8 @@ class DynamoDBStreamChangedRecordModel(BaseModel):
2929 SequenceNumber : str = Field (description = "A unique identifier for the stream record." , examples = ["222" ])
3030 SizeBytes : int = Field (description = "The size of the stream record, in bytes." , examples = [26 ])
3131 StreamViewType : Literal ["NEW_AND_OLD_IMAGES" , "KEYS_ONLY" , "NEW_IMAGE" , "OLD_IMAGE" ] = Field (
32- description = "The type of data included in the stream record." , examples = ["NEW_AND_OLD_IMAGES" ]
32+ description = "The type of data included in the stream record." ,
33+ examples = ["NEW_AND_OLD_IMAGES" ],
3334 )
3435
3536 @field_validator ("Keys" , "NewImage" , "OldImage" , mode = "before" )
@@ -39,7 +40,6 @@ def deserialize_field(cls, value):
3940
4041class UserIdentity (BaseModel ):
4142 type : Literal ["Service" ] = Field (
42- default = "Service" ,
4343 description = "The type of identity that made the request, which is always 'Service' for DynamoDB streams." ,
4444 examples = ["Service" ],
4545 )
@@ -52,11 +52,11 @@ class UserIdentity(BaseModel):
5252class DynamoDBStreamRecordModel (BaseModel ):
5353 eventID : str = Field (description = "A unique identifier for the event." , examples = ["1" ])
5454 eventName : Literal ["INSERT" , "MODIFY" , "REMOVE" ] = Field (
55- description = "The type of operation that was performed on the item." , examples = ["INSERT" ]
55+ description = "The type of operation that was performed on the item." ,
56+ examples = ["INSERT" ],
5657 )
57- eventVersion : float = Field (default = "1.0" , description = "The version of the stream record format." , examples = ["1.0" ])
58+ eventVersion : float = Field (description = "The version of the stream record format." , examples = ["1.0" ])
5859 eventSource : Literal ["aws:dynamodb" ] = Field (
59- default = "aws:dynamodb" ,
6060 description = "The source of the event, which is always 'aws:dynamodb' for DynamoDB streams." ,
6161 examples = ["aws:dynamodb" ],
6262 )
@@ -76,7 +76,7 @@ class DynamoDBStreamRecordModel(BaseModel):
7676 "SequenceNumber" : "222" ,
7777 "SizeBytes" : 26 ,
7878 "StreamViewType" : "NEW_AND_OLD_IMAGES" ,
79- }
79+ },
8080 ],
8181 )
8282 userIdentity : Optional [UserIdentity ] = Field (
@@ -96,7 +96,7 @@ class DynamoDBStreamModel(BaseModel):
9696 "eventVersion" : "1.0" ,
9797 "eventSource" : "aws:dynamodb" ,
9898 "awsRegion" : "us-west-2" ,
99- "eventSourceARN" : "arn:aws:dynamodb:us-west-2:123456789012:table/ExampleTable/stream/2021-01-01T00:00:00.000" ,
99+ "eventSourceARN" : "arn:aws:dynamodb:us-west-2:123456789012:table/ExampleTable/stream/2021-01-01T00:00:00.000" , # noqa E501
100100 "dynamodb" : {
101101 "ApproximateCreationDateTime" : 1693997155.0 ,
102102 "Keys" : {"Id" : {"N" : "101" }},
@@ -107,6 +107,6 @@ class DynamoDBStreamModel(BaseModel):
107107 "StreamViewType" : "NEW_AND_OLD_IMAGES" ,
108108 },
109109 "userIdentity" : {"type" : "Service" , "principalId" : "dynamodb.amazonaws.com" },
110- }
110+ },
111111 ],
112112 )
0 commit comments