Skip to content

Commit

Permalink
Generate Elasticmapreduce support.
Browse files Browse the repository at this point in the history
Contains a manual fix for recursive modules Configuration / ConfigurationList.
  • Loading branch information
tmcgilchrist committed Aug 21, 2019
1 parent f105cc2 commit 47b5a31
Show file tree
Hide file tree
Showing 44 changed files with 6,301 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ LIBRARIES := \
aws-cloudwatch \
aws-elasticache \
aws-elasticloadbalancing \
aws-emr \
aws-rds \
aws-sdb \
aws-ssm \
Expand Down
22 changes: 22 additions & 0 deletions aws_elasticmapreduce.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 Elastic MapReduce"
description: "Amazon Web Services SDK bindings to Amazon Elastic MapReduce"
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}
]
1 change: 1 addition & 0 deletions input/emr/latest
57 changes: 57 additions & 0 deletions libraries/elasticmapreduce/lib/addInstanceGroups.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
open Types
open Aws
type input = AddInstanceGroupsInput.t
type output = AddInstanceGroupsOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http req =
let uri =
Uri.add_query_params
(Uri.of_string "https://elasticmapreduce.amazonaws.com")
(List.append
[("Version", ["2009-03-31"]); ("Action", ["AddInstanceGroups"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (AddInstanceGroupsInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "AddInstanceGroupsResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp AddInstanceGroupsOutput.parse)
(let open Error in
BadResponse
{
body;
message =
"Could not find well formed AddInstanceGroupsOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing AddInstanceGroupsOutput - 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.InternalFailure] @ 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/elasticmapreduce/lib/addInstanceGroups.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = AddInstanceGroupsInput.t
type output = AddInstanceGroupsOutput.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/elasticmapreduce/lib/addJobFlowSteps.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
open Types
open Aws
type input = AddJobFlowStepsInput.t
type output = AddJobFlowStepsOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http req =
let uri =
Uri.add_query_params
(Uri.of_string "https://elasticmapreduce.amazonaws.com")
(List.append
[("Version", ["2009-03-31"]); ("Action", ["AddJobFlowSteps"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (AddJobFlowStepsInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "AddJobFlowStepsResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp AddJobFlowStepsOutput.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed AddJobFlowStepsOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing AddJobFlowStepsOutput - 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.InternalFailure] @ 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/elasticmapreduce/lib/addJobFlowSteps.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = AddJobFlowStepsInput.t
type output = AddJobFlowStepsOutput.t
type error = Errors_internal.t
include
(Aws.Call with type input := input and type output := output and type
error := error)
27 changes: 27 additions & 0 deletions libraries/elasticmapreduce/lib/addTags.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
open Types
open Aws
type input = AddTagsInput.t
type output = unit
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http req =
let uri =
Uri.add_query_params
(Uri.of_string "https://elasticmapreduce.amazonaws.com")
(List.append [("Version", ["2009-03-31"]); ("Action", ["AddTags"])]
(Util.drop_empty
(Uri.query_of_encoded (Query.render (AddTagsInput.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
7 changes: 7 additions & 0 deletions libraries/elasticmapreduce/lib/addTags.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = AddTagsInput.t
type output = unit
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/elasticmapreduce/lib/describeCluster.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
open Types
open Aws
type input = DescribeClusterInput.t
type output = DescribeClusterOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http req =
let uri =
Uri.add_query_params
(Uri.of_string "https://elasticmapreduce.amazonaws.com")
(List.append
[("Version", ["2009-03-31"]); ("Action", ["DescribeCluster"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (DescribeClusterInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "DescribeClusterResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp DescribeClusterOutput.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed DescribeClusterOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing DescribeClusterOutput - 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/elasticmapreduce/lib/describeCluster.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = DescribeClusterInput.t
type output = DescribeClusterOutput.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/elasticmapreduce/lib/describeJobFlows.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
open Types
open Aws
type input = DescribeJobFlowsInput.t
type output = DescribeJobFlowsOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http req =
let uri =
Uri.add_query_params
(Uri.of_string "https://elasticmapreduce.amazonaws.com")
(List.append
[("Version", ["2009-03-31"]); ("Action", ["DescribeJobFlows"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (DescribeJobFlowsInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "DescribeJobFlowsResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp DescribeJobFlowsOutput.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed DescribeJobFlowsOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing DescribeJobFlowsOutput - 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.InternalFailure] @ 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/elasticmapreduce/lib/describeJobFlows.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = DescribeJobFlowsInput.t
type output = DescribeJobFlowsOutput.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/elasticmapreduce/lib/describeStep.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
open Types
open Aws
type input = DescribeStepInput.t
type output = DescribeStepOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http req =
let uri =
Uri.add_query_params
(Uri.of_string "https://elasticmapreduce.amazonaws.com")
(List.append
[("Version", ["2009-03-31"]); ("Action", ["DescribeStep"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (DescribeStepInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "DescribeStepResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp DescribeStepOutput.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed DescribeStepOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing DescribeStepOutput - 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
Loading

0 comments on commit 47b5a31

Please sign in to comment.