123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839(* 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.iot_dataletapiVersion="2015-05-28"letendpointPrefix="data-ats.iot"letserviceFullName="AWS IoT Data Plane"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[]))])modulePayloadSize=structtypenonrect=Int64.tletmakei=iletof_string=Int64.of_stringletto_valuex=`Longxletto_queryv=to_queryto_valuevletto_headerx=Int64.to_stringxletof_xmlxml_arg0=Int64.of_string(string_of_xml~kind:"a long"xml_arg0)letof_jsonj=Int64.of_float(float_of_json~kind:"a long"j)letto_json=simple_to_jsonto_valueendmoduleQos=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:1)>>=(fun()->check_int_mini~min:0));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for Qos"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleTimestamp=structtypenonrect=Int64.tletmakei=iletof_string=Int64.of_stringletto_valuex=`Longxletto_queryv=to_queryto_valuevletto_headerx=Int64.to_stringxletof_xmlxml_arg0=Int64.of_string(string_of_xml~kind:"a long"xml_arg0)letof_jsonj=Int64.of_float(float_of_json~kind:"a long"j)letto_json=simple_to_jsonto_valueendmoduleTopic=structtypenonrect=stringletcontext_="Topic"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:"Topic"jletto_json=simple_to_jsonto_valueendmoduleErrorMessage=structtypenonrect=stringletcontext_="errorMessage"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:"errorMessage"jletto_json=simple_to_jsonto_valueendmoduleRetainedMessageSummary=structtypenonrect={topic:Topic.toption[@ocaml.doc"The topic name to which the retained message was published."];payloadSize:PayloadSize.toption[@ocaml.doc"The size of the retained message's payload in bytes."];qos:Qos.toption[@ocaml.doc"The quality of service (QoS) level used to publish the retained message."];lastModifiedTime:Timestamp.toption[@ocaml.doc"The Epoch date and time, in milliseconds, when the retained message was stored by IoT."]}letmake?topic=fun?payloadSize->fun?qos->fun?lastModifiedTime->fun()->{topic;payloadSize;qos;lastModifiedTime}letto_valuex=structure_to_value[("topic",(Option.mapx.topic~f:Topic.to_value));("payloadSize",(Option.mapx.payloadSize~f:PayloadSize.to_value));("qos",(Option.mapx.qos~f:Qos.to_value));("lastModifiedTime",(Option.mapx.lastModifiedTime~f:Timestamp.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letlastModifiedTime=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"lastModifiedTime")inletqos=(Option.map~f:Qos.of_xml)(Xml.childxml_arg0"qos")inletpayloadSize=(Option.map~f:PayloadSize.of_xml)(Xml.childxml_arg0"payloadSize")inlettopic=(Option.map~f:Topic.of_xml)(Xml.childxml_arg0"topic")inmake?lastModifiedTime?qos?payloadSize?topic()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letlastModifiedTime=field_mapjson__"lastModifiedTime"Timestamp.of_jsoninletqos=field_mapjson__"qos"Qos.of_jsoninletpayloadSize=field_mapjson__"payloadSize"PayloadSize.of_jsoninlettopic=field_mapjson__"topic"Topic.of_jsoninmake?lastModifiedTime?qos?payloadSize?topic()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about a single retained message."]moduleShadowName=structtypenonrect=stringletcontext_="ShadowName"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:64)>>=(fun()->check_patterni~pattern:"[$a-zA-Z0-9:_-]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ShadowName"jletto_json=simple_to_jsonto_valueendmoduleConflictException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The specified version does not match the version of the document."]moduleInternalFailureException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"An unexpected error has occurred."]moduleInvalidRequestException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The request is not valid."]moduleJsonDocument=structtypenonrect=stringletmakei=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_valueendmoduleMethodNotAllowedException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The specified combination of HTTP verb and URI is not supported."]moduleRequestEntityTooLargeException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The payload exceeds the maximum size allowed."]moduleServiceUnavailableException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The service is temporarily unavailable."]moduleThrottlingException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The rate exceeds the limit."]moduleUnauthorizedException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"You are not authorized to perform this operation."]moduleUnsupportedDocumentEncodingException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The document encoding is not supported."]moduleThingName=structtypenonrect=stringletcontext_="ThingName"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:128)>>=(fun()->check_patterni~pattern:"[a-zA-Z0-9:_-]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ThingName"jletto_json=simple_to_jsonto_valueendmoduleContentType=structtypenonrect=stringletcontext_="ContentType"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:"ContentType"jletto_json=simple_to_jsonto_valueendmoduleCorrelationData=structtypenonrect=stringletcontext_="CorrelationData"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:"CorrelationData"jletto_json=simple_to_jsonto_valueendmoduleMessageExpiry=structtypenonrect=Int64.tletmakei=iletof_string=Int64.of_stringletto_valuex=`Longxletto_queryv=to_queryto_valuevletto_headerx=Int64.to_stringxletof_xmlxml_arg0=Int64.of_string(string_of_xml~kind:"a long"xml_arg0)letof_jsonj=Int64.of_float(float_of_json~kind:"a long"j)letto_json=simple_to_jsonto_valueendmodulePayload=structtypenonrect=stringletmakei=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_valueendmodulePayloadFormatIndicator=structtypenonrect=|UNSPECIFIED_BYTES|UTF8_DATA|Non_static_idofstringletmakei=iletto_string=function|UNSPECIFIED_BYTES->"UNSPECIFIED_BYTES"|UTF8_DATA->"UTF8_DATA"|Non_static_ids->sletof_string=function|"UNSPECIFIED_BYTES"->UNSPECIFIED_BYTES|"UTF8_DATA"->UTF8_DATA|x->Non_static_idxletto_valuex=`Enum(to_stringx)letto_queryv=to_queryto_valuevletto_headerx=to_stringxletof_xmlxml_arg0=of_string(string_of_xml~kind:"enumeration PayloadFormatIndicator"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"PayloadFormatIndicator"j)letto_json=simple_to_jsonto_valueendmoduleResponseTopic=structtypenonrect=stringletcontext_="ResponseTopic"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:"ResponseTopic"jletto_json=simple_to_jsonto_valueendmoduleRetain=structtypenonrect=boolletmakei=iletof_string=Bool.of_stringletto_valuex=`Booleanxletto_queryv=to_queryto_valuevletto_headerx=Bool.to_stringxletof_xmlxml_arg0=Bool.of_string(string_of_xml~kind:"a boolean"xml_arg0)letof_json=bool_of_jsonletto_json=simple_to_jsonto_valueendmoduleUserProperties=structtypenonrect=stringletcontext_="UserProperties"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:"UserProperties"jletto_json=simple_to_jsonto_valueendmoduleNextToken=structtypenonrect=stringletcontext_="NextToken"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:"NextToken"jletto_json=simple_to_jsonto_valueendmoduleRetainedMessageList=structtypenonrect=RetainedMessageSummary.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:RetainedMessageSummary.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:RetainedMessageSummary.of_xml)letof_jsonj=list_of_json~kind:"RetainedMessageList"~of_json:RetainedMessageSummary.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleMaxResults=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:200)>>=(fun()->check_int_mini~min:1));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for MaxResults"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleNamedShadowList=structtypenonrect=ShadowName.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:ShadowName.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:ShadowName.of_xml)letof_jsonj=list_of_json~kind:"NamedShadowList"~of_json:ShadowName.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleResourceNotFoundException=structtypenonrect={message:ErrorMessage.toption[@ocaml.doc"The message for the exception."]}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The specified resource does not exist."]modulePageSize=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:100)>>=(fun()->check_int_mini~min:1));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for PageSize"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleUserPropertiesBlob=structtypenonrect=stringletmakei=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_valueendmoduleCleanSession=structtypenonrect=boolletmakei=iletof_string=Bool.of_stringletto_valuex=`Booleanxletto_queryv=to_queryto_valuevletto_headerx=Bool.to_stringxletof_xmlxml_arg0=Bool.of_string(string_of_xml~kind:"a boolean"xml_arg0)letof_json=bool_of_jsonletto_json=simple_to_jsonto_valueendmoduleClientId=structtypenonrect=stringletcontext_="ClientId"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:128)>>=(fun()->check_patterni~pattern:"^[^$].*")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ClientId"jletto_json=simple_to_jsonto_valueendmodulePreventWillMessage=structtypenonrect=boolletmakei=iletof_string=Bool.of_stringletto_valuex=`Booleanxletto_queryv=to_queryto_valuevletto_headerx=Bool.to_stringxletof_xmlxml_arg0=Bool.of_string(string_of_xml~kind:"a boolean"xml_arg0)letof_json=bool_of_jsonletto_json=simple_to_jsonto_valueendmoduleUpdateThingShadowResponse=structtypenonrect={payload:JsonDocument.toption[@ocaml.doc"The state information, in JSON format."]}typenonrecerror=[`ConflictExceptionofConflictException.t|`InternalFailureExceptionofInternalFailureException.t|`InvalidRequestExceptionofInvalidRequestException.t|`MethodNotAllowedExceptionofMethodNotAllowedException.t|`RequestEntityTooLargeExceptionofRequestEntityTooLargeException.t|`ServiceUnavailableExceptionofServiceUnavailableException.t|`ThrottlingExceptionofThrottlingException.t|`UnauthorizedExceptionofUnauthorizedException.t|`UnsupportedDocumentEncodingExceptionofUnsupportedDocumentEncodingException.t|`Unknown_operation_errorof(string*stringoption)]letmake?payload=fun()->{payload}leterror_of_jsonnamejson=matchnamewith|"ConflictException"->`ConflictException(ConflictException.of_jsonjson)|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_jsonjson)|"RequestEntityTooLargeException"->`RequestEntityTooLargeException(RequestEntityTooLargeException.of_jsonjson)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|"UnsupportedDocumentEncodingException"->`UnsupportedDocumentEncodingException(UnsupportedDocumentEncodingException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"ConflictException"->`ConflictException(ConflictException.of_xmlxml)|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_xmlxml)|"RequestEntityTooLargeException"->`RequestEntityTooLargeException(RequestEntityTooLargeException.of_xmlxml)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|"UnsupportedDocumentEncodingException"->`UnsupportedDocumentEncodingException(UnsupportedDocumentEncodingException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`ConflictExceptione->`Assoc[("error",(`String"ConflictException"));("details",(ConflictException.to_jsone))]|`InternalFailureExceptione->`Assoc[("error",(`String"InternalFailureException"));("details",(InternalFailureException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`MethodNotAllowedExceptione->`Assoc[("error",(`String"MethodNotAllowedException"));("details",(MethodNotAllowedException.to_jsone))]|`RequestEntityTooLargeExceptione->`Assoc[("error",(`String"RequestEntityTooLargeException"));("details",(RequestEntityTooLargeException.to_jsone))]|`ServiceUnavailableExceptione->`Assoc[("error",(`String"ServiceUnavailableException"));("details",(ServiceUnavailableException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`UnsupportedDocumentEncodingExceptione->`Assoc[("error",(`String"UnsupportedDocumentEncodingException"));("details",(UnsupportedDocumentEncodingException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letof_header_and_body=((fun(xs,pipe)->make?payload:(Somepipe)())[@warning"-27"])letto_valuex=structure_to_value[("payload",(Option.mapx.payload~f:JsonDocument.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpayload=(Option.map~f:JsonDocument.of_xml)(Xml.childxml_arg0"payload")inmake?payload()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpayload=field_mapjson__"payload"JsonDocument.of_jsoninmake?payload()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The output from the UpdateThingShadow operation."]moduleUpdateThingShadowRequest=structtypenonrect={thingName:ThingName.t[@ocaml.doc"The name of the thing."];shadowName:ShadowName.toption[@ocaml.doc"The name of the shadow."];payload:JsonDocument.t[@ocaml.doc"The state information, in JSON format."]}letcontext_="UpdateThingShadowRequest"letmake?shadowName=fun~thingName->fun~payload->fun()->{shadowName;thingName;payload}letof_header_and_body=((fun(xs,pipe)->make~thingName:(ThingName.of_string((List.Assoc.find_exn~equal:String.Caseless.equal)xs"thingName"))?shadowName:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"name")~f:ShadowName.of_string)~payload:pipe())[@warning"-27"])letto_valuex=structure_to_value[("thingName",(Some(ThingName.to_valuex.thingName)));("name",(Option.mapx.shadowName~f:ShadowName.to_value));("payload",(Some(JsonDocument.to_valuex.payload)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpayload=JsonDocument.of_xml(Xml.child_exn~context:context_xml_arg0"payload")inletshadowName=(Option.map~f:ShadowName.of_xml)(Xml.childxml_arg0"name")inletthingName=ThingName.of_xml(Xml.child_exn~context:context_xml_arg0"thingName")inmake~payload?shadowName~thingName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpayload=field_map_exnjson__"payload"JsonDocument.of_jsoninletshadowName=field_mapjson__"shadowName"ShadowName.of_jsoninletthingName=field_map_exnjson__"thingName"ThingName.of_jsoninmake~payload?shadowName~thingName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The input for the UpdateThingShadow operation."]modulePublishRequest=structtypenonrect={topic:Topic.t[@ocaml.doc"The name of the MQTT topic."];qos:Qos.toption[@ocaml.doc"The Quality of Service (QoS) level. The default QoS level is 0."];retain:Retain.toption[@ocaml.doc"A Boolean value that determines whether to set the RETAIN flag when the message is published. Setting the RETAIN flag causes the message to be retained and sent to new subscribers to the topic. Valid values: true | false Default value: false"];payload:Payload.toption[@ocaml.doc"The message body. MQTT accepts text, binary, and empty (null) message payloads. Publishing an empty (null) payload with retain = true deletes the retained message identified by topic from Amazon Web Services IoT Core."];userProperties:UserProperties.toption[@ocaml.doc"A JSON string that contains an array of JSON objects. If you don\226\128\153t use Amazon Web Services SDK or CLI, you must encode the JSON string to base64 format before adding it to the HTTP header. userProperties is an HTTP header value in the API. The following example userProperties parameter is a JSON string which represents two User Properties. Note that it needs to be base64-encoded: \\[\\{\"deviceName\": \"alpha\"\\}, \\{\"deviceCnt\": \"45\"\\}\\]"];payloadFormatIndicator:PayloadFormatIndicator.toption[@ocaml.doc"An Enum string value that indicates whether the payload is formatted as UTF-8. payloadFormatIndicator is an HTTP header value in the API."];contentType:ContentType.toption[@ocaml.doc"A UTF-8 encoded string that describes the content of the publishing message."];responseTopic:ResponseTopic.toption[@ocaml.doc"A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters."];correlationData:CorrelationData.toption[@ocaml.doc"The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received. correlationData is an HTTP header value in the API."];messageExpiry:MessageExpiry.toption[@ocaml.doc"A user-defined integer value that represents the message expiry interval in seconds. If absent, the message doesn't expire. For more information about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide."]}letcontext_="PublishRequest"letmake?qos=fun?retain->fun?payload->fun?userProperties->fun?payloadFormatIndicator->fun?contentType->fun?responseTopic->fun?correlationData->fun?messageExpiry->fun~topic->fun()->{qos;retain;payload;userProperties;payloadFormatIndicator;contentType;responseTopic;correlationData;messageExpiry;topic}letof_header_and_body=((fun(xs,pipe)->make~topic:(Topic.of_string((List.Assoc.find_exn~equal:String.Caseless.equal)xs"topic"))?qos:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"qos")~f:Qos.of_string)?retain:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"retain")~f:Retain.of_string)?payload:(Somepipe)?userProperties:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"x-amz-mqtt5-user-properties")~f:UserProperties.of_string)?payloadFormatIndicator:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"x-amz-mqtt5-payload-format-indicator")~f:PayloadFormatIndicator.of_string)?contentType:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"contentType")~f:ContentType.of_string)?responseTopic:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"responseTopic")~f:ResponseTopic.of_string)?correlationData:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"x-amz-mqtt5-correlation-data")~f:CorrelationData.of_string)?messageExpiry:(Option.map((List.Assoc.find~equal:String.Caseless.equal)xs"messageExpiry")~f:MessageExpiry.of_string)())[@warning"-27"])letto_valuex=structure_to_value[("topic",(Some(Topic.to_valuex.topic)));("qos",(Option.mapx.qos~f:Qos.to_value));("retain",(Option.mapx.retain~f:Retain.to_value));("payload",(Option.mapx.payload~f:Payload.to_value));("x-amz-mqtt5-user-properties",(Option.mapx.userProperties~f:UserProperties.to_value));("x-amz-mqtt5-payload-format-indicator",(Option.mapx.payloadFormatIndicator~f:PayloadFormatIndicator.to_value));("contentType",(Option.mapx.contentType~f:ContentType.to_value));("responseTopic",(Option.mapx.responseTopic~f:ResponseTopic.to_value));("x-amz-mqtt5-correlation-data",(Option.mapx.correlationData~f:CorrelationData.to_value));("messageExpiry",(Option.mapx.messageExpiry~f:MessageExpiry.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessageExpiry=(Option.map~f:MessageExpiry.of_xml)(Xml.childxml_arg0"messageExpiry")inletcorrelationData=(Option.map~f:CorrelationData.of_xml)(Xml.childxml_arg0"x-amz-mqtt5-correlation-data")inletresponseTopic=(Option.map~f:ResponseTopic.of_xml)(Xml.childxml_arg0"responseTopic")inletcontentType=(Option.map~f:ContentType.of_xml)(Xml.childxml_arg0"contentType")inletpayloadFormatIndicator=(Option.map~f:PayloadFormatIndicator.of_xml)(Xml.childxml_arg0"x-amz-mqtt5-payload-format-indicator")inletuserProperties=(Option.map~f:UserProperties.of_xml)(Xml.childxml_arg0"x-amz-mqtt5-user-properties")inletpayload=(Option.map~f:Payload.of_xml)(Xml.childxml_arg0"payload")inletretain=(Option.map~f:Retain.of_xml)(Xml.childxml_arg0"retain")inletqos=(Option.map~f:Qos.of_xml)(Xml.childxml_arg0"qos")inlettopic=Topic.of_xml(Xml.child_exn~context:context_xml_arg0"topic")inmake?messageExpiry?correlationData?responseTopic?contentType?payloadFormatIndicator?userProperties?payload?retain?qos~topic()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessageExpiry=field_mapjson__"messageExpiry"MessageExpiry.of_jsoninletcorrelationData=field_mapjson__"correlationData"CorrelationData.of_jsoninletresponseTopic=field_mapjson__"responseTopic"ResponseTopic.of_jsoninletcontentType=field_mapjson__"contentType"ContentType.of_jsoninletpayloadFormatIndicator=field_mapjson__"payloadFormatIndicator"PayloadFormatIndicator.of_jsoninletuserProperties=field_mapjson__"userProperties"UserProperties.of_jsoninletpayload=field_mapjson__"payload"Payload.of_jsoninletretain=field_mapjson__"retain"Retain.of_jsoninletqos=field_mapjson__"qos"Qos.of_jsoninlettopic=field_map_exnjson__"topic"Topic.of_jsoninmake?messageExpiry?correlationData?responseTopic?contentType?payloadFormatIndicator?userProperties?payload?retain?qos~topic()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The input for the Publish operation."]moduleListRetainedMessagesResponse=structtypenonrect={retainedTopics:RetainedMessageList.toption[@ocaml.doc"A summary list the account's retained messages. The information returned doesn't include the message payloads of the retained messages."];nextToken:NextToken.toption[@ocaml.doc"The token for the next set of results, or null if there are no additional results."]}typenonrecerror=[`InternalFailureExceptionofInternalFailureException.t|`InvalidRequestExceptionofInvalidRequestException.t|`MethodNotAllowedExceptionofMethodNotAllowedException.t|`ServiceUnavailableExceptionofServiceUnavailableException.t|`ThrottlingExceptionofThrottlingException.t|`UnauthorizedExceptionofUnauthorizedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?retainedTopics=fun?nextToken->fun()->{retainedTopics;nextToken}leterror_of_jsonnamejson=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_jsonjson)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_xmlxml)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalFailureExceptione->`Assoc[("error",(`String"InternalFailureException"));("details",(InternalFailureException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`MethodNotAllowedExceptione->`Assoc[("error",(`String"MethodNotAllowedException"));("details",(MethodNotAllowedException.to_jsone))]|`ServiceUnavailableExceptione->`Assoc[("error",(`String"ServiceUnavailableException"));("details",(ServiceUnavailableException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("retainedTopics",(Option.mapx.retainedTopics~f:RetainedMessageList.to_value));("nextToken",(Option.mapx.nextToken~f:NextToken.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"nextToken")inletretainedTopics=(Option.map~f:RetainedMessageList.of_xml)(Xml.childxml_arg0"retainedTopics")inmake?nextToken?retainedTopics()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"nextToken"NextToken.of_jsoninletretainedTopics=field_mapjson__"retainedTopics"RetainedMessageList.of_jsoninmake?nextToken?retainedTopics()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists summary information about the retained messages stored for the account. This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs. To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message. Requires permission to access the ListRetainedMessages action. For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging."]moduleListRetainedMessagesRequest=structtypenonrect={nextToken:NextToken.toption[@ocaml.doc"To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results."];maxResults:MaxResults.toption[@ocaml.doc"The maximum number of results to return at one time."]}letmake?nextToken=fun?maxResults->fun()->{nextToken;maxResults}letto_valuex=structure_to_value[("nextToken",(Option.mapx.nextToken~f:NextToken.to_value));("maxResults",(Option.mapx.maxResults~f:MaxResults.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmaxResults=(Option.map~f:MaxResults.of_xml)(Xml.childxml_arg0"maxResults")inletnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"nextToken")inmake?maxResults?nextToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmaxResults=field_mapjson__"maxResults"MaxResults.of_jsoninletnextToken=field_mapjson__"nextToken"NextToken.of_jsoninmake?maxResults?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists summary information about the retained messages stored for the account. This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs. To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message. Requires permission to access the ListRetainedMessages action. For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging."]moduleListNamedShadowsForThingResponse=structtypenonrect={results:NamedShadowList.toption[@ocaml.doc"The list of shadows for the specified thing."];nextToken:NextToken.toption[@ocaml.doc"The token to use to get the next set of results, or null if there are no additional results."];timestamp:Timestamp.toption[@ocaml.doc"The Epoch date and time the response was generated by IoT."]}typenonrecerror=[`InternalFailureExceptionofInternalFailureException.t|`InvalidRequestExceptionofInvalidRequestException.t|`MethodNotAllowedExceptionofMethodNotAllowedException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ServiceUnavailableExceptionofServiceUnavailableException.t|`ThrottlingExceptionofThrottlingException.t|`UnauthorizedExceptionofUnauthorizedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?results=fun?nextToken->fun?timestamp->fun()->{results;nextToken;timestamp}leterror_of_jsonnamejson=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalFailureExceptione->`Assoc[("error",(`String"InternalFailureException"));("details",(InternalFailureException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`MethodNotAllowedExceptione->`Assoc[("error",(`String"MethodNotAllowedException"));("details",(MethodNotAllowedException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ServiceUnavailableExceptione->`Assoc[("error",(`String"ServiceUnavailableException"));("details",(ServiceUnavailableException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("results",(Option.mapx.results~f:NamedShadowList.to_value));("nextToken",(Option.mapx.nextToken~f:NextToken.to_value));("timestamp",(Option.mapx.timestamp~f:Timestamp.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettimestamp=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"timestamp")inletnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"nextToken")inletresults=(Option.map~f:NamedShadowList.of_xml)(Xml.childxml_arg0"results")inmake?timestamp?nextToken?results()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettimestamp=field_mapjson__"timestamp"Timestamp.of_jsoninletnextToken=field_mapjson__"nextToken"NextToken.of_jsoninletresults=field_mapjson__"results"NamedShadowList.of_jsoninmake?timestamp?nextToken?results()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists the shadows for the specified thing. Requires permission to access the ListNamedShadowsForThing action."]moduleListNamedShadowsForThingRequest=structtypenonrect={thingName:ThingName.t[@ocaml.doc"The name of the thing."];nextToken:NextToken.toption[@ocaml.doc"The token to retrieve the next set of results."];pageSize:PageSize.toption[@ocaml.doc"The result page size."]}letcontext_="ListNamedShadowsForThingRequest"letmake?nextToken=fun?pageSize->fun~thingName->fun()->{nextToken;pageSize;thingName}letto_valuex=structure_to_value[("thingName",(Some(ThingName.to_valuex.thingName)));("nextToken",(Option.mapx.nextToken~f:NextToken.to_value));("pageSize",(Option.mapx.pageSize~f:PageSize.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpageSize=(Option.map~f:PageSize.of_xml)(Xml.childxml_arg0"pageSize")inletnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"nextToken")inletthingName=ThingName.of_xml(Xml.child_exn~context:context_xml_arg0"thingName")inmake?pageSize?nextToken~thingName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpageSize=field_mapjson__"pageSize"PageSize.of_jsoninletnextToken=field_mapjson__"nextToken"NextToken.of_jsoninletthingName=field_map_exnjson__"thingName"ThingName.of_jsoninmake?pageSize?nextToken~thingName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Lists the shadows for the specified thing. Requires permission to access the ListNamedShadowsForThing action."]moduleGetThingShadowResponse=structtypenonrect={payload:JsonDocument.toption[@ocaml.doc"The state information, in JSON format."]}typenonrecerror=[`InternalFailureExceptionofInternalFailureException.t|`InvalidRequestExceptionofInvalidRequestException.t|`MethodNotAllowedExceptionofMethodNotAllowedException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ServiceUnavailableExceptionofServiceUnavailableException.t|`ThrottlingExceptionofThrottlingException.t|`UnauthorizedExceptionofUnauthorizedException.t|`UnsupportedDocumentEncodingExceptionofUnsupportedDocumentEncodingException.t|`Unknown_operation_errorof(string*stringoption)]letmake?payload=fun()->{payload}leterror_of_jsonnamejson=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|"UnsupportedDocumentEncodingException"->`UnsupportedDocumentEncodingException(UnsupportedDocumentEncodingException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|"UnsupportedDocumentEncodingException"->`UnsupportedDocumentEncodingException(UnsupportedDocumentEncodingException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalFailureExceptione->`Assoc[("error",(`String"InternalFailureException"));("details",(InternalFailureException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`MethodNotAllowedExceptione->`Assoc[("error",(`String"MethodNotAllowedException"));("details",(MethodNotAllowedException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ServiceUnavailableExceptione->`Assoc[("error",(`String"ServiceUnavailableException"));("details",(ServiceUnavailableException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`UnsupportedDocumentEncodingExceptione->`Assoc[("error",(`String"UnsupportedDocumentEncodingException"));("details",(UnsupportedDocumentEncodingException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letof_header_and_body=((fun(xs,pipe)->make?payload:(Somepipe)())[@warning"-27"])letto_valuex=structure_to_value[("payload",(Option.mapx.payload~f:JsonDocument.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpayload=(Option.map~f:JsonDocument.of_xml)(Xml.childxml_arg0"payload")inmake?payload()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpayload=field_mapjson__"payload"JsonDocument.of_jsoninmake?payload()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The output from the GetThingShadow operation."]moduleGetThingShadowRequest=structtypenonrect={thingName:ThingName.t[@ocaml.doc"The name of the thing."];shadowName:ShadowName.toption[@ocaml.doc"The name of the shadow."]}letcontext_="GetThingShadowRequest"letmake?shadowName=fun~thingName->fun()->{shadowName;thingName}letto_valuex=structure_to_value[("thingName",(Some(ThingName.to_valuex.thingName)));("name",(Option.mapx.shadowName~f:ShadowName.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letshadowName=(Option.map~f:ShadowName.of_xml)(Xml.childxml_arg0"name")inletthingName=ThingName.of_xml(Xml.child_exn~context:context_xml_arg0"thingName")inmake?shadowName~thingName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letshadowName=field_mapjson__"shadowName"ShadowName.of_jsoninletthingName=field_map_exnjson__"thingName"ThingName.of_jsoninmake?shadowName~thingName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The input for the GetThingShadow operation."]moduleGetRetainedMessageResponse=structtypenonrect={topic:Topic.toption[@ocaml.doc"The topic name to which the retained message was published."];payload:Payload.toption[@ocaml.doc"The Base64-encoded message payload of the retained message body."];qos:Qos.toption[@ocaml.doc"The quality of service (QoS) level used to publish the retained message."];lastModifiedTime:Timestamp.toption[@ocaml.doc"The Epoch date and time, in milliseconds, when the retained message was stored by IoT."];userProperties:UserPropertiesBlob.toption[@ocaml.doc"A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't include any user properties. The following example userProperties parameter is a JSON string that represents two user properties. Note that it will be base64-encoded: \\[\\{\"deviceName\": \"alpha\"\\}, \\{\"deviceCnt\": \"45\"\\}\\]"]}typenonrecerror=[`InternalFailureExceptionofInternalFailureException.t|`InvalidRequestExceptionofInvalidRequestException.t|`MethodNotAllowedExceptionofMethodNotAllowedException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ServiceUnavailableExceptionofServiceUnavailableException.t|`ThrottlingExceptionofThrottlingException.t|`UnauthorizedExceptionofUnauthorizedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?topic=fun?payload->fun?qos->fun?lastModifiedTime->fun?userProperties->fun()->{topic;payload;qos;lastModifiedTime;userProperties}leterror_of_jsonnamejson=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalFailureExceptione->`Assoc[("error",(`String"InternalFailureException"));("details",(InternalFailureException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`MethodNotAllowedExceptione->`Assoc[("error",(`String"MethodNotAllowedException"));("details",(MethodNotAllowedException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ServiceUnavailableExceptione->`Assoc[("error",(`String"ServiceUnavailableException"));("details",(ServiceUnavailableException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("topic",(Option.mapx.topic~f:Topic.to_value));("payload",(Option.mapx.payload~f:Payload.to_value));("qos",(Option.mapx.qos~f:Qos.to_value));("lastModifiedTime",(Option.mapx.lastModifiedTime~f:Timestamp.to_value));("userProperties",(Option.mapx.userProperties~f:UserPropertiesBlob.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letuserProperties=(Option.map~f:UserPropertiesBlob.of_xml)(Xml.childxml_arg0"userProperties")inletlastModifiedTime=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"lastModifiedTime")inletqos=(Option.map~f:Qos.of_xml)(Xml.childxml_arg0"qos")inletpayload=(Option.map~f:Payload.of_xml)(Xml.childxml_arg0"payload")inlettopic=(Option.map~f:Topic.of_xml)(Xml.childxml_arg0"topic")inmake?userProperties?lastModifiedTime?qos?payload?topic()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letuserProperties=field_mapjson__"userProperties"UserPropertiesBlob.of_jsoninletlastModifiedTime=field_mapjson__"lastModifiedTime"Timestamp.of_jsoninletqos=field_mapjson__"qos"Qos.of_jsoninletpayload=field_mapjson__"payload"Payload.of_jsoninlettopic=field_mapjson__"topic"Topic.of_jsoninmake?userProperties?lastModifiedTime?qos?payload?topic()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The output from the GetRetainedMessage operation."]moduleGetRetainedMessageRequest=structtypenonrect={topic:Topic.t[@ocaml.doc"The topic name of the retained message to retrieve."]}letcontext_="GetRetainedMessageRequest"letmake~topic=fun()->{topic}letto_valuex=structure_to_value[("topic",(Some(Topic.to_valuex.topic)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettopic=Topic.of_xml(Xml.child_exn~context:context_xml_arg0"topic")inmake~topic()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettopic=field_map_exnjson__"topic"Topic.of_jsoninmake~topic()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The input for the GetRetainedMessage operation."]moduleForbiddenException=structtypenonrect={message:ErrorMessage.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The caller isn't authorized to make the request."]moduleDeleteThingShadowResponse=structtypenonrect={payload:JsonDocument.toption[@ocaml.doc"The state information, in JSON format."]}typenonrecerror=[`InternalFailureExceptionofInternalFailureException.t|`InvalidRequestExceptionofInvalidRequestException.t|`MethodNotAllowedExceptionofMethodNotAllowedException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ServiceUnavailableExceptionofServiceUnavailableException.t|`ThrottlingExceptionofThrottlingException.t|`UnauthorizedExceptionofUnauthorizedException.t|`UnsupportedDocumentEncodingExceptionofUnsupportedDocumentEncodingException.t|`Unknown_operation_errorof(string*stringoption)]letmake?payload=fun()->{payload}leterror_of_jsonnamejson=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|"UnsupportedDocumentEncodingException"->`UnsupportedDocumentEncodingException(UnsupportedDocumentEncodingException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalFailureException"->`InternalFailureException(InternalFailureException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"MethodNotAllowedException"->`MethodNotAllowedException(MethodNotAllowedException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ServiceUnavailableException"->`ServiceUnavailableException(ServiceUnavailableException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_xmlxml)|"UnsupportedDocumentEncodingException"->`UnsupportedDocumentEncodingException(UnsupportedDocumentEncodingException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalFailureExceptione->`Assoc[("error",(`String"InternalFailureException"));("details",(InternalFailureException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`MethodNotAllowedExceptione->`Assoc[("error",(`String"MethodNotAllowedException"));("details",(MethodNotAllowedException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ServiceUnavailableExceptione->`Assoc[("error",(`String"ServiceUnavailableException"));("details",(ServiceUnavailableException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`UnsupportedDocumentEncodingExceptione->`Assoc[("error",(`String"UnsupportedDocumentEncodingException"));("details",(UnsupportedDocumentEncodingException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letof_header_and_body=((fun(xs,pipe)->make?payload:(Somepipe)())[@warning"-27"])letto_valuex=structure_to_value[("payload",(Option.mapx.payload~f:JsonDocument.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpayload=(Option.map~f:JsonDocument.of_xml)(Xml.childxml_arg0"payload")inmake?payload()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpayload=field_mapjson__"payload"JsonDocument.of_jsoninmake?payload()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The output from the DeleteThingShadow operation."]moduleDeleteThingShadowRequest=structtypenonrect={thingName:ThingName.t[@ocaml.doc"The name of the thing."];shadowName:ShadowName.toption[@ocaml.doc"The name of the shadow."]}letcontext_="DeleteThingShadowRequest"letmake?shadowName=fun~thingName->fun()->{shadowName;thingName}letto_valuex=structure_to_value[("thingName",(Some(ThingName.to_valuex.thingName)));("name",(Option.mapx.shadowName~f:ShadowName.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letshadowName=(Option.map~f:ShadowName.of_xml)(Xml.childxml_arg0"name")inletthingName=ThingName.of_xml(Xml.child_exn~context:context_xml_arg0"thingName")inmake?shadowName~thingName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letshadowName=field_mapjson__"shadowName"ShadowName.of_jsoninletthingName=field_map_exnjson__"thingName"ThingName.of_jsoninmake?shadowName~thingName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The input for the DeleteThingShadow operation."]moduleDeleteConnectionRequest=structtypenonrect={clientId:ClientId.t[@ocaml.doc"The unique identifier of the MQTT client to disconnect. The client ID can't start with a dollar sign ($)."];cleanSession:CleanSession.toption[@ocaml.doc"Specifies whether to remove the client's session state when disconnecting. Set to TRUE to delete all session information, including subscriptions and queued messages. Set to FALSE to preserve the session state. By default, this is set to FALSE (preserves the session state)."];preventWillMessage:PreventWillMessage.toption[@ocaml.doc"Controls if Amazon Web Services IoT Core publishes the client's Last Will and Testament (LWT) message upon disconnection. Set to TRUE to prevent publishing the LWT message. Set to FALSE to allow publishing. By default, this is set to FALSE (allows publishing the LWT message)."]}letcontext_="DeleteConnectionRequest"letmake?cleanSession=fun?preventWillMessage->fun~clientId->fun()->{cleanSession;preventWillMessage;clientId}letto_valuex=structure_to_value[("clientId",(Some(ClientId.to_valuex.clientId)));("cleanSession",(Option.mapx.cleanSession~f:CleanSession.to_value));("preventWillMessage",(Option.mapx.preventWillMessage~f:PreventWillMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpreventWillMessage=(Option.map~f:PreventWillMessage.of_xml)(Xml.childxml_arg0"preventWillMessage")inletcleanSession=(Option.map~f:CleanSession.of_xml)(Xml.childxml_arg0"cleanSession")inletclientId=ClientId.of_xml(Xml.child_exn~context:context_xml_arg0"clientId")inmake?preventWillMessage?cleanSession~clientId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpreventWillMessage=field_mapjson__"preventWillMessage"PreventWillMessage.of_jsoninletcleanSession=field_mapjson__"cleanSession"CleanSession.of_jsoninletclientId=field_map_exnjson__"clientId"ClientId.of_jsoninmake?preventWillMessage?cleanSession~clientId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Disconnects a connected MQTT client from Amazon Web Services IoT Core. When you disconnect a client, Amazon Web Services IoT Core closes the client's network connection and optionally cleans the session state."]