Skip to content

Commit

Permalink
Generate rekognition source code
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonidas-from-XIV committed Jul 29, 2019
1 parent 20bad9b commit e222528
Show file tree
Hide file tree
Showing 76 changed files with 8,608 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ LIBRARIES := \
aws-elasticache \
aws-elasticloadbalancing \
aws-rds \
aws-rekognition \
aws-sdb \
aws-ssm \
aws-sts \
Expand Down
22 changes: 22 additions & 0 deletions aws_rekognition.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
opam-version: "2.0"
maintainer: "Tim McGilchrist <[email protected]>"
authors: [ "Spiros Eliopoulos <[email protected]>"
"Daniel Patterson <[email protected]>"
"Tim McGilchrist <[email protected]>"
]
synopsis: "Amazon Web Services SDK bindings to Amazon Rekognition"
description: "Amazon Web Services SDK bindings to Amazon Rekognition"
version: "1.1"
license: "BSD-3-clause"
homepage: "https://github.com/inhabitedtype/ocaml-aws"
dev-repo: "git+https://github.com/inhabitedtype/ocaml-aws.git"
bug-reports: "https://github.com/inhabitedtype/ocaml-aws/issues"
doc: "https://github.com/inhabitedtype/ocaml-aws"
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"aws" {>= "0.1.0"}
"dune" {build}
]
55 changes: 55 additions & 0 deletions libraries/rekognition/lib/compareFaces.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
open Types_internal
open Aws
type input = CompareFacesRequest.t
type output = CompareFacesResponse.t
type error = Errors_internal.t
let service = "rekognition"
let to_http req =
let uri =
Uri.add_query_params (Uri.of_string "https://rekognition.amazonaws.com")
(List.append
[("Version", ["2016-06-27"]); ("Action", ["CompareFaces"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (CompareFacesRequest.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "CompareFacesResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp CompareFacesResponse.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed CompareFacesResponse."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing CompareFacesResponse - missing field in body or children: "
^ msg)
})
with
| Failure msg ->
`Error
(let open Error in
BadResponse { body; message = ("Error parsing xml: " ^ msg) })
let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
(List.mem var errors) &&
((match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true))
then Some var
else None
| None -> None
7 changes: 7 additions & 0 deletions libraries/rekognition/lib/compareFaces.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types_internal
type input = CompareFacesRequest.t
type output = CompareFacesResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type
error := error
56 changes: 56 additions & 0 deletions libraries/rekognition/lib/createCollection.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
open Types_internal
open Aws
type input = CreateCollectionRequest.t
type output = CreateCollectionResponse.t
type error = Errors_internal.t
let service = "rekognition"
let to_http req =
let uri =
Uri.add_query_params (Uri.of_string "https://rekognition.amazonaws.com")
(List.append
[("Version", ["2016-06-27"]); ("Action", ["CreateCollection"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (CreateCollectionRequest.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "CreateCollectionResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp CreateCollectionResponse.parse)
(let open Error in
BadResponse
{
body;
message =
"Could not find well formed CreateCollectionResponse."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing CreateCollectionResponse - missing field in body or children: "
^ msg)
})
with
| Failure msg ->
`Error
(let open Error in
BadResponse { body; message = ("Error parsing xml: " ^ msg) })
let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
(List.mem var errors) &&
((match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true))
then Some var
else None
| None -> None
7 changes: 7 additions & 0 deletions libraries/rekognition/lib/createCollection.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types_internal
type input = CreateCollectionRequest.t
type output = CreateCollectionResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type
error := error
57 changes: 57 additions & 0 deletions libraries/rekognition/lib/createStreamProcessor.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
open Types_internal
open Aws
type input = CreateStreamProcessorRequest.t
type output = CreateStreamProcessorResponse.t
type error = Errors_internal.t
let service = "rekognition"
let to_http req =
let uri =
Uri.add_query_params (Uri.of_string "https://rekognition.amazonaws.com")
(List.append
[("Version", ["2016-06-27"]); ("Action", ["CreateStreamProcessor"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (CreateStreamProcessorRequest.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "CreateStreamProcessorResponse" (snd xml) in
try
Util.or_error
(Util.option_bind resp CreateStreamProcessorResponse.parse)
(let open Error in
BadResponse
{
body;
message =
"Could not find well formed CreateStreamProcessorResponse."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing CreateStreamProcessorResponse - missing field in body or children: "
^ msg)
})
with
| Failure msg ->
`Error
(let open Error in
BadResponse { body; message = ("Error parsing xml: " ^ msg) })
let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
(List.mem var errors) &&
((match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true))
then Some var
else None
| None -> None
7 changes: 7 additions & 0 deletions libraries/rekognition/lib/createStreamProcessor.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types_internal
type input = CreateStreamProcessorRequest.t
type output = CreateStreamProcessorResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type
error := error
56 changes: 56 additions & 0 deletions libraries/rekognition/lib/deleteCollection.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
open Types_internal
open Aws
type input = DeleteCollectionRequest.t
type output = DeleteCollectionResponse.t
type error = Errors_internal.t
let service = "rekognition"
let to_http req =
let uri =
Uri.add_query_params (Uri.of_string "https://rekognition.amazonaws.com")
(List.append
[("Version", ["2016-06-27"]); ("Action", ["DeleteCollection"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (DeleteCollectionRequest.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "DeleteCollectionResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp DeleteCollectionResponse.parse)
(let open Error in
BadResponse
{
body;
message =
"Could not find well formed DeleteCollectionResponse."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing DeleteCollectionResponse - missing field in body or children: "
^ msg)
})
with
| Failure msg ->
`Error
(let open Error in
BadResponse { body; message = ("Error parsing xml: " ^ msg) })
let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
(List.mem var errors) &&
((match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true))
then Some var
else None
| None -> None
7 changes: 7 additions & 0 deletions libraries/rekognition/lib/deleteCollection.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types_internal
type input = DeleteCollectionRequest.t
type output = DeleteCollectionResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type
error := error
54 changes: 54 additions & 0 deletions libraries/rekognition/lib/deleteFaces.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
open Types_internal
open Aws
type input = DeleteFacesRequest.t
type output = DeleteFacesResponse.t
type error = Errors_internal.t
let service = "rekognition"
let to_http req =
let uri =
Uri.add_query_params (Uri.of_string "https://rekognition.amazonaws.com")
(List.append [("Version", ["2016-06-27"]); ("Action", ["DeleteFaces"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (DeleteFacesRequest.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "DeleteFacesResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp DeleteFacesResponse.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed DeleteFacesResponse."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing DeleteFacesResponse - missing field in body or children: "
^ msg)
})
with
| Failure msg ->
`Error
(let open Error in
BadResponse { body; message = ("Error parsing xml: " ^ msg) })
let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
(List.mem var errors) &&
((match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true))
then Some var
else None
| None -> None
7 changes: 7 additions & 0 deletions libraries/rekognition/lib/deleteFaces.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types_internal
type input = DeleteFacesRequest.t
type output = DeleteFacesResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type
error := error
28 changes: 28 additions & 0 deletions libraries/rekognition/lib/deleteStreamProcessor.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
open Types_internal
open Aws
type input = DeleteStreamProcessorRequest.t
type output = unit
type error = Errors_internal.t
let service = "rekognition"
let to_http req =
let uri =
Uri.add_query_params (Uri.of_string "https://rekognition.amazonaws.com")
(List.append
[("Version", ["2016-06-27"]); ("Action", ["DeleteStreamProcessor"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (DeleteStreamProcessorRequest.to_query req))))) in
(`POST, uri, [])
let of_http body = `Ok ()
let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
(List.mem var errors) &&
((match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true))
then Some var
else None
| None -> None
Loading

0 comments on commit e222528

Please sign in to comment.