capo-keyspacesstreams 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- capo_keyspacesstreams/__init__.py +74 -0
- capo_keyspacesstreams/_async.py +25 -0
- capo_keyspacesstreams/_auth/_identity.py +16 -0
- capo_keyspacesstreams/_auth/_providers.py +886 -0
- capo_keyspacesstreams/_auth/_signers.py +88 -0
- capo_keyspacesstreams/_auth/_sigv4.py +434 -0
- capo_keyspacesstreams/_auth/_zapros_handler.py +80 -0
- capo_keyspacesstreams/_iter.py +113 -0
- capo_keyspacesstreams/_operations/keyspaces_streams/get_records.py +171 -0
- capo_keyspacesstreams/_operations/keyspaces_streams/get_shard_iterator.py +170 -0
- capo_keyspacesstreams/_operations/keyspaces_streams/get_stream.py +174 -0
- capo_keyspacesstreams/_operations/keyspaces_streams/list_streams.py +170 -0
- capo_keyspacesstreams/_pagination.py +21 -0
- capo_keyspacesstreams/_protocol/__init__.py +1 -0
- capo_keyspacesstreams/_protocol/errors.py +93 -0
- capo_keyspacesstreams/_protocol/eventstream.py +238 -0
- capo_keyspacesstreams/_protocol/serialize.py +47 -0
- capo_keyspacesstreams/_protocol/xml.py +33 -0
- capo_keyspacesstreams/_rule_engine/__init__.py +0 -0
- capo_keyspacesstreams/_rule_engine/_aws_partition.py +160 -0
- capo_keyspacesstreams/_rule_engine/_endpoint_rule_set.py +65 -0
- capo_keyspacesstreams/_rule_engine/_endpoint_runtime.py +389 -0
- capo_keyspacesstreams/_services/_aws_config.py +156 -0
- capo_keyspacesstreams/_services/_pipeline.py +196 -0
- capo_keyspacesstreams/_services/async_keyspaces_streams.py +442 -0
- capo_keyspacesstreams/_services/keyspaces_streams.py +438 -0
- capo_keyspacesstreams/errors/__init__.py +32 -0
- capo_keyspacesstreams/errors/_base.py +94 -0
- capo_keyspacesstreams/errors/access_denied_exception.py +47 -0
- capo_keyspacesstreams/errors/internal_server_exception.py +47 -0
- capo_keyspacesstreams/errors/resource_not_found_exception.py +47 -0
- capo_keyspacesstreams/errors/throttling_exception.py +47 -0
- capo_keyspacesstreams/errors/validation_exception.py +72 -0
- capo_keyspacesstreams/py.typed +0 -0
- capo_keyspacesstreams/types/_prelude/blob.py +12 -0
- capo_keyspacesstreams/types/_prelude/timestamp.py +17 -0
- capo_keyspacesstreams/types/date.py +20 -0
- capo_keyspacesstreams/types/get_records_input.py +37 -0
- capo_keyspacesstreams/types/get_records_output.py +70 -0
- capo_keyspacesstreams/types/get_shard_iterator_input.py +70 -0
- capo_keyspacesstreams/types/get_shard_iterator_output.py +30 -0
- capo_keyspacesstreams/types/get_stream_input.py +63 -0
- capo_keyspacesstreams/types/get_stream_output.py +144 -0
- capo_keyspacesstreams/types/iterator_description.py +42 -0
- capo_keyspacesstreams/types/iterator_position.py +17 -0
- capo_keyspacesstreams/types/keyspace_name.py +5 -0
- capo_keyspacesstreams/types/keyspaces_cell.py +63 -0
- capo_keyspacesstreams/types/keyspaces_cell_list.py +35 -0
- capo_keyspacesstreams/types/keyspaces_cell_map.py +39 -0
- capo_keyspacesstreams/types/keyspaces_cell_map_definition.py +83 -0
- capo_keyspacesstreams/types/keyspaces_cell_value.py +333 -0
- capo_keyspacesstreams/types/keyspaces_cells.py +35 -0
- capo_keyspacesstreams/types/keyspaces_keys_map.py +39 -0
- capo_keyspacesstreams/types/keyspaces_metadata.py +29 -0
- capo_keyspacesstreams/types/keyspaces_row.py +83 -0
- capo_keyspacesstreams/types/keyspaces_udt_map.py +35 -0
- capo_keyspacesstreams/types/list_streams_input.py +50 -0
- capo_keyspacesstreams/types/list_streams_output.py +47 -0
- capo_keyspacesstreams/types/origin_type.py +18 -0
- capo_keyspacesstreams/types/record.py +146 -0
- capo_keyspacesstreams/types/record_list.py +29 -0
- capo_keyspacesstreams/types/sequence_number.py +5 -0
- capo_keyspacesstreams/types/sequence_number_range.py +38 -0
- capo_keyspacesstreams/types/shard.py +70 -0
- capo_keyspacesstreams/types/shard_description_list.py +29 -0
- capo_keyspacesstreams/types/shard_filter.py +47 -0
- capo_keyspacesstreams/types/shard_filter_type.py +14 -0
- capo_keyspacesstreams/types/shard_id.py +5 -0
- capo_keyspacesstreams/types/shard_id_list.py +17 -0
- capo_keyspacesstreams/types/shard_id_token.py +5 -0
- capo_keyspacesstreams/types/shard_iterator.py +5 -0
- capo_keyspacesstreams/types/shard_iterator_type.py +19 -0
- capo_keyspacesstreams/types/stream.py +54 -0
- capo_keyspacesstreams/types/stream_arn.py +5 -0
- capo_keyspacesstreams/types/stream_arn_token.py +5 -0
- capo_keyspacesstreams/types/stream_list.py +29 -0
- capo_keyspacesstreams/types/stream_status.py +19 -0
- capo_keyspacesstreams/types/stream_view_type.py +19 -0
- capo_keyspacesstreams/types/table_name.py +5 -0
- capo_keyspacesstreams/types/validation_exception_type.py +19 -0
- capo_keyspacesstreams-0.1.0.dist-info/METADATA +101 -0
- capo_keyspacesstreams-0.1.0.dist-info/RECORD +85 -0
- capo_keyspacesstreams-0.1.0.dist-info/WHEEL +5 -0
- capo_keyspacesstreams-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_keyspacesstreams-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#Record``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_keyspacesstreams.types.date
|
|
9
|
+
import capo_keyspacesstreams.types.keyspaces_keys_map
|
|
10
|
+
import capo_keyspacesstreams.types.keyspaces_row
|
|
11
|
+
import capo_keyspacesstreams.types.origin_type
|
|
12
|
+
import capo_keyspacesstreams.types.sequence_number
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Record(TypedDict, closed=True):
|
|
16
|
+
event_version: NotRequired["str"]
|
|
17
|
+
"""<p>The version of the record format, used to track the evolution of the record structure over time.</p>"""
|
|
18
|
+
created_at: NotRequired["capo_keyspacesstreams.types.date.Date"]
|
|
19
|
+
"""<p>The timestamp indicating when this change data capture record was created.</p>"""
|
|
20
|
+
origin: NotRequired["capo_keyspacesstreams.types.origin_type.OriginType"]
|
|
21
|
+
"""<p>The origin or source of this change data capture record.</p>"""
|
|
22
|
+
partition_keys: NotRequired[
|
|
23
|
+
"capo_keyspacesstreams.types.keyspaces_keys_map.KeyspacesKeysMap"
|
|
24
|
+
]
|
|
25
|
+
"""<p>The partition key columns and their values for the affected row.</p>"""
|
|
26
|
+
clustering_keys: NotRequired[
|
|
27
|
+
"capo_keyspacesstreams.types.keyspaces_keys_map.KeyspacesKeysMap"
|
|
28
|
+
]
|
|
29
|
+
"""<p>The clustering key columns and their values for the affected row, which determine the order of rows within a partition.</p>"""
|
|
30
|
+
new_image: NotRequired["capo_keyspacesstreams.types.keyspaces_row.KeyspacesRow"]
|
|
31
|
+
"""<p>The state of the row after the change operation that generated this record.</p>"""
|
|
32
|
+
old_image: NotRequired["capo_keyspacesstreams.types.keyspaces_row.KeyspacesRow"]
|
|
33
|
+
"""<p>The state of the row before the change operation that generated this record.</p>"""
|
|
34
|
+
sequence_number: NotRequired[
|
|
35
|
+
"capo_keyspacesstreams.types.sequence_number.SequenceNumber"
|
|
36
|
+
]
|
|
37
|
+
"""<p>A unique identifier assigned to this record within the shard, used for ordering and tracking purposes.</p>"""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# --- awsJson1_0 ser/de ---
|
|
41
|
+
def serialize_aws_json_1_0(value: Record) -> dict:
|
|
42
|
+
out: dict = {}
|
|
43
|
+
if "event_version" in value:
|
|
44
|
+
out["eventVersion"] = value["event_version"]
|
|
45
|
+
if "created_at" in value:
|
|
46
|
+
import capo_keyspacesstreams.types.date
|
|
47
|
+
|
|
48
|
+
out["createdAt"] = capo_keyspacesstreams.types.date.serialize_aws_json_1_0(
|
|
49
|
+
value["created_at"]
|
|
50
|
+
)
|
|
51
|
+
if "origin" in value:
|
|
52
|
+
import capo_keyspacesstreams.types.origin_type
|
|
53
|
+
|
|
54
|
+
out["origin"] = capo_keyspacesstreams.types.origin_type.serialize_aws_json_1_0(
|
|
55
|
+
value["origin"]
|
|
56
|
+
)
|
|
57
|
+
if "partition_keys" in value:
|
|
58
|
+
import capo_keyspacesstreams.types.keyspaces_keys_map
|
|
59
|
+
|
|
60
|
+
out["partitionKeys"] = (
|
|
61
|
+
capo_keyspacesstreams.types.keyspaces_keys_map.serialize_aws_json_1_0(
|
|
62
|
+
value["partition_keys"]
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
if "clustering_keys" in value:
|
|
66
|
+
import capo_keyspacesstreams.types.keyspaces_keys_map
|
|
67
|
+
|
|
68
|
+
out["clusteringKeys"] = (
|
|
69
|
+
capo_keyspacesstreams.types.keyspaces_keys_map.serialize_aws_json_1_0(
|
|
70
|
+
value["clustering_keys"]
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
if "new_image" in value:
|
|
74
|
+
import capo_keyspacesstreams.types.keyspaces_row
|
|
75
|
+
|
|
76
|
+
out["newImage"] = (
|
|
77
|
+
capo_keyspacesstreams.types.keyspaces_row.serialize_aws_json_1_0(
|
|
78
|
+
value["new_image"]
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
if "old_image" in value:
|
|
82
|
+
import capo_keyspacesstreams.types.keyspaces_row
|
|
83
|
+
|
|
84
|
+
out["oldImage"] = (
|
|
85
|
+
capo_keyspacesstreams.types.keyspaces_row.serialize_aws_json_1_0(
|
|
86
|
+
value["old_image"]
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
if "sequence_number" in value:
|
|
90
|
+
out["sequenceNumber"] = value["sequence_number"]
|
|
91
|
+
return out
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def deserialize_aws_json_1_0(data: dict) -> Record:
|
|
95
|
+
out: Record = {} # type: ignore[typeddict-item]
|
|
96
|
+
if data.get("eventVersion") is not None:
|
|
97
|
+
out["event_version"] = data["eventVersion"]
|
|
98
|
+
if data.get("createdAt") is not None:
|
|
99
|
+
import capo_keyspacesstreams.types.date
|
|
100
|
+
|
|
101
|
+
out["created_at"] = capo_keyspacesstreams.types.date.deserialize_aws_json_1_0(
|
|
102
|
+
data["createdAt"]
|
|
103
|
+
)
|
|
104
|
+
if data.get("origin") is not None:
|
|
105
|
+
import capo_keyspacesstreams.types.origin_type
|
|
106
|
+
|
|
107
|
+
out["origin"] = (
|
|
108
|
+
capo_keyspacesstreams.types.origin_type.deserialize_aws_json_1_0(
|
|
109
|
+
data["origin"]
|
|
110
|
+
)
|
|
111
|
+
)
|
|
112
|
+
if data.get("partitionKeys") is not None:
|
|
113
|
+
import capo_keyspacesstreams.types.keyspaces_keys_map
|
|
114
|
+
|
|
115
|
+
out["partition_keys"] = (
|
|
116
|
+
capo_keyspacesstreams.types.keyspaces_keys_map.deserialize_aws_json_1_0(
|
|
117
|
+
data["partitionKeys"]
|
|
118
|
+
)
|
|
119
|
+
)
|
|
120
|
+
if data.get("clusteringKeys") is not None:
|
|
121
|
+
import capo_keyspacesstreams.types.keyspaces_keys_map
|
|
122
|
+
|
|
123
|
+
out["clustering_keys"] = (
|
|
124
|
+
capo_keyspacesstreams.types.keyspaces_keys_map.deserialize_aws_json_1_0(
|
|
125
|
+
data["clusteringKeys"]
|
|
126
|
+
)
|
|
127
|
+
)
|
|
128
|
+
if data.get("newImage") is not None:
|
|
129
|
+
import capo_keyspacesstreams.types.keyspaces_row
|
|
130
|
+
|
|
131
|
+
out["new_image"] = (
|
|
132
|
+
capo_keyspacesstreams.types.keyspaces_row.deserialize_aws_json_1_0(
|
|
133
|
+
data["newImage"]
|
|
134
|
+
)
|
|
135
|
+
)
|
|
136
|
+
if data.get("oldImage") is not None:
|
|
137
|
+
import capo_keyspacesstreams.types.keyspaces_row
|
|
138
|
+
|
|
139
|
+
out["old_image"] = (
|
|
140
|
+
capo_keyspacesstreams.types.keyspaces_row.deserialize_aws_json_1_0(
|
|
141
|
+
data["oldImage"]
|
|
142
|
+
)
|
|
143
|
+
)
|
|
144
|
+
if data.get("sequenceNumber") is not None:
|
|
145
|
+
out["sequence_number"] = data["sequenceNumber"]
|
|
146
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#RecordList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspacesstreams.types.record
|
|
7
|
+
|
|
8
|
+
RecordList: TypeAlias = list["capo_keyspacesstreams.types.record.Record"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: RecordList) -> list:
|
|
13
|
+
import capo_keyspacesstreams.types.record
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_keyspacesstreams.types.record.serialize_aws_json_1_0(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_aws_json_1_0(data: list) -> RecordList:
|
|
22
|
+
import capo_keyspacesstreams.types.record
|
|
23
|
+
|
|
24
|
+
out: RecordList = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_keyspacesstreams.types.record.deserialize_aws_json_1_0(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#SequenceNumberRange``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_keyspacesstreams.types.sequence_number
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SequenceNumberRange(TypedDict, closed=True):
|
|
12
|
+
starting_sequence_number: NotRequired[
|
|
13
|
+
"capo_keyspacesstreams.types.sequence_number.SequenceNumber"
|
|
14
|
+
]
|
|
15
|
+
"""<p>The starting sequence number of the range.</p>"""
|
|
16
|
+
ending_sequence_number: NotRequired[
|
|
17
|
+
"capo_keyspacesstreams.types.sequence_number.SequenceNumber"
|
|
18
|
+
]
|
|
19
|
+
"""<p>The ending sequence number of the range, which may be null for open-ended ranges.</p>"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# --- awsJson1_0 ser/de ---
|
|
23
|
+
def serialize_aws_json_1_0(value: SequenceNumberRange) -> dict:
|
|
24
|
+
out: dict = {}
|
|
25
|
+
if "starting_sequence_number" in value:
|
|
26
|
+
out["startingSequenceNumber"] = value["starting_sequence_number"]
|
|
27
|
+
if "ending_sequence_number" in value:
|
|
28
|
+
out["endingSequenceNumber"] = value["ending_sequence_number"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def deserialize_aws_json_1_0(data: dict) -> SequenceNumberRange:
|
|
33
|
+
out: SequenceNumberRange = {} # type: ignore[typeddict-item]
|
|
34
|
+
if data.get("startingSequenceNumber") is not None:
|
|
35
|
+
out["starting_sequence_number"] = data["startingSequenceNumber"]
|
|
36
|
+
if data.get("endingSequenceNumber") is not None:
|
|
37
|
+
out["ending_sequence_number"] = data["endingSequenceNumber"]
|
|
38
|
+
return out
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#Shard``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_keyspacesstreams.types.sequence_number_range
|
|
9
|
+
import capo_keyspacesstreams.types.shard_id
|
|
10
|
+
import capo_keyspacesstreams.types.shard_id_list
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Shard(TypedDict, closed=True):
|
|
14
|
+
shard_id: NotRequired["capo_keyspacesstreams.types.shard_id.ShardId"]
|
|
15
|
+
"""<p>A unique identifier for this shard within the stream.</p>"""
|
|
16
|
+
sequence_number_range: NotRequired[
|
|
17
|
+
"capo_keyspacesstreams.types.sequence_number_range.SequenceNumberRange"
|
|
18
|
+
]
|
|
19
|
+
"""<p>The range of sequence numbers contained within this shard.</p>"""
|
|
20
|
+
parent_shard_ids: NotRequired[
|
|
21
|
+
"capo_keyspacesstreams.types.shard_id_list.ShardIdList"
|
|
22
|
+
]
|
|
23
|
+
"""<p>The identifiers of parent shards that this shard evolved from, if this shard was created through resharding.</p>"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# --- awsJson1_0 ser/de ---
|
|
27
|
+
def serialize_aws_json_1_0(value: Shard) -> dict:
|
|
28
|
+
out: dict = {}
|
|
29
|
+
if "shard_id" in value:
|
|
30
|
+
out["shardId"] = value["shard_id"]
|
|
31
|
+
if "sequence_number_range" in value:
|
|
32
|
+
import capo_keyspacesstreams.types.sequence_number_range
|
|
33
|
+
|
|
34
|
+
out["sequenceNumberRange"] = (
|
|
35
|
+
capo_keyspacesstreams.types.sequence_number_range.serialize_aws_json_1_0(
|
|
36
|
+
value["sequence_number_range"]
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
if "parent_shard_ids" in value:
|
|
40
|
+
import capo_keyspacesstreams.types.shard_id_list
|
|
41
|
+
|
|
42
|
+
out["parentShardIds"] = (
|
|
43
|
+
capo_keyspacesstreams.types.shard_id_list.serialize_aws_json_1_0(
|
|
44
|
+
value["parent_shard_ids"]
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
return out
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def deserialize_aws_json_1_0(data: dict) -> Shard:
|
|
51
|
+
out: Shard = {} # type: ignore[typeddict-item]
|
|
52
|
+
if data.get("shardId") is not None:
|
|
53
|
+
out["shard_id"] = data["shardId"]
|
|
54
|
+
if data.get("sequenceNumberRange") is not None:
|
|
55
|
+
import capo_keyspacesstreams.types.sequence_number_range
|
|
56
|
+
|
|
57
|
+
out["sequence_number_range"] = (
|
|
58
|
+
capo_keyspacesstreams.types.sequence_number_range.deserialize_aws_json_1_0(
|
|
59
|
+
data["sequenceNumberRange"]
|
|
60
|
+
)
|
|
61
|
+
)
|
|
62
|
+
if data.get("parentShardIds") is not None:
|
|
63
|
+
import capo_keyspacesstreams.types.shard_id_list
|
|
64
|
+
|
|
65
|
+
out["parent_shard_ids"] = (
|
|
66
|
+
capo_keyspacesstreams.types.shard_id_list.deserialize_aws_json_1_0(
|
|
67
|
+
data["parentShardIds"]
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ShardDescriptionList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspacesstreams.types.shard
|
|
7
|
+
|
|
8
|
+
ShardDescriptionList: TypeAlias = list["capo_keyspacesstreams.types.shard.Shard"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: ShardDescriptionList) -> list:
|
|
13
|
+
import capo_keyspacesstreams.types.shard
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_keyspacesstreams.types.shard.serialize_aws_json_1_0(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_aws_json_1_0(data: list) -> ShardDescriptionList:
|
|
22
|
+
import capo_keyspacesstreams.types.shard
|
|
23
|
+
|
|
24
|
+
out: ShardDescriptionList = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_keyspacesstreams.types.shard.deserialize_aws_json_1_0(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ShardFilter``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_keyspacesstreams.types.shard_filter_type
|
|
9
|
+
import capo_keyspacesstreams.types.shard_id
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ShardFilter(TypedDict, closed=True):
|
|
13
|
+
type: NotRequired["capo_keyspacesstreams.types.shard_filter_type.ShardFilterType"]
|
|
14
|
+
"""<p>The type of shard filter to use, which determines how the shardId parameter is interpreted.</p>"""
|
|
15
|
+
shard_id: NotRequired["capo_keyspacesstreams.types.shard_id.ShardId"]
|
|
16
|
+
"""<p>The identifier of a specific shard used to filter results based on the specified filter type.</p>"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# --- awsJson1_0 ser/de ---
|
|
20
|
+
def serialize_aws_json_1_0(value: ShardFilter) -> dict:
|
|
21
|
+
out: dict = {}
|
|
22
|
+
if "type" in value:
|
|
23
|
+
import capo_keyspacesstreams.types.shard_filter_type
|
|
24
|
+
|
|
25
|
+
out["type"] = (
|
|
26
|
+
capo_keyspacesstreams.types.shard_filter_type.serialize_aws_json_1_0(
|
|
27
|
+
value["type"]
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
if "shard_id" in value:
|
|
31
|
+
out["shardId"] = value["shard_id"]
|
|
32
|
+
return out
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def deserialize_aws_json_1_0(data: dict) -> ShardFilter:
|
|
36
|
+
out: ShardFilter = {} # type: ignore[typeddict-item]
|
|
37
|
+
if data.get("type") is not None:
|
|
38
|
+
import capo_keyspacesstreams.types.shard_filter_type
|
|
39
|
+
|
|
40
|
+
out["type"] = (
|
|
41
|
+
capo_keyspacesstreams.types.shard_filter_type.deserialize_aws_json_1_0(
|
|
42
|
+
data["type"]
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
if data.get("shardId") is not None:
|
|
46
|
+
out["shard_id"] = data["shardId"]
|
|
47
|
+
return out
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ShardFilterType``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
ShardFilterType: TypeAlias = Literal["CHILD_SHARDS",]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# --- awsJson1_0 ser/de ---
|
|
9
|
+
def serialize_aws_json_1_0(value: ShardFilterType) -> str:
|
|
10
|
+
return value
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def deserialize_aws_json_1_0(data: str) -> ShardFilterType:
|
|
14
|
+
return cast(ShardFilterType, data)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ShardIdList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspacesstreams.types.shard_id
|
|
7
|
+
|
|
8
|
+
ShardIdList: TypeAlias = list["capo_keyspacesstreams.types.shard_id.ShardId"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: ShardIdList) -> list:
|
|
13
|
+
return list(value)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_aws_json_1_0(data: list) -> ShardIdList:
|
|
17
|
+
return [item for item in data if item is not None]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ShardIteratorType``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
ShardIteratorType: TypeAlias = Literal[
|
|
6
|
+
"TRIM_HORIZON",
|
|
7
|
+
"LATEST",
|
|
8
|
+
"AT_SEQUENCE_NUMBER",
|
|
9
|
+
"AFTER_SEQUENCE_NUMBER",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(value: ShardIteratorType) -> str:
|
|
15
|
+
return value
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def deserialize_aws_json_1_0(data: str) -> ShardIteratorType:
|
|
19
|
+
return cast(ShardIteratorType, data)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#Stream``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_keyspacesstreams.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_keyspacesstreams.types.keyspace_name
|
|
11
|
+
import capo_keyspacesstreams.types.stream_arn
|
|
12
|
+
import capo_keyspacesstreams.types.table_name
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Stream(TypedDict, closed=True):
|
|
16
|
+
stream_arn: "capo_keyspacesstreams.types.stream_arn.StreamArn"
|
|
17
|
+
"""<p>The Amazon Resource Name (ARN) that uniquely identifies this stream.</p>"""
|
|
18
|
+
keyspace_name: "capo_keyspacesstreams.types.keyspace_name.KeyspaceName"
|
|
19
|
+
"""<p>The name of the keyspace containing the table associated with this stream.</p>"""
|
|
20
|
+
table_name: "capo_keyspacesstreams.types.table_name.TableName"
|
|
21
|
+
"""<p>The name of the table associated with this stream.</p>"""
|
|
22
|
+
stream_label: "str"
|
|
23
|
+
"""<p>A unique identifier for this stream that can be used in stream operations.</p>"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# --- awsJson1_0 ser/de ---
|
|
27
|
+
def serialize_aws_json_1_0(value: Stream) -> dict:
|
|
28
|
+
out: dict = {}
|
|
29
|
+
out["streamArn"] = value["stream_arn"]
|
|
30
|
+
out["keyspaceName"] = value["keyspace_name"]
|
|
31
|
+
out["tableName"] = value["table_name"]
|
|
32
|
+
out["streamLabel"] = value["stream_label"]
|
|
33
|
+
return out
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def deserialize_aws_json_1_0(data: dict) -> Stream:
|
|
37
|
+
out: Stream = {} # type: ignore[typeddict-item]
|
|
38
|
+
if data.get("streamArn") is not None:
|
|
39
|
+
out["stream_arn"] = data["streamArn"]
|
|
40
|
+
else:
|
|
41
|
+
raise DeserializationError("Stream.stream_arn required")
|
|
42
|
+
if data.get("keyspaceName") is not None:
|
|
43
|
+
out["keyspace_name"] = data["keyspaceName"]
|
|
44
|
+
else:
|
|
45
|
+
raise DeserializationError("Stream.keyspace_name required")
|
|
46
|
+
if data.get("tableName") is not None:
|
|
47
|
+
out["table_name"] = data["tableName"]
|
|
48
|
+
else:
|
|
49
|
+
raise DeserializationError("Stream.table_name required")
|
|
50
|
+
if data.get("streamLabel") is not None:
|
|
51
|
+
out["stream_label"] = data["streamLabel"]
|
|
52
|
+
else:
|
|
53
|
+
raise DeserializationError("Stream.stream_label required")
|
|
54
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#StreamList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspacesstreams.types.stream
|
|
7
|
+
|
|
8
|
+
StreamList: TypeAlias = list["capo_keyspacesstreams.types.stream.Stream"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: StreamList) -> list:
|
|
13
|
+
import capo_keyspacesstreams.types.stream
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_keyspacesstreams.types.stream.serialize_aws_json_1_0(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_aws_json_1_0(data: list) -> StreamList:
|
|
22
|
+
import capo_keyspacesstreams.types.stream
|
|
23
|
+
|
|
24
|
+
out: StreamList = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_keyspacesstreams.types.stream.deserialize_aws_json_1_0(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#StreamStatus``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
StreamStatus: TypeAlias = Literal[
|
|
6
|
+
"ENABLING",
|
|
7
|
+
"ENABLED",
|
|
8
|
+
"DISABLING",
|
|
9
|
+
"DISABLED",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(value: StreamStatus) -> str:
|
|
15
|
+
return value
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def deserialize_aws_json_1_0(data: str) -> StreamStatus:
|
|
19
|
+
return cast(StreamStatus, data)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#StreamViewType``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
StreamViewType: TypeAlias = Literal[
|
|
6
|
+
"NEW_IMAGE",
|
|
7
|
+
"OLD_IMAGE",
|
|
8
|
+
"NEW_AND_OLD_IMAGES",
|
|
9
|
+
"KEYS_ONLY",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(value: StreamViewType) -> str:
|
|
15
|
+
return value
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def deserialize_aws_json_1_0(data: str) -> StreamViewType:
|
|
19
|
+
return cast(StreamViewType, data)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ValidationExceptionType``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
ValidationExceptionType: TypeAlias = Literal[
|
|
6
|
+
"InvalidFormat",
|
|
7
|
+
"TrimmedDataAccess",
|
|
8
|
+
"ExpiredIterator",
|
|
9
|
+
"ExpiredNextToken",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(value: ValidationExceptionType) -> str:
|
|
15
|
+
return value
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def deserialize_aws_json_1_0(data: str) -> ValidationExceptionType:
|
|
19
|
+
return cast(ValidationExceptionType, data)
|