1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925(* 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.codeguru_securityletapiVersion="2018-05-10"letendpointPrefix="codeguru-security"letserviceFullName="Amazon CodeGuru Security"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[]))])moduleInteger=structtypenonrect=intletmakei=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 Integer"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleString_=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_valueendmoduleCodeLine=structtypenonrect={number:Integer.toption[@ocaml.doc"The code line number."];content:String_.toption[@ocaml.doc"The code that contains a vulnerability."]}letmake?number=fun?content->fun()->{number;content}letto_valuex=structure_to_value[("number",(Option.mapx.number~f:Integer.to_value));("content",(Option.mapx.content~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcontent=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"content")inletnumber=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"number")inmake?content?number()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcontent=field_mapjson__"content"String_.of_jsoninletnumber=field_mapjson__"number"Integer.of_jsoninmake?content?number()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The line of code where a finding was detected."]moduleSuggestedFix=structtypenonrect={description:String_.toption[@ocaml.doc"A description of the suggested code fix and why it is being suggested."];code:String_.toption[@ocaml.doc"The suggested code fix. If applicable, includes code patch to replace your source code."]}letmake?description=fun?code->fun()->{description;code}letto_valuex=structure_to_value[("description",(Option.mapx.description~f:String_.to_value));("code",(Option.mapx.code~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"code")inletdescription=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"description")inmake?code?description()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcode=field_mapjson__"code"String_.of_jsoninletdescription=field_mapjson__"description"String_.of_jsoninmake?code?description()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about the suggested code fix to remediate a finding."]moduleCodeSnippet=structtypenonrect=CodeLine.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:CodeLine.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:CodeLine.of_xml)letof_jsonj=list_of_json~kind:"CodeSnippet"~of_json:CodeLine.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleDouble=structtypenonrect=floatletmakei=iletof_string=Float.of_stringletto_valuex=`Doublexletto_queryv=to_queryto_valuevletto_headerx=Stdlib.Float.to_stringxletof_xmlxml_arg0=Float.of_string(string_of_xml~kind:"a double"xml_arg0)letof_jsonj=float_of_json~kind:"a double"jletto_json=simple_to_jsonto_valueendmoduleRecommendation=structtypenonrect={text:String_.toption[@ocaml.doc"The recommended course of action to remediate the finding."];url:String_.toption[@ocaml.doc"The URL address to the recommendation for remediating the finding."]}letmake?text=fun?url->fun()->{text;url}letto_valuex=structure_to_value[("text",(Option.mapx.text~f:String_.to_value));("url",(Option.mapx.url~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leturl=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"url")inlettext=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"text")inmake?url?text()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leturl=field_mapjson__"url"String_.of_jsoninlettext=field_mapjson__"text"String_.of_jsoninmake?url?text()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about the recommended course of action to remediate a finding."]moduleSuggestedFixes=structtypenonrect=SuggestedFix.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:SuggestedFix.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:SuggestedFix.of_xml)letof_jsonj=list_of_json~kind:"SuggestedFixes"~of_json:SuggestedFix.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleFilePath=structtypenonrect={name:String_.toption[@ocaml.doc"The name of the file."];path:String_.toption[@ocaml.doc"The path to the resource with the security vulnerability."];startLine:Integer.toption[@ocaml.doc"The first line number of the code snippet where the security vulnerability appears in your code."];endLine:Integer.toption[@ocaml.doc"The last line number of the code snippet where the security vulnerability appears in your code."];codeSnippet:CodeSnippet.toption[@ocaml.doc"A list of CodeLine objects that describe where the security vulnerability appears in your code."]}letmake?name=fun?path->fun?startLine->fun?endLine->fun?codeSnippet->fun()->{name;path;startLine;endLine;codeSnippet}letto_valuex=structure_to_value[("name",(Option.mapx.name~f:String_.to_value));("path",(Option.mapx.path~f:String_.to_value));("startLine",(Option.mapx.startLine~f:Integer.to_value));("endLine",(Option.mapx.endLine~f:Integer.to_value));("codeSnippet",(Option.mapx.codeSnippet~f:CodeSnippet.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcodeSnippet=(Option.map~f:CodeSnippet.of_xml)(Xml.childxml_arg0"codeSnippet")inletendLine=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"endLine")inletstartLine=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"startLine")inletpath=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"path")inletname=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"name")inmake?codeSnippet?endLine?startLine?path?name()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcodeSnippet=field_mapjson__"codeSnippet"CodeSnippet.of_jsoninletendLine=field_mapjson__"endLine"Integer.of_jsoninletstartLine=field_mapjson__"startLine"Integer.of_jsoninletpath=field_mapjson__"path"String_.of_jsoninletname=field_mapjson__"name"String_.of_jsoninmake?codeSnippet?endLine?startLine?path?name()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about the location of security vulnerabilities that Amazon CodeGuru Security detected in your code."]moduleReferenceUrls=structtypenonrect=String_.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:String_.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:String_.of_xml)letof_jsonj=list_of_json~kind:"ReferenceUrls"~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleRelatedVulnerabilities=structtypenonrect=String_.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:String_.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:String_.of_xml)letof_jsonj=list_of_json~kind:"RelatedVulnerabilities"~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleValidationExceptionField=structtypenonrect={name:String_.toption[@ocaml.doc"The name of the exception."];message:String_.toption[@ocaml.doc"Describes the exception."]}letmake?name=fun?message->fun()->{name;message}letto_valuex=structure_to_value[("name",(Option.mapx.name~f:String_.to_value));("message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inletname=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"name")inmake?message?name()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"String_.of_jsoninletname=field_mapjson__"name"String_.of_jsoninmake?message?name()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about a validation exception."]moduleScanName=structtypenonrect=stringletcontext_="ScanName"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:140)>>=(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:"ScanName"jletto_json=simple_to_jsonto_valueendmoduleScanNameArn=structtypenonrect=stringletcontext_="ScanNameArn"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:300)>>=(fun()->check_patterni~pattern:"arn:aws:codeguru-security:[\\S]+:[\\d]{12}:scans\\/[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:"ScanNameArn"jletto_json=simple_to_jsonto_valueendmoduleScanState=structtypenonrect=|InProgress|Successful|Failed|Non_static_idofstringletmakei=iletto_string=function|InProgress->"InProgress"|Successful->"Successful"|Failed->"Failed"|Non_static_ids->sletof_string=function|"InProgress"->InProgress|"Successful"->Successful|"Failed"->Failed|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 ScanState"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"ScanState"j)letto_json=simple_to_jsonto_valueendmoduleTimestamp=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_valueendmoduleUuid=structtypenonrect=stringletcontext_="Uuid"letmakei=letopenResultinok_or_failwith(check_patterni~pattern:"[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}");iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"Uuid"jletto_json=simple_to_jsonto_valueendmoduleFindingMetricsValuePerSeverity=structtypenonrect={info:Double.toption[@ocaml.doc"A numeric value corresponding to an informational finding."];low:Double.toption[@ocaml.doc"A numeric value corresponding to a low severity finding."];medium:Double.toption[@ocaml.doc"A numeric value corresponding to a medium severity finding."];high:Double.toption[@ocaml.doc"A numeric value corresponding to a high severity finding."];critical:Double.toption[@ocaml.doc"A numeric value corresponding to a critical finding."]}letmake?info=fun?low->fun?medium->fun?high->fun?critical->fun()->{info;low;medium;high;critical}letto_valuex=structure_to_value[("info",(Option.mapx.info~f:Double.to_value));("low",(Option.mapx.low~f:Double.to_value));("medium",(Option.mapx.medium~f:Double.to_value));("high",(Option.mapx.high~f:Double.to_value));("critical",(Option.mapx.critical~f:Double.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcritical=(Option.map~f:Double.of_xml)(Xml.childxml_arg0"critical")inlethigh=(Option.map~f:Double.of_xml)(Xml.childxml_arg0"high")inletmedium=(Option.map~f:Double.of_xml)(Xml.childxml_arg0"medium")inletlow=(Option.map~f:Double.of_xml)(Xml.childxml_arg0"low")inletinfo=(Option.map~f:Double.of_xml)(Xml.childxml_arg0"info")inmake?critical?high?medium?low?info()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcritical=field_mapjson__"critical"Double.of_jsoninlethigh=field_mapjson__"high"Double.of_jsoninletmedium=field_mapjson__"medium"Double.of_jsoninletlow=field_mapjson__"low"Double.of_jsoninletinfo=field_mapjson__"info"Double.of_jsoninmake?critical?high?medium?low?info()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"A numeric value corresponding to the severity of a finding, such as the number of open findings or the average time it takes to close findings of a given severity."]moduleCategoryWithFindingNum=structtypenonrect={categoryName:String_.toption[@ocaml.doc"The name of the finding category. A finding category is determined by the detector that detected the finding."];findingNumber:Integer.toption[@ocaml.doc"The number of open findings in the category."]}letmake?categoryName=fun?findingNumber->fun()->{categoryName;findingNumber}letto_valuex=structure_to_value[("categoryName",(Option.mapx.categoryName~f:String_.to_value));("findingNumber",(Option.mapx.findingNumber~f:Integer.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letfindingNumber=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"findingNumber")inletcategoryName=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"categoryName")inmake?findingNumber?categoryName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfindingNumber=field_mapjson__"findingNumber"Integer.of_jsoninletcategoryName=field_mapjson__"categoryName"String_.of_jsoninmake?findingNumber?categoryName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about a finding category with open findings."]moduleScanNameWithFindingNum=structtypenonrect={scanName:String_.toption[@ocaml.doc"The name of the scan."];findingNumber:Integer.toption[@ocaml.doc"The number of findings generated by a scan."]}letmake?scanName=fun?findingNumber->fun()->{scanName;findingNumber}letto_valuex=structure_to_value[("scanName",(Option.mapx.scanName~f:String_.to_value));("findingNumber",(Option.mapx.findingNumber~f:Integer.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letfindingNumber=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"findingNumber")inletscanName=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"scanName")inmake?findingNumber?scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfindingNumber=field_mapjson__"findingNumber"Integer.of_jsoninletscanName=field_mapjson__"scanName"String_.of_jsoninmake?findingNumber?scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about the number of findings generated by a scan."]moduleDetectorTags=structtypenonrect=String_.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:String_.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:String_.of_xml)letof_jsonj=list_of_json~kind:"DetectorTags"~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleRemediation=structtypenonrect={recommendation:Recommendation.toption[@ocaml.doc"An object that contains information about the recommended course of action to remediate a finding."];suggestedFixes:SuggestedFixes.toption[@ocaml.doc"A list of SuggestedFix objects. Each object contains information about a suggested code fix to remediate the finding."]}letmake?recommendation=fun?suggestedFixes->fun()->{recommendation;suggestedFixes}letto_valuex=structure_to_value[("recommendation",(Option.mapx.recommendation~f:Recommendation.to_value));("suggestedFixes",(Option.mapx.suggestedFixes~f:SuggestedFixes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsuggestedFixes=(Option.map~f:SuggestedFixes.of_xml)(Xml.childxml_arg0"suggestedFixes")inletrecommendation=(Option.map~f:Recommendation.of_xml)(Xml.childxml_arg0"recommendation")inmake?suggestedFixes?recommendation()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsuggestedFixes=field_mapjson__"suggestedFixes"SuggestedFixes.of_jsoninletrecommendation=field_mapjson__"recommendation"Recommendation.of_jsoninmake?suggestedFixes?recommendation()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about how to remediate a finding."]moduleResource=structtypenonrect={id:String_.toption[@ocaml.doc"The scanName of the scan that was run on the resource."];subResourceId:String_.toption[@ocaml.doc"The identifier for a section of the resource."]}letmake?id=fun?subResourceId->fun()->{id;subResourceId}letto_valuex=structure_to_value[("id",(Option.mapx.id~f:String_.to_value));("subResourceId",(Option.mapx.subResourceId~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsubResourceId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"subResourceId")inletid=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"id")inmake?subResourceId?id()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsubResourceId=field_mapjson__"subResourceId"String_.of_jsoninletid=field_mapjson__"id"String_.of_jsoninmake?subResourceId?id()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about a resource that contains a finding."]moduleSeverity=structtypenonrect=|Critical|High|Medium|Low|Info|Non_static_idofstringletmakei=iletto_string=function|Critical->"Critical"|High->"High"|Medium->"Medium"|Low->"Low"|Info->"Info"|Non_static_ids->sletof_string=function|"Critical"->Critical|"High"->High|"Medium"->Medium|"Low"->Low|"Info"->Info|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 Severity"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"Severity"j)letto_json=simple_to_jsonto_valueendmoduleStatus=structtypenonrect=|Closed|Open|All|Non_static_idofstringletmakei=iletto_string=function|Closed->"Closed"|Open->"Open"|All->"All"|Non_static_ids->sletof_string=function|"Closed"->Closed|"Open"->Open|"All"->All|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 Status"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"Status"j)letto_json=simple_to_jsonto_valueendmoduleVulnerability=structtypenonrect={referenceUrls:ReferenceUrls.toption[@ocaml.doc"One or more URL addresses that contain details about a vulnerability."];relatedVulnerabilities:RelatedVulnerabilities.toption[@ocaml.doc"One or more vulnerabilities that are related to the vulnerability being described."];id:String_.toption[@ocaml.doc"The identifier for the vulnerability."];filePath:FilePath.toption[@ocaml.doc"An object that describes the location of the detected security vulnerability in your code."];itemCount:Integer.toption[@ocaml.doc"The number of times the vulnerability appears in your code."]}letmake?referenceUrls=fun?relatedVulnerabilities->fun?id->fun?filePath->fun?itemCount->fun()->{referenceUrls;relatedVulnerabilities;id;filePath;itemCount}letto_valuex=structure_to_value[("referenceUrls",(Option.mapx.referenceUrls~f:ReferenceUrls.to_value));("relatedVulnerabilities",(Option.mapx.relatedVulnerabilities~f:RelatedVulnerabilities.to_value));("id",(Option.mapx.id~f:String_.to_value));("filePath",(Option.mapx.filePath~f:FilePath.to_value));("itemCount",(Option.mapx.itemCount~f:Integer.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letitemCount=(Option.map~f:Integer.of_xml)(Xml.childxml_arg0"itemCount")inletfilePath=(Option.map~f:FilePath.of_xml)(Xml.childxml_arg0"filePath")inletid=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"id")inletrelatedVulnerabilities=(Option.map~f:RelatedVulnerabilities.of_xml)(Xml.childxml_arg0"relatedVulnerabilities")inletreferenceUrls=(Option.map~f:ReferenceUrls.of_xml)(Xml.childxml_arg0"referenceUrls")inmake?itemCount?filePath?id?relatedVulnerabilities?referenceUrls()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letitemCount=field_mapjson__"itemCount"Integer.of_jsoninletfilePath=field_mapjson__"filePath"FilePath.of_jsoninletid=field_mapjson__"id"String_.of_jsoninletrelatedVulnerabilities=field_mapjson__"relatedVulnerabilities"RelatedVulnerabilities.of_jsoninletreferenceUrls=field_mapjson__"referenceUrls"ReferenceUrls.of_jsoninmake?itemCount?filePath?id?relatedVulnerabilities?referenceUrls()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about a security vulnerability that Amazon CodeGuru Security detected."]moduleErrorCode=structtypenonrect=|DUPLICATE_IDENTIFIER|ITEM_DOES_NOT_EXIST|INTERNAL_ERROR|INVALID_FINDING_ID|INVALID_SCAN_NAME|Non_static_idofstringletmakei=iletto_string=function|DUPLICATE_IDENTIFIER->"DUPLICATE_IDENTIFIER"|ITEM_DOES_NOT_EXIST->"ITEM_DOES_NOT_EXIST"|INTERNAL_ERROR->"INTERNAL_ERROR"|INVALID_FINDING_ID->"INVALID_FINDING_ID"|INVALID_SCAN_NAME->"INVALID_SCAN_NAME"|Non_static_ids->sletof_string=function|"DUPLICATE_IDENTIFIER"->DUPLICATE_IDENTIFIER|"ITEM_DOES_NOT_EXIST"->ITEM_DOES_NOT_EXIST|"INTERNAL_ERROR"->INTERNAL_ERROR|"INVALID_FINDING_ID"->INVALID_FINDING_ID|"INVALID_SCAN_NAME"->INVALID_SCAN_NAME|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 ErrorCode"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"ErrorCode"j)letto_json=simple_to_jsonto_valueendmoduleKmsKeyArn=structtypenonrect=stringletcontext_="KmsKeyArn"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:2048)>>=(fun()->check_patterni~pattern:"arn:aws:kms:[\\S]+:[\\d]{12}:key\\/(([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})|(mrk-[0-9a-zA-Z]{32}))")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"KmsKeyArn"jletto_json=simple_to_jsonto_valueendmoduleValidationExceptionFieldList=structtypenonrect=ValidationExceptionField.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:ValidationExceptionField.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:ValidationExceptionField.of_xml)letof_jsonj=list_of_json~kind:"ValidationExceptionFieldList"~of_json:ValidationExceptionField.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleValidationExceptionReason=structtypenonrect=|UnknownOperation|CannotParse|FieldValidationFailed|Other|LambdaCodeShaMisMatch|Non_static_idofstringletmakei=iletto_string=function|UnknownOperation->"unknownOperation"|CannotParse->"cannotParse"|FieldValidationFailed->"fieldValidationFailed"|Other->"other"|LambdaCodeShaMisMatch->"lambdaCodeShaMisMatch"|Non_static_ids->sletof_string=function|"unknownOperation"->UnknownOperation|"cannotParse"->CannotParse|"fieldValidationFailed"->FieldValidationFailed|"other"->Other|"lambdaCodeShaMisMatch"->LambdaCodeShaMisMatch|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 ValidationExceptionReason"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"ValidationExceptionReason"j)letto_json=simple_to_jsonto_valueendmoduleTagKey=structtypenonrect=stringletcontext_="TagKey"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:128)>>=(fun()->check_string_mini~min:1));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"TagKey"jletto_json=simple_to_jsonto_valueendmoduleTagValue=structtypenonrect=stringletcontext_="TagValue"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:256)>>=(fun()->check_string_mini~min:0));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"TagValue"jletto_json=simple_to_jsonto_valueendmoduleScanSummary=structtypenonrect={scanState:ScanState.toption[@ocaml.doc"The state of the scan. A scan can be In Progress, Complete, or Failed."];createdAt:Timestamp.toption[@ocaml.doc"The time when the scan was created."];updatedAt:Timestamp.toption[@ocaml.doc"The time the scan was last updated. A scan is updated when it is re-run."];scanName:ScanName.toption[@ocaml.doc"The name of the scan."];runId:Uuid.toption[@ocaml.doc"The identifier for the scan run."];scanNameArn:ScanNameArn.toption[@ocaml.doc"The ARN for the scan name."]}letmake?scanState=fun?createdAt->fun?updatedAt->fun?scanName->fun?runId->fun?scanNameArn->fun()->{scanState;createdAt;updatedAt;scanName;runId;scanNameArn}letto_valuex=structure_to_value[("scanState",(Option.mapx.scanState~f:ScanState.to_value));("createdAt",(Option.mapx.createdAt~f:Timestamp.to_value));("updatedAt",(Option.mapx.updatedAt~f:Timestamp.to_value));("scanName",(Option.mapx.scanName~f:ScanName.to_value));("runId",(Option.mapx.runId~f:Uuid.to_value));("scanNameArn",(Option.mapx.scanNameArn~f:ScanNameArn.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letscanNameArn=(Option.map~f:ScanNameArn.of_xml)(Xml.childxml_arg0"scanNameArn")inletrunId=(Option.map~f:Uuid.of_xml)(Xml.childxml_arg0"runId")inletscanName=(Option.map~f:ScanName.of_xml)(Xml.childxml_arg0"scanName")inletupdatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"updatedAt")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"createdAt")inletscanState=(Option.map~f:ScanState.of_xml)(Xml.childxml_arg0"scanState")inmake?scanNameArn?runId?scanName?updatedAt?createdAt?scanState()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letscanNameArn=field_mapjson__"scanNameArn"ScanNameArn.of_jsoninletrunId=field_mapjson__"runId"Uuid.of_jsoninletscanName=field_mapjson__"scanName"ScanName.of_jsoninletupdatedAt=field_mapjson__"updatedAt"Timestamp.of_jsoninletcreatedAt=field_mapjson__"createdAt"Timestamp.of_jsoninletscanState=field_mapjson__"scanState"ScanState.of_jsoninmake?scanNameArn?runId?scanName?updatedAt?createdAt?scanState()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about a scan."]moduleAccountFindingsMetric=structtypenonrect={date:Timestamp.toption[@ocaml.doc"The date from which the findings metrics were retrieved."];newFindings:FindingMetricsValuePerSeverity.toption[@ocaml.doc"The number of new findings of each severity on the specified date."];closedFindings:FindingMetricsValuePerSeverity.toption[@ocaml.doc"The number of closed findings of each severity on the specified date."];openFindings:FindingMetricsValuePerSeverity.toption[@ocaml.doc"The number of open findings of each severity as of the specified date."];meanTimeToClose:FindingMetricsValuePerSeverity.toption[@ocaml.doc"The average time in days it takes to close findings of each severity as of a specified date."]}letmake?date=fun?newFindings->fun?closedFindings->fun?openFindings->fun?meanTimeToClose->fun()->{date;newFindings;closedFindings;openFindings;meanTimeToClose}letto_valuex=structure_to_value[("date",(Option.mapx.date~f:Timestamp.to_value));("newFindings",(Option.mapx.newFindings~f:FindingMetricsValuePerSeverity.to_value));("closedFindings",(Option.mapx.closedFindings~f:FindingMetricsValuePerSeverity.to_value));("openFindings",(Option.mapx.openFindings~f:FindingMetricsValuePerSeverity.to_value));("meanTimeToClose",(Option.mapx.meanTimeToClose~f:FindingMetricsValuePerSeverity.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmeanTimeToClose=(Option.map~f:FindingMetricsValuePerSeverity.of_xml)(Xml.childxml_arg0"meanTimeToClose")inletopenFindings=(Option.map~f:FindingMetricsValuePerSeverity.of_xml)(Xml.childxml_arg0"openFindings")inletclosedFindings=(Option.map~f:FindingMetricsValuePerSeverity.of_xml)(Xml.childxml_arg0"closedFindings")inletnewFindings=(Option.map~f:FindingMetricsValuePerSeverity.of_xml)(Xml.childxml_arg0"newFindings")inletdate=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"date")inmake?meanTimeToClose?openFindings?closedFindings?newFindings?date()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmeanTimeToClose=field_mapjson__"meanTimeToClose"FindingMetricsValuePerSeverity.of_jsoninletopenFindings=field_mapjson__"openFindings"FindingMetricsValuePerSeverity.of_jsoninletclosedFindings=field_mapjson__"closedFindings"FindingMetricsValuePerSeverity.of_jsoninletnewFindings=field_mapjson__"newFindings"FindingMetricsValuePerSeverity.of_jsoninletdate=field_mapjson__"date"Timestamp.of_jsoninmake?meanTimeToClose?openFindings?closedFindings?newFindings?date()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"A summary of findings metrics for an account on a specified date."]moduleCategoriesWithMostFindings=structtypenonrect=CategoryWithFindingNum.tlistletmakei=letopenResultinok_or_failwith((check_list_maxi~max:5)>>=(fun()->check_list_mini~min:0));iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:CategoryWithFindingNum.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:CategoryWithFindingNum.of_xml)letof_jsonj=list_of_json~kind:"CategoriesWithMostFindings"~of_json:CategoryWithFindingNum.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleScansWithMostOpenCriticalFindings=structtypenonrect=ScanNameWithFindingNum.tlistletmakei=letopenResultinok_or_failwith((check_list_maxi~max:3)>>=(fun()->check_list_mini~min:0));iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:ScanNameWithFindingNum.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:ScanNameWithFindingNum.of_xml)letof_jsonj=list_of_json~kind:"ScansWithMostOpenCriticalFindings"~of_json:ScanNameWithFindingNum.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleScansWithMostOpenFindings=structtypenonrect=ScanNameWithFindingNum.tlistletmakei=letopenResultinok_or_failwith((check_list_maxi~max:3)>>=(fun()->check_list_mini~min:0));iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:ScanNameWithFindingNum.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:ScanNameWithFindingNum.of_xml)letof_jsonj=list_of_json~kind:"ScansWithMostOpenFindings"~of_json:ScanNameWithFindingNum.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleFinding=structtypenonrect={createdAt:Timestamp.toption[@ocaml.doc"The time when the finding was created."];description:String_.toption[@ocaml.doc"A description of the finding."];generatorId:String_.toption[@ocaml.doc"The identifier for the component that generated a finding such as AmazonCodeGuruSecurity."];id:String_.toption[@ocaml.doc"The identifier for a finding."];updatedAt:Timestamp.toption[@ocaml.doc"The time when the finding was last updated. Findings are updated when you remediate them or when the finding code location changes."];type_:String_.toption[@ocaml.doc"The type of finding."];status:Status.toption[@ocaml.doc"The status of the finding. A finding status can be open or closed."];resource:Resource.toption[@ocaml.doc"The resource where Amazon CodeGuru Security detected a finding."];vulnerability:Vulnerability.toption[@ocaml.doc"An object that describes the detected security vulnerability."];severity:Severity.toption[@ocaml.doc"The severity of the finding. Severity can be critical, high, medium, low, or informational. For information on severity levels, see Finding severity in the Amazon CodeGuru Security User Guide."];remediation:Remediation.toption[@ocaml.doc"An object that contains the details about how to remediate a finding."];title:String_.toption[@ocaml.doc"The title of the finding."];detectorTags:DetectorTags.toption[@ocaml.doc"One or more tags or categorizations that are associated with a detector. These tags are defined by type, programming language, or other classification such as maintainability or consistency."];detectorId:String_.toption[@ocaml.doc"The identifier for the detector that detected the finding in your code. A detector is a defined rule based on industry standards and AWS best practices."];detectorName:String_.toption[@ocaml.doc"The name of the detector that identified the security vulnerability in your code."];ruleId:String_.toption[@ocaml.doc"The identifier for the rule that generated the finding."]}letmake?createdAt=fun?description->fun?generatorId->fun?id->fun?updatedAt->fun?type_->fun?status->fun?resource->fun?vulnerability->fun?severity->fun?remediation->fun?title->fun?detectorTags->fun?detectorId->fun?detectorName->fun?ruleId->fun()->{createdAt;description;generatorId;id;updatedAt;type_;status;resource;vulnerability;severity;remediation;title;detectorTags;detectorId;detectorName;ruleId}letto_valuex=structure_to_value[("createdAt",(Option.mapx.createdAt~f:Timestamp.to_value));("description",(Option.mapx.description~f:String_.to_value));("generatorId",(Option.mapx.generatorId~f:String_.to_value));("id",(Option.mapx.id~f:String_.to_value));("updatedAt",(Option.mapx.updatedAt~f:Timestamp.to_value));("type",(Option.mapx.type_~f:String_.to_value));("status",(Option.mapx.status~f:Status.to_value));("resource",(Option.mapx.resource~f:Resource.to_value));("vulnerability",(Option.mapx.vulnerability~f:Vulnerability.to_value));("severity",(Option.mapx.severity~f:Severity.to_value));("remediation",(Option.mapx.remediation~f:Remediation.to_value));("title",(Option.mapx.title~f:String_.to_value));("detectorTags",(Option.mapx.detectorTags~f:DetectorTags.to_value));("detectorId",(Option.mapx.detectorId~f:String_.to_value));("detectorName",(Option.mapx.detectorName~f:String_.to_value));("ruleId",(Option.mapx.ruleId~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letruleId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"ruleId")inletdetectorName=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"detectorName")inletdetectorId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"detectorId")inletdetectorTags=(Option.map~f:DetectorTags.of_xml)(Xml.childxml_arg0"detectorTags")inlettitle=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"title")inletremediation=(Option.map~f:Remediation.of_xml)(Xml.childxml_arg0"remediation")inletseverity=(Option.map~f:Severity.of_xml)(Xml.childxml_arg0"severity")inletvulnerability=(Option.map~f:Vulnerability.of_xml)(Xml.childxml_arg0"vulnerability")inletresource=(Option.map~f:Resource.of_xml)(Xml.childxml_arg0"resource")inletstatus=(Option.map~f:Status.of_xml)(Xml.childxml_arg0"status")inlettype_=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"type")inletupdatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"updatedAt")inletid=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"id")inletgeneratorId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"generatorId")inletdescription=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"description")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"createdAt")inmake?ruleId?detectorName?detectorId?detectorTags?title?remediation?severity?vulnerability?resource?status?type_?updatedAt?id?generatorId?description?createdAt()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letruleId=field_mapjson__"ruleId"String_.of_jsoninletdetectorName=field_mapjson__"detectorName"String_.of_jsoninletdetectorId=field_mapjson__"detectorId"String_.of_jsoninletdetectorTags=field_mapjson__"detectorTags"DetectorTags.of_jsoninlettitle=field_mapjson__"title"String_.of_jsoninletremediation=field_mapjson__"remediation"Remediation.of_jsoninletseverity=field_mapjson__"severity"Severity.of_jsoninletvulnerability=field_mapjson__"vulnerability"Vulnerability.of_jsoninletresource=field_mapjson__"resource"Resource.of_jsoninletstatus=field_mapjson__"status"Status.of_jsoninlettype_=field_mapjson__"type"String_.of_jsoninletupdatedAt=field_mapjson__"updatedAt"Timestamp.of_jsoninletid=field_mapjson__"id"String_.of_jsoninletgeneratorId=field_mapjson__"generatorId"String_.of_jsoninletdescription=field_mapjson__"description"String_.of_jsoninletcreatedAt=field_mapjson__"createdAt"Timestamp.of_jsoninmake?ruleId?detectorName?detectorId?detectorTags?title?remediation?severity?vulnerability?resource?status?type_?updatedAt?id?generatorId?description?createdAt()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about a finding that was detected in your code."]moduleHeaderKey=structtypenonrect=stringletcontext_="HeaderKey"letmakei=letopenResultinok_or_failwith(check_string_mini~min:1);iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HeaderKey"jletto_json=simple_to_jsonto_valueendmoduleHeaderValue=structtypenonrect=stringletcontext_="HeaderValue"letmakei=letopenResultinok_or_failwith(check_string_mini~min:1);iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HeaderValue"jletto_json=simple_to_jsonto_valueendmoduleBatchGetFindingsError=structtypenonrect={scanName:ScanName.toption[@ocaml.doc"The name of the scan that generated the finding."];findingId:String_.toption[@ocaml.doc"The finding ID of the finding that was not fetched."];errorCode:ErrorCode.toption[@ocaml.doc"A code associated with the type of error."];message:String_.toption[@ocaml.doc"Describes the error."]}letmake?scanName=fun?findingId->fun?errorCode->fun?message->fun()->{scanName;findingId;errorCode;message}letto_valuex=structure_to_value[("scanName",(Option.mapx.scanName~f:ScanName.to_value));("findingId",(Option.mapx.findingId~f:String_.to_value));("errorCode",(Option.mapx.errorCode~f:ErrorCode.to_value));("message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inleterrorCode=(Option.map~f:ErrorCode.of_xml)(Xml.childxml_arg0"errorCode")inletfindingId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"findingId")inletscanName=(Option.map~f:ScanName.of_xml)(Xml.childxml_arg0"scanName")inmake?message?errorCode?findingId?scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"String_.of_jsoninleterrorCode=field_mapjson__"errorCode"ErrorCode.of_jsoninletfindingId=field_mapjson__"findingId"String_.of_jsoninletscanName=field_mapjson__"scanName"ScanName.of_jsoninmake?message?errorCode?findingId?scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Contains information about the error that caused a finding to fail to be retrieved."]moduleFindingIdentifier=structtypenonrect={scanName:String_.t[@ocaml.doc"The name of the scan that generated the finding."];findingId:String_.t[@ocaml.doc"The identifier for a finding."]}letcontext_="FindingIdentifier"letmake~scanName=fun~findingId->fun()->{scanName;findingId}letto_valuex=structure_to_value[("scanName",(Some(String_.to_valuex.scanName)));("findingId",(Some(String_.to_valuex.findingId)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letfindingId=String_.of_xml(Xml.child_exn~context:context_xml_arg0"findingId")inletscanName=String_.of_xml(Xml.child_exn~context:context_xml_arg0"scanName")inmake~findingId~scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfindingId=field_map_exnjson__"findingId"String_.of_jsoninletscanName=field_map_exnjson__"scanName"String_.of_jsoninmake~findingId~scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"An object that contains information about a finding and the scan that generated it."]moduleAccessDeniedException=structtypenonrect={errorCode:String_.toption[@ocaml.doc"The identifier for the error."];message:String_.toption[@ocaml.doc"Description of the error."];resourceId:String_.toption[@ocaml.doc"The identifier for the resource you don't have access to."];resourceType:String_.toption[@ocaml.doc"The type of resource you don't have access to."]}letmake?errorCode=fun?message->fun?resourceId->fun?resourceType->fun()->{errorCode;message;resourceId;resourceType}letto_valuex=structure_to_value[("errorCode",(Option.mapx.errorCode~f:String_.to_value));("message",(Option.mapx.message~f:String_.to_value));("resourceId",(Option.mapx.resourceId~f:String_.to_value));("resourceType",(Option.mapx.resourceType~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letresourceType=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"resourceType")inletresourceId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"resourceId")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inleterrorCode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"errorCode")inmake?resourceType?resourceId?message?errorCode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letresourceType=field_mapjson__"resourceType"String_.of_jsoninletresourceId=field_mapjson__"resourceId"String_.of_jsoninletmessage=field_mapjson__"message"String_.of_jsoninleterrorCode=field_mapjson__"errorCode"String_.of_jsoninmake?resourceType?resourceId?message?errorCode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"You do not have sufficient access to perform this action."]moduleEncryptionConfig=structtypenonrect={kmsKeyArn:KmsKeyArn.toption[@ocaml.doc"The KMS key ARN that is used for encryption. If an AWS-managed key is used for encryption, returns empty."]}letmake?kmsKeyArn=fun()->{kmsKeyArn}letto_valuex=structure_to_value[("kmsKeyArn",(Option.mapx.kmsKeyArn~f:KmsKeyArn.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letkmsKeyArn=(Option.map~f:KmsKeyArn.of_xml)(Xml.childxml_arg0"kmsKeyArn")inmake?kmsKeyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letkmsKeyArn=field_mapjson__"kmsKeyArn"KmsKeyArn.of_jsoninmake?kmsKeyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Information about the encryption configuration for an account. Required to call UpdateAccountConfiguration."]moduleInternalServerException=structtypenonrect={error:String_.toption[@ocaml.doc"The internal error encountered by the server."];message:String_.toption[@ocaml.doc"Description of the error."]}letmake?error=fun?message->fun()->{error;message}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:String_.to_value));("message",(Option.mapx.message~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inleterror=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"error")inmake?message?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"String_.of_jsoninleterror=field_mapjson__"error"String_.of_jsoninmake?message?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The server encountered an internal error and is unable to complete the request."]moduleResourceNotFoundException=structtypenonrect={errorCode:String_.toption[@ocaml.doc"The identifier for the error."];message:String_.toption[@ocaml.doc"Description of the error."];resourceId:String_.toption[@ocaml.doc"The identifier for the resource that was not found."];resourceType:String_.toption[@ocaml.doc"The type of resource that was not found."]}letmake?errorCode=fun?message->fun?resourceId->fun?resourceType->fun()->{errorCode;message;resourceId;resourceType}letto_valuex=structure_to_value[("errorCode",(Option.mapx.errorCode~f:String_.to_value));("message",(Option.mapx.message~f:String_.to_value));("resourceId",(Option.mapx.resourceId~f:String_.to_value));("resourceType",(Option.mapx.resourceType~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letresourceType=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"resourceType")inletresourceId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"resourceId")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inleterrorCode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"errorCode")inmake?resourceType?resourceId?message?errorCode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letresourceType=field_mapjson__"resourceType"String_.of_jsoninletresourceId=field_mapjson__"resourceId"String_.of_jsoninletmessage=field_mapjson__"message"String_.of_jsoninleterrorCode=field_mapjson__"errorCode"String_.of_jsoninmake?resourceType?resourceId?message?errorCode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The resource specified in the request was not found."]moduleThrottlingException=structtypenonrect={errorCode:String_.toption[@ocaml.doc"The identifier for the error."];message:String_.toption[@ocaml.doc"Description of the error."];serviceCode:String_.toption[@ocaml.doc"The identifier for the originating service."];quotaCode:String_.toption[@ocaml.doc"The identifier for the originating quota."]}letmake?errorCode=fun?message->fun?serviceCode->fun?quotaCode->fun()->{errorCode;message;serviceCode;quotaCode}letto_valuex=structure_to_value[("errorCode",(Option.mapx.errorCode~f:String_.to_value));("message",(Option.mapx.message~f:String_.to_value));("serviceCode",(Option.mapx.serviceCode~f:String_.to_value));("quotaCode",(Option.mapx.quotaCode~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letquotaCode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"quotaCode")inletserviceCode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"serviceCode")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inleterrorCode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"errorCode")inmake?quotaCode?serviceCode?message?errorCode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letquotaCode=field_mapjson__"quotaCode"String_.of_jsoninletserviceCode=field_mapjson__"serviceCode"String_.of_jsoninletmessage=field_mapjson__"message"String_.of_jsoninleterrorCode=field_mapjson__"errorCode"String_.of_jsoninmake?quotaCode?serviceCode?message?errorCode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The request was denied due to request throttling."]moduleValidationException=structtypenonrect={errorCode:String_.toption[@ocaml.doc"The identifier for the error."];message:String_.toption[@ocaml.doc"Description of the error."];reason:ValidationExceptionReason.toption[@ocaml.doc"The reason the request failed validation."];fieldList:ValidationExceptionFieldList.toption[@ocaml.doc"The field that caused the error, if applicable."]}letmake?errorCode=fun?message->fun?reason->fun?fieldList->fun()->{errorCode;message;reason;fieldList}letto_valuex=structure_to_value[("errorCode",(Option.mapx.errorCode~f:String_.to_value));("message",(Option.mapx.message~f:String_.to_value));("reason",(Option.mapx.reason~f:ValidationExceptionReason.to_value));("fieldList",(Option.mapx.fieldList~f:ValidationExceptionFieldList.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letfieldList=(Option.map~f:ValidationExceptionFieldList.of_xml)(Xml.childxml_arg0"fieldList")inletreason=(Option.map~f:ValidationExceptionReason.of_xml)(Xml.childxml_arg0"reason")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inleterrorCode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"errorCode")inmake?fieldList?reason?message?errorCode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfieldList=field_mapjson__"fieldList"ValidationExceptionFieldList.of_jsoninletreason=field_mapjson__"reason"ValidationExceptionReason.of_jsoninletmessage=field_mapjson__"message"String_.of_jsoninleterrorCode=field_mapjson__"errorCode"String_.of_jsoninmake?fieldList?reason?message?errorCode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The input fails to satisfy the specified constraints."]moduleConflictException=structtypenonrect={errorCode:String_.toption[@ocaml.doc"The identifier for the error."];message:String_.toption[@ocaml.doc"Description of the error."];resourceId:String_.toption[@ocaml.doc"The identifier for the service resource associated with the request."];resourceType:String_.toption[@ocaml.doc"The type of resource associated with the request."]}letmake?errorCode=fun?message->fun?resourceId->fun?resourceType->fun()->{errorCode;message;resourceId;resourceType}letto_valuex=structure_to_value[("errorCode",(Option.mapx.errorCode~f:String_.to_value));("message",(Option.mapx.message~f:String_.to_value));("resourceId",(Option.mapx.resourceId~f:String_.to_value));("resourceType",(Option.mapx.resourceType~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letresourceType=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"resourceType")inletresourceId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"resourceId")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inleterrorCode=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"errorCode")inmake?resourceType?resourceId?message?errorCode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letresourceType=field_mapjson__"resourceType"String_.of_jsoninletresourceId=field_mapjson__"resourceId"String_.of_jsoninletmessage=field_mapjson__"message"String_.of_jsoninleterrorCode=field_mapjson__"errorCode"String_.of_jsoninmake?resourceType?resourceId?message?errorCode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request."]moduleTagKeyList=structtypenonrect=TagKey.tlistletmakei=letopenResultinok_or_failwith((check_list_maxi~max:200)>>=(fun()->check_list_mini~min:0));iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:TagKey.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:TagKey.of_xml)letof_jsonj=list_of_json~kind:"TagKeyList"~of_json:TagKey.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleTagMap=structtypenonrect=(TagKey.t*TagValue.t)listletmakei=letopenResultinok_or_failwith((check_list_maxi~max:200)>>=(fun()->check_list_mini~min:0));iletof_headerxs=make(List.filter_mapxs~f:(fun(k,v)->(Base.String.chop_prefixk~prefix:"x-amz-meta-")|>(Option.map~f:(funchopped->((TagKey.of_stringchopped),(TagValue.of_stringv))))))letto_valuexs=(xs|>(List.map~f:(fun(x,y)->(TagKey.to_valuex)|>(funx->(TagValue.to_valuey)|>(funy->(x,y))))))|>(funx->`Mapx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for Map_shape objects"()letof_xml_=failwith"of_xml_converter_of_shape: Map_shape case not implemented"letof_jsonj=object_of_json~key_of_string:TagKey.of_string~of_json:TagValue.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleNextToken=structtypenonrect=stringletcontext_="NextToken"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:2048)>>=(fun()->check_patterni~pattern:"[\\S]+")));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_valueendmoduleScanSummaries=structtypenonrect=ScanSummary.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:ScanSummary.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:ScanSummary.of_xml)letof_jsonj=list_of_json~kind:"ScanSummaries"~of_json:ScanSummary.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleListScansRequestMaxResultsInteger=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 ListScansRequestMaxResultsInteger"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleFindingsMetricList=structtypenonrect=AccountFindingsMetric.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:AccountFindingsMetric.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:AccountFindingsMetric.of_xml)letof_jsonj=list_of_json~kind:"FindingsMetricList"~of_json:AccountFindingsMetric.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleListFindingsMetricsRequestMaxResultsInteger=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:1000)>>=(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 ListFindingsMetricsRequestMaxResultsInteger"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleAnalysisType=structtypenonrect=|Security|All|Non_static_idofstringletmakei=iletto_string=function|Security->"Security"|All->"All"|Non_static_ids->sletof_string=function|"Security"->Security|"All"->All|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 AnalysisType"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"AnalysisType"j)letto_json=simple_to_jsonto_valueendmoduleErrorMessage=structtypenonrect=stringletcontext_="ErrorMessage"letmakei=letopenResultinok_or_failwith(check_string_mini~min:1);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_valueendmoduleLong=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_valueendmoduleMetricsSummary=structtypenonrect={date:Timestamp.toption[@ocaml.doc"The date from which the metrics summary information was retrieved."];openFindings:FindingMetricsValuePerSeverity.toption[@ocaml.doc"The number of open findings of each severity."];categoriesWithMostFindings:CategoriesWithMostFindings.toption[@ocaml.doc"A list of CategoryWithFindingNum objects for the top 5 finding categories with the most findings."];scansWithMostOpenFindings:ScansWithMostOpenFindings.toption[@ocaml.doc"A list of ScanNameWithFindingNum objects for the top 3 scans with the most number of open findings."];scansWithMostOpenCriticalFindings:ScansWithMostOpenCriticalFindings.toption[@ocaml.doc"A list of ScanNameWithFindingNum objects for the top 3 scans with the most number of open critical findings."]}letmake?date=fun?openFindings->fun?categoriesWithMostFindings->fun?scansWithMostOpenFindings->fun?scansWithMostOpenCriticalFindings->fun()->{date;openFindings;categoriesWithMostFindings;scansWithMostOpenFindings;scansWithMostOpenCriticalFindings}letto_valuex=structure_to_value[("date",(Option.mapx.date~f:Timestamp.to_value));("openFindings",(Option.mapx.openFindings~f:FindingMetricsValuePerSeverity.to_value));("categoriesWithMostFindings",(Option.mapx.categoriesWithMostFindings~f:CategoriesWithMostFindings.to_value));("scansWithMostOpenFindings",(Option.mapx.scansWithMostOpenFindings~f:ScansWithMostOpenFindings.to_value));("scansWithMostOpenCriticalFindings",(Option.mapx.scansWithMostOpenCriticalFindings~f:ScansWithMostOpenCriticalFindings.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letscansWithMostOpenCriticalFindings=(Option.map~f:ScansWithMostOpenCriticalFindings.of_xml)(Xml.childxml_arg0"scansWithMostOpenCriticalFindings")inletscansWithMostOpenFindings=(Option.map~f:ScansWithMostOpenFindings.of_xml)(Xml.childxml_arg0"scansWithMostOpenFindings")inletcategoriesWithMostFindings=(Option.map~f:CategoriesWithMostFindings.of_xml)(Xml.childxml_arg0"categoriesWithMostFindings")inletopenFindings=(Option.map~f:FindingMetricsValuePerSeverity.of_xml)(Xml.childxml_arg0"openFindings")inletdate=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"date")inmake?scansWithMostOpenCriticalFindings?scansWithMostOpenFindings?categoriesWithMostFindings?openFindings?date()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letscansWithMostOpenCriticalFindings=field_mapjson__"scansWithMostOpenCriticalFindings"ScansWithMostOpenCriticalFindings.of_jsoninletscansWithMostOpenFindings=field_mapjson__"scansWithMostOpenFindings"ScansWithMostOpenFindings.of_jsoninletcategoriesWithMostFindings=field_mapjson__"categoriesWithMostFindings"CategoriesWithMostFindings.of_jsoninletopenFindings=field_mapjson__"openFindings"FindingMetricsValuePerSeverity.of_jsoninletdate=field_mapjson__"date"Timestamp.of_jsoninmake?scansWithMostOpenCriticalFindings?scansWithMostOpenFindings?categoriesWithMostFindings?openFindings?date()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"A summary of metrics for an account as of a specified date."]moduleFindings=structtypenonrect=Finding.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:Finding.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:Finding.of_xml)letof_jsonj=list_of_json~kind:"Findings"~of_json:Finding.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleGetFindingsRequestMaxResultsInteger=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:1000)>>=(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 GetFindingsRequestMaxResultsInteger"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleRequestHeaderMap=structtypenonrect=(HeaderKey.t*HeaderValue.t)listletmakei=iletof_headerxs=make(List.filter_mapxs~f:(fun(k,v)->(Base.String.chop_prefixk~prefix:"x-amz-meta-")|>(Option.map~f:(funchopped->((HeaderKey.of_stringchopped),(HeaderValue.of_stringv))))))letto_valuexs=(xs|>(List.map~f:(fun(x,y)->(HeaderKey.to_valuex)|>(funx->(HeaderValue.to_valuey)|>(funy->(x,y))))))|>(funx->`Mapx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for Map_shape objects"()letof_xml_=failwith"of_xml_converter_of_shape: Map_shape case not implemented"letof_jsonj=object_of_json~key_of_string:HeaderKey.of_string~of_json:HeaderValue.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleS3Url=structtypenonrect=stringletcontext_="S3Url"letmakei=letopenResultinok_or_failwith(check_string_mini~min:1);iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"S3Url"jletto_json=simple_to_jsonto_valueendmoduleResourceId=structtypenonrect={codeArtifactId:Uuid.toption[@ocaml.doc"The identifier for the code file uploaded to the resource object. Returned by CreateUploadUrl when you upload resources to be scanned."]}letmake?codeArtifactId=fun()->{codeArtifactId}letto_valuex=structure_to_value[("codeArtifactId",(Option.mapx.codeArtifactId~f:Uuid.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcodeArtifactId=(Option.map~f:Uuid.of_xml)(Xml.childxml_arg0"codeArtifactId")inmake?codeArtifactId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcodeArtifactId=field_mapjson__"codeArtifactId"Uuid.of_jsoninmake?codeArtifactId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The identifier for a resource object that contains resources to scan. Specifying a codeArtifactId is required to create a scan."]moduleClientToken=structtypenonrect=stringletcontext_="ClientToken"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:64)>>=(fun()->check_patterni~pattern:"[\\S]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ClientToken"jletto_json=simple_to_jsonto_valueendmoduleScanType=structtypenonrect=|Standard|Express|Non_static_idofstringletmakei=iletto_string=function|Standard->"Standard"|Express->"Express"|Non_static_ids->sletof_string=function|"Standard"->Standard|"Express"->Express|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 ScanType"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"ScanType"j)letto_json=simple_to_jsonto_valueendmoduleBatchGetFindingsErrors=structtypenonrect=BatchGetFindingsError.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:BatchGetFindingsError.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:BatchGetFindingsError.of_xml)letof_jsonj=list_of_json~kind:"BatchGetFindingsErrors"~of_json:BatchGetFindingsError.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleFindingIdentifiers=structtypenonrect=FindingIdentifier.tlistletmakei=letopenResultinok_or_failwith((check_list_maxi~max:25)>>=(fun()->check_list_mini~min:1));iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:FindingIdentifier.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:FindingIdentifier.of_xml)letof_jsonj=list_of_json~kind:"FindingIdentifiers"~of_json:FindingIdentifier.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleUpdateAccountConfigurationResponse=structtypenonrect={encryptionConfig:EncryptionConfig.toption[@ocaml.doc"An EncryptionConfig object that contains the KMS key ARN that is used for encryption. If you did not specify a customer-managed KMS key in the request, returns empty."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?encryptionConfig=fun()->{encryptionConfig}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("encryptionConfig",(Option.mapx.encryptionConfig~f:EncryptionConfig.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letencryptionConfig=(Option.map~f:EncryptionConfig.of_xml)(Xml.childxml_arg0"encryptionConfig")inmake?encryptionConfig()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letencryptionConfig=field_mapjson__"encryptionConfig"EncryptionConfig.of_jsoninmake?encryptionConfig()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Use to update the encryption configuration for an account."]moduleUpdateAccountConfigurationRequest=structtypenonrect={encryptionConfig:EncryptionConfig.t[@ocaml.doc"The customer-managed KMS key ARN you want to use for encryption. If not specified, CodeGuru Security will use an AWS-managed key for encryption. If you previously specified a customer-managed KMS key and want CodeGuru Security to use an AWS-managed key for encryption instead, pass nothing."]}letcontext_="UpdateAccountConfigurationRequest"letmake~encryptionConfig=fun()->{encryptionConfig}letto_valuex=structure_to_value[("encryptionConfig",(Some(EncryptionConfig.to_valuex.encryptionConfig)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letencryptionConfig=EncryptionConfig.of_xml(Xml.child_exn~context:context_xml_arg0"encryptionConfig")inmake~encryptionConfig()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letencryptionConfig=field_map_exnjson__"encryptionConfig"EncryptionConfig.of_jsoninmake~encryptionConfig()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Use to update the encryption configuration for an account."]moduleUntagResourceResponse=structtypenonrect=unittypenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`ConflictExceptionofConflictException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake()=()leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"ConflictException"->`ConflictException(ConflictException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"ConflictException"->`ConflictException(ConflictException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`ConflictExceptione->`Assoc[("error",(`String"ConflictException"));("details",(ConflictException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))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"Use to remove one or more tags from an existing scan."]moduleUntagResourceRequest=structtypenonrect={resourceArn:ScanNameArn.t[@ocaml.doc"The ARN of the ScanName object. You can retrieve this ARN by calling CreateScan, ListScans, or GetScan."];tagKeys:TagKeyList.t[@ocaml.doc"A list of keys for each tag you want to remove from a scan."]}letcontext_="UntagResourceRequest"letmake~resourceArn=fun~tagKeys->fun()->{resourceArn;tagKeys}letto_valuex=structure_to_value[("resourceArn",(Some(ScanNameArn.to_valuex.resourceArn)));("tagKeys",(Some(TagKeyList.to_valuex.tagKeys)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettagKeys=TagKeyList.of_xml(Xml.child_exn~context:context_xml_arg0"tagKeys")inletresourceArn=ScanNameArn.of_xml(Xml.child_exn~context:context_xml_arg0"resourceArn")inmake~tagKeys~resourceArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettagKeys=field_map_exnjson__"tagKeys"TagKeyList.of_jsoninletresourceArn=field_map_exnjson__"resourceArn"ScanNameArn.of_jsoninmake~tagKeys~resourceArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Use to remove one or more tags from an existing scan."]moduleTagResourceResponse=structtypenonrect=unittypenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`ConflictExceptionofConflictException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake()=()leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"ConflictException"->`ConflictException(ConflictException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"ConflictException"->`ConflictException(ConflictException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`ConflictExceptione->`Assoc[("error",(`String"ConflictException"));("details",(ConflictException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))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"Use to add one or more tags to an existing scan."]moduleTagResourceRequest=structtypenonrect={resourceArn:ScanNameArn.t[@ocaml.doc"The ARN of the ScanName object. You can retrieve this ARN by calling CreateScan, ListScans, or GetScan."];tags:TagMap.t[@ocaml.doc"An array of key-value pairs used to tag an existing scan. A tag is a custom attribute label with two parts: A tag key. For example, CostCenter, Environment, or Secret. Tag keys are case sensitive. An optional tag value field. For example, 111122223333, Production, or a team name. Omitting the tag value is the same as using an empty string. Tag values are case sensitive."]}letcontext_="TagResourceRequest"letmake~resourceArn=fun~tags->fun()->{resourceArn;tags}letto_valuex=structure_to_value[("resourceArn",(Some(ScanNameArn.to_valuex.resourceArn)));("tags",(Some(TagMap.to_valuex.tags)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettags=TagMap.of_xml(Xml.child_exn~context:context_xml_arg0"tags")inletresourceArn=ScanNameArn.of_xml(Xml.child_exn~context:context_xml_arg0"resourceArn")inmake~tags~resourceArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettags=field_map_exnjson__"tags"TagMap.of_jsoninletresourceArn=field_map_exnjson__"resourceArn"ScanNameArn.of_jsoninmake~tags~resourceArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Use to add one or more tags to an existing scan."]moduleListTagsForResourceResponse=structtypenonrect={tags:TagMap.toption[@ocaml.doc"An array of key-value pairs used to tag an existing scan. A tag is a custom attribute label with two parts: A tag key. For example, CostCenter, Environment, or Secret. Tag keys are case sensitive. An optional tag value field. For example, 111122223333, Production, or a team name. Omitting the tag value is the same as using an empty string. Tag values are case sensitive."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`ConflictExceptionofConflictException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?tags=fun()->{tags}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"ConflictException"->`ConflictException(ConflictException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"ConflictException"->`ConflictException(ConflictException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`ConflictExceptione->`Assoc[("error",(`String"ConflictException"));("details",(ConflictException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("tags",(Option.mapx.tags~f:TagMap.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettags=(Option.map~f:TagMap.of_xml)(Xml.childxml_arg0"tags")inmake?tags()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettags=field_mapjson__"tags"TagMap.of_jsoninmake?tags()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of all tags associated with a scan."]moduleListTagsForResourceRequest=structtypenonrect={resourceArn:ScanNameArn.t[@ocaml.doc"The ARN of the ScanName object. You can retrieve this ARN by calling CreateScan, ListScans, or GetScan."]}letcontext_="ListTagsForResourceRequest"letmake~resourceArn=fun()->{resourceArn}letto_valuex=structure_to_value[("resourceArn",(Some(ScanNameArn.to_valuex.resourceArn)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letresourceArn=ScanNameArn.of_xml(Xml.child_exn~context:context_xml_arg0"resourceArn")inmake~resourceArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letresourceArn=field_map_exnjson__"resourceArn"ScanNameArn.of_jsoninmake~resourceArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of all tags associated with a scan."]moduleListScansResponse=structtypenonrect={summaries:ScanSummaries.toption[@ocaml.doc"A list of ScanSummary objects with information about all scans in an account."];nextToken:NextToken.toption[@ocaml.doc"A pagination token. You can use this in future calls to ListScans to continue listing results after the current page."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?summaries=fun?nextToken->fun()->{summaries;nextToken}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("summaries",(Option.mapx.summaries~f:ScanSummaries.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")inletsummaries=(Option.map~f:ScanSummaries.of_xml)(Xml.childxml_arg0"summaries")inmake?nextToken?summaries()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"nextToken"NextToken.of_jsoninletsummaries=field_mapjson__"summaries"ScanSummaries.of_jsoninmake?nextToken?summaries()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of all scans in an account. Does not return EXPRESS scans."]moduleListScansRequest=structtypenonrect={nextToken:NextToken.toption[@ocaml.doc"A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page."];maxResults:ListScansRequestMaxResultsInteger.toption[@ocaml.doc"The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the nextToken element is returned in the response. Use nextToken in a subsequent request to retrieve additional results. If not specified, returns 100 results."]}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:ListScansRequestMaxResultsInteger.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmaxResults=(Option.map~f:ListScansRequestMaxResultsInteger.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"ListScansRequestMaxResultsInteger.of_jsoninletnextToken=field_mapjson__"nextToken"NextToken.of_jsoninmake?maxResults?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of all scans in an account. Does not return EXPRESS scans."]moduleListFindingsMetricsResponse=structtypenonrect={findingsMetrics:FindingsMetricList.toption[@ocaml.doc"A list of AccountFindingsMetric objects retrieved from the specified time interval."];nextToken:NextToken.toption[@ocaml.doc"A pagination token. You can use this in future calls to ListFindingMetrics to continue listing results after the current page."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?findingsMetrics=fun?nextToken->fun()->{findingsMetrics;nextToken}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("findingsMetrics",(Option.mapx.findingsMetrics~f:FindingsMetricList.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")inletfindingsMetrics=(Option.map~f:FindingsMetricList.of_xml)(Xml.childxml_arg0"findingsMetrics")inmake?nextToken?findingsMetrics()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"nextToken"NextToken.of_jsoninletfindingsMetrics=field_mapjson__"findingsMetrics"FindingsMetricList.of_jsoninmake?nextToken?findingsMetrics()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns metrics about all findings in an account within a specified time range."]moduleListFindingsMetricsRequest=structtypenonrect={nextToken:NextToken.toption[@ocaml.doc"A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page."];maxResults:ListFindingsMetricsRequestMaxResultsInteger.toption[@ocaml.doc"The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the nextToken element is returned in the response. Use nextToken in a subsequent request to retrieve additional results. If not specified, returns 1000 results."];startDate:Timestamp.t[@ocaml.doc"The start date of the interval which you want to retrieve metrics from. Rounds to the nearest day."];endDate:Timestamp.t[@ocaml.doc"The end date of the interval which you want to retrieve metrics from. Round to the nearest day."]}letcontext_="ListFindingsMetricsRequest"letmake?nextToken=fun?maxResults->fun~startDate->fun~endDate->fun()->{nextToken;maxResults;startDate;endDate}letto_valuex=structure_to_value[("nextToken",(Option.mapx.nextToken~f:NextToken.to_value));("maxResults",(Option.mapx.maxResults~f:ListFindingsMetricsRequestMaxResultsInteger.to_value));("startDate",(Some(Timestamp.to_valuex.startDate)));("endDate",(Some(Timestamp.to_valuex.endDate)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letendDate=Timestamp.of_xml(Xml.child_exn~context:context_xml_arg0"endDate")inletstartDate=Timestamp.of_xml(Xml.child_exn~context:context_xml_arg0"startDate")inletmaxResults=(Option.map~f:ListFindingsMetricsRequestMaxResultsInteger.of_xml)(Xml.childxml_arg0"maxResults")inletnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"nextToken")inmake~endDate~startDate?maxResults?nextToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letendDate=field_map_exnjson__"endDate"Timestamp.of_jsoninletstartDate=field_map_exnjson__"startDate"Timestamp.of_jsoninletmaxResults=field_mapjson__"maxResults"ListFindingsMetricsRequestMaxResultsInteger.of_jsoninletnextToken=field_mapjson__"nextToken"NextToken.of_jsoninmake~endDate~startDate?maxResults?nextToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns metrics about all findings in an account within a specified time range."]moduleGetScanResponse=structtypenonrect={scanName:ScanName.toption[@ocaml.doc"The name of the scan."];runId:Uuid.toption[@ocaml.doc"UUID that identifies the individual scan run."];scanState:ScanState.toption[@ocaml.doc"The current state of the scan. Returns either InProgress, Successful, or Failed."];createdAt:Timestamp.toption[@ocaml.doc"The time the scan was created."];analysisType:AnalysisType.toption[@ocaml.doc"The type of analysis CodeGuru Security performed in the scan, either Security or All. The Security type only generates findings related to security. The All type generates both security findings and quality findings."];updatedAt:Timestamp.toption[@ocaml.doc"The time when the scan was last updated. Only available for STANDARD scan types."];numberOfRevisions:Long.toption[@ocaml.doc"The number of times a scan has been re-run on a revised resource."];scanNameArn:ScanNameArn.toption[@ocaml.doc"The ARN for the scan name."];errorMessage:ErrorMessage.toption[@ocaml.doc"Details about the error that causes a scan to fail to be retrieved."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?scanName=fun?runId->fun?scanState->fun?createdAt->fun?analysisType->fun?updatedAt->fun?numberOfRevisions->fun?scanNameArn->fun?errorMessage->fun()->{scanName;runId;scanState;createdAt;analysisType;updatedAt;numberOfRevisions;scanNameArn;errorMessage}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("scanName",(Option.mapx.scanName~f:ScanName.to_value));("runId",(Option.mapx.runId~f:Uuid.to_value));("scanState",(Option.mapx.scanState~f:ScanState.to_value));("createdAt",(Option.mapx.createdAt~f:Timestamp.to_value));("analysisType",(Option.mapx.analysisType~f:AnalysisType.to_value));("updatedAt",(Option.mapx.updatedAt~f:Timestamp.to_value));("numberOfRevisions",(Option.mapx.numberOfRevisions~f:Long.to_value));("scanNameArn",(Option.mapx.scanNameArn~f:ScanNameArn.to_value));("errorMessage",(Option.mapx.errorMessage~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterrorMessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"errorMessage")inletscanNameArn=(Option.map~f:ScanNameArn.of_xml)(Xml.childxml_arg0"scanNameArn")inletnumberOfRevisions=(Option.map~f:Long.of_xml)(Xml.childxml_arg0"numberOfRevisions")inletupdatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"updatedAt")inletanalysisType=(Option.map~f:AnalysisType.of_xml)(Xml.childxml_arg0"analysisType")inletcreatedAt=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"createdAt")inletscanState=(Option.map~f:ScanState.of_xml)(Xml.childxml_arg0"scanState")inletrunId=(Option.map~f:Uuid.of_xml)(Xml.childxml_arg0"runId")inletscanName=(Option.map~f:ScanName.of_xml)(Xml.childxml_arg0"scanName")inmake?errorMessage?scanNameArn?numberOfRevisions?updatedAt?analysisType?createdAt?scanState?runId?scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterrorMessage=field_mapjson__"errorMessage"ErrorMessage.of_jsoninletscanNameArn=field_mapjson__"scanNameArn"ScanNameArn.of_jsoninletnumberOfRevisions=field_mapjson__"numberOfRevisions"Long.of_jsoninletupdatedAt=field_mapjson__"updatedAt"Timestamp.of_jsoninletanalysisType=field_mapjson__"analysisType"AnalysisType.of_jsoninletcreatedAt=field_mapjson__"createdAt"Timestamp.of_jsoninletscanState=field_mapjson__"scanState"ScanState.of_jsoninletrunId=field_mapjson__"runId"Uuid.of_jsoninletscanName=field_mapjson__"scanName"ScanName.of_jsoninmake?errorMessage?scanNameArn?numberOfRevisions?updatedAt?analysisType?createdAt?scanState?runId?scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns details about a scan, including whether or not a scan has completed."]moduleGetScanRequest=structtypenonrect={scanName:ScanName.t[@ocaml.doc"The name of the scan you want to view details about."];runId:Uuid.toption[@ocaml.doc"UUID that identifies the individual scan run you want to view details about. You retrieve this when you call the CreateScan operation. Defaults to the latest scan run if missing."]}letcontext_="GetScanRequest"letmake?runId=fun~scanName->fun()->{runId;scanName}letto_valuex=structure_to_value[("scanName",(Some(ScanName.to_valuex.scanName)));("runId",(Option.mapx.runId~f:Uuid.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letrunId=(Option.map~f:Uuid.of_xml)(Xml.childxml_arg0"runId")inletscanName=ScanName.of_xml(Xml.child_exn~context:context_xml_arg0"scanName")inmake?runId~scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letrunId=field_mapjson__"runId"Uuid.of_jsoninletscanName=field_map_exnjson__"scanName"ScanName.of_jsoninmake?runId~scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns details about a scan, including whether or not a scan has completed."]moduleGetMetricsSummaryResponse=structtypenonrect={metricsSummary:MetricsSummary.toption[@ocaml.doc"The summary metrics from the specified date."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?metricsSummary=fun()->{metricsSummary}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("metricsSummary",(Option.mapx.metricsSummary~f:MetricsSummary.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmetricsSummary=(Option.map~f:MetricsSummary.of_xml)(Xml.childxml_arg0"metricsSummary")inmake?metricsSummary()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmetricsSummary=field_mapjson__"metricsSummary"MetricsSummary.of_jsoninmake?metricsSummary()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a summary of metrics for an account from a specified date, including number of open findings, the categories with most findings, the scans with most open findings, and scans with most open critical findings."]moduleGetMetricsSummaryRequest=structtypenonrect={date:Timestamp.t[@ocaml.doc"The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years."]}letcontext_="GetMetricsSummaryRequest"letmake~date=fun()->{date}letto_valuex=structure_to_value[("date",(Some(Timestamp.to_valuex.date)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdate=Timestamp.of_xml(Xml.child_exn~context:context_xml_arg0"date")inmake~date()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdate=field_map_exnjson__"date"Timestamp.of_jsoninmake~date()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a summary of metrics for an account from a specified date, including number of open findings, the categories with most findings, the scans with most open findings, and scans with most open critical findings."]moduleGetFindingsResponse=structtypenonrect={findings:Findings.toption[@ocaml.doc"A list of findings generated by the specified scan."];nextToken:NextToken.toption[@ocaml.doc"A pagination token. You can use this in future calls to GetFindings to continue listing results after the current page."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`ConflictExceptionofConflictException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?findings=fun?nextToken->fun()->{findings;nextToken}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"ConflictException"->`ConflictException(ConflictException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"ConflictException"->`ConflictException(ConflictException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`ConflictExceptione->`Assoc[("error",(`String"ConflictException"));("details",(ConflictException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("findings",(Option.mapx.findings~f:Findings.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")inletfindings=(Option.map~f:Findings.of_xml)(Xml.childxml_arg0"findings")inmake?nextToken?findings()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"nextToken"NextToken.of_jsoninletfindings=field_mapjson__"findings"Findings.of_jsoninmake?nextToken?findings()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of all findings generated by a particular scan."]moduleGetFindingsRequest=structtypenonrect={scanName:ScanName.t[@ocaml.doc"The name of the scan you want to retrieve findings from."];nextToken:NextToken.toption[@ocaml.doc"A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page."];maxResults:GetFindingsRequestMaxResultsInteger.toption[@ocaml.doc"The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the nextToken element is returned in the response. Use nextToken in a subsequent request to retrieve additional results. If not specified, returns 1000 results."];status:Status.toption[@ocaml.doc"The status of the findings you want to get. Pass either Open, Closed, or All."]}letcontext_="GetFindingsRequest"letmake?nextToken=fun?maxResults->fun?status->fun~scanName->fun()->{nextToken;maxResults;status;scanName}letto_valuex=structure_to_value[("scanName",(Some(ScanName.to_valuex.scanName)));("nextToken",(Option.mapx.nextToken~f:NextToken.to_value));("maxResults",(Option.mapx.maxResults~f:GetFindingsRequestMaxResultsInteger.to_value));("status",(Option.mapx.status~f:Status.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letstatus=(Option.map~f:Status.of_xml)(Xml.childxml_arg0"status")inletmaxResults=(Option.map~f:GetFindingsRequestMaxResultsInteger.of_xml)(Xml.childxml_arg0"maxResults")inletnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"nextToken")inletscanName=ScanName.of_xml(Xml.child_exn~context:context_xml_arg0"scanName")inmake?status?maxResults?nextToken~scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letstatus=field_mapjson__"status"Status.of_jsoninletmaxResults=field_mapjson__"maxResults"GetFindingsRequestMaxResultsInteger.of_jsoninletnextToken=field_mapjson__"nextToken"NextToken.of_jsoninletscanName=field_map_exnjson__"scanName"ScanName.of_jsoninmake?status?maxResults?nextToken~scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of all findings generated by a particular scan."]moduleGetAccountConfigurationResponse=structtypenonrect={encryptionConfig:EncryptionConfig.toption[@ocaml.doc"An EncryptionConfig object that contains the KMS key ARN that is used for encryption. By default, CodeGuru Security uses an AWS-managed key for encryption. To specify your own key, call UpdateAccountConfiguration. If you do not specify a customer-managed key, returns empty."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?encryptionConfig=fun()->{encryptionConfig}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("encryptionConfig",(Option.mapx.encryptionConfig~f:EncryptionConfig.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letencryptionConfig=(Option.map~f:EncryptionConfig.of_xml)(Xml.childxml_arg0"encryptionConfig")inmake?encryptionConfig()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letencryptionConfig=field_mapjson__"encryptionConfig"EncryptionConfig.of_jsoninmake?encryptionConfig()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Use to get the encryption configuration for an account."]moduleGetAccountConfigurationRequest=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"Use to get the encryption configuration for an account."]moduleCreateUploadUrlResponse=structtypenonrect={s3Url:S3Url.toption[@ocaml.doc"A pre-signed S3 URL. You can upload the code file you want to scan with the required requestHeaders using any HTTP client."];requestHeaders:RequestHeaderMap.toption[@ocaml.doc"A set of key-value pairs that contain the required headers when uploading your resource."];codeArtifactId:Uuid.toption[@ocaml.doc"The identifier for the uploaded code resource. Pass this to CreateScan to use the uploaded resources."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?s3Url=fun?requestHeaders->fun?codeArtifactId->fun()->{s3Url;requestHeaders;codeArtifactId}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("s3Url",(Option.mapx.s3Url~f:S3Url.to_value));("requestHeaders",(Option.mapx.requestHeaders~f:RequestHeaderMap.to_value));("codeArtifactId",(Option.mapx.codeArtifactId~f:Uuid.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcodeArtifactId=(Option.map~f:Uuid.of_xml)(Xml.childxml_arg0"codeArtifactId")inletrequestHeaders=(Option.map~f:RequestHeaderMap.of_xml)(Xml.childxml_arg0"requestHeaders")inlets3Url=(Option.map~f:S3Url.of_xml)(Xml.childxml_arg0"s3Url")inmake?codeArtifactId?requestHeaders?s3Url()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcodeArtifactId=field_mapjson__"codeArtifactId"Uuid.of_jsoninletrequestHeaders=field_mapjson__"requestHeaders"RequestHeaderMap.of_jsoninlets3Url=field_mapjson__"s3Url"S3Url.of_jsoninmake?codeArtifactId?requestHeaders?s3Url()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the uploaded resource. You can upload your code resource to the URL with the request headers using any HTTP client."]moduleCreateUploadUrlRequest=structtypenonrect={scanName:ScanName.t[@ocaml.doc"The name of the scan that will use the uploaded resource. CodeGuru Security uses the unique scan name to track revisions across multiple scans of the same resource. Use this scanName when you call CreateScan on the code resource you upload to this URL."]}letcontext_="CreateUploadUrlRequest"letmake~scanName=fun()->{scanName}letto_valuex=structure_to_value[("scanName",(Some(ScanName.to_valuex.scanName)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letscanName=ScanName.of_xml(Xml.child_exn~context:context_xml_arg0"scanName")inmake~scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letscanName=field_map_exnjson__"scanName"ScanName.of_jsoninmake~scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the uploaded resource. You can upload your code resource to the URL with the request headers using any HTTP client."]moduleCreateScanResponse=structtypenonrect={scanName:ScanName.toption[@ocaml.doc"The name of the scan."];runId:Uuid.toption[@ocaml.doc"UUID that identifies the individual scan run."];resourceId:ResourceId.toption[@ocaml.doc"The identifier for the resource object that contains resources that were scanned."];scanState:ScanState.toption[@ocaml.doc"The current state of the scan. Returns either InProgress, Successful, or Failed."];scanNameArn:ScanNameArn.toption[@ocaml.doc"The ARN for the scan name."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`ConflictExceptionofConflictException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?scanName=fun?runId->fun?resourceId->fun?scanState->fun?scanNameArn->fun()->{scanName;runId;resourceId;scanState;scanNameArn}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"ConflictException"->`ConflictException(ConflictException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"ConflictException"->`ConflictException(ConflictException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`ConflictExceptione->`Assoc[("error",(`String"ConflictException"));("details",(ConflictException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("scanName",(Option.mapx.scanName~f:ScanName.to_value));("runId",(Option.mapx.runId~f:Uuid.to_value));("resourceId",(Option.mapx.resourceId~f:ResourceId.to_value));("scanState",(Option.mapx.scanState~f:ScanState.to_value));("scanNameArn",(Option.mapx.scanNameArn~f:ScanNameArn.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letscanNameArn=(Option.map~f:ScanNameArn.of_xml)(Xml.childxml_arg0"scanNameArn")inletscanState=(Option.map~f:ScanState.of_xml)(Xml.childxml_arg0"scanState")inletresourceId=(Option.map~f:ResourceId.of_xml)(Xml.childxml_arg0"resourceId")inletrunId=(Option.map~f:Uuid.of_xml)(Xml.childxml_arg0"runId")inletscanName=(Option.map~f:ScanName.of_xml)(Xml.childxml_arg0"scanName")inmake?scanNameArn?scanState?resourceId?runId?scanName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letscanNameArn=field_mapjson__"scanNameArn"ScanNameArn.of_jsoninletscanState=field_mapjson__"scanState"ScanState.of_jsoninletresourceId=field_mapjson__"resourceId"ResourceId.of_jsoninletrunId=field_mapjson__"runId"Uuid.of_jsoninletscanName=field_mapjson__"scanName"ScanName.of_jsoninmake?scanNameArn?scanState?resourceId?runId?scanName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Use to create a scan using code uploaded to an Amazon S3 bucket."]moduleCreateScanRequest=structtypenonrect={clientToken:ClientToken.toption[@ocaml.doc"The idempotency token for the request. Amazon CodeGuru Security uses this value to prevent the accidental creation of duplicate scans if there are failures and retries."];resourceId:ResourceId.t[@ocaml.doc"The identifier for the resource object to be scanned."];scanName:ScanName.t[@ocaml.doc"The unique name that CodeGuru Security uses to track revisions across multiple scans of the same resource. Only allowed for a STANDARD scan type."];scanType:ScanType.toption[@ocaml.doc"The type of scan, either Standard or Express. Defaults to Standard type if missing. Express scans run on limited resources and use a limited set of detectors to analyze your code in near-real time. Standard scans have standard resource limits and use the full set of detectors to analyze your code."];analysisType:AnalysisType.toption[@ocaml.doc"The type of analysis you want CodeGuru Security to perform in the scan, either Security or All. The Security type only generates findings related to security. The All type generates both security findings and quality findings. Defaults to Security type if missing."];tags:TagMap.toption[@ocaml.doc"An array of key-value pairs used to tag a scan. A tag is a custom attribute label with two parts: A tag key. For example, CostCenter, Environment, or Secret. Tag keys are case sensitive. An optional tag value field. For example, 111122223333, Production, or a team name. Omitting the tag value is the same as using an empty string. Tag values are case sensitive."]}letcontext_="CreateScanRequest"letmake?clientToken=fun?scanType->fun?analysisType->fun?tags->fun~resourceId->fun~scanName->fun()->{clientToken;scanType;analysisType;tags;resourceId;scanName}letto_valuex=structure_to_value[("clientToken",(Option.mapx.clientToken~f:ClientToken.to_value));("resourceId",(Some(ResourceId.to_valuex.resourceId)));("scanName",(Some(ScanName.to_valuex.scanName)));("scanType",(Option.mapx.scanType~f:ScanType.to_value));("analysisType",(Option.mapx.analysisType~f:AnalysisType.to_value));("tags",(Option.mapx.tags~f:TagMap.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettags=(Option.map~f:TagMap.of_xml)(Xml.childxml_arg0"tags")inletanalysisType=(Option.map~f:AnalysisType.of_xml)(Xml.childxml_arg0"analysisType")inletscanType=(Option.map~f:ScanType.of_xml)(Xml.childxml_arg0"scanType")inletscanName=ScanName.of_xml(Xml.child_exn~context:context_xml_arg0"scanName")inletresourceId=ResourceId.of_xml(Xml.child_exn~context:context_xml_arg0"resourceId")inletclientToken=(Option.map~f:ClientToken.of_xml)(Xml.childxml_arg0"clientToken")inmake?tags?analysisType?scanType~scanName~resourceId?clientToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettags=field_mapjson__"tags"TagMap.of_jsoninletanalysisType=field_mapjson__"analysisType"AnalysisType.of_jsoninletscanType=field_mapjson__"scanType"ScanType.of_jsoninletscanName=field_map_exnjson__"scanName"ScanName.of_jsoninletresourceId=field_map_exnjson__"resourceId"ResourceId.of_jsoninletclientToken=field_mapjson__"clientToken"ClientToken.of_jsoninmake?tags?analysisType?scanType~scanName~resourceId?clientToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Use to create a scan using code uploaded to an Amazon S3 bucket."]moduleBatchGetFindingsResponse=structtypenonrect={findings:Findings.toption[@ocaml.doc"A list of all findings which were successfully fetched."];failedFindings:BatchGetFindingsErrors.toption[@ocaml.doc"A list of errors for individual findings which were not fetched. Each BatchGetFindingsError contains the scanName, findingId, errorCode and error message."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?findings=fun?failedFindings->fun()->{findings;failedFindings}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("findings",(Option.mapx.findings~f:Findings.to_value));("failedFindings",(Option.mapx.failedFindings~f:BatchGetFindingsErrors.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letfailedFindings=(Option.map~f:BatchGetFindingsErrors.of_xml)(Xml.childxml_arg0"failedFindings")inletfindings=(Option.map~f:Findings.of_xml)(Xml.childxml_arg0"findings")inmake?failedFindings?findings()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfailedFindings=field_mapjson__"failedFindings"BatchGetFindingsErrors.of_jsoninletfindings=field_mapjson__"findings"Findings.of_jsoninmake?failedFindings?findings()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of requested findings from standard scans."]moduleBatchGetFindingsRequest=structtypenonrect={findingIdentifiers:FindingIdentifiers.t[@ocaml.doc"A list of finding identifiers. Each identifier consists of a scanName and a findingId. You retrieve the findingId when you call GetFindings."]}letcontext_="BatchGetFindingsRequest"letmake~findingIdentifiers=fun()->{findingIdentifiers}letto_valuex=structure_to_value[("findingIdentifiers",(Some(FindingIdentifiers.to_valuex.findingIdentifiers)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letfindingIdentifiers=FindingIdentifiers.of_xml(Xml.child_exn~context:context_xml_arg0"findingIdentifiers")inmake~findingIdentifiers()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfindingIdentifiers=field_map_exnjson__"findingIdentifiers"FindingIdentifiers.of_jsoninmake~findingIdentifiers()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns a list of requested findings from standard scans."]