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,333 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#KeyspacesCellValue``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_keyspacesstreams.errors import DeserializationError, SerializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_keyspacesstreams.types.keyspaces_cell_list
|
|
11
|
+
import capo_keyspacesstreams.types.keyspaces_cell_map
|
|
12
|
+
import capo_keyspacesstreams.types.keyspaces_udt_map
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class _KeyspacesCellValue_asciiT(TypedDict, closed=True):
|
|
16
|
+
asciiT: "str"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class _KeyspacesCellValue_bigintT(TypedDict, closed=True):
|
|
20
|
+
bigintT: "str"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class _KeyspacesCellValue_blobT(TypedDict, closed=True):
|
|
24
|
+
blobT: "bytes"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _KeyspacesCellValue_boolT(TypedDict, closed=True):
|
|
28
|
+
boolT: "bool"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class _KeyspacesCellValue_counterT(TypedDict, closed=True):
|
|
32
|
+
counterT: "str"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class _KeyspacesCellValue_dateT(TypedDict, closed=True):
|
|
36
|
+
dateT: "str"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class _KeyspacesCellValue_decimalT(TypedDict, closed=True):
|
|
40
|
+
decimalT: "str"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class _KeyspacesCellValue_doubleT(TypedDict, closed=True):
|
|
44
|
+
doubleT: "str"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class _KeyspacesCellValue_durationT(TypedDict, closed=True):
|
|
48
|
+
durationT: "str"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class _KeyspacesCellValue_floatT(TypedDict, closed=True):
|
|
52
|
+
floatT: "str"
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class _KeyspacesCellValue_inetT(TypedDict, closed=True):
|
|
56
|
+
inetT: "str"
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class _KeyspacesCellValue_intT(TypedDict, closed=True):
|
|
60
|
+
intT: "str"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class _KeyspacesCellValue_listT(TypedDict, closed=True):
|
|
64
|
+
listT: "capo_keyspacesstreams.types.keyspaces_cell_list.KeyspacesCellList"
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class _KeyspacesCellValue_mapT(TypedDict, closed=True):
|
|
68
|
+
mapT: "capo_keyspacesstreams.types.keyspaces_cell_map.KeyspacesCellMap"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class _KeyspacesCellValue_setT(TypedDict, closed=True):
|
|
72
|
+
setT: "capo_keyspacesstreams.types.keyspaces_cell_list.KeyspacesCellList"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class _KeyspacesCellValue_smallintT(TypedDict, closed=True):
|
|
76
|
+
smallintT: "str"
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class _KeyspacesCellValue_textT(TypedDict, closed=True):
|
|
80
|
+
textT: "str"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class _KeyspacesCellValue_timeT(TypedDict, closed=True):
|
|
84
|
+
timeT: "str"
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class _KeyspacesCellValue_timestampT(TypedDict, closed=True):
|
|
88
|
+
timestampT: "str"
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class _KeyspacesCellValue_timeuuidT(TypedDict, closed=True):
|
|
92
|
+
timeuuidT: "str"
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class _KeyspacesCellValue_tinyintT(TypedDict, closed=True):
|
|
96
|
+
tinyintT: "str"
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class _KeyspacesCellValue_tupleT(TypedDict, closed=True):
|
|
100
|
+
tupleT: "capo_keyspacesstreams.types.keyspaces_cell_list.KeyspacesCellList"
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class _KeyspacesCellValue_uuidT(TypedDict, closed=True):
|
|
104
|
+
uuidT: "str"
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class _KeyspacesCellValue_varcharT(TypedDict, closed=True):
|
|
108
|
+
varcharT: "str"
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class _KeyspacesCellValue_varintT(TypedDict, closed=True):
|
|
112
|
+
varintT: "str"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class _KeyspacesCellValue_udtT(TypedDict, closed=True):
|
|
116
|
+
udtT: "capo_keyspacesstreams.types.keyspaces_udt_map.KeyspacesUdtMap"
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
KeyspacesCellValue: TypeAlias = (
|
|
120
|
+
_KeyspacesCellValue_asciiT
|
|
121
|
+
| _KeyspacesCellValue_bigintT
|
|
122
|
+
| _KeyspacesCellValue_blobT
|
|
123
|
+
| _KeyspacesCellValue_boolT
|
|
124
|
+
| _KeyspacesCellValue_counterT
|
|
125
|
+
| _KeyspacesCellValue_dateT
|
|
126
|
+
| _KeyspacesCellValue_decimalT
|
|
127
|
+
| _KeyspacesCellValue_doubleT
|
|
128
|
+
| _KeyspacesCellValue_durationT
|
|
129
|
+
| _KeyspacesCellValue_floatT
|
|
130
|
+
| _KeyspacesCellValue_inetT
|
|
131
|
+
| _KeyspacesCellValue_intT
|
|
132
|
+
| _KeyspacesCellValue_listT
|
|
133
|
+
| _KeyspacesCellValue_mapT
|
|
134
|
+
| _KeyspacesCellValue_setT
|
|
135
|
+
| _KeyspacesCellValue_smallintT
|
|
136
|
+
| _KeyspacesCellValue_textT
|
|
137
|
+
| _KeyspacesCellValue_timeT
|
|
138
|
+
| _KeyspacesCellValue_timestampT
|
|
139
|
+
| _KeyspacesCellValue_timeuuidT
|
|
140
|
+
| _KeyspacesCellValue_tinyintT
|
|
141
|
+
| _KeyspacesCellValue_tupleT
|
|
142
|
+
| _KeyspacesCellValue_uuidT
|
|
143
|
+
| _KeyspacesCellValue_varcharT
|
|
144
|
+
| _KeyspacesCellValue_varintT
|
|
145
|
+
| _KeyspacesCellValue_udtT
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# --- awsJson1_0 ser/de ---
|
|
150
|
+
def serialize_aws_json_1_0(value: KeyspacesCellValue) -> dict:
|
|
151
|
+
if "asciiT" in value:
|
|
152
|
+
return {"asciiT": value["asciiT"]}
|
|
153
|
+
elif "bigintT" in value:
|
|
154
|
+
return {"bigintT": value["bigintT"]}
|
|
155
|
+
elif "blobT" in value:
|
|
156
|
+
import capo_keyspacesstreams.types._prelude.blob
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
"blobT": capo_keyspacesstreams.types._prelude.blob.serialize_aws_json_1_0(
|
|
160
|
+
value["blobT"]
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
elif "boolT" in value:
|
|
164
|
+
return {"boolT": value["boolT"]}
|
|
165
|
+
elif "counterT" in value:
|
|
166
|
+
return {"counterT": value["counterT"]}
|
|
167
|
+
elif "dateT" in value:
|
|
168
|
+
return {"dateT": value["dateT"]}
|
|
169
|
+
elif "decimalT" in value:
|
|
170
|
+
return {"decimalT": value["decimalT"]}
|
|
171
|
+
elif "doubleT" in value:
|
|
172
|
+
return {"doubleT": value["doubleT"]}
|
|
173
|
+
elif "durationT" in value:
|
|
174
|
+
return {"durationT": value["durationT"]}
|
|
175
|
+
elif "floatT" in value:
|
|
176
|
+
return {"floatT": value["floatT"]}
|
|
177
|
+
elif "inetT" in value:
|
|
178
|
+
return {"inetT": value["inetT"]}
|
|
179
|
+
elif "intT" in value:
|
|
180
|
+
return {"intT": value["intT"]}
|
|
181
|
+
elif "listT" in value:
|
|
182
|
+
import capo_keyspacesstreams.types.keyspaces_cell_list
|
|
183
|
+
|
|
184
|
+
return {
|
|
185
|
+
"listT": capo_keyspacesstreams.types.keyspaces_cell_list.serialize_aws_json_1_0(
|
|
186
|
+
value["listT"]
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
elif "mapT" in value:
|
|
190
|
+
import capo_keyspacesstreams.types.keyspaces_cell_map
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
"mapT": capo_keyspacesstreams.types.keyspaces_cell_map.serialize_aws_json_1_0(
|
|
194
|
+
value["mapT"]
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
elif "setT" in value:
|
|
198
|
+
import capo_keyspacesstreams.types.keyspaces_cell_list
|
|
199
|
+
|
|
200
|
+
return {
|
|
201
|
+
"setT": capo_keyspacesstreams.types.keyspaces_cell_list.serialize_aws_json_1_0(
|
|
202
|
+
value["setT"]
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
elif "smallintT" in value:
|
|
206
|
+
return {"smallintT": value["smallintT"]}
|
|
207
|
+
elif "textT" in value:
|
|
208
|
+
return {"textT": value["textT"]}
|
|
209
|
+
elif "timeT" in value:
|
|
210
|
+
return {"timeT": value["timeT"]}
|
|
211
|
+
elif "timestampT" in value:
|
|
212
|
+
return {"timestampT": value["timestampT"]}
|
|
213
|
+
elif "timeuuidT" in value:
|
|
214
|
+
return {"timeuuidT": value["timeuuidT"]}
|
|
215
|
+
elif "tinyintT" in value:
|
|
216
|
+
return {"tinyintT": value["tinyintT"]}
|
|
217
|
+
elif "tupleT" in value:
|
|
218
|
+
import capo_keyspacesstreams.types.keyspaces_cell_list
|
|
219
|
+
|
|
220
|
+
return {
|
|
221
|
+
"tupleT": capo_keyspacesstreams.types.keyspaces_cell_list.serialize_aws_json_1_0(
|
|
222
|
+
value["tupleT"]
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
elif "uuidT" in value:
|
|
226
|
+
return {"uuidT": value["uuidT"]}
|
|
227
|
+
elif "varcharT" in value:
|
|
228
|
+
return {"varcharT": value["varcharT"]}
|
|
229
|
+
elif "varintT" in value:
|
|
230
|
+
return {"varintT": value["varintT"]}
|
|
231
|
+
elif "udtT" in value:
|
|
232
|
+
import capo_keyspacesstreams.types.keyspaces_udt_map
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
"udtT": capo_keyspacesstreams.types.keyspaces_udt_map.serialize_aws_json_1_0(
|
|
236
|
+
value["udtT"]
|
|
237
|
+
)
|
|
238
|
+
}
|
|
239
|
+
else:
|
|
240
|
+
raise SerializationError("KeyspacesCellValue: no variant present")
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def deserialize_aws_json_1_0(data: dict) -> KeyspacesCellValue:
|
|
244
|
+
if data.get("asciiT") is not None:
|
|
245
|
+
return {"asciiT": data["asciiT"]}
|
|
246
|
+
elif data.get("bigintT") is not None:
|
|
247
|
+
return {"bigintT": data["bigintT"]}
|
|
248
|
+
elif data.get("blobT") is not None:
|
|
249
|
+
import capo_keyspacesstreams.types._prelude.blob
|
|
250
|
+
|
|
251
|
+
return {
|
|
252
|
+
"blobT": capo_keyspacesstreams.types._prelude.blob.deserialize_aws_json_1_0(
|
|
253
|
+
data["blobT"]
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
elif data.get("boolT") is not None:
|
|
257
|
+
return {"boolT": data["boolT"]}
|
|
258
|
+
elif data.get("counterT") is not None:
|
|
259
|
+
return {"counterT": data["counterT"]}
|
|
260
|
+
elif data.get("dateT") is not None:
|
|
261
|
+
return {"dateT": data["dateT"]}
|
|
262
|
+
elif data.get("decimalT") is not None:
|
|
263
|
+
return {"decimalT": data["decimalT"]}
|
|
264
|
+
elif data.get("doubleT") is not None:
|
|
265
|
+
return {"doubleT": data["doubleT"]}
|
|
266
|
+
elif data.get("durationT") is not None:
|
|
267
|
+
return {"durationT": data["durationT"]}
|
|
268
|
+
elif data.get("floatT") is not None:
|
|
269
|
+
return {"floatT": data["floatT"]}
|
|
270
|
+
elif data.get("inetT") is not None:
|
|
271
|
+
return {"inetT": data["inetT"]}
|
|
272
|
+
elif data.get("intT") is not None:
|
|
273
|
+
return {"intT": data["intT"]}
|
|
274
|
+
elif data.get("listT") is not None:
|
|
275
|
+
import capo_keyspacesstreams.types.keyspaces_cell_list
|
|
276
|
+
|
|
277
|
+
return {
|
|
278
|
+
"listT": capo_keyspacesstreams.types.keyspaces_cell_list.deserialize_aws_json_1_0(
|
|
279
|
+
data["listT"]
|
|
280
|
+
)
|
|
281
|
+
}
|
|
282
|
+
elif data.get("mapT") is not None:
|
|
283
|
+
import capo_keyspacesstreams.types.keyspaces_cell_map
|
|
284
|
+
|
|
285
|
+
return {
|
|
286
|
+
"mapT": capo_keyspacesstreams.types.keyspaces_cell_map.deserialize_aws_json_1_0(
|
|
287
|
+
data["mapT"]
|
|
288
|
+
)
|
|
289
|
+
}
|
|
290
|
+
elif data.get("setT") is not None:
|
|
291
|
+
import capo_keyspacesstreams.types.keyspaces_cell_list
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
"setT": capo_keyspacesstreams.types.keyspaces_cell_list.deserialize_aws_json_1_0(
|
|
295
|
+
data["setT"]
|
|
296
|
+
)
|
|
297
|
+
}
|
|
298
|
+
elif data.get("smallintT") is not None:
|
|
299
|
+
return {"smallintT": data["smallintT"]}
|
|
300
|
+
elif data.get("textT") is not None:
|
|
301
|
+
return {"textT": data["textT"]}
|
|
302
|
+
elif data.get("timeT") is not None:
|
|
303
|
+
return {"timeT": data["timeT"]}
|
|
304
|
+
elif data.get("timestampT") is not None:
|
|
305
|
+
return {"timestampT": data["timestampT"]}
|
|
306
|
+
elif data.get("timeuuidT") is not None:
|
|
307
|
+
return {"timeuuidT": data["timeuuidT"]}
|
|
308
|
+
elif data.get("tinyintT") is not None:
|
|
309
|
+
return {"tinyintT": data["tinyintT"]}
|
|
310
|
+
elif data.get("tupleT") is not None:
|
|
311
|
+
import capo_keyspacesstreams.types.keyspaces_cell_list
|
|
312
|
+
|
|
313
|
+
return {
|
|
314
|
+
"tupleT": capo_keyspacesstreams.types.keyspaces_cell_list.deserialize_aws_json_1_0(
|
|
315
|
+
data["tupleT"]
|
|
316
|
+
)
|
|
317
|
+
}
|
|
318
|
+
elif data.get("uuidT") is not None:
|
|
319
|
+
return {"uuidT": data["uuidT"]}
|
|
320
|
+
elif data.get("varcharT") is not None:
|
|
321
|
+
return {"varcharT": data["varcharT"]}
|
|
322
|
+
elif data.get("varintT") is not None:
|
|
323
|
+
return {"varintT": data["varintT"]}
|
|
324
|
+
elif data.get("udtT") is not None:
|
|
325
|
+
import capo_keyspacesstreams.types.keyspaces_udt_map
|
|
326
|
+
|
|
327
|
+
return {
|
|
328
|
+
"udtT": capo_keyspacesstreams.types.keyspaces_udt_map.deserialize_aws_json_1_0(
|
|
329
|
+
data["udtT"]
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
else:
|
|
333
|
+
raise DeserializationError("KeyspacesCellValue: no recognized variant key")
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#KeyspacesCells``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspacesstreams.types.keyspaces_cell
|
|
7
|
+
|
|
8
|
+
KeyspacesCells: TypeAlias = dict[
|
|
9
|
+
"str", "capo_keyspacesstreams.types.keyspaces_cell.KeyspacesCell"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(input_to_serialize: KeyspacesCells) -> dict:
|
|
15
|
+
out: dict = {}
|
|
16
|
+
for key, value in input_to_serialize.items():
|
|
17
|
+
import capo_keyspacesstreams.types.keyspaces_cell
|
|
18
|
+
|
|
19
|
+
out[key] = capo_keyspacesstreams.types.keyspaces_cell.serialize_aws_json_1_0(
|
|
20
|
+
value
|
|
21
|
+
)
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> KeyspacesCells:
|
|
26
|
+
out: KeyspacesCells = {}
|
|
27
|
+
for key, value in data.items():
|
|
28
|
+
if value is None:
|
|
29
|
+
continue
|
|
30
|
+
import capo_keyspacesstreams.types.keyspaces_cell
|
|
31
|
+
|
|
32
|
+
out[key] = capo_keyspacesstreams.types.keyspaces_cell.deserialize_aws_json_1_0(
|
|
33
|
+
value
|
|
34
|
+
)
|
|
35
|
+
return out
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#KeyspacesKeysMap``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspacesstreams.types.keyspaces_cell_value
|
|
7
|
+
|
|
8
|
+
KeyspacesKeysMap: TypeAlias = dict[
|
|
9
|
+
"str", "capo_keyspacesstreams.types.keyspaces_cell_value.KeyspacesCellValue"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(input_to_serialize: KeyspacesKeysMap) -> dict:
|
|
15
|
+
out: dict = {}
|
|
16
|
+
for key, value in input_to_serialize.items():
|
|
17
|
+
import capo_keyspacesstreams.types.keyspaces_cell_value
|
|
18
|
+
|
|
19
|
+
out[key] = (
|
|
20
|
+
capo_keyspacesstreams.types.keyspaces_cell_value.serialize_aws_json_1_0(
|
|
21
|
+
value
|
|
22
|
+
)
|
|
23
|
+
)
|
|
24
|
+
return out
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def deserialize_aws_json_1_0(data: dict) -> KeyspacesKeysMap:
|
|
28
|
+
out: KeyspacesKeysMap = {}
|
|
29
|
+
for key, value in data.items():
|
|
30
|
+
if value is None:
|
|
31
|
+
continue
|
|
32
|
+
import capo_keyspacesstreams.types.keyspaces_cell_value
|
|
33
|
+
|
|
34
|
+
out[key] = (
|
|
35
|
+
capo_keyspacesstreams.types.keyspaces_cell_value.deserialize_aws_json_1_0(
|
|
36
|
+
value
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#KeyspacesMetadata``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class KeyspacesMetadata(TypedDict, closed=True):
|
|
7
|
+
expiration_time: NotRequired["str"]
|
|
8
|
+
"""<p>The time at which the associated data will expire, based on the time-to-live (TTL) setting.</p>"""
|
|
9
|
+
write_time: NotRequired["str"]
|
|
10
|
+
"""<p>The timestamp at which the associated data was written to the database.</p>"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(value: KeyspacesMetadata) -> dict:
|
|
15
|
+
out: dict = {}
|
|
16
|
+
if "expiration_time" in value:
|
|
17
|
+
out["expirationTime"] = value["expiration_time"]
|
|
18
|
+
if "write_time" in value:
|
|
19
|
+
out["writeTime"] = value["write_time"]
|
|
20
|
+
return out
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def deserialize_aws_json_1_0(data: dict) -> KeyspacesMetadata:
|
|
24
|
+
out: KeyspacesMetadata = {} # type: ignore[typeddict-item]
|
|
25
|
+
if data.get("expirationTime") is not None:
|
|
26
|
+
out["expiration_time"] = data["expirationTime"]
|
|
27
|
+
if data.get("writeTime") is not None:
|
|
28
|
+
out["write_time"] = data["writeTime"]
|
|
29
|
+
return out
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#KeyspacesRow``."""
|
|
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.keyspaces_cells
|
|
9
|
+
import capo_keyspacesstreams.types.keyspaces_metadata
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class KeyspacesRow(TypedDict, closed=True):
|
|
13
|
+
value_cells: NotRequired[
|
|
14
|
+
"capo_keyspacesstreams.types.keyspaces_cells.KeyspacesCells"
|
|
15
|
+
]
|
|
16
|
+
"""<p>A map of regular (non-static) column cells in the row, where keys are column names and values are the corresponding cells.</p>"""
|
|
17
|
+
static_cells: NotRequired[
|
|
18
|
+
"capo_keyspacesstreams.types.keyspaces_cells.KeyspacesCells"
|
|
19
|
+
]
|
|
20
|
+
"""<p>A map of static column cells shared by all rows with the same partition key, where keys are column names and values are the corresponding cells.</p>"""
|
|
21
|
+
row_metadata: NotRequired[
|
|
22
|
+
"capo_keyspacesstreams.types.keyspaces_metadata.KeyspacesMetadata"
|
|
23
|
+
]
|
|
24
|
+
"""<p>Metadata that applies to the entire row, such as timestamps and TTL information.</p>"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# --- awsJson1_0 ser/de ---
|
|
28
|
+
def serialize_aws_json_1_0(value: KeyspacesRow) -> dict:
|
|
29
|
+
out: dict = {}
|
|
30
|
+
if "value_cells" in value:
|
|
31
|
+
import capo_keyspacesstreams.types.keyspaces_cells
|
|
32
|
+
|
|
33
|
+
out["valueCells"] = (
|
|
34
|
+
capo_keyspacesstreams.types.keyspaces_cells.serialize_aws_json_1_0(
|
|
35
|
+
value["value_cells"]
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
if "static_cells" in value:
|
|
39
|
+
import capo_keyspacesstreams.types.keyspaces_cells
|
|
40
|
+
|
|
41
|
+
out["staticCells"] = (
|
|
42
|
+
capo_keyspacesstreams.types.keyspaces_cells.serialize_aws_json_1_0(
|
|
43
|
+
value["static_cells"]
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
if "row_metadata" in value:
|
|
47
|
+
import capo_keyspacesstreams.types.keyspaces_metadata
|
|
48
|
+
|
|
49
|
+
out["rowMetadata"] = (
|
|
50
|
+
capo_keyspacesstreams.types.keyspaces_metadata.serialize_aws_json_1_0(
|
|
51
|
+
value["row_metadata"]
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
return out
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def deserialize_aws_json_1_0(data: dict) -> KeyspacesRow:
|
|
58
|
+
out: KeyspacesRow = {} # type: ignore[typeddict-item]
|
|
59
|
+
if data.get("valueCells") is not None:
|
|
60
|
+
import capo_keyspacesstreams.types.keyspaces_cells
|
|
61
|
+
|
|
62
|
+
out["value_cells"] = (
|
|
63
|
+
capo_keyspacesstreams.types.keyspaces_cells.deserialize_aws_json_1_0(
|
|
64
|
+
data["valueCells"]
|
|
65
|
+
)
|
|
66
|
+
)
|
|
67
|
+
if data.get("staticCells") is not None:
|
|
68
|
+
import capo_keyspacesstreams.types.keyspaces_cells
|
|
69
|
+
|
|
70
|
+
out["static_cells"] = (
|
|
71
|
+
capo_keyspacesstreams.types.keyspaces_cells.deserialize_aws_json_1_0(
|
|
72
|
+
data["staticCells"]
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
if data.get("rowMetadata") is not None:
|
|
76
|
+
import capo_keyspacesstreams.types.keyspaces_metadata
|
|
77
|
+
|
|
78
|
+
out["row_metadata"] = (
|
|
79
|
+
capo_keyspacesstreams.types.keyspaces_metadata.deserialize_aws_json_1_0(
|
|
80
|
+
data["rowMetadata"]
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
return out
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#KeyspacesUdtMap``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspacesstreams.types.keyspaces_cell
|
|
7
|
+
|
|
8
|
+
KeyspacesUdtMap: TypeAlias = dict[
|
|
9
|
+
"str", "capo_keyspacesstreams.types.keyspaces_cell.KeyspacesCell"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(input_to_serialize: KeyspacesUdtMap) -> dict:
|
|
15
|
+
out: dict = {}
|
|
16
|
+
for key, value in input_to_serialize.items():
|
|
17
|
+
import capo_keyspacesstreams.types.keyspaces_cell
|
|
18
|
+
|
|
19
|
+
out[key] = capo_keyspacesstreams.types.keyspaces_cell.serialize_aws_json_1_0(
|
|
20
|
+
value
|
|
21
|
+
)
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> KeyspacesUdtMap:
|
|
26
|
+
out: KeyspacesUdtMap = {}
|
|
27
|
+
for key, value in data.items():
|
|
28
|
+
if value is None:
|
|
29
|
+
continue
|
|
30
|
+
import capo_keyspacesstreams.types.keyspaces_cell
|
|
31
|
+
|
|
32
|
+
out[key] = capo_keyspacesstreams.types.keyspaces_cell.deserialize_aws_json_1_0(
|
|
33
|
+
value
|
|
34
|
+
)
|
|
35
|
+
return out
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ListStreamsInput``."""
|
|
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.keyspace_name
|
|
9
|
+
import capo_keyspacesstreams.types.stream_arn_token
|
|
10
|
+
import capo_keyspacesstreams.types.table_name
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ListStreamsInput(TypedDict, closed=True):
|
|
14
|
+
keyspace_name: NotRequired["capo_keyspacesstreams.types.keyspace_name.KeyspaceName"]
|
|
15
|
+
"""<p> The name of the keyspace for which to list streams. If specified, only streams associated with tables in this keyspace are returned. If omitted, streams from all keyspaces are included in the results. </p>"""
|
|
16
|
+
table_name: NotRequired["capo_keyspacesstreams.types.table_name.TableName"]
|
|
17
|
+
"""<p> The name of the table for which to list streams. Must be used together with <code>keyspaceName</code>. If specified, only streams associated with this specific table are returned. </p>"""
|
|
18
|
+
max_results: NotRequired["int"]
|
|
19
|
+
"""<p> The maximum number of streams to return in a single <code>ListStreams</code> request. The default value is 100. The minimum value is 1 and the maximum value is 100. </p>"""
|
|
20
|
+
next_token: NotRequired[
|
|
21
|
+
"capo_keyspacesstreams.types.stream_arn_token.StreamArnToken"
|
|
22
|
+
]
|
|
23
|
+
"""<p> An optional pagination token provided by a previous <code>ListStreams</code> operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>maxResults</code>. </p>"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# --- awsJson1_0 ser/de ---
|
|
27
|
+
def serialize_aws_json_1_0(value: ListStreamsInput) -> dict:
|
|
28
|
+
out: dict = {}
|
|
29
|
+
if "keyspace_name" in value:
|
|
30
|
+
out["keyspaceName"] = value["keyspace_name"]
|
|
31
|
+
if "table_name" in value:
|
|
32
|
+
out["tableName"] = value["table_name"]
|
|
33
|
+
if "max_results" in value:
|
|
34
|
+
out["maxResults"] = value["max_results"]
|
|
35
|
+
if "next_token" in value:
|
|
36
|
+
out["nextToken"] = value["next_token"]
|
|
37
|
+
return out
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def deserialize_aws_json_1_0(data: dict) -> ListStreamsInput:
|
|
41
|
+
out: ListStreamsInput = {} # type: ignore[typeddict-item]
|
|
42
|
+
if data.get("keyspaceName") is not None:
|
|
43
|
+
out["keyspace_name"] = data["keyspaceName"]
|
|
44
|
+
if data.get("tableName") is not None:
|
|
45
|
+
out["table_name"] = data["tableName"]
|
|
46
|
+
if data.get("maxResults") is not None:
|
|
47
|
+
out["max_results"] = data["maxResults"]
|
|
48
|
+
if data.get("nextToken") is not None:
|
|
49
|
+
out["next_token"] = data["nextToken"]
|
|
50
|
+
return out
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#ListStreamsOutput``."""
|
|
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.stream_arn_token
|
|
9
|
+
import capo_keyspacesstreams.types.stream_list
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ListStreamsOutput(TypedDict, closed=True):
|
|
13
|
+
streams: NotRequired["capo_keyspacesstreams.types.stream_list.StreamList"]
|
|
14
|
+
"""<p> An array of stream objects, each containing summary information about a stream including its ARN, status, and associated table information. This list includes all streams that match the request criteria. </p>"""
|
|
15
|
+
next_token: NotRequired[
|
|
16
|
+
"capo_keyspacesstreams.types.stream_arn_token.StreamArnToken"
|
|
17
|
+
]
|
|
18
|
+
"""<p> A pagination token that can be used in a subsequent <code>ListStreams</code> request. This token is returned if the response contains more streams than can be returned in a single response based on the <code>maxResults</code> parameter. </p>"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# --- awsJson1_0 ser/de ---
|
|
22
|
+
def serialize_aws_json_1_0(value: ListStreamsOutput) -> dict:
|
|
23
|
+
out: dict = {}
|
|
24
|
+
if "streams" in value:
|
|
25
|
+
import capo_keyspacesstreams.types.stream_list
|
|
26
|
+
|
|
27
|
+
out["streams"] = capo_keyspacesstreams.types.stream_list.serialize_aws_json_1_0(
|
|
28
|
+
value["streams"]
|
|
29
|
+
)
|
|
30
|
+
if "next_token" in value:
|
|
31
|
+
out["nextToken"] = value["next_token"]
|
|
32
|
+
return out
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def deserialize_aws_json_1_0(data: dict) -> ListStreamsOutput:
|
|
36
|
+
out: ListStreamsOutput = {} # type: ignore[typeddict-item]
|
|
37
|
+
if data.get("streams") is not None:
|
|
38
|
+
import capo_keyspacesstreams.types.stream_list
|
|
39
|
+
|
|
40
|
+
out["streams"] = (
|
|
41
|
+
capo_keyspacesstreams.types.stream_list.deserialize_aws_json_1_0(
|
|
42
|
+
data["streams"]
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
if data.get("nextToken") is not None:
|
|
46
|
+
out["next_token"] = data["nextToken"]
|
|
47
|
+
return out
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspacesstreams#OriginType``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
OriginType: TypeAlias = Literal[
|
|
6
|
+
"USER",
|
|
7
|
+
"REPLICATION",
|
|
8
|
+
"TTL",
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# --- awsJson1_0 ser/de ---
|
|
13
|
+
def serialize_aws_json_1_0(value: OriginType) -> str:
|
|
14
|
+
return value
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def deserialize_aws_json_1_0(data: str) -> OriginType:
|
|
18
|
+
return cast(OriginType, data)
|