123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319(* generated by: awso-codegen generate-all --botocore-data vendor/botocore/botocore/data -o aws --runtime-dir lib/runtime/awso --cli-dir awso-cli *)openAwsoopen!Import[@@@warning"-32"]letservice=Service.apigatewaymanagementapiletapiVersion="2018-11-29"letendpointPrefix="execute-api"letserviceFullName="AmazonApiGatewayManagementApi"letsignatureVersion="v4"letprotocol="rest_json"letglobalEndpoint=endpointPrefix^".amazonaws.com"letsimple_to_jsonto_valuex=Botodata.Json.value_to_json_scalar(to_valuex)letcomposed_to_jsonto_valuex=Botodata.Json.value_to_json(to_valuex)letto_queryto_valuex=Client.Query.of_value(to_valuex)letstructure_to_value_auxst~f=letfilter=function|(k,Somev)->Some(k,v)|_->Noneinletpairkv=(k,v)inletdefer_value(k,dv)=pairkdvin((List.filter_mapst~f:filter)|>(List.map~f:defer_value))|>(funx->`Structure(fx))letstructure_to_value=structure_to_value_aux~f:Fn.idletstructure_to_wrapped_value~wrapper~response=structure_to_value_aux~f:(funx->[(wrapper,(`Structurex));(response,(`Structure[]))])moduleZz__string=structtypenonrect=stringletcontext_="__string"letmakei=iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"__string"jletto_json=simple_to_jsonto_valueendmoduleData=structtypenonrect=string[@@ocaml.doc"The data to be sent to the client specified by its connection id."]letmakei=iletof_stringx=xletto_valuex=`Blobxletto_queryv=to_queryto_valuevletto_headerx=xletof_xmlxml_arg0=string_of_xml~kind:"a blob"xml_arg0letof_jsonj=string_of_json~kind:"a blob"jletto_json=simple_to_jsonto_valueend[@@ocaml.doc"The data to be sent to the client specified by its connection id."]moduleForbiddenException=structtypenonrect=unitletmake()=()letof_header_and_body=((fun(xs,pipe)->make())[@warning"-27"])letto_value_=`Structure[]letto_queryv=to_queryto_valuevletof_xml_=make()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_json_=make()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The caller is not authorized to invoke this operation."]moduleGoneException=structtypenonrect=unitletmake()=()letof_header_and_body=((fun(xs,pipe)->make())[@warning"-27"])letto_value_=`Structure[]letto_queryv=to_queryto_valuevletof_xml_=make()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_json_=make()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The connection with the provided id no longer exists."]moduleIdentity=structtypenonrect={sourceIp:Zz__string.toption[@ocaml.doc"The source IP address of the TCP connection making the request to API Gateway."];userAgent:Zz__string.toption[@ocaml.doc"The User Agent of the API caller."]}letmake?sourceIp=fun?userAgent->fun()->{sourceIp;userAgent}letto_valuex=structure_to_value[("sourceIp",(Option.mapx.sourceIp~f:Zz__string.to_value));("userAgent",(Option.mapx.userAgent~f:Zz__string.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letuserAgent=(Option.map~f:Zz__string.of_xml)(Xml.childxml_arg0"userAgent")inletsourceIp=(Option.map~f:Zz__string.of_xml)(Xml.childxml_arg0"sourceIp")inmake?userAgent?sourceIp()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letuserAgent=field_mapjson__"UserAgent"Zz__string.of_jsoninletsourceIp=field_mapjson__"SourceIp"Zz__string.of_jsoninmake?userAgent?sourceIp()letto_jsonv=composed_to_jsonto_valuevendmoduleLimitExceededException=structtypenonrect=unitletmake()=()letof_header_and_body=((fun(xs,pipe)->make())[@warning"-27"])letto_value_=`Structure[]letto_queryv=to_queryto_valuevletof_xml_=make()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_json_=make()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full."]moduleZz__timestampIso8601=structtypenonrect=stringletmakei=iletof_stringx=xletto_valuex=`Timestampxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=string_of_xml~kind:"a timestamp"letof_json=timestamp_of_jsonletto_json=simple_to_jsonto_valueendmodulePostToConnectionRequest=structtypenonrect={data:Data.t[@ocaml.doc"The data to be sent to the client specified by its connection id."];connectionId:Zz__string.t[@ocaml.doc"The identifier of the connection that a specific client is using."]}letcontext_="PostToConnectionRequest"letmake~data=fun~connectionId->fun()->{data;connectionId}letof_header_and_body=((fun(xs,pipe)->make~data:pipe~connectionId:(Zz__string.of_string((List.Assoc.find_exn~equal:String.Caseless.equal)xs"connectionId"))())[@warning"-27"])letto_valuex=structure_to_value[("Data",(Some(Data.to_valuex.data)));("connectionId",(Some(Zz__string.to_valuex.connectionId)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letconnectionId=Zz__string.of_xml(Xml.child_exn~context:context_xml_arg0"connectionId")inletdata=Data.of_xml(Xml.child_exn~context:context_xml_arg0"Data")inmake~connectionId~data()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letconnectionId=field_map_exnjson__"ConnectionId"Zz__string.of_jsoninletdata=field_map_exnjson__"Data"Data.of_jsoninmake~connectionId~data()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Sends the provided data to the specified connection."]modulePayloadTooLargeException=structtypenonrect={message:Zz__string.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:Zz__string.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:Zz__string.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"Zz__string.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The data has exceeded the maximum size allowed."]moduleGetConnectionResponse=structtypenonrect={connectedAt:Zz__timestampIso8601.toption[@ocaml.doc"The time in ISO 8601 format for when the connection was established."];identity:Identity.toption;lastActiveAt:Zz__timestampIso8601.toption[@ocaml.doc"The time in ISO 8601 format for when the connection was last active."]}typenonrecerror=[`ForbiddenExceptionofForbiddenException.t|`GoneExceptionofGoneException.t|`LimitExceededExceptionofLimitExceededException.t|`Unknown_operation_errorof(string*stringoption)]letmake?connectedAt=fun?identity->fun?lastActiveAt->fun()->{connectedAt;identity;lastActiveAt}leterror_of_jsonnamejson=matchnamewith|"ForbiddenException"->`ForbiddenException(ForbiddenException.of_jsonjson)|"GoneException"->`GoneException(GoneException.of_jsonjson)|"LimitExceededException"->`LimitExceededException(LimitExceededException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"ForbiddenException"->`ForbiddenException(ForbiddenException.of_xmlxml)|"GoneException"->`GoneException(GoneException.of_xmlxml)|"LimitExceededException"->`LimitExceededException(LimitExceededException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`ForbiddenExceptione->`Assoc[("error",(`String"ForbiddenException"));("details",(ForbiddenException.to_jsone))]|`GoneExceptione->`Assoc[("error",(`String"GoneException"));("details",(GoneException.to_jsone))]|`LimitExceededExceptione->`Assoc[("error",(`String"LimitExceededException"));("details",(LimitExceededException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("connectedAt",(Option.mapx.connectedAt~f:Zz__timestampIso8601.to_value));("identity",(Option.mapx.identity~f:Identity.to_value));("lastActiveAt",(Option.mapx.lastActiveAt~f:Zz__timestampIso8601.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letlastActiveAt=(Option.map~f:Zz__timestampIso8601.of_xml)(Xml.childxml_arg0"lastActiveAt")inletidentity=(Option.map~f:Identity.of_xml)(Xml.childxml_arg0"identity")inletconnectedAt=(Option.map~f:Zz__timestampIso8601.of_xml)(Xml.childxml_arg0"connectedAt")inmake?lastActiveAt?identity?connectedAt()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letlastActiveAt=field_mapjson__"LastActiveAt"Zz__timestampIso8601.of_jsoninletidentity=field_mapjson__"Identity"Identity.of_jsoninletconnectedAt=field_mapjson__"ConnectedAt"Zz__timestampIso8601.of_jsoninmake?lastActiveAt?identity?connectedAt()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Get information about the connection with the provided id."]moduleGetConnectionRequest=structtypenonrect={connectionId:Zz__string.t}letcontext_="GetConnectionRequest"letmake~connectionId=fun()->{connectionId}letto_valuex=structure_to_value[("connectionId",(Some(Zz__string.to_valuex.connectionId)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letconnectionId=Zz__string.of_xml(Xml.child_exn~context:context_xml_arg0"connectionId")inmake~connectionId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letconnectionId=field_map_exnjson__"ConnectionId"Zz__string.of_jsoninmake~connectionId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Get information about the connection with the provided id."]moduleDeleteConnectionRequest=structtypenonrect={connectionId:Zz__string.t}letcontext_="DeleteConnectionRequest"letmake~connectionId=fun()->{connectionId}letto_valuex=structure_to_value[("connectionId",(Some(Zz__string.to_valuex.connectionId)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letconnectionId=Zz__string.of_xml(Xml.child_exn~context:context_xml_arg0"connectionId")inmake~connectionId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letconnectionId=field_map_exnjson__"ConnectionId"Zz__string.of_jsoninmake~connectionId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Delete the connection with the provided id."]