Source file operations.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
open Types
let (let+) res map = Result.map map res
module ListStreams = struct
let error_deserializer tree path =
let open Deserializers in
let handler = fun handler tree path -> function
| "com.amazonaws.dynamodbstreams", "InternalServerError" ->
(`InternalServerError (internal_server_error_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "ResourceNotFoundException" ->
(`ResourceNotFoundException (resource_not_found_exception_of_yojson tree path))
| _type -> handler tree path _type
in
Smaws_Lib.Protocols.AwsJson.(error_deserializer (handler Smaws_Lib.Protocols.AwsJson.Errors.default_handler) tree path)
let request = fun context (request: list_streams_input) ->
let input = Serializers.list_streams_input_to_yojson request in
Smaws_Lib.Protocols.AwsJson.request
~shape_name:"DynamoDBStreams_20120810.ListStreams"
~service
~config:Smaws_Lib.Context.(context.config)
~http:Smaws_Lib.Context.(context.http)
~input
~output_deserializer:Deserializers.list_streams_output_of_yojson
~error_deserializer
end
module GetShardIterator = struct
let error_deserializer tree path =
let open Deserializers in
let handler = fun handler tree path -> function
| "com.amazonaws.dynamodbstreams", "InternalServerError" ->
(`InternalServerError (internal_server_error_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "ResourceNotFoundException" ->
(`ResourceNotFoundException (resource_not_found_exception_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "TrimmedDataAccessException" ->
(`TrimmedDataAccessException (trimmed_data_access_exception_of_yojson tree path))
| _type -> handler tree path _type
in
Smaws_Lib.Protocols.AwsJson.(error_deserializer (handler Smaws_Lib.Protocols.AwsJson.Errors.default_handler) tree path)
let request = fun context (request: get_shard_iterator_input) ->
let input = Serializers.get_shard_iterator_input_to_yojson request in
Smaws_Lib.Protocols.AwsJson.request
~shape_name:"DynamoDBStreams_20120810.GetShardIterator"
~service
~config:Smaws_Lib.Context.(context.config)
~http:Smaws_Lib.Context.(context.http)
~input
~output_deserializer:Deserializers.get_shard_iterator_output_of_yojson
~error_deserializer
end
module GetRecords = struct
let error_deserializer tree path =
let open Deserializers in
let handler = fun handler tree path -> function
| "com.amazonaws.dynamodbstreams", "ExpiredIteratorException" ->
(`ExpiredIteratorException (expired_iterator_exception_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "InternalServerError" ->
(`InternalServerError (internal_server_error_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "LimitExceededException" ->
(`LimitExceededException (limit_exceeded_exception_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "ResourceNotFoundException" ->
(`ResourceNotFoundException (resource_not_found_exception_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "TrimmedDataAccessException" ->
(`TrimmedDataAccessException (trimmed_data_access_exception_of_yojson tree path))
| _type -> handler tree path _type
in
Smaws_Lib.Protocols.AwsJson.(error_deserializer (handler Smaws_Lib.Protocols.AwsJson.Errors.default_handler) tree path)
let request = fun context (request: get_records_input) ->
let input = Serializers.get_records_input_to_yojson request in
Smaws_Lib.Protocols.AwsJson.request
~shape_name:"DynamoDBStreams_20120810.GetRecords"
~service
~config:Smaws_Lib.Context.(context.config)
~http:Smaws_Lib.Context.(context.http)
~input
~output_deserializer:Deserializers.get_records_output_of_yojson
~error_deserializer
end
module DescribeStream = struct
let error_deserializer tree path =
let open Deserializers in
let handler = fun handler tree path -> function
| "com.amazonaws.dynamodbstreams", "InternalServerError" ->
(`InternalServerError (internal_server_error_of_yojson tree path))
| "com.amazonaws.dynamodbstreams", "ResourceNotFoundException" ->
(`ResourceNotFoundException (resource_not_found_exception_of_yojson tree path))
| _type -> handler tree path _type
in
Smaws_Lib.Protocols.AwsJson.(error_deserializer (handler Smaws_Lib.Protocols.AwsJson.Errors.default_handler) tree path)
let request = fun context (request: describe_stream_input) ->
let input = Serializers.describe_stream_input_to_yojson request in
Smaws_Lib.Protocols.AwsJson.request
~shape_name:"DynamoDBStreams_20120810.DescribeStream"
~service
~config:Smaws_Lib.Context.(context.config)
~http:Smaws_Lib.Context.(context.http)
~input
~output_deserializer:Deserializers.describe_stream_output_of_yojson
~error_deserializer
end