Skip to content

Commit

Permalink
Run EMR code gen.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgilchrist committed Sep 5, 2019
1 parent 87acf4d commit e709b51
Show file tree
Hide file tree
Showing 30 changed files with 4,817 additions and 505 deletions.
57 changes: 57 additions & 0 deletions libraries/elasticmapreduce/lib/addInstanceFleet.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
open Types
open Aws
type input = AddInstanceFleetInput.t
type output = AddInstanceFleetOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string
(Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[("Version", ["2009-03-31"]); ("Action", ["AddInstanceFleet"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (AddInstanceFleetInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "AddInstanceFleetResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp AddInstanceFleetOutput.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed AddInstanceFleetOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing AddInstanceFleetOutput - 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/addInstanceFleet.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = AddInstanceFleetInput.t
type output = AddInstanceFleetOutput.t
type error = Errors_internal.t
include
(Aws.Call with type input := input and type output := output and type
error := error)
2 changes: 1 addition & 1 deletion libraries/elasticmapreduce/lib/addInstanceGroups.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let of_http body =
(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
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
Expand Down
2 changes: 1 addition & 1 deletion libraries/elasticmapreduce/lib/addJobFlowSteps.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let of_http body =
(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
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
Expand Down
56 changes: 56 additions & 0 deletions libraries/elasticmapreduce/lib/cancelSteps.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
open Types
open Aws
type input = CancelStepsInput.t
type output = CancelStepsOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string
(Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append [("Version", ["2009-03-31"]); ("Action", ["CancelSteps"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (CancelStepsInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "CancelStepsResponse" (snd xml) in
try
Util.or_error (Util.option_bind resp CancelStepsOutput.parse)
(let open Error in
BadResponse
{
body;
message = "Could not find well formed CancelStepsOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing CancelStepsOutput - 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/cancelSteps.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = CancelStepsInput.t
type output = CancelStepsOutput.t
type error = Errors_internal.t
include
(Aws.Call with type input := input and type output := output and type
error := error)
60 changes: 60 additions & 0 deletions libraries/elasticmapreduce/lib/createSecurityConfiguration.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
open Types
open Aws
type input = CreateSecurityConfigurationInput.t
type output = CreateSecurityConfigurationOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string
(Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[("Version", ["2009-03-31"]);
("Action", ["CreateSecurityConfiguration"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (CreateSecurityConfigurationInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "CreateSecurityConfigurationResponse" (snd xml) in
try
Util.or_error
(Util.option_bind resp CreateSecurityConfigurationOutput.parse)
(let open Error in
BadResponse
{
body;
message =
"Could not find well formed CreateSecurityConfigurationOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing CreateSecurityConfigurationOutput - 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = CreateSecurityConfigurationInput.t
type output = CreateSecurityConfigurationOutput.t
type error = Errors_internal.t
include
(Aws.Call with type input := input and type output := output and type
error := error)
31 changes: 31 additions & 0 deletions libraries/elasticmapreduce/lib/deleteSecurityConfiguration.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
open Types
open Aws
type input = DeleteSecurityConfigurationInput.t
type output = unit
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string
(Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[("Version", ["2009-03-31"]);
("Action", ["DeleteSecurityConfiguration"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (DeleteSecurityConfigurationInput.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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = DeleteSecurityConfigurationInput.t
type output = unit
type error = Errors_internal.t
include
(Aws.Call with type input := input and type output := output and type
error := error)
2 changes: 1 addition & 1 deletion libraries/elasticmapreduce/lib/describeJobFlows.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let of_http body =
(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
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if
Expand Down
61 changes: 61 additions & 0 deletions libraries/elasticmapreduce/lib/describeSecurityConfiguration.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
open Types
open Aws
type input = DescribeSecurityConfigurationInput.t
type output = DescribeSecurityConfigurationOutput.t
type error = Errors_internal.t
let service = "elasticmapreduce"
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string
(Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[("Version", ["2009-03-31"]);
("Action", ["DescribeSecurityConfiguration"])]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render
(DescribeSecurityConfigurationInput.to_query req))))) in
(`POST, uri, [])
let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp = Xml.member "DescribeSecurityConfigurationResponse" (snd xml) in
try
Util.or_error
(Util.option_bind resp DescribeSecurityConfigurationOutput.parse)
(let open Error in
BadResponse
{
body;
message =
"Could not find well formed DescribeSecurityConfigurationOutput."
})
with
| Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{
body;
message =
("Error parsing DescribeSecurityConfigurationOutput - 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
open Types
type input = DescribeSecurityConfigurationInput.t
type output = DescribeSecurityConfigurationOutput.t
type error = Errors_internal.t
include
(Aws.Call with type input := input and type output := output and type
error := error)
4 changes: 4 additions & 0 deletions libraries/elasticmapreduce/lib/errors_internal.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type t =
| IdempotentParameterMismatch
| IncompleteSignature
| InternalFailure
| InternalServerError
| InternalServerException
| InvalidAction
| InvalidClientTokenId
Expand Down Expand Up @@ -63,6 +64,7 @@ let to_http_code e =
| IdempotentParameterMismatch -> None
| IncompleteSignature -> Some 400
| InternalFailure -> Some 500
| InternalServerError -> None
| InternalServerException -> None
| InvalidAction -> Some 400
| InvalidClientTokenId -> Some 403
Expand Down Expand Up @@ -94,6 +96,7 @@ let to_string e =
| IdempotentParameterMismatch -> "IdempotentParameterMismatch"
| IncompleteSignature -> "IncompleteSignature"
| InternalFailure -> "InternalFailure"
| InternalServerError -> "InternalServerError"
| InternalServerException -> "InternalServerException"
| InvalidAction -> "InvalidAction"
| InvalidClientTokenId -> "InvalidClientTokenId"
Expand Down Expand Up @@ -125,6 +128,7 @@ let of_string e =
| "IdempotentParameterMismatch" -> Some IdempotentParameterMismatch
| "IncompleteSignature" -> Some IncompleteSignature
| "InternalFailure" -> Some InternalFailure
| "InternalServerError" -> Some InternalServerError
| "InternalServerException" -> Some InternalServerException
| "InvalidAction" -> Some InvalidAction
| "InvalidClientTokenId" -> Some InvalidClientTokenId
Expand Down
Loading

0 comments on commit e709b51

Please sign in to comment.