12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513(* 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.payment_cryptography_dataletapiVersion="2022-02-03"letendpointPrefix="dataplane.payment-cryptography"letserviceFullName="Payment Cryptography Data Plane"letsignatureVersion="v4"letprotocol="rest_json"letglobalEndpoint=endpointPrefix^".amazonaws.com"letsimple_to_jsonto_valuex=Botodata.Json.value_to_json_scalar(to_valuex)letcomposed_to_jsonto_valuex=Botodata.Json.value_to_json(to_valuex)letto_queryto_valuex=Client.Query.of_value(to_valuex)letstructure_to_value_auxst~f=letfilter=function|(k,Somev)->Some(k,v)|_->Noneinletpairkv=(k,v)inletdefer_value(k,dv)=pairkdvin((List.filter_mapst~f:filter)|>(List.map~f:defer_value))|>(funx->`Structure(fx))letstructure_to_value=structure_to_value_aux~f:Fn.idletstructure_to_wrapped_value~wrapper~response=structure_to_value_aux~f:(funx->[(wrapper,(`Structurex));(response,(`Structure[]))])moduleString_=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_valueendmoduleCertificateType=structtypenonrect=stringletcontext_="CertificateType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:32768)>>=(fun()->check_patterni~pattern:"[^\\[;\\]<>]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"CertificateType"jletto_json=simple_to_jsonto_valueendmoduleKeyArnOrKeyAliasType=structtypenonrect=stringletcontext_="KeyArnOrKeyAliasType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:7)>>=(fun()->(check_string_maxi~max:322)>>=(fun()->check_patterni~pattern:"arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:(key/[0-9a-zA-Z]{16,64}|alias/[a-zA-Z0-9/_-]+)$|^alias/[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:"KeyArnOrKeyAliasType"jletto_json=simple_to_jsonto_valueendmoduleKeyDerivationFunction=structtypenonrect=|NIST_SP800|ANSI_X963|Non_static_idofstringletmakei=iletto_string=function|NIST_SP800->"NIST_SP800"|ANSI_X963->"ANSI_X963"|Non_static_ids->sletof_string=function|"NIST_SP800"->NIST_SP800|"ANSI_X963"->ANSI_X963|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 KeyDerivationFunction"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"KeyDerivationFunction"j)letto_json=simple_to_jsonto_valueendmoduleKeyDerivationHashAlgorithm=structtypenonrect=|SHA_256|SHA_384|SHA_512|Non_static_idofstringletmakei=iletto_string=function|SHA_256->"SHA_256"|SHA_384->"SHA_384"|SHA_512->"SHA_512"|Non_static_ids->sletof_string=function|"SHA_256"->SHA_256|"SHA_384"->SHA_384|"SHA_512"->SHA_512|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 KeyDerivationHashAlgorithm"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"KeyDerivationHashAlgorithm"j)letto_json=simple_to_jsonto_valueendmoduleSharedInformation=structtypenonrect=stringletcontext_="SharedInformation"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:2048)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"SharedInformation"jletto_json=simple_to_jsonto_valueendmoduleSymmetricKeyAlgorithm=structtypenonrect=|TDES_2KEY|TDES_3KEY|AES_128|AES_192|AES_256|HMAC_SHA256|HMAC_SHA384|HMAC_SHA512|HMAC_SHA224|Non_static_idofstringletmakei=iletto_string=function|TDES_2KEY->"TDES_2KEY"|TDES_3KEY->"TDES_3KEY"|AES_128->"AES_128"|AES_192->"AES_192"|AES_256->"AES_256"|HMAC_SHA256->"HMAC_SHA256"|HMAC_SHA384->"HMAC_SHA384"|HMAC_SHA512->"HMAC_SHA512"|HMAC_SHA224->"HMAC_SHA224"|Non_static_ids->sletof_string=function|"TDES_2KEY"->TDES_2KEY|"TDES_3KEY"->TDES_3KEY|"AES_128"->AES_128|"AES_192"->AES_192|"AES_256"->AES_256|"HMAC_SHA256"->HMAC_SHA256|"HMAC_SHA384"->HMAC_SHA384|"HMAC_SHA512"->HMAC_SHA512|"HMAC_SHA224"->HMAC_SHA224|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 SymmetricKeyAlgorithm"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"SymmetricKeyAlgorithm"j)letto_json=simple_to_jsonto_valueendmoduleApplicationCryptogramType=structtypenonrect=stringletcontext_="ApplicationCryptogramType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ApplicationCryptogramType"jletto_json=simple_to_jsonto_valueendmoduleHexLengthEquals4=structtypenonrect=stringletcontext_="HexLengthEquals4"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:4)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HexLengthEquals4"jletto_json=simple_to_jsonto_valueendmodulePinBlockLengthEquals16=structtypenonrect=stringletcontext_="PinBlockLengthEquals16"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"PinBlockLengthEquals16"jletto_json=simple_to_jsonto_valueendmoduleValidationExceptionField=structtypenonrect={path:String_.toption[@ocaml.doc"The request was denied due to an invalid request error."];message:String_.toption[@ocaml.doc"The request was denied due to an invalid request error."]}letmake?path=fun?message->fun()->{path;message}letto_valuex=structure_to_value[("path",(Option.mapx.path~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")inletpath=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"path")inmake?message?path()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"message"String_.of_jsoninletpath=field_mapjson__"path"String_.of_jsoninmake?message?path()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The request was denied due to an invalid request error."]moduleDecimalizationTableType=structtypenonrect=stringletcontext_="DecimalizationTableType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-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:"DecimalizationTableType"jletto_json=simple_to_jsonto_valueendmoduleHexLengthEquals1=structtypenonrect=stringletcontext_="HexLengthEquals1"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:1)>>=(fun()->check_patterni~pattern:"[0-9A-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HexLengthEquals1"jletto_json=simple_to_jsonto_valueendmodulePinOffsetType=structtypenonrect=stringletcontext_="PinOffsetType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:12)>>=(fun()->check_patterni~pattern:"[0-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:"PinOffsetType"jletto_json=simple_to_jsonto_valueendmodulePinValidationDataType=structtypenonrect=stringletcontext_="PinValidationDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-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:"PinValidationDataType"jletto_json=simple_to_jsonto_valueendmoduleIntegerRangeBetween0And6=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:6)>>=(fun()->check_int_mini~min:0));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for IntegerRangeBetween0And6"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleVerificationValueType=structtypenonrect=stringletcontext_="VerificationValueType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:12)>>=(fun()->check_patterni~pattern:"[0-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:"VerificationValueType"jletto_json=simple_to_jsonto_valueendmoduleEcdhDerivationAttributes=structtypenonrect={certificateAuthorityPublicKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyArn of the certificate that signed the client's PublicKeyCertificate."];publicKeyCertificate:CertificateType.t[@ocaml.doc"The client's public key certificate in PEM format (base64 encoded) to use for ECDH key derivation."];keyAlgorithm:SymmetricKeyAlgorithm.t[@ocaml.doc"The key algorithm of the derived ECDH key."];keyDerivationFunction:KeyDerivationFunction.t[@ocaml.doc"The key derivation function to use for deriving a key using ECDH."];keyDerivationHashAlgorithm:KeyDerivationHashAlgorithm.t[@ocaml.doc"The hash type to use for deriving a key using ECDH."];sharedInformation:SharedInformation.t[@ocaml.doc"A byte string containing information that binds the ECDH derived key to the two parties involved or to the context of the key. It may include details like identities of the two parties deriving the key, context of the operation, session IDs, and optionally a nonce. It must not contain zero bytes, and re-using shared information for multiple ECDH key derivations is not recommended."]}letcontext_="EcdhDerivationAttributes"letmake~certificateAuthorityPublicKeyIdentifier=fun~publicKeyCertificate->fun~keyAlgorithm->fun~keyDerivationFunction->fun~keyDerivationHashAlgorithm->fun~sharedInformation->fun()->{certificateAuthorityPublicKeyIdentifier;publicKeyCertificate;keyAlgorithm;keyDerivationFunction;keyDerivationHashAlgorithm;sharedInformation}letto_valuex=structure_to_value[("CertificateAuthorityPublicKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.certificateAuthorityPublicKeyIdentifier)));("PublicKeyCertificate",(Some(CertificateType.to_valuex.publicKeyCertificate)));("KeyAlgorithm",(Some(SymmetricKeyAlgorithm.to_valuex.keyAlgorithm)));("KeyDerivationFunction",(Some(KeyDerivationFunction.to_valuex.keyDerivationFunction)));("KeyDerivationHashAlgorithm",(Some(KeyDerivationHashAlgorithm.to_valuex.keyDerivationHashAlgorithm)));("SharedInformation",(Some(SharedInformation.to_valuex.sharedInformation)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsharedInformation=SharedInformation.of_xml(Xml.child_exn~context:context_xml_arg0"SharedInformation")inletkeyDerivationHashAlgorithm=KeyDerivationHashAlgorithm.of_xml(Xml.child_exn~context:context_xml_arg0"KeyDerivationHashAlgorithm")inletkeyDerivationFunction=KeyDerivationFunction.of_xml(Xml.child_exn~context:context_xml_arg0"KeyDerivationFunction")inletkeyAlgorithm=SymmetricKeyAlgorithm.of_xml(Xml.child_exn~context:context_xml_arg0"KeyAlgorithm")inletpublicKeyCertificate=CertificateType.of_xml(Xml.child_exn~context:context_xml_arg0"PublicKeyCertificate")inletcertificateAuthorityPublicKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"CertificateAuthorityPublicKeyIdentifier")inmake~sharedInformation~keyDerivationHashAlgorithm~keyDerivationFunction~keyAlgorithm~publicKeyCertificate~certificateAuthorityPublicKeyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsharedInformation=field_map_exnjson__"SharedInformation"SharedInformation.of_jsoninletkeyDerivationHashAlgorithm=field_map_exnjson__"KeyDerivationHashAlgorithm"KeyDerivationHashAlgorithm.of_jsoninletkeyDerivationFunction=field_map_exnjson__"KeyDerivationFunction"KeyDerivationFunction.of_jsoninletkeyAlgorithm=field_map_exnjson__"KeyAlgorithm"SymmetricKeyAlgorithm.of_jsoninletpublicKeyCertificate=field_map_exnjson__"PublicKeyCertificate"CertificateType.of_jsoninletcertificateAuthorityPublicKeyIdentifier=field_map_exnjson__"CertificateAuthorityPublicKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake~sharedInformation~keyDerivationHashAlgorithm~keyDerivationFunction~keyAlgorithm~publicKeyCertificate~certificateAuthorityPublicKeyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters required to establish ECDH based key exchange."]moduleTr31WrappedKeyBlock=structtypenonrect=stringletcontext_="Tr31WrappedKeyBlock"letmakei=letopenResultinok_or_failwith((check_string_mini~min:56)>>=(fun()->(check_string_maxi~max:9984)>>=(fun()->check_patterni~pattern:"[0-9a-zA-Z]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"Tr31WrappedKeyBlock"jletto_json=simple_to_jsonto_valueendmoduleDukptDerivationType=structtypenonrect=|TDES_2KEY|TDES_3KEY|AES_128|AES_192|AES_256|Non_static_idofstringletmakei=iletto_string=function|TDES_2KEY->"TDES_2KEY"|TDES_3KEY->"TDES_3KEY"|AES_128->"AES_128"|AES_192->"AES_192"|AES_256->"AES_256"|Non_static_ids->sletof_string=function|"TDES_2KEY"->TDES_2KEY|"TDES_3KEY"->TDES_3KEY|"AES_128"->AES_128|"AES_192"->AES_192|"AES_256"->AES_256|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 DukptDerivationType"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"DukptDerivationType"j)letto_json=simple_to_jsonto_valueendmoduleDukptKeyVariant=structtypenonrect=|BIDIRECTIONAL|REQUEST|RESPONSE|Non_static_idofstringletmakei=iletto_string=function|BIDIRECTIONAL->"BIDIRECTIONAL"|REQUEST->"REQUEST"|RESPONSE->"RESPONSE"|Non_static_ids->sletof_string=function|"BIDIRECTIONAL"->BIDIRECTIONAL|"REQUEST"->REQUEST|"RESPONSE"->RESPONSE|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 DukptKeyVariant"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"DukptKeyVariant"j)letto_json=simple_to_jsonto_valueendmoduleHexLength16Or20Or24=structtypenonrect=stringletcontext_="HexLength16Or20Or24"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:24)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F]{16}|[0-9a-fA-F]{20}|[0-9a-fA-F]{24})")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HexLength16Or20Or24"jletto_json=simple_to_jsonto_valueendmoduleMajorKeyDerivationMode=structtypenonrect=|EMV_OPTION_A|EMV_OPTION_B|Non_static_idofstringletmakei=iletto_string=function|EMV_OPTION_A->"EMV_OPTION_A"|EMV_OPTION_B->"EMV_OPTION_B"|Non_static_ids->sletof_string=function|"EMV_OPTION_A"->EMV_OPTION_A|"EMV_OPTION_B"->EMV_OPTION_B|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 MajorKeyDerivationMode"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"MajorKeyDerivationMode"j)letto_json=simple_to_jsonto_valueendmoduleNumberLengthEquals2=structtypenonrect=stringletcontext_="NumberLengthEquals2"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:2)>>=(fun()->check_patterni~pattern:"[0-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:"NumberLengthEquals2"jletto_json=simple_to_jsonto_valueendmodulePrimaryAccountNumberType=structtypenonrect=stringletcontext_="PrimaryAccountNumberType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:12)>>=(fun()->(check_string_maxi~max:19)>>=(fun()->check_patterni~pattern:"[0-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:"PrimaryAccountNumberType"jletto_json=simple_to_jsonto_valueendmoduleSessionKeyDerivationMode=structtypenonrect=|EMV_COMMON_SESSION_KEY|EMV2000|AMEX|MASTERCARD_SESSION_KEY|VISA|Non_static_idofstringletmakei=iletto_string=function|EMV_COMMON_SESSION_KEY->"EMV_COMMON_SESSION_KEY"|EMV2000->"EMV2000"|AMEX->"AMEX"|MASTERCARD_SESSION_KEY->"MASTERCARD_SESSION_KEY"|VISA->"VISA"|Non_static_ids->sletof_string=function|"EMV_COMMON_SESSION_KEY"->EMV_COMMON_SESSION_KEY|"EMV2000"->EMV2000|"AMEX"->AMEX|"MASTERCARD_SESSION_KEY"->MASTERCARD_SESSION_KEY|"VISA"->VISA|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 SessionKeyDerivationMode"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"SessionKeyDerivationMode"j)letto_json=simple_to_jsonto_valueendmoduleSessionKeyDerivationValue=structtypenonrect={applicationCryptogram:ApplicationCryptogramType.toption[@ocaml.doc"The cryptogram provided by the terminal during transaction processing."];applicationTransactionCounter:HexLengthEquals4.toption[@ocaml.doc"The transaction counter that is provided by the terminal during transaction processing."]}letmake?applicationCryptogram=fun?applicationTransactionCounter->fun()->{applicationCryptogram;applicationTransactionCounter}letto_valuex=structure_to_value[("ApplicationCryptogram",(Option.mapx.applicationCryptogram~f:ApplicationCryptogramType.to_value));("ApplicationTransactionCounter",(Option.mapx.applicationTransactionCounter~f:HexLengthEquals4.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationTransactionCounter=(Option.map~f:HexLengthEquals4.of_xml)(Xml.childxml_arg0"ApplicationTransactionCounter")inletapplicationCryptogram=(Option.map~f:ApplicationCryptogramType.of_xml)(Xml.childxml_arg0"ApplicationCryptogram")inmake?applicationTransactionCounter?applicationCryptogram()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationTransactionCounter=field_mapjson__"ApplicationTransactionCounter"HexLengthEquals4.of_jsoninletapplicationCryptogram=field_mapjson__"ApplicationCryptogram"ApplicationCryptogramType.of_jsoninmake?applicationTransactionCounter?applicationCryptogram()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive session key value using a MAC EMV algorithm."]moduleCardExpiryDateType=structtypenonrect=stringletcontext_="CardExpiryDateType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:4)>>=(fun()->check_patterni~pattern:"[0-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:"CardExpiryDateType"jletto_json=simple_to_jsonto_valueendmoduleServiceCodeType=structtypenonrect=stringletcontext_="ServiceCodeType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:3)>>=(fun()->(check_string_maxi~max:3)>>=(fun()->check_patterni~pattern:"[0-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:"ServiceCodeType"jletto_json=simple_to_jsonto_valueendmoduleHexLengthBetween2And4=structtypenonrect=stringletcontext_="HexLengthBetween2And4"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:4)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HexLengthBetween2And4"jletto_json=simple_to_jsonto_valueendmoduleHexLengthBetween2And8=structtypenonrect=stringletcontext_="HexLengthBetween2And8"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:8)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HexLengthBetween2And8"jletto_json=simple_to_jsonto_valueendmoduleTrackDataType=structtypenonrect=stringletcontext_="TrackDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:160)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"TrackDataType"jletto_json=simple_to_jsonto_valueendmoduleHexLengthEquals8=structtypenonrect=stringletcontext_="HexLengthEquals8"letmakei=letopenResultinok_or_failwith((check_string_mini~min:8)>>=(fun()->(check_string_maxi~max:8)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HexLengthEquals8"jletto_json=simple_to_jsonto_valueendmoduleProprietaryAuthenticationDataType=structtypenonrect=stringletcontext_="ProprietaryAuthenticationDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ProprietaryAuthenticationDataType"jletto_json=simple_to_jsonto_valueendmoduleDiffieHellmanDerivationData=structtypenonrect={sharedInformation:SharedInformation.toption[@ocaml.doc"A string containing information that binds the ECDH derived key to the two parties involved or to the context of the key. It may include details like identities of the two parties deriving the key, context of the operation, session IDs, and optionally a nonce. It must not contain zero bytes. It is not recommended to reuse shared information for multiple ECDH key derivations, as it could result in derived key material being the same across different derivations."]}letmake?sharedInformation=fun()->{sharedInformation}letto_valuex=structure_to_value[("SharedInformation",(Option.mapx.sharedInformation~f:SharedInformation.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsharedInformation=(Option.map~f:SharedInformation.of_xml)(Xml.childxml_arg0"SharedInformation")inmake?sharedInformation()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsharedInformation=field_mapjson__"SharedInformation"SharedInformation.of_jsoninmake?sharedInformation()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The shared information used when deriving a key using ECDH."]moduleDukptEncryptionMode=structtypenonrect=|ECB|CBC|Non_static_idofstringletmakei=iletto_string=function|ECB->"ECB"|CBC->"CBC"|Non_static_ids->sletof_string=function|"ECB"->ECB|"CBC"->CBC|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 DukptEncryptionMode"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"DukptEncryptionMode"j)letto_json=simple_to_jsonto_valueendmoduleInitializationVectorType=structtypenonrect=stringletcontext_="InitializationVectorType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:32)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F]{16}|[0-9a-fA-F]{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:"InitializationVectorType"jletto_json=simple_to_jsonto_valueendmoduleEncryptionMode=structtypenonrect=|ECB|CBC|CFB|CFB1|CFB8|CFB64|CFB128|OFB|Non_static_idofstringletmakei=iletto_string=function|ECB->"ECB"|CBC->"CBC"|CFB->"CFB"|CFB1->"CFB1"|CFB8->"CFB8"|CFB64->"CFB64"|CFB128->"CFB128"|OFB->"OFB"|Non_static_ids->sletof_string=function|"ECB"->ECB|"CBC"->CBC|"CFB"->CFB|"CFB1"->CFB1|"CFB8"->CFB8|"CFB64"->CFB64|"CFB128"->CFB128|"OFB"->OFB|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 EncryptionMode"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"EncryptionMode"j)letto_json=simple_to_jsonto_valueendmodulePaddingType=structtypenonrect=|PKCS1|OAEP_SHA1|OAEP_SHA256|OAEP_SHA512|Non_static_idofstringletmakei=iletto_string=function|PKCS1->"PKCS1"|OAEP_SHA1->"OAEP_SHA1"|OAEP_SHA256->"OAEP_SHA256"|OAEP_SHA512->"OAEP_SHA512"|Non_static_ids->sletof_string=function|"PKCS1"->PKCS1|"OAEP_SHA1"->OAEP_SHA1|"OAEP_SHA256"->OAEP_SHA256|"OAEP_SHA512"->OAEP_SHA512|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 PaddingType"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"PaddingType"j)letto_json=simple_to_jsonto_valueendmoduleEncryptedPinBlockType=structtypenonrect=stringletcontext_="EncryptedPinBlockType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:32)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"EncryptedPinBlockType"jletto_json=simple_to_jsonto_valueendmoduleCurrentPinAttributes=structtypenonrect={currentPinPekIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyArn of the current PIN PEK."];currentEncryptedPinBlock:PinBlockLengthEquals16.t[@ocaml.doc"The encrypted pinblock of the current pin stored on the chip card."]}letcontext_="CurrentPinAttributes"letmake~currentPinPekIdentifier=fun~currentEncryptedPinBlock->fun()->{currentPinPekIdentifier;currentEncryptedPinBlock}letto_valuex=structure_to_value[("CurrentPinPekIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.currentPinPekIdentifier)));("CurrentEncryptedPinBlock",(Some(PinBlockLengthEquals16.to_valuex.currentEncryptedPinBlock)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcurrentEncryptedPinBlock=PinBlockLengthEquals16.of_xml(Xml.child_exn~context:context_xml_arg0"CurrentEncryptedPinBlock")inletcurrentPinPekIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"CurrentPinPekIdentifier")inmake~currentEncryptedPinBlock~currentPinPekIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcurrentEncryptedPinBlock=field_map_exnjson__"CurrentEncryptedPinBlock"PinBlockLengthEquals16.of_jsoninletcurrentPinPekIdentifier=field_map_exnjson__"CurrentPinPekIdentifier"KeyArnOrKeyAliasType.of_jsoninmake~currentEncryptedPinBlock~currentPinPekIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The parameter values of the current PIN to be changed on the EMV chip card."]moduleEmvEncryptionMode=structtypenonrect=|ECB|CBC|Non_static_idofstringletmakei=iletto_string=function|ECB->"ECB"|CBC->"CBC"|Non_static_ids->sletof_string=function|"ECB"->ECB|"CBC"->CBC|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 EmvEncryptionMode"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"EmvEncryptionMode"j)letto_json=simple_to_jsonto_valueendmodulePinBlockLengthPosition=structtypenonrect=|NONE|FRONT_OF_PIN_BLOCK|Non_static_idofstringletmakei=iletto_string=function|NONE->"NONE"|FRONT_OF_PIN_BLOCK->"FRONT_OF_PIN_BLOCK"|Non_static_ids->sletof_string=function|"NONE"->NONE|"FRONT_OF_PIN_BLOCK"->FRONT_OF_PIN_BLOCK|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 PinBlockLengthPosition"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"PinBlockLengthPosition"j)letto_json=simple_to_jsonto_valueendmodulePinBlockPaddingType=structtypenonrect=|NO_PADDING|ISO_IEC_7816_4|Non_static_idofstringletmakei=iletto_string=function|NO_PADDING->"NO_PADDING"|ISO_IEC_7816_4->"ISO_IEC_7816_4"|Non_static_ids->sletof_string=function|"NO_PADDING"->NO_PADDING|"ISO_IEC_7816_4"->ISO_IEC_7816_4|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 PinBlockPaddingType"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"PinBlockPaddingType"j)letto_json=simple_to_jsonto_valueendmoduleAs2805RandomKeyMaterial=structtypenonrect=stringletcontext_="As2805RandomKeyMaterial"letmakei=letopenResultinok_or_failwith((check_string_mini~min:32)>>=(fun()->(check_string_maxi~max:48)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F]{32}|[0-9a-fA-F]{48})")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"As2805RandomKeyMaterial"jletto_json=simple_to_jsonto_valueendmoduleEmvMajorKeyDerivationMode=structtypenonrect=|EMV_OPTION_A|EMV_OPTION_B|Non_static_idofstringletmakei=iletto_string=function|EMV_OPTION_A->"EMV_OPTION_A"|EMV_OPTION_B->"EMV_OPTION_B"|Non_static_ids->sletof_string=function|"EMV_OPTION_A"->EMV_OPTION_A|"EMV_OPTION_B"->EMV_OPTION_B|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 EmvMajorKeyDerivationMode"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"EmvMajorKeyDerivationMode"j)letto_json=simple_to_jsonto_valueendmoduleSessionDerivationDataType=structtypenonrect=stringletcontext_="SessionDerivationDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"SessionDerivationDataType"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_valuevendmoduleVerificationFailedReason=structtypenonrect=|INVALID_MAC|INVALID_PIN|INVALID_VALIDATION_DATA|INVALID_AUTH_REQUEST_CRYPTOGRAM|Non_static_idofstringletmakei=iletto_string=function|INVALID_MAC->"INVALID_MAC"|INVALID_PIN->"INVALID_PIN"|INVALID_VALIDATION_DATA->"INVALID_VALIDATION_DATA"|INVALID_AUTH_REQUEST_CRYPTOGRAM->"INVALID_AUTH_REQUEST_CRYPTOGRAM"|Non_static_ids->sletof_string=function|"INVALID_MAC"->INVALID_MAC|"INVALID_PIN"->INVALID_PIN|"INVALID_VALIDATION_DATA"->INVALID_VALIDATION_DATA|"INVALID_AUTH_REQUEST_CRYPTOGRAM"->INVALID_AUTH_REQUEST_CRYPTOGRAM|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 VerificationFailedReason"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"VerificationFailedReason"j)letto_json=simple_to_jsonto_valueendmoduleIbm3624PinVerification=structtypenonrect={decimalizationTable:DecimalizationTableType.t[@ocaml.doc"The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal."];pinValidationDataPadCharacter:HexLengthEquals1.t[@ocaml.doc"The padding character for validation data."];pinValidationData:PinValidationDataType.t[@ocaml.doc"The unique data for cardholder identification."];pinOffset:PinOffsetType.t[@ocaml.doc"The PIN offset value."]}letcontext_="Ibm3624PinVerification"letmake~decimalizationTable=fun~pinValidationDataPadCharacter->fun~pinValidationData->fun~pinOffset->fun()->{decimalizationTable;pinValidationDataPadCharacter;pinValidationData;pinOffset}letto_valuex=structure_to_value[("DecimalizationTable",(Some(DecimalizationTableType.to_valuex.decimalizationTable)));("PinValidationDataPadCharacter",(Some(HexLengthEquals1.to_valuex.pinValidationDataPadCharacter)));("PinValidationData",(Some(PinValidationDataType.to_valuex.pinValidationData)));("PinOffset",(Some(PinOffsetType.to_valuex.pinOffset)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinOffset=PinOffsetType.of_xml(Xml.child_exn~context:context_xml_arg0"PinOffset")inletpinValidationData=PinValidationDataType.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationData")inletpinValidationDataPadCharacter=HexLengthEquals1.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationDataPadCharacter")inletdecimalizationTable=DecimalizationTableType.of_xml(Xml.child_exn~context:context_xml_arg0"DecimalizationTable")inmake~pinOffset~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinOffset=field_map_exnjson__"PinOffset"PinOffsetType.of_jsoninletpinValidationData=field_map_exnjson__"PinValidationData"PinValidationDataType.of_jsoninletpinValidationDataPadCharacter=field_map_exnjson__"PinValidationDataPadCharacter"HexLengthEquals1.of_jsoninletdecimalizationTable=field_map_exnjson__"DecimalizationTable"DecimalizationTableType.of_jsoninmake~pinOffset~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Ibm3624 PIN verification PIN."]moduleVisaPinVerification=structtypenonrect={pinVerificationKeyIndex:IntegerRangeBetween0And6.t[@ocaml.doc"The value for PIN verification index. It is used in the Visa PIN algorithm to calculate the PVV (PIN Verification Value)."];verificationValue:VerificationValueType.t[@ocaml.doc"Parameters that are required to generate or verify Visa PVV (PIN Verification Value)."]}letcontext_="VisaPinVerification"letmake~pinVerificationKeyIndex=fun~verificationValue->fun()->{pinVerificationKeyIndex;verificationValue}letto_valuex=structure_to_value[("PinVerificationKeyIndex",(Some(IntegerRangeBetween0And6.to_valuex.pinVerificationKeyIndex)));("VerificationValue",(Some(VerificationValueType.to_valuex.verificationValue)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letverificationValue=VerificationValueType.of_xml(Xml.child_exn~context:context_xml_arg0"VerificationValue")inletpinVerificationKeyIndex=IntegerRangeBetween0And6.of_xml(Xml.child_exn~context:context_xml_arg0"PinVerificationKeyIndex")inmake~verificationValue~pinVerificationKeyIndex()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letverificationValue=field_map_exnjson__"VerificationValue"VerificationValueType.of_jsoninletpinVerificationKeyIndex=field_map_exnjson__"PinVerificationKeyIndex"IntegerRangeBetween0And6.of_jsoninmake~verificationValue~pinVerificationKeyIndex()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Visa PIN."]moduleKeyCheckValueAlgorithm=structtypenonrect=|CMAC|ANSI_X9_24|HMAC|SHA_1|Non_static_idofstringletmakei=iletto_string=function|CMAC->"CMAC"|ANSI_X9_24->"ANSI_X9_24"|HMAC->"HMAC"|SHA_1->"SHA_1"|Non_static_ids->sletof_string=function|"CMAC"->CMAC|"ANSI_X9_24"->ANSI_X9_24|"HMAC"->HMAC|"SHA_1"->SHA_1|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 KeyCheckValueAlgorithm"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"KeyCheckValueAlgorithm"j)letto_json=simple_to_jsonto_valueendmoduleWrappedKeyMaterial=structtypenonrect={tr31KeyBlock:Tr31WrappedKeyBlock.toption[@ocaml.doc"The TR-31 wrapped key block."];diffieHellmanSymmetricKey:EcdhDerivationAttributes.toption[@ocaml.doc"The parameter information for deriving a ECDH shared key."]}letmake?tr31KeyBlock=fun?diffieHellmanSymmetricKey->fun()->{tr31KeyBlock;diffieHellmanSymmetricKey}letto_valuex=structure_to_value[("Tr31KeyBlock",(Option.mapx.tr31KeyBlock~f:Tr31WrappedKeyBlock.to_value));("DiffieHellmanSymmetricKey",(Option.mapx.diffieHellmanSymmetricKey~f:EcdhDerivationAttributes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdiffieHellmanSymmetricKey=(Option.map~f:EcdhDerivationAttributes.of_xml)(Xml.childxml_arg0"DiffieHellmanSymmetricKey")inlettr31KeyBlock=(Option.map~f:Tr31WrappedKeyBlock.of_xml)(Xml.childxml_arg0"Tr31KeyBlock")inmake?diffieHellmanSymmetricKey?tr31KeyBlock()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdiffieHellmanSymmetricKey=field_mapjson__"DiffieHellmanSymmetricKey"EcdhDerivationAttributes.of_jsoninlettr31KeyBlock=field_mapjson__"Tr31KeyBlock"Tr31WrappedKeyBlock.of_jsoninmake?diffieHellmanSymmetricKey?tr31KeyBlock()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information of a WrappedKeyBlock for encryption key exchange."]moduleMacAlgorithm=structtypenonrect=|ISO9797_ALGORITHM1|ISO9797_ALGORITHM3|CMAC|HMAC|HMAC_SHA224|HMAC_SHA256|HMAC_SHA384|HMAC_SHA512|AS2805_4_1|Non_static_idofstringletmakei=iletto_string=function|ISO9797_ALGORITHM1->"ISO9797_ALGORITHM1"|ISO9797_ALGORITHM3->"ISO9797_ALGORITHM3"|CMAC->"CMAC"|HMAC->"HMAC"|HMAC_SHA224->"HMAC_SHA224"|HMAC_SHA256->"HMAC_SHA256"|HMAC_SHA384->"HMAC_SHA384"|HMAC_SHA512->"HMAC_SHA512"|AS2805_4_1->"AS2805_4_1"|Non_static_ids->sletof_string=function|"ISO9797_ALGORITHM1"->ISO9797_ALGORITHM1|"ISO9797_ALGORITHM3"->ISO9797_ALGORITHM3|"CMAC"->CMAC|"HMAC"->HMAC|"HMAC_SHA224"->HMAC_SHA224|"HMAC_SHA256"->HMAC_SHA256|"HMAC_SHA384"->HMAC_SHA384|"HMAC_SHA512"->HMAC_SHA512|"AS2805_4_1"->AS2805_4_1|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 MacAlgorithm"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"MacAlgorithm"j)letto_json=simple_to_jsonto_valueendmoduleMacAlgorithmDukpt=structtypenonrect={keySerialNumber:HexLength16Or20Or24.t[@ocaml.doc"The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter."];dukptKeyVariant:DukptKeyVariant.t[@ocaml.doc"The type of use of DUKPT, which can be MAC generation, MAC verification, or both."];dukptDerivationType:DukptDerivationType.toption[@ocaml.doc"The key type derived using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY."]}letcontext_="MacAlgorithmDukpt"letmake?dukptDerivationType=fun~keySerialNumber->fun~dukptKeyVariant->fun()->{dukptDerivationType;keySerialNumber;dukptKeyVariant}letto_valuex=structure_to_value[("KeySerialNumber",(Some(HexLength16Or20Or24.to_valuex.keySerialNumber)));("DukptKeyVariant",(Some(DukptKeyVariant.to_valuex.dukptKeyVariant)));("DukptDerivationType",(Option.mapx.dukptDerivationType~f:DukptDerivationType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdukptDerivationType=(Option.map~f:DukptDerivationType.of_xml)(Xml.childxml_arg0"DukptDerivationType")inletdukptKeyVariant=DukptKeyVariant.of_xml(Xml.child_exn~context:context_xml_arg0"DukptKeyVariant")inletkeySerialNumber=HexLength16Or20Or24.of_xml(Xml.child_exn~context:context_xml_arg0"KeySerialNumber")inmake?dukptDerivationType~dukptKeyVariant~keySerialNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdukptDerivationType=field_mapjson__"DukptDerivationType"DukptDerivationType.of_jsoninletdukptKeyVariant=field_map_exnjson__"DukptKeyVariant"DukptKeyVariant.of_jsoninletkeySerialNumber=field_map_exnjson__"KeySerialNumber"HexLength16Or20Or24.of_jsoninmake?dukptDerivationType~dukptKeyVariant~keySerialNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters required for DUKPT MAC generation and verification."]moduleMacAlgorithmEmv=structtypenonrect={majorKeyDerivationMode:MajorKeyDerivationMode.t[@ocaml.doc"The method to use when deriving the master key for EMV MAC generation or verification."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN), a unique identifier for a payment credit or debit card and associates the card to a specific account holder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."];sessionKeyDerivationMode:SessionKeyDerivationMode.t[@ocaml.doc"The method of deriving a session key for EMV MAC generation or verification."];sessionKeyDerivationValue:SessionKeyDerivationValue.t[@ocaml.doc"Parameters that are required to generate session key for EMV generation and verification."]}letcontext_="MacAlgorithmEmv"letmake~majorKeyDerivationMode=fun~primaryAccountNumber->fun~panSequenceNumber->fun~sessionKeyDerivationMode->fun~sessionKeyDerivationValue->fun()->{majorKeyDerivationMode;primaryAccountNumber;panSequenceNumber;sessionKeyDerivationMode;sessionKeyDerivationValue}letto_valuex=structure_to_value[("MajorKeyDerivationMode",(Some(MajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("SessionKeyDerivationMode",(Some(SessionKeyDerivationMode.to_valuex.sessionKeyDerivationMode)));("SessionKeyDerivationValue",(Some(SessionKeyDerivationValue.to_valuex.sessionKeyDerivationValue)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letsessionKeyDerivationValue=SessionKeyDerivationValue.of_xml(Xml.child_exn~context:context_xml_arg0"SessionKeyDerivationValue")inletsessionKeyDerivationMode=SessionKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"SessionKeyDerivationMode")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletmajorKeyDerivationMode=MajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inmake~sessionKeyDerivationValue~sessionKeyDerivationMode~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letsessionKeyDerivationValue=field_map_exnjson__"SessionKeyDerivationValue"SessionKeyDerivationValue.of_jsoninletsessionKeyDerivationMode=field_map_exnjson__"SessionKeyDerivationMode"SessionKeyDerivationMode.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"MajorKeyDerivationMode.of_jsoninmake~sessionKeyDerivationValue~sessionKeyDerivationMode~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for EMV MAC generation and verification."]moduleAmexCardSecurityCodeVersion1=structtypenonrect={cardExpiryDate:CardExpiryDateType.t[@ocaml.doc"The expiry date of a payment card."]}letcontext_="AmexCardSecurityCodeVersion1"letmake~cardExpiryDate=fun()->{cardExpiryDate}letto_valuex=structure_to_value[("CardExpiryDate",(Some(CardExpiryDateType.to_valuex.cardExpiryDate)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcardExpiryDate=CardExpiryDateType.of_xml(Xml.child_exn~context:context_xml_arg0"CardExpiryDate")inmake~cardExpiryDate()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcardExpiryDate=field_map_exnjson__"CardExpiryDate"CardExpiryDateType.of_jsoninmake~cardExpiryDate()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Card data parameters that are required to generate a Card Security Code (CSC2) for an AMEX payment card."]moduleAmexCardSecurityCodeVersion2=structtypenonrect={cardExpiryDate:CardExpiryDateType.t[@ocaml.doc"The expiry date of a payment card."];serviceCode:ServiceCodeType.t[@ocaml.doc"The service code of the AMEX payment card. This is different from the Card Security Code (CSC)."]}letcontext_="AmexCardSecurityCodeVersion2"letmake~cardExpiryDate=fun~serviceCode->fun()->{cardExpiryDate;serviceCode}letto_valuex=structure_to_value[("CardExpiryDate",(Some(CardExpiryDateType.to_valuex.cardExpiryDate)));("ServiceCode",(Some(ServiceCodeType.to_valuex.serviceCode)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letserviceCode=ServiceCodeType.of_xml(Xml.child_exn~context:context_xml_arg0"ServiceCode")inletcardExpiryDate=CardExpiryDateType.of_xml(Xml.child_exn~context:context_xml_arg0"CardExpiryDate")inmake~serviceCode~cardExpiryDate()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letserviceCode=field_map_exnjson__"ServiceCode"ServiceCodeType.of_jsoninletcardExpiryDate=field_map_exnjson__"CardExpiryDate"CardExpiryDateType.of_jsoninmake~serviceCode~cardExpiryDate()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Card data parameters that are required to generate a Card Security Code (CSC2) for an AMEX payment card."]moduleCardHolderVerificationValue=structtypenonrect={unpredictableNumber:HexLengthBetween2And8.t[@ocaml.doc"A random number generated by the issuer."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."];applicationTransactionCounter:HexLengthBetween2And4.t[@ocaml.doc"The transaction counter value that comes from a point of sale terminal."]}letcontext_="CardHolderVerificationValue"letmake~unpredictableNumber=fun~panSequenceNumber->fun~applicationTransactionCounter->fun()->{unpredictableNumber;panSequenceNumber;applicationTransactionCounter}letto_valuex=structure_to_value[("UnpredictableNumber",(Some(HexLengthBetween2And8.to_valuex.unpredictableNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthBetween2And4.to_valuex.applicationTransactionCounter)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationTransactionCounter=HexLengthBetween2And4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletunpredictableNumber=HexLengthBetween2And8.of_xml(Xml.child_exn~context:context_xml_arg0"UnpredictableNumber")inmake~applicationTransactionCounter~panSequenceNumber~unpredictableNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthBetween2And4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletunpredictableNumber=field_map_exnjson__"UnpredictableNumber"HexLengthBetween2And8.of_jsoninmake~applicationTransactionCounter~panSequenceNumber~unpredictableNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Card data parameters that are required to generate a cardholder verification value for the payment card."]moduleCardVerificationValue1=structtypenonrect={cardExpiryDate:CardExpiryDateType.t[@ocaml.doc"The expiry date of a payment card."];serviceCode:ServiceCodeType.t[@ocaml.doc"The service code of the payment card. This is different from Card Security Code (CSC)."]}letcontext_="CardVerificationValue1"letmake~cardExpiryDate=fun~serviceCode->fun()->{cardExpiryDate;serviceCode}letto_valuex=structure_to_value[("CardExpiryDate",(Some(CardExpiryDateType.to_valuex.cardExpiryDate)));("ServiceCode",(Some(ServiceCodeType.to_valuex.serviceCode)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letserviceCode=ServiceCodeType.of_xml(Xml.child_exn~context:context_xml_arg0"ServiceCode")inletcardExpiryDate=CardExpiryDateType.of_xml(Xml.child_exn~context:context_xml_arg0"CardExpiryDate")inmake~serviceCode~cardExpiryDate()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letserviceCode=field_map_exnjson__"ServiceCode"ServiceCodeType.of_jsoninletcardExpiryDate=field_map_exnjson__"CardExpiryDate"CardExpiryDateType.of_jsoninmake~serviceCode~cardExpiryDate()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Card data parameters that are required to verify CVV (Card Verification Value) for the payment card."]moduleCardVerificationValue2=structtypenonrect={cardExpiryDate:CardExpiryDateType.t[@ocaml.doc"The expiry date of a payment card."]}letcontext_="CardVerificationValue2"letmake~cardExpiryDate=fun()->{cardExpiryDate}letto_valuex=structure_to_value[("CardExpiryDate",(Some(CardExpiryDateType.to_valuex.cardExpiryDate)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcardExpiryDate=CardExpiryDateType.of_xml(Xml.child_exn~context:context_xml_arg0"CardExpiryDate")inmake~cardExpiryDate()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcardExpiryDate=field_map_exnjson__"CardExpiryDate"CardExpiryDateType.of_jsoninmake~cardExpiryDate()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Card data parameters that are required to verify Card Verification Value (CVV2) for the payment card."]moduleDiscoverDynamicCardVerificationCode=structtypenonrect={cardExpiryDate:CardExpiryDateType.t[@ocaml.doc"The expiry date of a payment card."];unpredictableNumber:HexLengthBetween2And8.t[@ocaml.doc"A random number that is generated by the issuer."];applicationTransactionCounter:HexLengthBetween2And4.t[@ocaml.doc"The transaction counter value that comes from the terminal."]}letcontext_="DiscoverDynamicCardVerificationCode"letmake~cardExpiryDate=fun~unpredictableNumber->fun~applicationTransactionCounter->fun()->{cardExpiryDate;unpredictableNumber;applicationTransactionCounter}letto_valuex=structure_to_value[("CardExpiryDate",(Some(CardExpiryDateType.to_valuex.cardExpiryDate)));("UnpredictableNumber",(Some(HexLengthBetween2And8.to_valuex.unpredictableNumber)));("ApplicationTransactionCounter",(Some(HexLengthBetween2And4.to_valuex.applicationTransactionCounter)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationTransactionCounter=HexLengthBetween2And4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletunpredictableNumber=HexLengthBetween2And8.of_xml(Xml.child_exn~context:context_xml_arg0"UnpredictableNumber")inletcardExpiryDate=CardExpiryDateType.of_xml(Xml.child_exn~context:context_xml_arg0"CardExpiryDate")inmake~applicationTransactionCounter~unpredictableNumber~cardExpiryDate()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthBetween2And4.of_jsoninletunpredictableNumber=field_map_exnjson__"UnpredictableNumber"HexLengthBetween2And8.of_jsoninletcardExpiryDate=field_map_exnjson__"CardExpiryDate"CardExpiryDateType.of_jsoninmake~applicationTransactionCounter~unpredictableNumber~cardExpiryDate()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify dCVC (Dynamic Card Verification Code)."]moduleDynamicCardVerificationCode=structtypenonrect={unpredictableNumber:HexLengthBetween2And8.t[@ocaml.doc"A random number generated by the issuer."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."];applicationTransactionCounter:HexLengthBetween2And4.t[@ocaml.doc"The transaction counter value that comes from the terminal."];trackData:TrackDataType.t[@ocaml.doc"The data on the two tracks of magnetic cards used for financial transactions. This includes the cardholder name, PAN, expiration date, bank ID (BIN) and several other numbers the issuing bank uses to validate the data received."]}letcontext_="DynamicCardVerificationCode"letmake~unpredictableNumber=fun~panSequenceNumber->fun~applicationTransactionCounter->fun~trackData->fun()->{unpredictableNumber;panSequenceNumber;applicationTransactionCounter;trackData}letto_valuex=structure_to_value[("UnpredictableNumber",(Some(HexLengthBetween2And8.to_valuex.unpredictableNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthBetween2And4.to_valuex.applicationTransactionCounter)));("TrackData",(Some(TrackDataType.to_valuex.trackData)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettrackData=TrackDataType.of_xml(Xml.child_exn~context:context_xml_arg0"TrackData")inletapplicationTransactionCounter=HexLengthBetween2And4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletunpredictableNumber=HexLengthBetween2And8.of_xml(Xml.child_exn~context:context_xml_arg0"UnpredictableNumber")inmake~trackData~applicationTransactionCounter~panSequenceNumber~unpredictableNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettrackData=field_map_exnjson__"TrackData"TrackDataType.of_jsoninletapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthBetween2And4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletunpredictableNumber=field_map_exnjson__"UnpredictableNumber"HexLengthBetween2And8.of_jsoninmake~trackData~applicationTransactionCounter~panSequenceNumber~unpredictableNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Dynamic Card Verification Value (dCVV)."]moduleDynamicCardVerificationValue=structtypenonrect={panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."];cardExpiryDate:CardExpiryDateType.t[@ocaml.doc"The expiry date of a payment card."];serviceCode:ServiceCodeType.t[@ocaml.doc"The service code of the payment card. This is different from Card Security Code (CSC)."];applicationTransactionCounter:HexLengthBetween2And4.t[@ocaml.doc"The transaction counter value that comes from the terminal."]}letcontext_="DynamicCardVerificationValue"letmake~panSequenceNumber=fun~cardExpiryDate->fun~serviceCode->fun~applicationTransactionCounter->fun()->{panSequenceNumber;cardExpiryDate;serviceCode;applicationTransactionCounter}letto_valuex=structure_to_value[("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("CardExpiryDate",(Some(CardExpiryDateType.to_valuex.cardExpiryDate)));("ServiceCode",(Some(ServiceCodeType.to_valuex.serviceCode)));("ApplicationTransactionCounter",(Some(HexLengthBetween2And4.to_valuex.applicationTransactionCounter)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationTransactionCounter=HexLengthBetween2And4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletserviceCode=ServiceCodeType.of_xml(Xml.child_exn~context:context_xml_arg0"ServiceCode")inletcardExpiryDate=CardExpiryDateType.of_xml(Xml.child_exn~context:context_xml_arg0"CardExpiryDate")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inmake~applicationTransactionCounter~serviceCode~cardExpiryDate~panSequenceNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthBetween2And4.of_jsoninletserviceCode=field_map_exnjson__"ServiceCode"ServiceCodeType.of_jsoninletcardExpiryDate=field_map_exnjson__"CardExpiryDate"CardExpiryDateType.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninmake~applicationTransactionCounter~serviceCode~cardExpiryDate~panSequenceNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Dynamic Card Verification Value (dCVV)."]moduleCryptogramVerificationArpcMethod1=structtypenonrect={authResponseCode:HexLengthEquals4.t[@ocaml.doc"The auth code used to calculate APRC after ARQC verification is successful. This is the same auth code used for ARQC generation outside of Amazon Web Services Payment Cryptography."]}letcontext_="CryptogramVerificationArpcMethod1"letmake~authResponseCode=fun()->{authResponseCode}letto_valuex=structure_to_value[("AuthResponseCode",(Some(HexLengthEquals4.to_valuex.authResponseCode)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letauthResponseCode=HexLengthEquals4.of_xml(Xml.child_exn~context:context_xml_arg0"AuthResponseCode")inmake~authResponseCode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letauthResponseCode=field_map_exnjson__"AuthResponseCode"HexLengthEquals4.of_jsoninmake~authResponseCode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for ARPC response generation using method1 after ARQC verification is successful."]moduleCryptogramVerificationArpcMethod2=structtypenonrect={cardStatusUpdate:HexLengthEquals8.t[@ocaml.doc"The data indicating whether the issuer approves or declines an online transaction using an EMV chip card."];proprietaryAuthenticationData:ProprietaryAuthenticationDataType.toption[@ocaml.doc"The proprietary authentication data used by issuer for communication during online transaction using an EMV chip card."]}letcontext_="CryptogramVerificationArpcMethod2"letmake?proprietaryAuthenticationData=fun~cardStatusUpdate->fun()->{proprietaryAuthenticationData;cardStatusUpdate}letto_valuex=structure_to_value[("CardStatusUpdate",(Some(HexLengthEquals8.to_valuex.cardStatusUpdate)));("ProprietaryAuthenticationData",(Option.mapx.proprietaryAuthenticationData~f:ProprietaryAuthenticationDataType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letproprietaryAuthenticationData=(Option.map~f:ProprietaryAuthenticationDataType.of_xml)(Xml.childxml_arg0"ProprietaryAuthenticationData")inletcardStatusUpdate=HexLengthEquals8.of_xml(Xml.child_exn~context:context_xml_arg0"CardStatusUpdate")inmake?proprietaryAuthenticationData~cardStatusUpdate()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letproprietaryAuthenticationData=field_mapjson__"ProprietaryAuthenticationData"ProprietaryAuthenticationDataType.of_jsoninletcardStatusUpdate=field_map_exnjson__"CardStatusUpdate"HexLengthEquals8.of_jsoninmake?proprietaryAuthenticationData~cardStatusUpdate()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for ARPC response generation using method2 after ARQC verification is successful."]moduleSessionKeyAmex=structtypenonrect={primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."]}letcontext_="SessionKeyAmex"letmake~primaryAccountNumber=fun~panSequenceNumber->fun()->{primaryAccountNumber;panSequenceNumber}letto_valuex=structure_to_value[("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inmake~panSequenceNumber~primaryAccountNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninmake~panSequenceNumber~primaryAccountNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive session key for an Amex payment card."]moduleSessionKeyEmv2000=structtypenonrect={primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."];applicationTransactionCounter:HexLengthEquals4.t[@ocaml.doc"The transaction counter that is provided by the terminal during transaction processing."]}letcontext_="SessionKeyEmv2000"letmake~primaryAccountNumber=fun~panSequenceNumber->fun~applicationTransactionCounter->fun()->{primaryAccountNumber;panSequenceNumber;applicationTransactionCounter}letto_valuex=structure_to_value[("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthEquals4.to_valuex.applicationTransactionCounter)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationTransactionCounter=HexLengthEquals4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inmake~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthEquals4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninmake~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive session key for an Emv2000 payment card for ARQC verification."]moduleSessionKeyEmvCommon=structtypenonrect={primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."];applicationTransactionCounter:HexLengthEquals4.t[@ocaml.doc"The transaction counter that is provided by the terminal during transaction processing."]}letcontext_="SessionKeyEmvCommon"letmake~primaryAccountNumber=fun~panSequenceNumber->fun~applicationTransactionCounter->fun()->{primaryAccountNumber;panSequenceNumber;applicationTransactionCounter}letto_valuex=structure_to_value[("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthEquals4.to_valuex.applicationTransactionCounter)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationTransactionCounter=HexLengthEquals4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inmake~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthEquals4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninmake~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive session key for an Emv common payment card for ARQC verification."]moduleSessionKeyMastercard=structtypenonrect={primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."];applicationTransactionCounter:HexLengthEquals4.t[@ocaml.doc"The transaction counter that is provided by the terminal during transaction processing."];unpredictableNumber:HexLengthBetween2And8.t[@ocaml.doc"A random number generated by the issuer."]}letcontext_="SessionKeyMastercard"letmake~primaryAccountNumber=fun~panSequenceNumber->fun~applicationTransactionCounter->fun~unpredictableNumber->fun()->{primaryAccountNumber;panSequenceNumber;applicationTransactionCounter;unpredictableNumber}letto_valuex=structure_to_value[("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthEquals4.to_valuex.applicationTransactionCounter)));("UnpredictableNumber",(Some(HexLengthBetween2And8.to_valuex.unpredictableNumber)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letunpredictableNumber=HexLengthBetween2And8.of_xml(Xml.child_exn~context:context_xml_arg0"UnpredictableNumber")inletapplicationTransactionCounter=HexLengthEquals4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inmake~unpredictableNumber~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letunpredictableNumber=field_map_exnjson__"UnpredictableNumber"HexLengthBetween2And8.of_jsoninletapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthEquals4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninmake~unpredictableNumber~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive session key for Mastercard payment card for ARQC verification."]moduleSessionKeyVisa=structtypenonrect={primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN)."]}letcontext_="SessionKeyVisa"letmake~primaryAccountNumber=fun~panSequenceNumber->fun()->{primaryAccountNumber;panSequenceNumber}letto_valuex=structure_to_value[("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inmake~panSequenceNumber~primaryAccountNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninmake~panSequenceNumber~primaryAccountNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive session key for Visa payment card for ARQC verification."]moduleSystemTraceAuditNumberType=structtypenonrect=stringletcontext_="SystemTraceAuditNumberType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:6)>>=(fun()->(check_string_maxi~max:6)>>=(fun()->check_patterni~pattern:"[0-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:"SystemTraceAuditNumberType"jletto_json=simple_to_jsonto_valueendmoduleTransactionAmountType=structtypenonrect=stringletcontext_="TransactionAmountType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:12)>>=(fun()->(check_string_maxi~max:12)>>=(fun()->check_patterni~pattern:"[0-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:"TransactionAmountType"jletto_json=simple_to_jsonto_valueendmoduleTranslationPinDataAs2805Format0=structtypenonrect={primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."]}letcontext_="TranslationPinDataAs2805Format0"letmake~primaryAccountNumber=fun()->{primaryAccountNumber}letto_valuex=structure_to_value[("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inmake~primaryAccountNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninmake~primaryAccountNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for translation between AS2805 PIN format 0 translation."]moduleTranslationPinDataIsoFormat034=structtypenonrect={primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder. A PAN is a unique identifier for a payment credit or debit card and associates the card to a specific account holder."]}letcontext_="TranslationPinDataIsoFormat034"letmake~primaryAccountNumber=fun()->{primaryAccountNumber}letto_valuex=structure_to_value[("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inmake~primaryAccountNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninmake~primaryAccountNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for translation between ISO9564 PIN format 0,3,4 translation."]moduleTranslationPinDataIsoFormat1=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"Parameters that are required for ISO9564 PIN format 1 translation."]moduleKeyCheckValue=structtypenonrect=stringletcontext_="KeyCheckValue"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"KeyCheckValue"jletto_json=simple_to_jsonto_valueendmoduleKeyMaterial=structtypenonrect=stringletcontext_="KeyMaterial"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:16384)>>=(fun()->check_string_mini~min: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:"KeyMaterial"jletto_json=simple_to_jsonto_valueendmoduleWrappedKeyMaterialFormat=structtypenonrect=|KEY_CRYPTOGRAM|TR31_KEY_BLOCK|TR34_KEY_BLOCK|Non_static_idofstringletmakei=iletto_string=function|KEY_CRYPTOGRAM->"KEY_CRYPTOGRAM"|TR31_KEY_BLOCK->"TR31_KEY_BLOCK"|TR34_KEY_BLOCK->"TR34_KEY_BLOCK"|Non_static_ids->sletof_string=function|"KEY_CRYPTOGRAM"->KEY_CRYPTOGRAM|"TR31_KEY_BLOCK"->TR31_KEY_BLOCK|"TR34_KEY_BLOCK"->TR34_KEY_BLOCK|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 WrappedKeyMaterialFormat"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"WrappedKeyMaterialFormat"j)letto_json=simple_to_jsonto_valueendmoduleIncomingDiffieHellmanTr31KeyBlock=structtypenonrect={privateKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the asymmetric ECC key pair."];certificateAuthorityPublicKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyArn of the certificate that signed the client's PublicKeyCertificate."];publicKeyCertificate:CertificateType.t[@ocaml.doc"The client's public key certificate in PEM format (base64 encoded) to use for ECDH key derivation."];deriveKeyAlgorithm:SymmetricKeyAlgorithm.t[@ocaml.doc"The key algorithm of the derived ECDH key."];keyDerivationFunction:KeyDerivationFunction.t[@ocaml.doc"The key derivation function to use for deriving a key using ECDH."];keyDerivationHashAlgorithm:KeyDerivationHashAlgorithm.t[@ocaml.doc"The hash type to use for deriving a key using ECDH."];derivationData:DiffieHellmanDerivationData.t;wrappedKeyBlock:Tr31WrappedKeyBlock.t[@ocaml.doc"The WrappedKeyBlock containing the transaction key wrapped using an ECDH dervied key."]}letcontext_="IncomingDiffieHellmanTr31KeyBlock"letmake~privateKeyIdentifier=fun~certificateAuthorityPublicKeyIdentifier->fun~publicKeyCertificate->fun~deriveKeyAlgorithm->fun~keyDerivationFunction->fun~keyDerivationHashAlgorithm->fun~derivationData->fun~wrappedKeyBlock->fun()->{privateKeyIdentifier;certificateAuthorityPublicKeyIdentifier;publicKeyCertificate;deriveKeyAlgorithm;keyDerivationFunction;keyDerivationHashAlgorithm;derivationData;wrappedKeyBlock}letto_valuex=structure_to_value[("PrivateKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.privateKeyIdentifier)));("CertificateAuthorityPublicKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.certificateAuthorityPublicKeyIdentifier)));("PublicKeyCertificate",(Some(CertificateType.to_valuex.publicKeyCertificate)));("DeriveKeyAlgorithm",(Some(SymmetricKeyAlgorithm.to_valuex.deriveKeyAlgorithm)));("KeyDerivationFunction",(Some(KeyDerivationFunction.to_valuex.keyDerivationFunction)));("KeyDerivationHashAlgorithm",(Some(KeyDerivationHashAlgorithm.to_valuex.keyDerivationHashAlgorithm)));("DerivationData",(Some(DiffieHellmanDerivationData.to_valuex.derivationData)));("WrappedKeyBlock",(Some(Tr31WrappedKeyBlock.to_valuex.wrappedKeyBlock)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letwrappedKeyBlock=Tr31WrappedKeyBlock.of_xml(Xml.child_exn~context:context_xml_arg0"WrappedKeyBlock")inletderivationData=DiffieHellmanDerivationData.of_xml(Xml.child_exn~context:context_xml_arg0"DerivationData")inletkeyDerivationHashAlgorithm=KeyDerivationHashAlgorithm.of_xml(Xml.child_exn~context:context_xml_arg0"KeyDerivationHashAlgorithm")inletkeyDerivationFunction=KeyDerivationFunction.of_xml(Xml.child_exn~context:context_xml_arg0"KeyDerivationFunction")inletderiveKeyAlgorithm=SymmetricKeyAlgorithm.of_xml(Xml.child_exn~context:context_xml_arg0"DeriveKeyAlgorithm")inletpublicKeyCertificate=CertificateType.of_xml(Xml.child_exn~context:context_xml_arg0"PublicKeyCertificate")inletcertificateAuthorityPublicKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"CertificateAuthorityPublicKeyIdentifier")inletprivateKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"PrivateKeyIdentifier")inmake~wrappedKeyBlock~derivationData~keyDerivationHashAlgorithm~keyDerivationFunction~deriveKeyAlgorithm~publicKeyCertificate~certificateAuthorityPublicKeyIdentifier~privateKeyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letwrappedKeyBlock=field_map_exnjson__"WrappedKeyBlock"Tr31WrappedKeyBlock.of_jsoninletderivationData=field_map_exnjson__"DerivationData"DiffieHellmanDerivationData.of_jsoninletkeyDerivationHashAlgorithm=field_map_exnjson__"KeyDerivationHashAlgorithm"KeyDerivationHashAlgorithm.of_jsoninletkeyDerivationFunction=field_map_exnjson__"KeyDerivationFunction"KeyDerivationFunction.of_jsoninletderiveKeyAlgorithm=field_map_exnjson__"DeriveKeyAlgorithm"SymmetricKeyAlgorithm.of_jsoninletpublicKeyCertificate=field_map_exnjson__"PublicKeyCertificate"CertificateType.of_jsoninletcertificateAuthorityPublicKeyIdentifier=field_map_exnjson__"CertificateAuthorityPublicKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletprivateKeyIdentifier=field_map_exnjson__"PrivateKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake~wrappedKeyBlock~derivationData~keyDerivationHashAlgorithm~keyDerivationFunction~deriveKeyAlgorithm~publicKeyCertificate~certificateAuthorityPublicKeyIdentifier~privateKeyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information of a TR31KeyBlock wrapped using an ECDH derived key."]moduleOutgoingTr31KeyBlock=structtypenonrect={wrappingKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the KEK used to wrap the transaction key."]}letcontext_="OutgoingTr31KeyBlock"letmake~wrappingKeyIdentifier=fun()->{wrappingKeyIdentifier}letto_valuex=structure_to_value[("WrappingKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.wrappingKeyIdentifier)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letwrappingKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"WrappingKeyIdentifier")inmake~wrappingKeyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letwrappingKeyIdentifier=field_map_exnjson__"WrappingKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake~wrappingKeyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information of the TR31WrappedKeyBlock containing the transaction key wrapped using a KEK."]moduleDukptEncryptionAttributes=structtypenonrect={keySerialNumber:HexLength16Or20Or24.t[@ocaml.doc"The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter."];mode:DukptEncryptionMode.toption[@ocaml.doc"The block cipher method to use for encryption. The default is CBC."];dukptKeyDerivationType:DukptDerivationType.toption[@ocaml.doc"The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY"];dukptKeyVariant:DukptKeyVariant.toption[@ocaml.doc"The type of use of DUKPT, which can be incoming data decryption, outgoing data encryption, or both."];initializationVector:InitializationVectorType.toption[@ocaml.doc"An input used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero."]}letcontext_="DukptEncryptionAttributes"letmake?mode=fun?dukptKeyDerivationType->fun?dukptKeyVariant->fun?initializationVector->fun~keySerialNumber->fun()->{mode;dukptKeyDerivationType;dukptKeyVariant;initializationVector;keySerialNumber}letto_valuex=structure_to_value[("KeySerialNumber",(Some(HexLength16Or20Or24.to_valuex.keySerialNumber)));("Mode",(Option.mapx.mode~f:DukptEncryptionMode.to_value));("DukptKeyDerivationType",(Option.mapx.dukptKeyDerivationType~f:DukptDerivationType.to_value));("DukptKeyVariant",(Option.mapx.dukptKeyVariant~f:DukptKeyVariant.to_value));("InitializationVector",(Option.mapx.initializationVector~f:InitializationVectorType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letinitializationVector=(Option.map~f:InitializationVectorType.of_xml)(Xml.childxml_arg0"InitializationVector")inletdukptKeyVariant=(Option.map~f:DukptKeyVariant.of_xml)(Xml.childxml_arg0"DukptKeyVariant")inletdukptKeyDerivationType=(Option.map~f:DukptDerivationType.of_xml)(Xml.childxml_arg0"DukptKeyDerivationType")inletmode=(Option.map~f:DukptEncryptionMode.of_xml)(Xml.childxml_arg0"Mode")inletkeySerialNumber=HexLength16Or20Or24.of_xml(Xml.child_exn~context:context_xml_arg0"KeySerialNumber")inmake?initializationVector?dukptKeyVariant?dukptKeyDerivationType?mode~keySerialNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letinitializationVector=field_mapjson__"InitializationVector"InitializationVectorType.of_jsoninletdukptKeyVariant=field_mapjson__"DukptKeyVariant"DukptKeyVariant.of_jsoninletdukptKeyDerivationType=field_mapjson__"DukptKeyDerivationType"DukptDerivationType.of_jsoninletmode=field_mapjson__"Mode"DukptEncryptionMode.of_jsoninletkeySerialNumber=field_map_exnjson__"KeySerialNumber"HexLength16Or20Or24.of_jsoninmake?initializationVector?dukptKeyVariant?dukptKeyDerivationType?mode~keySerialNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to encrypt plaintext data using DUKPT."]moduleSymmetricEncryptionAttributes=structtypenonrect={mode:EncryptionMode.t[@ocaml.doc"The block cipher method to use for encryption."];initializationVector:InitializationVectorType.toption[@ocaml.doc"An input used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero."];paddingType:PaddingType.toption[@ocaml.doc"The padding to be included with the data."]}letcontext_="SymmetricEncryptionAttributes"letmake?initializationVector=fun?paddingType->fun~mode->fun()->{initializationVector;paddingType;mode}letto_valuex=structure_to_value[("Mode",(Some(EncryptionMode.to_valuex.mode)));("InitializationVector",(Option.mapx.initializationVector~f:InitializationVectorType.to_value));("PaddingType",(Option.mapx.paddingType~f:PaddingType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpaddingType=(Option.map~f:PaddingType.of_xml)(Xml.childxml_arg0"PaddingType")inletinitializationVector=(Option.map~f:InitializationVectorType.of_xml)(Xml.childxml_arg0"InitializationVector")inletmode=EncryptionMode.of_xml(Xml.child_exn~context:context_xml_arg0"Mode")inmake?paddingType?initializationVector~mode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpaddingType=field_mapjson__"PaddingType"PaddingType.of_jsoninletinitializationVector=field_mapjson__"InitializationVector"InitializationVectorType.of_jsoninletmode=field_map_exnjson__"Mode"EncryptionMode.of_jsoninmake?paddingType?initializationVector~mode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters requried to encrypt plaintext data using symmetric keys."]moduleIbm3624NaturalPin=structtypenonrect={decimalizationTable:DecimalizationTableType.t[@ocaml.doc"The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal."];pinValidationDataPadCharacter:HexLengthEquals1.t[@ocaml.doc"The padding character for validation data."];pinValidationData:PinValidationDataType.t[@ocaml.doc"The unique data for cardholder identification."]}letcontext_="Ibm3624NaturalPin"letmake~decimalizationTable=fun~pinValidationDataPadCharacter->fun~pinValidationData->fun()->{decimalizationTable;pinValidationDataPadCharacter;pinValidationData}letto_valuex=structure_to_value[("DecimalizationTable",(Some(DecimalizationTableType.to_valuex.decimalizationTable)));("PinValidationDataPadCharacter",(Some(HexLengthEquals1.to_valuex.pinValidationDataPadCharacter)));("PinValidationData",(Some(PinValidationDataType.to_valuex.pinValidationData)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinValidationData=PinValidationDataType.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationData")inletpinValidationDataPadCharacter=HexLengthEquals1.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationDataPadCharacter")inletdecimalizationTable=DecimalizationTableType.of_xml(Xml.child_exn~context:context_xml_arg0"DecimalizationTable")inmake~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinValidationData=field_map_exnjson__"PinValidationData"PinValidationDataType.of_jsoninletpinValidationDataPadCharacter=field_map_exnjson__"PinValidationDataPadCharacter"HexLengthEquals1.of_jsoninletdecimalizationTable=field_map_exnjson__"DecimalizationTable"DecimalizationTableType.of_jsoninmake~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Ibm3624 natural PIN."]moduleIbm3624PinFromOffset=structtypenonrect={decimalizationTable:DecimalizationTableType.t[@ocaml.doc"The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal."];pinValidationDataPadCharacter:HexLengthEquals1.t[@ocaml.doc"The padding character for validation data."];pinValidationData:PinValidationDataType.t[@ocaml.doc"The unique data for cardholder identification."];pinOffset:PinOffsetType.t[@ocaml.doc"The PIN offset value."]}letcontext_="Ibm3624PinFromOffset"letmake~decimalizationTable=fun~pinValidationDataPadCharacter->fun~pinValidationData->fun~pinOffset->fun()->{decimalizationTable;pinValidationDataPadCharacter;pinValidationData;pinOffset}letto_valuex=structure_to_value[("DecimalizationTable",(Some(DecimalizationTableType.to_valuex.decimalizationTable)));("PinValidationDataPadCharacter",(Some(HexLengthEquals1.to_valuex.pinValidationDataPadCharacter)));("PinValidationData",(Some(PinValidationDataType.to_valuex.pinValidationData)));("PinOffset",(Some(PinOffsetType.to_valuex.pinOffset)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinOffset=PinOffsetType.of_xml(Xml.child_exn~context:context_xml_arg0"PinOffset")inletpinValidationData=PinValidationDataType.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationData")inletpinValidationDataPadCharacter=HexLengthEquals1.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationDataPadCharacter")inletdecimalizationTable=DecimalizationTableType.of_xml(Xml.child_exn~context:context_xml_arg0"DecimalizationTable")inmake~pinOffset~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinOffset=field_map_exnjson__"PinOffset"PinOffsetType.of_jsoninletpinValidationData=field_map_exnjson__"PinValidationData"PinValidationDataType.of_jsoninletpinValidationDataPadCharacter=field_map_exnjson__"PinValidationDataPadCharacter"HexLengthEquals1.of_jsoninletdecimalizationTable=field_map_exnjson__"DecimalizationTable"DecimalizationTableType.of_jsoninmake~pinOffset~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Ibm3624 PIN from offset PIN."]moduleIbm3624PinOffset=structtypenonrect={encryptedPinBlock:EncryptedPinBlockType.t[@ocaml.doc"The encrypted PIN block data. According to ISO 9564 standard, a PIN Block is an encoded representation of a payment card Personal Account Number (PAN) and the cardholder Personal Identification Number (PIN)."];decimalizationTable:DecimalizationTableType.t[@ocaml.doc"The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal."];pinValidationDataPadCharacter:HexLengthEquals1.t[@ocaml.doc"The padding character for validation data."];pinValidationData:PinValidationDataType.t[@ocaml.doc"The unique data for cardholder identification."]}letcontext_="Ibm3624PinOffset"letmake~encryptedPinBlock=fun~decimalizationTable->fun~pinValidationDataPadCharacter->fun~pinValidationData->fun()->{encryptedPinBlock;decimalizationTable;pinValidationDataPadCharacter;pinValidationData}letto_valuex=structure_to_value[("EncryptedPinBlock",(Some(EncryptedPinBlockType.to_valuex.encryptedPinBlock)));("DecimalizationTable",(Some(DecimalizationTableType.to_valuex.decimalizationTable)));("PinValidationDataPadCharacter",(Some(HexLengthEquals1.to_valuex.pinValidationDataPadCharacter)));("PinValidationData",(Some(PinValidationDataType.to_valuex.pinValidationData)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinValidationData=PinValidationDataType.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationData")inletpinValidationDataPadCharacter=HexLengthEquals1.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationDataPadCharacter")inletdecimalizationTable=DecimalizationTableType.of_xml(Xml.child_exn~context:context_xml_arg0"DecimalizationTable")inletencryptedPinBlock=EncryptedPinBlockType.of_xml(Xml.child_exn~context:context_xml_arg0"EncryptedPinBlock")inmake~pinValidationData~pinValidationDataPadCharacter~decimalizationTable~encryptedPinBlock()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinValidationData=field_map_exnjson__"PinValidationData"PinValidationDataType.of_jsoninletpinValidationDataPadCharacter=field_map_exnjson__"PinValidationDataPadCharacter"HexLengthEquals1.of_jsoninletdecimalizationTable=field_map_exnjson__"DecimalizationTable"DecimalizationTableType.of_jsoninletencryptedPinBlock=field_map_exnjson__"EncryptedPinBlock"EncryptedPinBlockType.of_jsoninmake~pinValidationData~pinValidationDataPadCharacter~decimalizationTable~encryptedPinBlock()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Pparameters that are required to generate or verify Ibm3624 PIN offset PIN."]moduleIbm3624RandomPin=structtypenonrect={decimalizationTable:DecimalizationTableType.t[@ocaml.doc"The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal."];pinValidationDataPadCharacter:HexLengthEquals1.t[@ocaml.doc"The padding character for validation data."];pinValidationData:PinValidationDataType.t[@ocaml.doc"The unique data for cardholder identification."]}letcontext_="Ibm3624RandomPin"letmake~decimalizationTable=fun~pinValidationDataPadCharacter->fun~pinValidationData->fun()->{decimalizationTable;pinValidationDataPadCharacter;pinValidationData}letto_valuex=structure_to_value[("DecimalizationTable",(Some(DecimalizationTableType.to_valuex.decimalizationTable)));("PinValidationDataPadCharacter",(Some(HexLengthEquals1.to_valuex.pinValidationDataPadCharacter)));("PinValidationData",(Some(PinValidationDataType.to_valuex.pinValidationData)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinValidationData=PinValidationDataType.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationData")inletpinValidationDataPadCharacter=HexLengthEquals1.of_xml(Xml.child_exn~context:context_xml_arg0"PinValidationDataPadCharacter")inletdecimalizationTable=DecimalizationTableType.of_xml(Xml.child_exn~context:context_xml_arg0"DecimalizationTable")inmake~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinValidationData=field_map_exnjson__"PinValidationData"PinValidationDataType.of_jsoninletpinValidationDataPadCharacter=field_map_exnjson__"PinValidationDataPadCharacter"HexLengthEquals1.of_jsoninletdecimalizationTable=field_map_exnjson__"DecimalizationTable"DecimalizationTableType.of_jsoninmake~pinValidationData~pinValidationDataPadCharacter~decimalizationTable()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Ibm3624 random PIN."]moduleVisaPin=structtypenonrect={pinVerificationKeyIndex:IntegerRangeBetween0And6.t[@ocaml.doc"The value for PIN verification index. It is used in the Visa PIN algorithm to calculate the PVV (PIN Verification Value)."]}letcontext_="VisaPin"letmake~pinVerificationKeyIndex=fun()->{pinVerificationKeyIndex}letto_valuex=structure_to_value[("PinVerificationKeyIndex",(Some(IntegerRangeBetween0And6.to_valuex.pinVerificationKeyIndex)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinVerificationKeyIndex=IntegerRangeBetween0And6.of_xml(Xml.child_exn~context:context_xml_arg0"PinVerificationKeyIndex")inmake~pinVerificationKeyIndex()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinVerificationKeyIndex=field_map_exnjson__"PinVerificationKeyIndex"IntegerRangeBetween0And6.of_jsoninmake~pinVerificationKeyIndex()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Visa PIN."]moduleVisaPinVerificationValue=structtypenonrect={encryptedPinBlock:EncryptedPinBlockType.t[@ocaml.doc"The encrypted PIN block data to verify."];pinVerificationKeyIndex:IntegerRangeBetween0And6.t[@ocaml.doc"The value for PIN verification index. It is used in the Visa PIN algorithm to calculate the PVV (PIN Verification Value)."]}letcontext_="VisaPinVerificationValue"letmake~encryptedPinBlock=fun~pinVerificationKeyIndex->fun()->{encryptedPinBlock;pinVerificationKeyIndex}letto_valuex=structure_to_value[("EncryptedPinBlock",(Some(EncryptedPinBlockType.to_valuex.encryptedPinBlock)));("PinVerificationKeyIndex",(Some(IntegerRangeBetween0And6.to_valuex.pinVerificationKeyIndex)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinVerificationKeyIndex=IntegerRangeBetween0And6.of_xml(Xml.child_exn~context:context_xml_arg0"PinVerificationKeyIndex")inletencryptedPinBlock=EncryptedPinBlockType.of_xml(Xml.child_exn~context:context_xml_arg0"EncryptedPinBlock")inmake~pinVerificationKeyIndex~encryptedPinBlock()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinVerificationKeyIndex=field_map_exnjson__"PinVerificationKeyIndex"IntegerRangeBetween0And6.of_jsoninletencryptedPinBlock=field_map_exnjson__"EncryptedPinBlock"EncryptedPinBlockType.of_jsoninmake~pinVerificationKeyIndex~encryptedPinBlock()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate or verify Visa PVV (PIN Verification Value)."]moduleKeyArn=structtypenonrect=stringletcontext_="KeyArn"letmakei=letopenResultinok_or_failwith((check_string_mini~min:70)>>=(fun()->(check_string_maxi~max:150)>>=(fun()->check_patterni~pattern:"arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:key/[0-9a-zA-Z]{16,64}")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"KeyArn"jletto_json=simple_to_jsonto_valueendmoduleAmexAttributes=structtypenonrect={majorKeyDerivationMode:MajorKeyDerivationMode.t[@ocaml.doc"The method to use when deriving the master key for a payment card using Amex derivation."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN). Typically 00 is used, if no value is provided by the terminal."];applicationTransactionCounter:HexLengthEquals4.t[@ocaml.doc"The transaction counter of the current transaction that is provided by the terminal during transaction processing."];authorizationRequestKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyArn of the issuer master key for cryptogram (IMK-AC) for the payment card."];currentPinAttributes:CurrentPinAttributes.toption[@ocaml.doc"The encrypted pinblock of the old pin stored on the chip card."]}letcontext_="AmexAttributes"letmake?currentPinAttributes=fun~majorKeyDerivationMode->fun~primaryAccountNumber->fun~panSequenceNumber->fun~applicationTransactionCounter->fun~authorizationRequestKeyIdentifier->fun()->{currentPinAttributes;majorKeyDerivationMode;primaryAccountNumber;panSequenceNumber;applicationTransactionCounter;authorizationRequestKeyIdentifier}letto_valuex=structure_to_value[("MajorKeyDerivationMode",(Some(MajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthEquals4.to_valuex.applicationTransactionCounter)));("AuthorizationRequestKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.authorizationRequestKeyIdentifier)));("CurrentPinAttributes",(Option.mapx.currentPinAttributes~f:CurrentPinAttributes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcurrentPinAttributes=(Option.map~f:CurrentPinAttributes.of_xml)(Xml.childxml_arg0"CurrentPinAttributes")inletauthorizationRequestKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"AuthorizationRequestKeyIdentifier")inletapplicationTransactionCounter=HexLengthEquals4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletmajorKeyDerivationMode=MajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inmake?currentPinAttributes~authorizationRequestKeyIdentifier~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcurrentPinAttributes=field_mapjson__"CurrentPinAttributes"CurrentPinAttributes.of_jsoninletauthorizationRequestKeyIdentifier=field_map_exnjson__"AuthorizationRequestKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthEquals4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"MajorKeyDerivationMode.of_jsoninmake?currentPinAttributes~authorizationRequestKeyIdentifier~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a payment card using Amex derivation method."]moduleEmv2000Attributes=structtypenonrect={majorKeyDerivationMode:MajorKeyDerivationMode.t[@ocaml.doc"The method to use when deriving the master key for the payment card."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN). Typically 00 is used, if no value is provided by the terminal."];applicationTransactionCounter:HexLengthEquals4.t[@ocaml.doc"The transaction counter of the current transaction that is provided by the terminal during transaction processing."]}letcontext_="Emv2000Attributes"letmake~majorKeyDerivationMode=fun~primaryAccountNumber->fun~panSequenceNumber->fun~applicationTransactionCounter->fun()->{majorKeyDerivationMode;primaryAccountNumber;panSequenceNumber;applicationTransactionCounter}letto_valuex=structure_to_value[("MajorKeyDerivationMode",(Some(MajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthEquals4.to_valuex.applicationTransactionCounter)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationTransactionCounter=HexLengthEquals4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletmajorKeyDerivationMode=MajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inmake~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthEquals4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"MajorKeyDerivationMode.of_jsoninmake~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a payment card using EMV2000 deruv."]moduleEmvCommonAttributes=structtypenonrect={majorKeyDerivationMode:MajorKeyDerivationMode.t[@ocaml.doc"The method to use when deriving the master key for the payment card."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN). Typically 00 is used, if no value is provided by the terminal."];applicationCryptogram:ApplicationCryptogramType.t[@ocaml.doc"The application cryptogram for the current transaction that is provided by the terminal during transaction processing."];mode:EmvEncryptionMode.t[@ocaml.doc"The block cipher method to use for encryption."];pinBlockPaddingType:PinBlockPaddingType.t[@ocaml.doc"The padding to be added to the PIN block prior to encryption. Padding type should be ISO_IEC_7816_4, if PinBlockLengthPosition is set to FRONT_OF_PIN_BLOCK. No padding is required, if PinBlockLengthPosition is set to NONE."];pinBlockLengthPosition:PinBlockLengthPosition.t[@ocaml.doc"Specifies if PIN block length should be added to front of the pin block. If value is set to FRONT_OF_PIN_BLOCK, then PIN block padding type should be ISO_IEC_7816_4."]}letcontext_="EmvCommonAttributes"letmake~majorKeyDerivationMode=fun~primaryAccountNumber->fun~panSequenceNumber->fun~applicationCryptogram->fun~mode->fun~pinBlockPaddingType->fun~pinBlockLengthPosition->fun()->{majorKeyDerivationMode;primaryAccountNumber;panSequenceNumber;applicationCryptogram;mode;pinBlockPaddingType;pinBlockLengthPosition}letto_valuex=structure_to_value[("MajorKeyDerivationMode",(Some(MajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationCryptogram",(Some(ApplicationCryptogramType.to_valuex.applicationCryptogram)));("Mode",(Some(EmvEncryptionMode.to_valuex.mode)));("PinBlockPaddingType",(Some(PinBlockPaddingType.to_valuex.pinBlockPaddingType)));("PinBlockLengthPosition",(Some(PinBlockLengthPosition.to_valuex.pinBlockLengthPosition)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinBlockLengthPosition=PinBlockLengthPosition.of_xml(Xml.child_exn~context:context_xml_arg0"PinBlockLengthPosition")inletpinBlockPaddingType=PinBlockPaddingType.of_xml(Xml.child_exn~context:context_xml_arg0"PinBlockPaddingType")inletmode=EmvEncryptionMode.of_xml(Xml.child_exn~context:context_xml_arg0"Mode")inletapplicationCryptogram=ApplicationCryptogramType.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationCryptogram")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletmajorKeyDerivationMode=MajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inmake~pinBlockLengthPosition~pinBlockPaddingType~mode~applicationCryptogram~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinBlockLengthPosition=field_map_exnjson__"PinBlockLengthPosition"PinBlockLengthPosition.of_jsoninletpinBlockPaddingType=field_map_exnjson__"PinBlockPaddingType"PinBlockPaddingType.of_jsoninletmode=field_map_exnjson__"Mode"EmvEncryptionMode.of_jsoninletapplicationCryptogram=field_map_exnjson__"ApplicationCryptogram"ApplicationCryptogramType.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"MajorKeyDerivationMode.of_jsoninmake~pinBlockLengthPosition~pinBlockPaddingType~mode~applicationCryptogram~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive the confidentiality and integrity keys for an Emv common payment card."]moduleMasterCardAttributes=structtypenonrect={majorKeyDerivationMode:MajorKeyDerivationMode.t[@ocaml.doc"The method to use when deriving the master key for the payment card."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN). Typically 00 is used, if no value is provided by the terminal."];applicationCryptogram:ApplicationCryptogramType.t[@ocaml.doc"The application cryptogram for the current transaction that is provided by the terminal during transaction processing."]}letcontext_="MasterCardAttributes"letmake~majorKeyDerivationMode=fun~primaryAccountNumber->fun~panSequenceNumber->fun~applicationCryptogram->fun()->{majorKeyDerivationMode;primaryAccountNumber;panSequenceNumber;applicationCryptogram}letto_valuex=structure_to_value[("MajorKeyDerivationMode",(Some(MajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationCryptogram",(Some(ApplicationCryptogramType.to_valuex.applicationCryptogram)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letapplicationCryptogram=ApplicationCryptogramType.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationCryptogram")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletmajorKeyDerivationMode=MajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inmake~applicationCryptogram~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letapplicationCryptogram=field_map_exnjson__"ApplicationCryptogram"ApplicationCryptogramType.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"MajorKeyDerivationMode.of_jsoninmake~applicationCryptogram~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a Mastercard payment card."]moduleVisaAttributes=structtypenonrect={majorKeyDerivationMode:MajorKeyDerivationMode.t[@ocaml.doc"The method to use when deriving the master key for the payment card."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN) of the cardholder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN). Typically 00 is used, if no value is provided by the terminal."];applicationTransactionCounter:HexLengthEquals4.t[@ocaml.doc"The transaction counter of the current transaction that is provided by the terminal during transaction processing."];authorizationRequestKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyArn of the issuer master key for cryptogram (IMK-AC) for the payment card."];currentPinAttributes:CurrentPinAttributes.toption[@ocaml.doc"The encrypted pinblock of the old pin stored on the chip card."]}letcontext_="VisaAttributes"letmake?currentPinAttributes=fun~majorKeyDerivationMode->fun~primaryAccountNumber->fun~panSequenceNumber->fun~applicationTransactionCounter->fun~authorizationRequestKeyIdentifier->fun()->{currentPinAttributes;majorKeyDerivationMode;primaryAccountNumber;panSequenceNumber;applicationTransactionCounter;authorizationRequestKeyIdentifier}letto_valuex=structure_to_value[("MajorKeyDerivationMode",(Some(MajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("ApplicationTransactionCounter",(Some(HexLengthEquals4.to_valuex.applicationTransactionCounter)));("AuthorizationRequestKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.authorizationRequestKeyIdentifier)));("CurrentPinAttributes",(Option.mapx.currentPinAttributes~f:CurrentPinAttributes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcurrentPinAttributes=(Option.map~f:CurrentPinAttributes.of_xml)(Xml.childxml_arg0"CurrentPinAttributes")inletauthorizationRequestKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"AuthorizationRequestKeyIdentifier")inletapplicationTransactionCounter=HexLengthEquals4.of_xml(Xml.child_exn~context:context_xml_arg0"ApplicationTransactionCounter")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletmajorKeyDerivationMode=MajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inmake?currentPinAttributes~authorizationRequestKeyIdentifier~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcurrentPinAttributes=field_mapjson__"CurrentPinAttributes"CurrentPinAttributes.of_jsoninletauthorizationRequestKeyIdentifier=field_map_exnjson__"AuthorizationRequestKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletapplicationTransactionCounter=field_map_exnjson__"ApplicationTransactionCounter"HexLengthEquals4.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"MajorKeyDerivationMode.of_jsoninmake?currentPinAttributes~authorizationRequestKeyIdentifier~applicationTransactionCounter~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a Visa payment card."]moduleKekValidationRequest=structtypenonrect={deriveKeyAlgorithm:SymmetricKeyAlgorithm.t[@ocaml.doc"The key derivation algorithm to use for generating a KEK validation request."]}letcontext_="KekValidationRequest"letmake~deriveKeyAlgorithm=fun()->{deriveKeyAlgorithm}letto_valuex=structure_to_value[("DeriveKeyAlgorithm",(Some(SymmetricKeyAlgorithm.to_valuex.deriveKeyAlgorithm)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letderiveKeyAlgorithm=SymmetricKeyAlgorithm.of_xml(Xml.child_exn~context:context_xml_arg0"DeriveKeyAlgorithm")inmake~deriveKeyAlgorithm()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letderiveKeyAlgorithm=field_map_exnjson__"DeriveKeyAlgorithm"SymmetricKeyAlgorithm.of_jsoninmake~deriveKeyAlgorithm()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information for generating a KEK validation request during node-to-node initialization."]moduleKekValidationResponse=structtypenonrect={randomKeySend:As2805RandomKeyMaterial.t[@ocaml.doc"The random key for generating a KEK validation response."]}letcontext_="KekValidationResponse"letmake~randomKeySend=fun()->{randomKeySend}letto_valuex=structure_to_value[("RandomKeySend",(Some(As2805RandomKeyMaterial.to_valuex.randomKeySend)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letrandomKeySend=As2805RandomKeyMaterial.of_xml(Xml.child_exn~context:context_xml_arg0"RandomKeySend")inmake~randomKeySend()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letrandomKeySend=field_map_exnjson__"RandomKeySend"As2805RandomKeyMaterial.of_jsoninmake~randomKeySend()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information for generating a KEK validation response during node-to-node initialization."]moduleAsymmetricEncryptionAttributes=structtypenonrect={paddingType:PaddingType.toption[@ocaml.doc"The padding to be included with the data."]}letmake?paddingType=fun()->{paddingType}letto_valuex=structure_to_value[("PaddingType",(Option.mapx.paddingType~f:PaddingType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpaddingType=(Option.map~f:PaddingType.of_xml)(Xml.childxml_arg0"PaddingType")inmake?paddingType()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpaddingType=field_mapjson__"PaddingType"PaddingType.of_jsoninmake?paddingType()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters for plaintext encryption using asymmetric keys."]moduleEmvEncryptionAttributes=structtypenonrect={majorKeyDerivationMode:EmvMajorKeyDerivationMode.t[@ocaml.doc"The EMV derivation mode to use for ICC master key derivation as per EMV version 4.3 book 2."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN), a unique identifier for a payment credit or debit card and associates the card to a specific account holder."];panSequenceNumber:NumberLengthEquals2.t[@ocaml.doc"A number that identifies and differentiates payment cards with the same Primary Account Number (PAN). Typically 00 is used, if no value is provided by the terminal."];sessionDerivationData:SessionDerivationDataType.t[@ocaml.doc"The derivation value used to derive the ICC session key. It is typically the application transaction counter value padded with zeros or previous ARQC value padded with zeros as per EMV version 4.3 book 2."];mode:EmvEncryptionMode.toption[@ocaml.doc"The block cipher method to use for encryption."];initializationVector:InitializationVectorType.toption[@ocaml.doc"An input used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero."]}letcontext_="EmvEncryptionAttributes"letmake?mode=fun?initializationVector->fun~majorKeyDerivationMode->fun~primaryAccountNumber->fun~panSequenceNumber->fun~sessionDerivationData->fun()->{mode;initializationVector;majorKeyDerivationMode;primaryAccountNumber;panSequenceNumber;sessionDerivationData}letto_valuex=structure_to_value[("MajorKeyDerivationMode",(Some(EmvMajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("PanSequenceNumber",(Some(NumberLengthEquals2.to_valuex.panSequenceNumber)));("SessionDerivationData",(Some(SessionDerivationDataType.to_valuex.sessionDerivationData)));("Mode",(Option.mapx.mode~f:EmvEncryptionMode.to_value));("InitializationVector",(Option.mapx.initializationVector~f:InitializationVectorType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letinitializationVector=(Option.map~f:InitializationVectorType.of_xml)(Xml.childxml_arg0"InitializationVector")inletmode=(Option.map~f:EmvEncryptionMode.of_xml)(Xml.childxml_arg0"Mode")inletsessionDerivationData=SessionDerivationDataType.of_xml(Xml.child_exn~context:context_xml_arg0"SessionDerivationData")inletpanSequenceNumber=NumberLengthEquals2.of_xml(Xml.child_exn~context:context_xml_arg0"PanSequenceNumber")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletmajorKeyDerivationMode=EmvMajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inmake?initializationVector?mode~sessionDerivationData~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letinitializationVector=field_mapjson__"InitializationVector"InitializationVectorType.of_jsoninletmode=field_mapjson__"Mode"EmvEncryptionMode.of_jsoninletsessionDerivationData=field_map_exnjson__"SessionDerivationData"SessionDerivationDataType.of_jsoninletpanSequenceNumber=field_map_exnjson__"PanSequenceNumber"NumberLengthEquals2.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"EmvMajorKeyDerivationMode.of_jsoninmake?initializationVector?mode~sessionDerivationData~panSequenceNumber~primaryAccountNumber~majorKeyDerivationMode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters for plaintext encryption using EMV keys."]moduleAccessDeniedException=structtypenonrect={message:String_.toption}letmake?message=fun()->{message}letto_valuex=structure_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")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"You do not have sufficient access to perform this action."]moduleInternalServerException=structtypenonrect={message:String_.toption}letmake?message=fun()->{message}letto_valuex=structure_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")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The request processing has failed because of an unknown error, exception, or failure."]moduleResourceNotFoundException=structtypenonrect={resourceId:String_.toption[@ocaml.doc"The resource that is missing."]}letmake?resourceId=fun()->{resourceId}letto_valuex=structure_to_value[("ResourceId",(Option.mapx.resourceId~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letresourceId=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"ResourceId")inmake?resourceId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letresourceId=field_mapjson__"ResourceId"String_.of_jsoninmake?resourceId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The request was denied due to an invalid resource error."]moduleThrottlingException=structtypenonrect={message:String_.toption}letmake?message=fun()->{message}letto_valuex=structure_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")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The request was denied due to request throttling."]moduleValidationException=structtypenonrect={message:String_.toption;fieldList:ValidationExceptionFieldList.toption[@ocaml.doc"The request was denied due to an invalid request error."]}letmake?message=fun?fieldList->fun()->{message;fieldList}letto_valuex=structure_to_value[("message",(Option.mapx.message~f:String_.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")inletmessage=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"message")inmake?fieldList?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfieldList=field_mapjson__"fieldList"ValidationExceptionFieldList.of_jsoninletmessage=field_mapjson__"message"String_.of_jsoninmake?fieldList?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The request was denied due to an invalid request error."]moduleVerificationFailedException=structtypenonrect={reason:VerificationFailedReason.toption[@ocaml.doc"The reason for the exception."];message:String_.toption}letmake?reason=fun?message->fun()->{reason;message}letto_valuex=structure_to_value[("Reason",(Option.mapx.reason~f:VerificationFailedReason.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")inletreason=(Option.map~f:VerificationFailedReason.of_xml)(Xml.childxml_arg0"Reason")inmake?message?reason()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"String_.of_jsoninletreason=field_mapjson__"Reason"VerificationFailedReason.of_jsoninmake?message?reason()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"This request failed verification."]moduleDukptAttributes=structtypenonrect={keySerialNumber:HexLength16Or20Or24.t[@ocaml.doc"The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter."];dukptDerivationType:DukptDerivationType.t[@ocaml.doc"The key type derived using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY."]}letcontext_="DukptAttributes"letmake~keySerialNumber=fun~dukptDerivationType->fun()->{keySerialNumber;dukptDerivationType}letto_valuex=structure_to_value[("KeySerialNumber",(Some(HexLength16Or20Or24.to_valuex.keySerialNumber)));("DukptDerivationType",(Some(DukptDerivationType.to_valuex.dukptDerivationType)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdukptDerivationType=DukptDerivationType.of_xml(Xml.child_exn~context:context_xml_arg0"DukptDerivationType")inletkeySerialNumber=HexLength16Or20Or24.of_xml(Xml.child_exn~context:context_xml_arg0"KeySerialNumber")inmake~dukptDerivationType~keySerialNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdukptDerivationType=field_map_exnjson__"DukptDerivationType"DukptDerivationType.of_jsoninletkeySerialNumber=field_map_exnjson__"KeySerialNumber"HexLength16Or20Or24.of_jsoninmake~dukptDerivationType~keySerialNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are used for Derived Unique Key Per Transaction (DUKPT) derivation algorithm."]moduleIntegerRangeBetween4And12=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:12)>>=(fun()->check_int_mini~min:4));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 IntegerRangeBetween4And12"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmodulePinBlockFormatForPinData=structtypenonrect=|ISO_FORMAT_0|ISO_FORMAT_1|ISO_FORMAT_3|ISO_FORMAT_4|Non_static_idofstringletmakei=iletto_string=function|ISO_FORMAT_0->"ISO_FORMAT_0"|ISO_FORMAT_1->"ISO_FORMAT_1"|ISO_FORMAT_3->"ISO_FORMAT_3"|ISO_FORMAT_4->"ISO_FORMAT_4"|Non_static_ids->sletof_string=function|"ISO_FORMAT_0"->ISO_FORMAT_0|"ISO_FORMAT_1"->ISO_FORMAT_1|"ISO_FORMAT_3"->ISO_FORMAT_3|"ISO_FORMAT_4"->ISO_FORMAT_4|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 PinBlockFormatForPinData"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"PinBlockFormatForPinData"j)letto_json=simple_to_jsonto_valueendmodulePinVerificationAttributes=structtypenonrect={visaPin:VisaPinVerification.toption[@ocaml.doc"Parameters that are required to generate or verify Visa PIN."];ibm3624Pin:Ibm3624PinVerification.toption[@ocaml.doc"Parameters that are required to generate or verify Ibm3624 PIN."]}letmake?visaPin=fun?ibm3624Pin->fun()->{visaPin;ibm3624Pin}letto_valuex=structure_to_value[("VisaPin",(Option.mapx.visaPin~f:VisaPinVerification.to_value));("Ibm3624Pin",(Option.mapx.ibm3624Pin~f:Ibm3624PinVerification.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letibm3624Pin=(Option.map~f:Ibm3624PinVerification.of_xml)(Xml.childxml_arg0"Ibm3624Pin")inletvisaPin=(Option.map~f:VisaPinVerification.of_xml)(Xml.childxml_arg0"VisaPin")inmake?ibm3624Pin?visaPin()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letibm3624Pin=field_mapjson__"Ibm3624Pin"Ibm3624PinVerification.of_jsoninletvisaPin=field_mapjson__"VisaPin"VisaPinVerification.of_jsoninmake?ibm3624Pin?visaPin()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for PIN data verification."]moduleWrappedKey=structtypenonrect={wrappedKeyMaterial:WrappedKeyMaterial.t[@ocaml.doc"Parameter information of a WrappedKeyBlock for encryption key exchange."];keyCheckValueAlgorithm:KeyCheckValueAlgorithm.toption[@ocaml.doc"The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV). It is used to validate the key integrity. For TDES keys, the KCV is computed by encrypting 8 bytes, each with value of zero, with the key to be checked and retaining the 3 highest order bytes of the encrypted result. For AES keys, the KCV is computed using a CMAC algorithm where the input data is 16 bytes of zero and retaining the 3 highest order bytes of the encrypted result."]}letcontext_="WrappedKey"letmake?keyCheckValueAlgorithm=fun~wrappedKeyMaterial->fun()->{keyCheckValueAlgorithm;wrappedKeyMaterial}letto_valuex=structure_to_value[("WrappedKeyMaterial",(Some(WrappedKeyMaterial.to_valuex.wrappedKeyMaterial)));("KeyCheckValueAlgorithm",(Option.mapx.keyCheckValueAlgorithm~f:KeyCheckValueAlgorithm.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letkeyCheckValueAlgorithm=(Option.map~f:KeyCheckValueAlgorithm.of_xml)(Xml.childxml_arg0"KeyCheckValueAlgorithm")inletwrappedKeyMaterial=WrappedKeyMaterial.of_xml(Xml.child_exn~context:context_xml_arg0"WrappedKeyMaterial")inmake?keyCheckValueAlgorithm~wrappedKeyMaterial()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letkeyCheckValueAlgorithm=field_mapjson__"KeyCheckValueAlgorithm"KeyCheckValueAlgorithm.of_jsoninletwrappedKeyMaterial=field_map_exnjson__"WrappedKeyMaterial"WrappedKeyMaterial.of_jsoninmake?keyCheckValueAlgorithm~wrappedKeyMaterial()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information of a WrappedKeyBlock for encryption key exchange."]moduleIntegerRangeBetween4And16=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:16)>>=(fun()->check_int_mini~min:4));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 IntegerRangeBetween4And16"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleMacAttributes=structtypenonrect={algorithm:MacAlgorithm.toption[@ocaml.doc"The encryption algorithm for MAC generation or verification."];emvMac:MacAlgorithmEmv.toption[@ocaml.doc"Parameters that are required for MAC generation or verification using EMV MAC algorithm."];dukptIso9797Algorithm1:MacAlgorithmDukpt.toption[@ocaml.doc"Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm1."];dukptIso9797Algorithm3:MacAlgorithmDukpt.toption[@ocaml.doc"Parameters that are required for MAC generation or verification using DUKPT ISO 9797 algorithm3."];dukptCmac:MacAlgorithmDukpt.toption[@ocaml.doc"Parameters that are required for MAC generation or verification using DUKPT CMAC algorithm."]}letmake?algorithm=fun?emvMac->fun?dukptIso9797Algorithm1->fun?dukptIso9797Algorithm3->fun?dukptCmac->fun()->{algorithm;emvMac;dukptIso9797Algorithm1;dukptIso9797Algorithm3;dukptCmac}letto_valuex=structure_to_value[("Algorithm",(Option.mapx.algorithm~f:MacAlgorithm.to_value));("EmvMac",(Option.mapx.emvMac~f:MacAlgorithmEmv.to_value));("DukptIso9797Algorithm1",(Option.mapx.dukptIso9797Algorithm1~f:MacAlgorithmDukpt.to_value));("DukptIso9797Algorithm3",(Option.mapx.dukptIso9797Algorithm3~f:MacAlgorithmDukpt.to_value));("DukptCmac",(Option.mapx.dukptCmac~f:MacAlgorithmDukpt.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdukptCmac=(Option.map~f:MacAlgorithmDukpt.of_xml)(Xml.childxml_arg0"DukptCmac")inletdukptIso9797Algorithm3=(Option.map~f:MacAlgorithmDukpt.of_xml)(Xml.childxml_arg0"DukptIso9797Algorithm3")inletdukptIso9797Algorithm1=(Option.map~f:MacAlgorithmDukpt.of_xml)(Xml.childxml_arg0"DukptIso9797Algorithm1")inletemvMac=(Option.map~f:MacAlgorithmEmv.of_xml)(Xml.childxml_arg0"EmvMac")inletalgorithm=(Option.map~f:MacAlgorithm.of_xml)(Xml.childxml_arg0"Algorithm")inmake?dukptCmac?dukptIso9797Algorithm3?dukptIso9797Algorithm1?emvMac?algorithm()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdukptCmac=field_mapjson__"DukptCmac"MacAlgorithmDukpt.of_jsoninletdukptIso9797Algorithm3=field_mapjson__"DukptIso9797Algorithm3"MacAlgorithmDukpt.of_jsoninletdukptIso9797Algorithm1=field_mapjson__"DukptIso9797Algorithm1"MacAlgorithmDukpt.of_jsoninletemvMac=field_mapjson__"EmvMac"MacAlgorithmEmv.of_jsoninletalgorithm=field_mapjson__"Algorithm"MacAlgorithm.of_jsoninmake?dukptCmac?dukptIso9797Algorithm3?dukptIso9797Algorithm1?emvMac?algorithm()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for DUKPT, HMAC, or EMV MAC generation or verification."]moduleMacType=structtypenonrect=stringletcontext_="MacType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:128)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"MacType"jletto_json=simple_to_jsonto_valueendmoduleMessageDataType=structtypenonrect=stringletcontext_="MessageDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:8192)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"MessageDataType"jletto_json=simple_to_jsonto_valueendmoduleCardVerificationAttributes=structtypenonrect={amexCardSecurityCodeVersion1:AmexCardSecurityCodeVersion1.toption;amexCardSecurityCodeVersion2:AmexCardSecurityCodeVersion2.toption[@ocaml.doc"Card data parameters that are required to verify a Card Security Code (CSC2) for an AMEX payment card."];cardVerificationValue1:CardVerificationValue1.toption[@ocaml.doc"Card data parameters that are required to verify Card Verification Value (CVV) for the payment card."];cardVerificationValue2:CardVerificationValue2.toption[@ocaml.doc"Card data parameters that are required to verify Card Verification Value (CVV2) for the payment card."];cardHolderVerificationValue:CardHolderVerificationValue.toption[@ocaml.doc"Card data parameters that are required to verify a cardholder verification value for the payment card."];dynamicCardVerificationCode:DynamicCardVerificationCode.toption[@ocaml.doc"Card data parameters that are required to verify CDynamic Card Verification Code (dCVC) for the payment card."];dynamicCardVerificationValue:DynamicCardVerificationValue.toption[@ocaml.doc"Card data parameters that are required to verify CDynamic Card Verification Value (dCVV) for the payment card."];discoverDynamicCardVerificationCode:DiscoverDynamicCardVerificationCode.toption[@ocaml.doc"Card data parameters that are required to verify CDynamic Card Verification Code (dCVC) for the payment card."]}letmake?amexCardSecurityCodeVersion1=fun?amexCardSecurityCodeVersion2->fun?cardVerificationValue1->fun?cardVerificationValue2->fun?cardHolderVerificationValue->fun?dynamicCardVerificationCode->fun?dynamicCardVerificationValue->fun?discoverDynamicCardVerificationCode->fun()->{amexCardSecurityCodeVersion1;amexCardSecurityCodeVersion2;cardVerificationValue1;cardVerificationValue2;cardHolderVerificationValue;dynamicCardVerificationCode;dynamicCardVerificationValue;discoverDynamicCardVerificationCode}letto_valuex=structure_to_value[("AmexCardSecurityCodeVersion1",(Option.mapx.amexCardSecurityCodeVersion1~f:AmexCardSecurityCodeVersion1.to_value));("AmexCardSecurityCodeVersion2",(Option.mapx.amexCardSecurityCodeVersion2~f:AmexCardSecurityCodeVersion2.to_value));("CardVerificationValue1",(Option.mapx.cardVerificationValue1~f:CardVerificationValue1.to_value));("CardVerificationValue2",(Option.mapx.cardVerificationValue2~f:CardVerificationValue2.to_value));("CardHolderVerificationValue",(Option.mapx.cardHolderVerificationValue~f:CardHolderVerificationValue.to_value));("DynamicCardVerificationCode",(Option.mapx.dynamicCardVerificationCode~f:DynamicCardVerificationCode.to_value));("DynamicCardVerificationValue",(Option.mapx.dynamicCardVerificationValue~f:DynamicCardVerificationValue.to_value));("DiscoverDynamicCardVerificationCode",(Option.mapx.discoverDynamicCardVerificationCode~f:DiscoverDynamicCardVerificationCode.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdiscoverDynamicCardVerificationCode=(Option.map~f:DiscoverDynamicCardVerificationCode.of_xml)(Xml.childxml_arg0"DiscoverDynamicCardVerificationCode")inletdynamicCardVerificationValue=(Option.map~f:DynamicCardVerificationValue.of_xml)(Xml.childxml_arg0"DynamicCardVerificationValue")inletdynamicCardVerificationCode=(Option.map~f:DynamicCardVerificationCode.of_xml)(Xml.childxml_arg0"DynamicCardVerificationCode")inletcardHolderVerificationValue=(Option.map~f:CardHolderVerificationValue.of_xml)(Xml.childxml_arg0"CardHolderVerificationValue")inletcardVerificationValue2=(Option.map~f:CardVerificationValue2.of_xml)(Xml.childxml_arg0"CardVerificationValue2")inletcardVerificationValue1=(Option.map~f:CardVerificationValue1.of_xml)(Xml.childxml_arg0"CardVerificationValue1")inletamexCardSecurityCodeVersion2=(Option.map~f:AmexCardSecurityCodeVersion2.of_xml)(Xml.childxml_arg0"AmexCardSecurityCodeVersion2")inletamexCardSecurityCodeVersion1=(Option.map~f:AmexCardSecurityCodeVersion1.of_xml)(Xml.childxml_arg0"AmexCardSecurityCodeVersion1")inmake?discoverDynamicCardVerificationCode?dynamicCardVerificationValue?dynamicCardVerificationCode?cardHolderVerificationValue?cardVerificationValue2?cardVerificationValue1?amexCardSecurityCodeVersion2?amexCardSecurityCodeVersion1()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdiscoverDynamicCardVerificationCode=field_mapjson__"DiscoverDynamicCardVerificationCode"DiscoverDynamicCardVerificationCode.of_jsoninletdynamicCardVerificationValue=field_mapjson__"DynamicCardVerificationValue"DynamicCardVerificationValue.of_jsoninletdynamicCardVerificationCode=field_mapjson__"DynamicCardVerificationCode"DynamicCardVerificationCode.of_jsoninletcardHolderVerificationValue=field_mapjson__"CardHolderVerificationValue"CardHolderVerificationValue.of_jsoninletcardVerificationValue2=field_mapjson__"CardVerificationValue2"CardVerificationValue2.of_jsoninletcardVerificationValue1=field_mapjson__"CardVerificationValue1"CardVerificationValue1.of_jsoninletamexCardSecurityCodeVersion2=field_mapjson__"AmexCardSecurityCodeVersion2"AmexCardSecurityCodeVersion2.of_jsoninletamexCardSecurityCodeVersion1=field_mapjson__"AmexCardSecurityCodeVersion1"AmexCardSecurityCodeVersion1.of_jsoninmake?discoverDynamicCardVerificationCode?dynamicCardVerificationValue?dynamicCardVerificationCode?cardHolderVerificationValue?cardVerificationValue2?cardVerificationValue1?amexCardSecurityCodeVersion2?amexCardSecurityCodeVersion1()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Card data parameters that are requried to verify Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2), or Card Security Codes (CSC)."]moduleValidationDataType=structtypenonrect=stringletcontext_="ValidationDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:3)>>=(fun()->(check_string_maxi~max:5)>>=(fun()->check_patterni~pattern:"[0-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:"ValidationDataType"jletto_json=simple_to_jsonto_valueendmoduleAuthResponseValueType=structtypenonrect=stringletcontext_="AuthResponseValueType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"AuthResponseValueType"jletto_json=simple_to_jsonto_valueendmoduleAuthRequestCryptogramType=structtypenonrect=stringletcontext_="AuthRequestCryptogramType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"AuthRequestCryptogramType"jletto_json=simple_to_jsonto_valueendmoduleCryptogramAuthResponse=structtypenonrect={arpcMethod1:CryptogramVerificationArpcMethod1.toption[@ocaml.doc"Parameters that are required for ARPC response generation using method1 after ARQC verification is successful."];arpcMethod2:CryptogramVerificationArpcMethod2.toption[@ocaml.doc"Parameters that are required for ARPC response generation using method2 after ARQC verification is successful."]}letmake?arpcMethod1=fun?arpcMethod2->fun()->{arpcMethod1;arpcMethod2}letto_valuex=structure_to_value[("ArpcMethod1",(Option.mapx.arpcMethod1~f:CryptogramVerificationArpcMethod1.to_value));("ArpcMethod2",(Option.mapx.arpcMethod2~f:CryptogramVerificationArpcMethod2.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letarpcMethod2=(Option.map~f:CryptogramVerificationArpcMethod2.of_xml)(Xml.childxml_arg0"ArpcMethod2")inletarpcMethod1=(Option.map~f:CryptogramVerificationArpcMethod1.of_xml)(Xml.childxml_arg0"ArpcMethod1")inmake?arpcMethod2?arpcMethod1()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letarpcMethod2=field_mapjson__"ArpcMethod2"CryptogramVerificationArpcMethod2.of_jsoninletarpcMethod1=field_mapjson__"ArpcMethod1"CryptogramVerificationArpcMethod1.of_jsoninmake?arpcMethod2?arpcMethod1()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for Authorization Response Cryptogram (ARPC) generation after Authorization Request Cryptogram (ARQC) verification is successful."]moduleSessionKeyDerivation=structtypenonrect={emvCommon:SessionKeyEmvCommon.toption[@ocaml.doc"Parameters to derive session key for an Emv common payment card for ARQC verification."];mastercard:SessionKeyMastercard.toption[@ocaml.doc"Parameters to derive session key for a Mastercard payment card for ARQC verification."];emv2000:SessionKeyEmv2000.toption[@ocaml.doc"Parameters to derive session key for an Emv2000 payment card for ARQC verification."];amex:SessionKeyAmex.toption[@ocaml.doc"Parameters to derive session key for an Amex payment card for ARQC verification."];visa:SessionKeyVisa.toption[@ocaml.doc"Parameters to derive session key for a Visa payment cardfor ARQC verification."]}letmake?emvCommon=fun?mastercard->fun?emv2000->fun?amex->fun?visa->fun()->{emvCommon;mastercard;emv2000;amex;visa}letto_valuex=structure_to_value[("EmvCommon",(Option.mapx.emvCommon~f:SessionKeyEmvCommon.to_value));("Mastercard",(Option.mapx.mastercard~f:SessionKeyMastercard.to_value));("Emv2000",(Option.mapx.emv2000~f:SessionKeyEmv2000.to_value));("Amex",(Option.mapx.amex~f:SessionKeyAmex.to_value));("Visa",(Option.mapx.visa~f:SessionKeyVisa.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvisa=(Option.map~f:SessionKeyVisa.of_xml)(Xml.childxml_arg0"Visa")inletamex=(Option.map~f:SessionKeyAmex.of_xml)(Xml.childxml_arg0"Amex")inletemv2000=(Option.map~f:SessionKeyEmv2000.of_xml)(Xml.childxml_arg0"Emv2000")inletmastercard=(Option.map~f:SessionKeyMastercard.of_xml)(Xml.childxml_arg0"Mastercard")inletemvCommon=(Option.map~f:SessionKeyEmvCommon.of_xml)(Xml.childxml_arg0"EmvCommon")inmake?visa?amex?emv2000?mastercard?emvCommon()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvisa=field_mapjson__"Visa"SessionKeyVisa.of_jsoninletamex=field_mapjson__"Amex"SessionKeyAmex.of_jsoninletemv2000=field_mapjson__"Emv2000"SessionKeyEmv2000.of_jsoninletmastercard=field_mapjson__"Mastercard"SessionKeyMastercard.of_jsoninletemvCommon=field_mapjson__"EmvCommon"SessionKeyEmvCommon.of_jsoninmake?visa?amex?emv2000?mastercard?emvCommon()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive a session key for Authorization Response Cryptogram (ARQC) verification."]moduleTransactionDataType=structtypenonrect=stringletcontext_="TransactionDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:1024)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"TransactionDataType"jletto_json=simple_to_jsonto_valueendmoduleAs2805PekDerivationAttributes=structtypenonrect={systemTraceAuditNumber:SystemTraceAuditNumberType.t[@ocaml.doc"The system trace audit number for the transaction."];transactionAmount:TransactionAmountType.t[@ocaml.doc"The transaction amount for the transaction."]}letcontext_="As2805PekDerivationAttributes"letmake~systemTraceAuditNumber=fun~transactionAmount->fun()->{systemTraceAuditNumber;transactionAmount}letto_valuex=structure_to_value[("SystemTraceAuditNumber",(Some(SystemTraceAuditNumberType.to_valuex.systemTraceAuditNumber)));("TransactionAmount",(Some(TransactionAmountType.to_valuex.transactionAmount)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettransactionAmount=TransactionAmountType.of_xml(Xml.child_exn~context:context_xml_arg0"TransactionAmount")inletsystemTraceAuditNumber=SystemTraceAuditNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"SystemTraceAuditNumber")inmake~transactionAmount~systemTraceAuditNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettransactionAmount=field_map_exnjson__"TransactionAmount"TransactionAmountType.of_jsoninletsystemTraceAuditNumber=field_map_exnjson__"SystemTraceAuditNumber"SystemTraceAuditNumberType.of_jsoninmake~transactionAmount~systemTraceAuditNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information to use a PEK derived using AS2805."]moduleDukptDerivationAttributes=structtypenonrect={keySerialNumber:HexLength16Or20Or24.t[@ocaml.doc"The unique identifier known as Key Serial Number (KSN) that comes from an encrypting device using DUKPT encryption method. The KSN is derived from the encrypting device unique identifier and an internal transaction counter."];dukptKeyDerivationType:DukptDerivationType.toption[@ocaml.doc"The key type derived using DUKPT from a Base Derivation Key (BDK) and Key Serial Number (KSN). This must be less than or equal to the strength of the BDK. For example, you can't use AES_128 as a derivation type for a BDK of AES_128 or TDES_2KEY"];dukptKeyVariant:DukptKeyVariant.toption[@ocaml.doc"The type of use of DUKPT, which can be for incoming data decryption, outgoing data encryption, or both."]}letcontext_="DukptDerivationAttributes"letmake?dukptKeyDerivationType=fun?dukptKeyVariant->fun~keySerialNumber->fun()->{dukptKeyDerivationType;dukptKeyVariant;keySerialNumber}letto_valuex=structure_to_value[("KeySerialNumber",(Some(HexLength16Or20Or24.to_valuex.keySerialNumber)));("DukptKeyDerivationType",(Option.mapx.dukptKeyDerivationType~f:DukptDerivationType.to_value));("DukptKeyVariant",(Option.mapx.dukptKeyVariant~f:DukptKeyVariant.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdukptKeyVariant=(Option.map~f:DukptKeyVariant.of_xml)(Xml.childxml_arg0"DukptKeyVariant")inletdukptKeyDerivationType=(Option.map~f:DukptDerivationType.of_xml)(Xml.childxml_arg0"DukptKeyDerivationType")inletkeySerialNumber=HexLength16Or20Or24.of_xml(Xml.child_exn~context:context_xml_arg0"KeySerialNumber")inmake?dukptKeyVariant?dukptKeyDerivationType~keySerialNumber()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdukptKeyVariant=field_mapjson__"DukptKeyVariant"DukptKeyVariant.of_jsoninletdukptKeyDerivationType=field_mapjson__"DukptKeyDerivationType"DukptDerivationType.of_jsoninletkeySerialNumber=field_map_exnjson__"KeySerialNumber"HexLength16Or20Or24.of_jsoninmake?dukptKeyVariant?dukptKeyDerivationType~keySerialNumber()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters required for encryption or decryption of data using DUKPT."]moduleHexEvenLengthBetween16And32=structtypenonrect=stringletcontext_="HexEvenLengthBetween16And32"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:32)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"HexEvenLengthBetween16And32"jletto_json=simple_to_jsonto_valueendmoduleTranslationIsoFormats=structtypenonrect={isoFormat0:TranslationPinDataIsoFormat034.toption[@ocaml.doc"Parameters that are required for ISO9564 PIN format 0 translation."];isoFormat1:TranslationPinDataIsoFormat1.toption[@ocaml.doc"Parameters that are required for ISO9564 PIN format 1 translation."];isoFormat3:TranslationPinDataIsoFormat034.toption[@ocaml.doc"Parameters that are required for ISO9564 PIN format 3 translation."];isoFormat4:TranslationPinDataIsoFormat034.toption[@ocaml.doc"Parameters that are required for ISO9564 PIN format 4 translation."];as2805Format0:TranslationPinDataAs2805Format0.toption[@ocaml.doc"Parameters that are required for AS2805 PIN format 0 translation."]}letmake?isoFormat0=fun?isoFormat1->fun?isoFormat3->fun?isoFormat4->fun?as2805Format0->fun()->{isoFormat0;isoFormat1;isoFormat3;isoFormat4;as2805Format0}letto_valuex=structure_to_value[("IsoFormat0",(Option.mapx.isoFormat0~f:TranslationPinDataIsoFormat034.to_value));("IsoFormat1",(Option.mapx.isoFormat1~f:TranslationPinDataIsoFormat1.to_value));("IsoFormat3",(Option.mapx.isoFormat3~f:TranslationPinDataIsoFormat034.to_value));("IsoFormat4",(Option.mapx.isoFormat4~f:TranslationPinDataIsoFormat034.to_value));("As2805Format0",(Option.mapx.as2805Format0~f:TranslationPinDataAs2805Format0.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letas2805Format0=(Option.map~f:TranslationPinDataAs2805Format0.of_xml)(Xml.childxml_arg0"As2805Format0")inletisoFormat4=(Option.map~f:TranslationPinDataIsoFormat034.of_xml)(Xml.childxml_arg0"IsoFormat4")inletisoFormat3=(Option.map~f:TranslationPinDataIsoFormat034.of_xml)(Xml.childxml_arg0"IsoFormat3")inletisoFormat1=(Option.map~f:TranslationPinDataIsoFormat1.of_xml)(Xml.childxml_arg0"IsoFormat1")inletisoFormat0=(Option.map~f:TranslationPinDataIsoFormat034.of_xml)(Xml.childxml_arg0"IsoFormat0")inmake?as2805Format0?isoFormat4?isoFormat3?isoFormat1?isoFormat0()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letas2805Format0=field_mapjson__"As2805Format0"TranslationPinDataAs2805Format0.of_jsoninletisoFormat4=field_mapjson__"IsoFormat4"TranslationPinDataIsoFormat034.of_jsoninletisoFormat3=field_mapjson__"IsoFormat3"TranslationPinDataIsoFormat034.of_jsoninletisoFormat1=field_mapjson__"IsoFormat1"TranslationPinDataIsoFormat1.of_jsoninletisoFormat0=field_mapjson__"IsoFormat0"TranslationPinDataIsoFormat034.of_jsoninmake?as2805Format0?isoFormat4?isoFormat3?isoFormat1?isoFormat0()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for translation between ISO9564 PIN block formats 0,1,3,4."]moduleWrappedWorkingKey=structtypenonrect={wrappedKeyMaterial:KeyMaterial.toption[@ocaml.doc"The wrapped key block of the outgoing transaction key."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the key contained within the outgoing TR31WrappedKeyBlock. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. For more information on KCV, see KCV in the Amazon Web Services Payment Cryptography User Guide."];wrappedKeyMaterialFormat:WrappedKeyMaterialFormat.toption[@ocaml.doc"The key block format of the wrapped key."]}letmake?wrappedKeyMaterial=fun?keyCheckValue->fun?wrappedKeyMaterialFormat->fun()->{wrappedKeyMaterial;keyCheckValue;wrappedKeyMaterialFormat}letto_valuex=structure_to_value[("WrappedKeyMaterial",(Option.mapx.wrappedKeyMaterial~f:KeyMaterial.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("WrappedKeyMaterialFormat",(Option.mapx.wrappedKeyMaterialFormat~f:WrappedKeyMaterialFormat.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letwrappedKeyMaterialFormat=(Option.map~f:WrappedKeyMaterialFormat.of_xml)(Xml.childxml_arg0"WrappedKeyMaterialFormat")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletwrappedKeyMaterial=(Option.map~f:KeyMaterial.of_xml)(Xml.childxml_arg0"WrappedKeyMaterial")inmake?wrappedKeyMaterialFormat?keyCheckValue?wrappedKeyMaterial()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letwrappedKeyMaterialFormat=field_mapjson__"WrappedKeyMaterialFormat"WrappedKeyMaterialFormat.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletwrappedKeyMaterial=field_mapjson__"WrappedKeyMaterial"KeyMaterial.of_jsoninmake?wrappedKeyMaterialFormat?keyCheckValue?wrappedKeyMaterial()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The parameter information of the outgoing wrapped key block."]moduleIncomingKeyMaterial=structtypenonrect={diffieHellmanTr31KeyBlock:IncomingDiffieHellmanTr31KeyBlock.toption[@ocaml.doc"Parameter information of the TR31WrappedKeyBlock containing the transaction key wrapped using an ECDH dervied key."]}letmake?diffieHellmanTr31KeyBlock=fun()->{diffieHellmanTr31KeyBlock}letto_valuex=structure_to_value[("DiffieHellmanTr31KeyBlock",(Option.mapx.diffieHellmanTr31KeyBlock~f:IncomingDiffieHellmanTr31KeyBlock.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdiffieHellmanTr31KeyBlock=(Option.map~f:IncomingDiffieHellmanTr31KeyBlock.of_xml)(Xml.childxml_arg0"DiffieHellmanTr31KeyBlock")inmake?diffieHellmanTr31KeyBlock()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdiffieHellmanTr31KeyBlock=field_mapjson__"DiffieHellmanTr31KeyBlock"IncomingDiffieHellmanTr31KeyBlock.of_jsoninmake?diffieHellmanTr31KeyBlock()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information of the incoming WrappedKeyBlock containing the transaction key."]moduleOutgoingKeyMaterial=structtypenonrect={tr31KeyBlock:OutgoingTr31KeyBlock.toption[@ocaml.doc"Parameter information of the TR31WrappedKeyBlock containing the transaction key wrapped using a KEK."]}letmake?tr31KeyBlock=fun()->{tr31KeyBlock}letto_valuex=structure_to_value[("Tr31KeyBlock",(Option.mapx.tr31KeyBlock~f:OutgoingTr31KeyBlock.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettr31KeyBlock=(Option.map~f:OutgoingTr31KeyBlock.of_xml)(Xml.childxml_arg0"Tr31KeyBlock")inmake?tr31KeyBlock()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettr31KeyBlock=field_mapjson__"Tr31KeyBlock"OutgoingTr31KeyBlock.of_jsoninmake?tr31KeyBlock()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information of the outgoing TR31WrappedKeyBlock containing the transaction key."]moduleCipherTextType=structtypenonrect=stringletcontext_="CipherTextType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:4224)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"CipherTextType"jletto_json=simple_to_jsonto_valueendmoduleReEncryptionAttributes=structtypenonrect={symmetric:SymmetricEncryptionAttributes.toption[@ocaml.doc"Parameters that are required to encrypt data using symmetric keys."];dukpt:DukptEncryptionAttributes.toption}letmake?symmetric=fun?dukpt->fun()->{symmetric;dukpt}letto_valuex=structure_to_value[("Symmetric",(Option.mapx.symmetric~f:SymmetricEncryptionAttributes.to_value));("Dukpt",(Option.mapx.dukpt~f:DukptEncryptionAttributes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdukpt=(Option.map~f:DukptEncryptionAttributes.of_xml)(Xml.childxml_arg0"Dukpt")inletsymmetric=(Option.map~f:SymmetricEncryptionAttributes.of_xml)(Xml.childxml_arg0"Symmetric")inmake?dukpt?symmetric()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdukpt=field_mapjson__"Dukpt"DukptEncryptionAttributes.of_jsoninletsymmetric=field_mapjson__"Symmetric"SymmetricEncryptionAttributes.of_jsoninmake?dukpt?symmetric()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to perform reencryption operation."]modulePinData=structtypenonrect={pinOffset:PinOffsetType.toption[@ocaml.doc"The PIN offset value."];verificationValue:VerificationValueType.toption[@ocaml.doc"The unique data to identify a cardholder. In most cases, this is the same as cardholder's Primary Account Number (PAN). If a value is not provided, it defaults to PAN."]}letmake?pinOffset=fun?verificationValue->fun()->{pinOffset;verificationValue}letto_valuex=structure_to_value[("PinOffset",(Option.mapx.pinOffset~f:PinOffsetType.to_value));("VerificationValue",(Option.mapx.verificationValue~f:VerificationValueType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letverificationValue=(Option.map~f:VerificationValueType.of_xml)(Xml.childxml_arg0"VerificationValue")inletpinOffset=(Option.map~f:PinOffsetType.of_xml)(Xml.childxml_arg0"PinOffset")inmake?verificationValue?pinOffset()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letverificationValue=field_mapjson__"VerificationValue"VerificationValueType.of_jsoninletpinOffset=field_mapjson__"PinOffset"PinOffsetType.of_jsoninmake?verificationValue?pinOffset()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to generate, translate, or verify PIN data."]modulePinGenerationAttributes=structtypenonrect={visaPin:VisaPin.toption[@ocaml.doc"Parameters that are required to generate or verify Visa PIN."];visaPinVerificationValue:VisaPinVerificationValue.toption[@ocaml.doc"Parameters that are required to generate or verify Visa PIN Verification Value (PVV)."];ibm3624PinOffset:Ibm3624PinOffset.toption[@ocaml.doc"Parameters that are required to generate or verify Ibm3624 PIN offset PIN."];ibm3624NaturalPin:Ibm3624NaturalPin.toption[@ocaml.doc"Parameters that are required to generate or verify Ibm3624 natural PIN."];ibm3624RandomPin:Ibm3624RandomPin.toption[@ocaml.doc"Parameters that are required to generate or verify Ibm3624 random PIN."];ibm3624PinFromOffset:Ibm3624PinFromOffset.toption[@ocaml.doc"Parameters that are required to generate or verify Ibm3624 PIN from offset PIN."]}letmake?visaPin=fun?visaPinVerificationValue->fun?ibm3624PinOffset->fun?ibm3624NaturalPin->fun?ibm3624RandomPin->fun?ibm3624PinFromOffset->fun()->{visaPin;visaPinVerificationValue;ibm3624PinOffset;ibm3624NaturalPin;ibm3624RandomPin;ibm3624PinFromOffset}letto_valuex=structure_to_value[("VisaPin",(Option.mapx.visaPin~f:VisaPin.to_value));("VisaPinVerificationValue",(Option.mapx.visaPinVerificationValue~f:VisaPinVerificationValue.to_value));("Ibm3624PinOffset",(Option.mapx.ibm3624PinOffset~f:Ibm3624PinOffset.to_value));("Ibm3624NaturalPin",(Option.mapx.ibm3624NaturalPin~f:Ibm3624NaturalPin.to_value));("Ibm3624RandomPin",(Option.mapx.ibm3624RandomPin~f:Ibm3624RandomPin.to_value));("Ibm3624PinFromOffset",(Option.mapx.ibm3624PinFromOffset~f:Ibm3624PinFromOffset.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letibm3624PinFromOffset=(Option.map~f:Ibm3624PinFromOffset.of_xml)(Xml.childxml_arg0"Ibm3624PinFromOffset")inletibm3624RandomPin=(Option.map~f:Ibm3624RandomPin.of_xml)(Xml.childxml_arg0"Ibm3624RandomPin")inletibm3624NaturalPin=(Option.map~f:Ibm3624NaturalPin.of_xml)(Xml.childxml_arg0"Ibm3624NaturalPin")inletibm3624PinOffset=(Option.map~f:Ibm3624PinOffset.of_xml)(Xml.childxml_arg0"Ibm3624PinOffset")inletvisaPinVerificationValue=(Option.map~f:VisaPinVerificationValue.of_xml)(Xml.childxml_arg0"VisaPinVerificationValue")inletvisaPin=(Option.map~f:VisaPin.of_xml)(Xml.childxml_arg0"VisaPin")inmake?ibm3624PinFromOffset?ibm3624RandomPin?ibm3624NaturalPin?ibm3624PinOffset?visaPinVerificationValue?visaPin()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letibm3624PinFromOffset=field_mapjson__"Ibm3624PinFromOffset"Ibm3624PinFromOffset.of_jsoninletibm3624RandomPin=field_mapjson__"Ibm3624RandomPin"Ibm3624RandomPin.of_jsoninletibm3624NaturalPin=field_mapjson__"Ibm3624NaturalPin"Ibm3624NaturalPin.of_jsoninletibm3624PinOffset=field_mapjson__"Ibm3624PinOffset"Ibm3624PinOffset.of_jsoninletvisaPinVerificationValue=field_mapjson__"VisaPinVerificationValue"VisaPinVerificationValue.of_jsoninletvisaPin=field_mapjson__"VisaPin"VisaPin.of_jsoninmake?ibm3624PinFromOffset?ibm3624RandomPin?ibm3624NaturalPin?ibm3624PinOffset?visaPinVerificationValue?visaPin()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required for PIN data generation."]moduleMacOutputType=structtypenonrect=stringletcontext_="MacOutputType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:4)>>=(fun()->(check_string_maxi~max:128)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"MacOutputType"jletto_json=simple_to_jsonto_valueendmodulePinChangeMacOutputType=structtypenonrect=stringletcontext_="PinChangeMacOutputType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:8)>>=(fun()->(check_string_maxi~max:16)>>=(fun()->check_patterni~pattern:"[0-9a-fA-F]+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"PinChangeMacOutputType"jletto_json=simple_to_jsonto_valueendmoduleVisaAmexDerivationOutputs=structtypenonrect={authorizationRequestKeyArn:KeyArn.toption[@ocaml.doc"The keyArn of the issuer master key for cryptogram (IMK-AC) used by the operation."];authorizationRequestKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the issuer master key for cryptogram (IMK-AC) used by the operation."];currentPinPekArn:KeyArn.toption[@ocaml.doc"The keyArn of the current PIN PEK."];currentPinPekKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the current PIN PEK."]}letmake?authorizationRequestKeyArn=fun?authorizationRequestKeyCheckValue->fun?currentPinPekArn->fun?currentPinPekKeyCheckValue->fun()->{authorizationRequestKeyArn;authorizationRequestKeyCheckValue;currentPinPekArn;currentPinPekKeyCheckValue}letto_valuex=structure_to_value[("AuthorizationRequestKeyArn",(Option.mapx.authorizationRequestKeyArn~f:KeyArn.to_value));("AuthorizationRequestKeyCheckValue",(Option.mapx.authorizationRequestKeyCheckValue~f:KeyCheckValue.to_value));("CurrentPinPekArn",(Option.mapx.currentPinPekArn~f:KeyArn.to_value));("CurrentPinPekKeyCheckValue",(Option.mapx.currentPinPekKeyCheckValue~f:KeyCheckValue.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcurrentPinPekKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"CurrentPinPekKeyCheckValue")inletcurrentPinPekArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"CurrentPinPekArn")inletauthorizationRequestKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"AuthorizationRequestKeyCheckValue")inletauthorizationRequestKeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"AuthorizationRequestKeyArn")inmake?currentPinPekKeyCheckValue?currentPinPekArn?authorizationRequestKeyCheckValue?authorizationRequestKeyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcurrentPinPekKeyCheckValue=field_mapjson__"CurrentPinPekKeyCheckValue"KeyCheckValue.of_jsoninletcurrentPinPekArn=field_mapjson__"CurrentPinPekArn"KeyArn.of_jsoninletauthorizationRequestKeyCheckValue=field_mapjson__"AuthorizationRequestKeyCheckValue"KeyCheckValue.of_jsoninletauthorizationRequestKeyArn=field_mapjson__"AuthorizationRequestKeyArn"KeyArn.of_jsoninmake?currentPinPekKeyCheckValue?currentPinPekArn?authorizationRequestKeyCheckValue?authorizationRequestKeyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The attributes values used for Amex and Visa derivation methods."]moduleCommandMessageDataType=structtypenonrect=stringletcontext_="CommandMessageDataType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:16)>>=(fun()->(check_string_maxi~max:1024)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"CommandMessageDataType"jletto_json=simple_to_jsonto_valueendmoduleDerivationMethodAttributes=structtypenonrect={emvCommon:EmvCommonAttributes.toption[@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a payment card using Emv common derivation method."];amex:AmexAttributes.toption[@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a payment card using Amex derivation method."];visa:VisaAttributes.toption[@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a a payment card using Visa derivation method."];emv2000:Emv2000Attributes.toption[@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a payment card using Emv2000 derivation method."];mastercard:MasterCardAttributes.toption[@ocaml.doc"Parameters to derive the confidentiality and integrity keys for a payment card using Mastercard derivation method."]}letmake?emvCommon=fun?amex->fun?visa->fun?emv2000->fun?mastercard->fun()->{emvCommon;amex;visa;emv2000;mastercard}letto_valuex=structure_to_value[("EmvCommon",(Option.mapx.emvCommon~f:EmvCommonAttributes.to_value));("Amex",(Option.mapx.amex~f:AmexAttributes.to_value));("Visa",(Option.mapx.visa~f:VisaAttributes.to_value));("Emv2000",(Option.mapx.emv2000~f:Emv2000Attributes.to_value));("Mastercard",(Option.mapx.mastercard~f:MasterCardAttributes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmastercard=(Option.map~f:MasterCardAttributes.of_xml)(Xml.childxml_arg0"Mastercard")inletemv2000=(Option.map~f:Emv2000Attributes.of_xml)(Xml.childxml_arg0"Emv2000")inletvisa=(Option.map~f:VisaAttributes.of_xml)(Xml.childxml_arg0"Visa")inletamex=(Option.map~f:AmexAttributes.of_xml)(Xml.childxml_arg0"Amex")inletemvCommon=(Option.map~f:EmvCommonAttributes.of_xml)(Xml.childxml_arg0"EmvCommon")inmake?mastercard?emv2000?visa?amex?emvCommon()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmastercard=field_mapjson__"Mastercard"MasterCardAttributes.of_jsoninletemv2000=field_mapjson__"Emv2000"Emv2000Attributes.of_jsoninletvisa=field_mapjson__"Visa"VisaAttributes.of_jsoninletamex=field_mapjson__"Amex"AmexAttributes.of_jsoninletemvCommon=field_mapjson__"EmvCommon"EmvCommonAttributes.of_jsoninmake?mastercard?emv2000?visa?amex?emvCommon()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters to derive the payment card specific confidentiality and integrity keys."]modulePinBlockFormatForEmvPinChange=structtypenonrect=|ISO_FORMAT_0|ISO_FORMAT_1|ISO_FORMAT_3|Non_static_idofstringletmakei=iletto_string=function|ISO_FORMAT_0->"ISO_FORMAT_0"|ISO_FORMAT_1->"ISO_FORMAT_1"|ISO_FORMAT_3->"ISO_FORMAT_3"|Non_static_ids->sletof_string=function|"ISO_FORMAT_0"->ISO_FORMAT_0|"ISO_FORMAT_1"->ISO_FORMAT_1|"ISO_FORMAT_3"->ISO_FORMAT_3|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 PinBlockFormatForEmvPinChange"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"PinBlockFormatForEmvPinChange"j)letto_json=simple_to_jsonto_valueendmoduleCardGenerationAttributes=structtypenonrect={amexCardSecurityCodeVersion1:AmexCardSecurityCodeVersion1.toption;amexCardSecurityCodeVersion2:AmexCardSecurityCodeVersion2.toption[@ocaml.doc"Card data parameters that are required to generate a Card Security Code (CSC2) for an AMEX payment card."];cardVerificationValue1:CardVerificationValue1.toption[@ocaml.doc"Card data parameters that are required to generate Card Verification Value (CVV) for the payment card."];cardVerificationValue2:CardVerificationValue2.toption[@ocaml.doc"Card data parameters that are required to generate Card Verification Value (CVV2) for the payment card."];cardHolderVerificationValue:CardHolderVerificationValue.toption[@ocaml.doc"Card data parameters that are required to generate a cardholder verification value for the payment card."];dynamicCardVerificationCode:DynamicCardVerificationCode.toption[@ocaml.doc"Card data parameters that are required to generate CDynamic Card Verification Code (dCVC) for the payment card."];dynamicCardVerificationValue:DynamicCardVerificationValue.toption[@ocaml.doc"Card data parameters that are required to generate CDynamic Card Verification Value (dCVV) for the payment card."]}letmake?amexCardSecurityCodeVersion1=fun?amexCardSecurityCodeVersion2->fun?cardVerificationValue1->fun?cardVerificationValue2->fun?cardHolderVerificationValue->fun?dynamicCardVerificationCode->fun?dynamicCardVerificationValue->fun()->{amexCardSecurityCodeVersion1;amexCardSecurityCodeVersion2;cardVerificationValue1;cardVerificationValue2;cardHolderVerificationValue;dynamicCardVerificationCode;dynamicCardVerificationValue}letto_valuex=structure_to_value[("AmexCardSecurityCodeVersion1",(Option.mapx.amexCardSecurityCodeVersion1~f:AmexCardSecurityCodeVersion1.to_value));("AmexCardSecurityCodeVersion2",(Option.mapx.amexCardSecurityCodeVersion2~f:AmexCardSecurityCodeVersion2.to_value));("CardVerificationValue1",(Option.mapx.cardVerificationValue1~f:CardVerificationValue1.to_value));("CardVerificationValue2",(Option.mapx.cardVerificationValue2~f:CardVerificationValue2.to_value));("CardHolderVerificationValue",(Option.mapx.cardHolderVerificationValue~f:CardHolderVerificationValue.to_value));("DynamicCardVerificationCode",(Option.mapx.dynamicCardVerificationCode~f:DynamicCardVerificationCode.to_value));("DynamicCardVerificationValue",(Option.mapx.dynamicCardVerificationValue~f:DynamicCardVerificationValue.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdynamicCardVerificationValue=(Option.map~f:DynamicCardVerificationValue.of_xml)(Xml.childxml_arg0"DynamicCardVerificationValue")inletdynamicCardVerificationCode=(Option.map~f:DynamicCardVerificationCode.of_xml)(Xml.childxml_arg0"DynamicCardVerificationCode")inletcardHolderVerificationValue=(Option.map~f:CardHolderVerificationValue.of_xml)(Xml.childxml_arg0"CardHolderVerificationValue")inletcardVerificationValue2=(Option.map~f:CardVerificationValue2.of_xml)(Xml.childxml_arg0"CardVerificationValue2")inletcardVerificationValue1=(Option.map~f:CardVerificationValue1.of_xml)(Xml.childxml_arg0"CardVerificationValue1")inletamexCardSecurityCodeVersion2=(Option.map~f:AmexCardSecurityCodeVersion2.of_xml)(Xml.childxml_arg0"AmexCardSecurityCodeVersion2")inletamexCardSecurityCodeVersion1=(Option.map~f:AmexCardSecurityCodeVersion1.of_xml)(Xml.childxml_arg0"AmexCardSecurityCodeVersion1")inmake?dynamicCardVerificationValue?dynamicCardVerificationCode?cardHolderVerificationValue?cardVerificationValue2?cardVerificationValue1?amexCardSecurityCodeVersion2?amexCardSecurityCodeVersion1()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdynamicCardVerificationValue=field_mapjson__"DynamicCardVerificationValue"DynamicCardVerificationValue.of_jsoninletdynamicCardVerificationCode=field_mapjson__"DynamicCardVerificationCode"DynamicCardVerificationCode.of_jsoninletcardHolderVerificationValue=field_mapjson__"CardHolderVerificationValue"CardHolderVerificationValue.of_jsoninletcardVerificationValue2=field_mapjson__"CardVerificationValue2"CardVerificationValue2.of_jsoninletcardVerificationValue1=field_mapjson__"CardVerificationValue1"CardVerificationValue1.of_jsoninletamexCardSecurityCodeVersion2=field_mapjson__"AmexCardSecurityCodeVersion2"AmexCardSecurityCodeVersion2.of_jsoninletamexCardSecurityCodeVersion1=field_mapjson__"AmexCardSecurityCodeVersion1"AmexCardSecurityCodeVersion1.of_jsoninmake?dynamicCardVerificationValue?dynamicCardVerificationCode?cardHolderVerificationValue?cardVerificationValue2?cardVerificationValue1?amexCardSecurityCodeVersion2?amexCardSecurityCodeVersion1()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Card data parameters that are required to generate Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2), or Card Security Codes (CSC)."]moduleIntegerRangeBetween3And5Type=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:5)>>=(fun()->check_int_mini~min:3));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 IntegerRangeBetween3And5Type"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleAs2805KekValidationType=structtypenonrect={kekValidationRequest:KekValidationRequest.toption[@ocaml.doc"Parameter information for generating a KEK validation request during node-to-node initialization."];kekValidationResponse:KekValidationResponse.toption[@ocaml.doc"Parameter information for generating a KEK validation response during node-to-node initialization."]}letmake?kekValidationRequest=fun?kekValidationResponse->fun()->{kekValidationRequest;kekValidationResponse}letto_valuex=structure_to_value[("KekValidationRequest",(Option.mapx.kekValidationRequest~f:KekValidationRequest.to_value));("KekValidationResponse",(Option.mapx.kekValidationResponse~f:KekValidationResponse.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letkekValidationResponse=(Option.map~f:KekValidationResponse.of_xml)(Xml.childxml_arg0"KekValidationResponse")inletkekValidationRequest=(Option.map~f:KekValidationRequest.of_xml)(Xml.childxml_arg0"KekValidationRequest")inmake?kekValidationResponse?kekValidationRequest()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letkekValidationResponse=field_mapjson__"KekValidationResponse"KekValidationResponse.of_jsoninletkekValidationRequest=field_mapjson__"KekValidationRequest"KekValidationRequest.of_jsoninmake?kekValidationResponse?kekValidationRequest()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameter information for generating a random key for KEK validation to perform node-to-node initialization."]moduleRandomKeySendVariantMask=structtypenonrect=|VARIANT_MASK_82C0|VARIANT_MASK_82|Non_static_idofstringletmakei=iletto_string=function|VARIANT_MASK_82C0->"VARIANT_MASK_82C0"|VARIANT_MASK_82->"VARIANT_MASK_82"|Non_static_ids->sletof_string=function|"VARIANT_MASK_82C0"->VARIANT_MASK_82C0|"VARIANT_MASK_82"->VARIANT_MASK_82|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 RandomKeySendVariantMask"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"RandomKeySendVariantMask"j)letto_json=simple_to_jsonto_valueendmoduleEncryptionDecryptionAttributes=structtypenonrect={symmetric:SymmetricEncryptionAttributes.toption[@ocaml.doc"Parameters that are required to perform encryption and decryption using symmetric keys."];asymmetric:AsymmetricEncryptionAttributes.toption;dukpt:DukptEncryptionAttributes.toption;emv:EmvEncryptionAttributes.toption[@ocaml.doc"Parameters for plaintext encryption using EMV keys."]}letmake?symmetric=fun?asymmetric->fun?dukpt->fun?emv->fun()->{symmetric;asymmetric;dukpt;emv}letto_valuex=structure_to_value[("Symmetric",(Option.mapx.symmetric~f:SymmetricEncryptionAttributes.to_value));("Asymmetric",(Option.mapx.asymmetric~f:AsymmetricEncryptionAttributes.to_value));("Dukpt",(Option.mapx.dukpt~f:DukptEncryptionAttributes.to_value));("Emv",(Option.mapx.emv~f:EmvEncryptionAttributes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letemv=(Option.map~f:EmvEncryptionAttributes.of_xml)(Xml.childxml_arg0"Emv")inletdukpt=(Option.map~f:DukptEncryptionAttributes.of_xml)(Xml.childxml_arg0"Dukpt")inletasymmetric=(Option.map~f:AsymmetricEncryptionAttributes.of_xml)(Xml.childxml_arg0"Asymmetric")inletsymmetric=(Option.map~f:SymmetricEncryptionAttributes.of_xml)(Xml.childxml_arg0"Symmetric")inmake?emv?dukpt?asymmetric?symmetric()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letemv=field_mapjson__"Emv"EmvEncryptionAttributes.of_jsoninletdukpt=field_mapjson__"Dukpt"DukptEncryptionAttributes.of_jsoninletasymmetric=field_mapjson__"Asymmetric"AsymmetricEncryptionAttributes.of_jsoninletsymmetric=field_mapjson__"Symmetric"SymmetricEncryptionAttributes.of_jsoninmake?emv?dukpt?asymmetric?symmetric()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Parameters that are required to perform encryption and decryption operations."]modulePlainTextType=structtypenonrect=stringletcontext_="PlainTextType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:4096)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"PlainTextType"jletto_json=simple_to_jsonto_valueendmodulePlainTextOutputType=structtypenonrect=stringletcontext_="PlainTextOutputType"letmakei=letopenResultinok_or_failwith((check_string_mini~min:2)>>=(fun()->(check_string_maxi~max:4224)>>=(fun()->check_patterni~pattern:"(?:[0-9a-fA-F][0-9a-fA-F])+")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"PlainTextOutputType"jletto_json=simple_to_jsonto_valueendmoduleVerifyPinDataOutput=structtypenonrect={verificationKeyArn:KeyArn.toption[@ocaml.doc"The keyARN of the PIN encryption key that Amazon Web Services Payment Cryptography uses for PIN or PIN Offset verification."];verificationKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];encryptionKeyArn:KeyArn.toption[@ocaml.doc"The keyARN of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation."];encryptionKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`VerificationFailedExceptionofVerificationFailedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?verificationKeyArn=fun?verificationKeyCheckValue->fun?encryptionKeyArn->fun?encryptionKeyCheckValue->fun()->{verificationKeyArn;verificationKeyCheckValue;encryptionKeyArn;encryptionKeyCheckValue}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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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))]|`VerificationFailedExceptione->`Assoc[("error",(`String"VerificationFailedException"));("details",(VerificationFailedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("VerificationKeyArn",(Option.mapx.verificationKeyArn~f:KeyArn.to_value));("VerificationKeyCheckValue",(Option.mapx.verificationKeyCheckValue~f:KeyCheckValue.to_value));("EncryptionKeyArn",(Option.mapx.encryptionKeyArn~f:KeyArn.to_value));("EncryptionKeyCheckValue",(Option.mapx.encryptionKeyCheckValue~f:KeyCheckValue.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letencryptionKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"EncryptionKeyCheckValue")inletencryptionKeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"EncryptionKeyArn")inletverificationKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"VerificationKeyCheckValue")inletverificationKeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"VerificationKeyArn")inmake?encryptionKeyCheckValue?encryptionKeyArn?verificationKeyCheckValue?verificationKeyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letencryptionKeyCheckValue=field_mapjson__"EncryptionKeyCheckValue"KeyCheckValue.of_jsoninletencryptionKeyArn=field_mapjson__"EncryptionKeyArn"KeyArn.of_jsoninletverificationKeyCheckValue=field_mapjson__"VerificationKeyCheckValue"KeyCheckValue.of_jsoninletverificationKeyArn=field_mapjson__"VerificationKeyArn"KeyArn.of_jsoninmake?encryptionKeyCheckValue?encryptionKeyArn?verificationKeyCheckValue?verificationKeyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies pin-related data such as PIN and PIN Offset using algorithms including VISA PVV and IBM3624. For more information, see Verify PIN data in the Amazon Web Services Payment Cryptography User Guide. This operation verifies PIN data for user payment card. A card holder PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation uses PIN Verification Key (PVK) for PIN or PIN Offset generation and then encrypts it using PIN Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData TranslatePinData"]moduleVerifyPinDataInput=structtypenonrect={verificationKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the PIN verification key."];encryptionKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key under which the PIN block data is encrypted. This key type can be PEK or BDK."];verificationAttributes:PinVerificationAttributes.t[@ocaml.doc"The attributes and values for PIN data verification."];encryptedPinBlock:EncryptedPinBlockType.t[@ocaml.doc"The encrypted PIN block data that Amazon Web Services Payment Cryptography verifies."];primaryAccountNumber:PrimaryAccountNumberType.toption[@ocaml.doc"The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder."];pinBlockFormat:PinBlockFormatForPinData.t[@ocaml.doc"The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports ISO_Format_0 and ISO_Format_3. The ISO_Format_0 PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length. The ISO_Format_3 PIN block format is the same as ISO_Format_0 except that the fill digits are random values from 10 to 15."];pinDataLength:IntegerRangeBetween4And12.toption[@ocaml.doc"The length of PIN being verified."];dukptAttributes:DukptAttributes.toption[@ocaml.doc"The attributes and values for the DUKPT encrypted PIN block data."];encryptionWrappedKey:WrappedKey.toption}letcontext_="VerifyPinDataInput"letmake?primaryAccountNumber=fun?pinDataLength->fun?dukptAttributes->fun?encryptionWrappedKey->fun~verificationKeyIdentifier->fun~encryptionKeyIdentifier->fun~verificationAttributes->fun~encryptedPinBlock->fun~pinBlockFormat->fun()->{primaryAccountNumber;pinDataLength;dukptAttributes;encryptionWrappedKey;verificationKeyIdentifier;encryptionKeyIdentifier;verificationAttributes;encryptedPinBlock;pinBlockFormat}letto_valuex=structure_to_value[("VerificationKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.verificationKeyIdentifier)));("EncryptionKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.encryptionKeyIdentifier)));("VerificationAttributes",(Some(PinVerificationAttributes.to_valuex.verificationAttributes)));("EncryptedPinBlock",(Some(EncryptedPinBlockType.to_valuex.encryptedPinBlock)));("PrimaryAccountNumber",(Option.mapx.primaryAccountNumber~f:PrimaryAccountNumberType.to_value));("PinBlockFormat",(Some(PinBlockFormatForPinData.to_valuex.pinBlockFormat)));("PinDataLength",(Option.mapx.pinDataLength~f:IntegerRangeBetween4And12.to_value));("DukptAttributes",(Option.mapx.dukptAttributes~f:DukptAttributes.to_value));("EncryptionWrappedKey",(Option.mapx.encryptionWrappedKey~f:WrappedKey.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letencryptionWrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"EncryptionWrappedKey")inletdukptAttributes=(Option.map~f:DukptAttributes.of_xml)(Xml.childxml_arg0"DukptAttributes")inletpinDataLength=(Option.map~f:IntegerRangeBetween4And12.of_xml)(Xml.childxml_arg0"PinDataLength")inletpinBlockFormat=PinBlockFormatForPinData.of_xml(Xml.child_exn~context:context_xml_arg0"PinBlockFormat")inletprimaryAccountNumber=(Option.map~f:PrimaryAccountNumberType.of_xml)(Xml.childxml_arg0"PrimaryAccountNumber")inletencryptedPinBlock=EncryptedPinBlockType.of_xml(Xml.child_exn~context:context_xml_arg0"EncryptedPinBlock")inletverificationAttributes=PinVerificationAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"VerificationAttributes")inletencryptionKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"EncryptionKeyIdentifier")inletverificationKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"VerificationKeyIdentifier")inmake?encryptionWrappedKey?dukptAttributes?pinDataLength~pinBlockFormat?primaryAccountNumber~encryptedPinBlock~verificationAttributes~encryptionKeyIdentifier~verificationKeyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letencryptionWrappedKey=field_mapjson__"EncryptionWrappedKey"WrappedKey.of_jsoninletdukptAttributes=field_mapjson__"DukptAttributes"DukptAttributes.of_jsoninletpinDataLength=field_mapjson__"PinDataLength"IntegerRangeBetween4And12.of_jsoninletpinBlockFormat=field_map_exnjson__"PinBlockFormat"PinBlockFormatForPinData.of_jsoninletprimaryAccountNumber=field_mapjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletencryptedPinBlock=field_map_exnjson__"EncryptedPinBlock"EncryptedPinBlockType.of_jsoninletverificationAttributes=field_map_exnjson__"VerificationAttributes"PinVerificationAttributes.of_jsoninletencryptionKeyIdentifier=field_map_exnjson__"EncryptionKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletverificationKeyIdentifier=field_map_exnjson__"VerificationKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?encryptionWrappedKey?dukptAttributes?pinDataLength~pinBlockFormat?primaryAccountNumber~encryptedPinBlock~verificationAttributes~encryptionKeyIdentifier~verificationKeyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies pin-related data such as PIN and PIN Offset using algorithms including VISA PVV and IBM3624. For more information, see Verify PIN data in the Amazon Web Services Payment Cryptography User Guide. This operation verifies PIN data for user payment card. A card holder PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation uses PIN Verification Key (PVK) for PIN or PIN Offset generation and then encrypts it using PIN Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData TranslatePinData"]moduleVerifyMacOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for MAC verification."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`VerificationFailedExceptionofVerificationFailedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun()->{keyArn;keyCheckValue}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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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))]|`VerificationFailedExceptione->`Assoc[("error",(`String"VerificationFailedException"));("details",(VerificationFailedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies a Message Authentication Code (MAC). You can use this operation to verify MAC for message data authentication such as . In this operation, you must use the same message data, secret encryption key and MAC algorithm that was used to generate MAC. You can use this operation to verify a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GenerateMac"]moduleVerifyMacInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data."];messageData:MessageDataType.t[@ocaml.doc"The data on for which MAC is under verification. This value must be hexBinary."];mac:MacType.t[@ocaml.doc"The MAC being verified."];verificationAttributes:MacAttributes.t[@ocaml.doc"The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography."];macLength:IntegerRangeBetween4And16.toption[@ocaml.doc"The length of the MAC."]}letcontext_="VerifyMacInput"letmake?macLength=fun~keyIdentifier->fun~messageData->fun~mac->fun~verificationAttributes->fun()->{macLength;keyIdentifier;messageData;mac;verificationAttributes}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("MessageData",(Some(MessageDataType.to_valuex.messageData)));("Mac",(Some(MacType.to_valuex.mac)));("VerificationAttributes",(Some(MacAttributes.to_valuex.verificationAttributes)));("MacLength",(Option.mapx.macLength~f:IntegerRangeBetween4And16.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmacLength=(Option.map~f:IntegerRangeBetween4And16.of_xml)(Xml.childxml_arg0"MacLength")inletverificationAttributes=MacAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"VerificationAttributes")inletmac=MacType.of_xml(Xml.child_exn~context:context_xml_arg0"Mac")inletmessageData=MessageDataType.of_xml(Xml.child_exn~context:context_xml_arg0"MessageData")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake?macLength~verificationAttributes~mac~messageData~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmacLength=field_mapjson__"MacLength"IntegerRangeBetween4And16.of_jsoninletverificationAttributes=field_map_exnjson__"VerificationAttributes"MacAttributes.of_jsoninletmac=field_map_exnjson__"Mac"MacType.of_jsoninletmessageData=field_map_exnjson__"MessageData"MessageDataType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?macLength~verificationAttributes~mac~messageData~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies a Message Authentication Code (MAC). You can use this operation to verify MAC for message data authentication such as . In this operation, you must use the same message data, secret encryption key and MAC algorithm that was used to generate MAC. You can use this operation to verify a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GenerateMac"]moduleVerifyCardValidationDataOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify CVV or CSC."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`VerificationFailedExceptionofVerificationFailedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun()->{keyArn;keyCheckValue}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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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))]|`VerificationFailedExceptione->`Assoc[("error",(`String"VerificationFailedException"));("details",(VerificationFailedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2) and Card Security Codes (CSC). For more information, see Verify card data in the Amazon Web Services Payment Cryptography User Guide. This operation validates the CVV or CSC codes that is printed on a payment credit or debit card during card payment transaction. The input values are typically provided as part of an inbound transaction to an issuer or supporting platform partner. Amazon Web Services Payment Cryptography uses CVV or CSC, PAN (Primary Account Number) and expiration date of the card to check its validity during transaction processing. In this operation, the CVK (Card Verification Key) encryption key for use with card data verification is same as the one in used for GenerateCardValidationData. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData VerifyAuthRequestCryptogram VerifyPinData"]moduleVerifyCardValidationDataInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify card data."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder."];verificationAttributes:CardVerificationAttributes.t[@ocaml.doc"The algorithm to use for verification of card data within Amazon Web Services Payment Cryptography."];validationData:ValidationDataType.t[@ocaml.doc"The CVV or CSC value for use for card data verification within Amazon Web Services Payment Cryptography."]}letcontext_="VerifyCardValidationDataInput"letmake~keyIdentifier=fun~primaryAccountNumber->fun~verificationAttributes->fun~validationData->fun()->{keyIdentifier;primaryAccountNumber;verificationAttributes;validationData}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("VerificationAttributes",(Some(CardVerificationAttributes.to_valuex.verificationAttributes)));("ValidationData",(Some(ValidationDataType.to_valuex.validationData)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvalidationData=ValidationDataType.of_xml(Xml.child_exn~context:context_xml_arg0"ValidationData")inletverificationAttributes=CardVerificationAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"VerificationAttributes")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake~validationData~verificationAttributes~primaryAccountNumber~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvalidationData=field_map_exnjson__"ValidationData"ValidationDataType.of_jsoninletverificationAttributes=field_map_exnjson__"VerificationAttributes"CardVerificationAttributes.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake~validationData~verificationAttributes~primaryAccountNumber~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2) and Card Security Codes (CSC). For more information, see Verify card data in the Amazon Web Services Payment Cryptography User Guide. This operation validates the CVV or CSC codes that is printed on a payment credit or debit card during card payment transaction. The input values are typically provided as part of an inbound transaction to an issuer or supporting platform partner. Amazon Web Services Payment Cryptography uses CVV or CSC, PAN (Primary Account Number) and expiration date of the card to check its validity during transaction processing. In this operation, the CVK (Card Verification Key) encryption key for use with card data verification is same as the one in used for GenerateCardValidationData. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData VerifyAuthRequestCryptogram VerifyPinData"]moduleVerifyAuthRequestCryptogramOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the major encryption key that Amazon Web Services Payment Cryptography uses for ARQC verification."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];authResponseValue:AuthResponseValueType.toption[@ocaml.doc"The result for ARQC verification or ARPC generation within Amazon Web Services Payment Cryptography."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`VerificationFailedExceptionofVerificationFailedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun?authResponseValue->fun()->{keyArn;keyCheckValue;authResponseValue}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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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)|"VerificationFailedException"->`VerificationFailedException(VerificationFailedException.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))]|`VerificationFailedExceptione->`Assoc[("error",(`String"VerificationFailedException"));("details",(VerificationFailedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("AuthResponseValue",(Option.mapx.authResponseValue~f:AuthResponseValueType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letauthResponseValue=(Option.map~f:AuthResponseValueType.of_xml)(Xml.childxml_arg0"AuthResponseValue")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?authResponseValue?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letauthResponseValue=field_mapjson__"AuthResponseValue"AuthResponseValueType.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?authResponseValue?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies Authorization Request Cryptogram (ARQC) for a EMV chip payment card authorization. For more information, see Verify auth request cryptogram in the Amazon Web Services Payment Cryptography User Guide. ARQC generation is done outside of Amazon Web Services Payment Cryptography and is typically generated on a point of sale terminal for an EMV chip card to obtain payment authorization during transaction time. For ARQC verification, you must first import the ARQC generated outside of Amazon Web Services Payment Cryptography by calling ImportKey. This operation uses the imported ARQC and an major encryption key (DUKPT) created by calling CreateKey to either provide a boolean ARQC verification result or provide an APRC (Authorization Response Cryptogram) response using Method 1 or Method 2. The ARPC_METHOD_1 uses AuthResponseCode to generate ARPC and ARPC_METHOD_2 uses CardStatusUpdate to generate ARPC. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: VerifyCardValidationData VerifyPinData"]moduleVerifyAuthRequestCryptogramInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the major encryption key that Amazon Web Services Payment Cryptography uses for ARQC verification."];transactionData:TransactionDataType.t[@ocaml.doc"The transaction data that Amazon Web Services Payment Cryptography uses for ARQC verification. The same transaction is used for ARQC generation outside of Amazon Web Services Payment Cryptography."];authRequestCryptogram:AuthRequestCryptogramType.t[@ocaml.doc"The auth request cryptogram imported into Amazon Web Services Payment Cryptography for ARQC verification using a major encryption key and transaction data."];majorKeyDerivationMode:MajorKeyDerivationMode.t[@ocaml.doc"The method to use when deriving the major encryption key for ARQC verification within Amazon Web Services Payment Cryptography. The same key derivation mode was used for ARQC generation outside of Amazon Web Services Payment Cryptography."];sessionKeyDerivationAttributes:SessionKeyDerivation.t[@ocaml.doc"The attributes and values to use for deriving a session key for ARQC verification within Amazon Web Services Payment Cryptography. The same attributes were used for ARQC generation outside of Amazon Web Services Payment Cryptography."];authResponseAttributes:CryptogramAuthResponse.toption[@ocaml.doc"The attributes and values for auth request cryptogram verification. These parameters are required in case using ARPC Method 1 or Method 2 for ARQC verification."]}letcontext_="VerifyAuthRequestCryptogramInput"letmake?authResponseAttributes=fun~keyIdentifier->fun~transactionData->fun~authRequestCryptogram->fun~majorKeyDerivationMode->fun~sessionKeyDerivationAttributes->fun()->{authResponseAttributes;keyIdentifier;transactionData;authRequestCryptogram;majorKeyDerivationMode;sessionKeyDerivationAttributes}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("TransactionData",(Some(TransactionDataType.to_valuex.transactionData)));("AuthRequestCryptogram",(Some(AuthRequestCryptogramType.to_valuex.authRequestCryptogram)));("MajorKeyDerivationMode",(Some(MajorKeyDerivationMode.to_valuex.majorKeyDerivationMode)));("SessionKeyDerivationAttributes",(Some(SessionKeyDerivation.to_valuex.sessionKeyDerivationAttributes)));("AuthResponseAttributes",(Option.mapx.authResponseAttributes~f:CryptogramAuthResponse.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letauthResponseAttributes=(Option.map~f:CryptogramAuthResponse.of_xml)(Xml.childxml_arg0"AuthResponseAttributes")inletsessionKeyDerivationAttributes=SessionKeyDerivation.of_xml(Xml.child_exn~context:context_xml_arg0"SessionKeyDerivationAttributes")inletmajorKeyDerivationMode=MajorKeyDerivationMode.of_xml(Xml.child_exn~context:context_xml_arg0"MajorKeyDerivationMode")inletauthRequestCryptogram=AuthRequestCryptogramType.of_xml(Xml.child_exn~context:context_xml_arg0"AuthRequestCryptogram")inlettransactionData=TransactionDataType.of_xml(Xml.child_exn~context:context_xml_arg0"TransactionData")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake?authResponseAttributes~sessionKeyDerivationAttributes~majorKeyDerivationMode~authRequestCryptogram~transactionData~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letauthResponseAttributes=field_mapjson__"AuthResponseAttributes"CryptogramAuthResponse.of_jsoninletsessionKeyDerivationAttributes=field_map_exnjson__"SessionKeyDerivationAttributes"SessionKeyDerivation.of_jsoninletmajorKeyDerivationMode=field_map_exnjson__"MajorKeyDerivationMode"MajorKeyDerivationMode.of_jsoninletauthRequestCryptogram=field_map_exnjson__"AuthRequestCryptogram"AuthRequestCryptogramType.of_jsoninlettransactionData=field_map_exnjson__"TransactionData"TransactionDataType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?authResponseAttributes~sessionKeyDerivationAttributes~majorKeyDerivationMode~authRequestCryptogram~transactionData~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Verifies Authorization Request Cryptogram (ARQC) for a EMV chip payment card authorization. For more information, see Verify auth request cryptogram in the Amazon Web Services Payment Cryptography User Guide. ARQC generation is done outside of Amazon Web Services Payment Cryptography and is typically generated on a point of sale terminal for an EMV chip card to obtain payment authorization during transaction time. For ARQC verification, you must first import the ARQC generated outside of Amazon Web Services Payment Cryptography by calling ImportKey. This operation uses the imported ARQC and an major encryption key (DUKPT) created by calling CreateKey to either provide a boolean ARQC verification result or provide an APRC (Authorization Response Cryptogram) response using Method 1 or Method 2. The ARPC_METHOD_1 uses AuthResponseCode to generate ARPC and ARPC_METHOD_2 uses CardStatusUpdate to generate ARPC. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: VerifyCardValidationData VerifyPinData"]moduleTranslatePinDataOutput=structtypenonrect={pinBlock:EncryptedPinBlockType.toption[@ocaml.doc"The outgoing encrypted PIN block data after translation."];keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses to encrypt outgoing PIN block data after translation."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?pinBlock=fun?keyArn->fun?keyCheckValue->fun()->{pinBlock;keyArn;keyCheckValue}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[("PinBlock",(Option.mapx.pinBlock~f:EncryptedPinBlockType.to_value));("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inletpinBlock=(Option.map~f:EncryptedPinBlockType.of_xml)(Xml.childxml_arg0"PinBlock")inmake?keyCheckValue?keyArn?pinBlock()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninletpinBlock=field_mapjson__"PinBlock"EncryptedPinBlockType.of_jsoninmake?keyCheckValue?keyArn?pinBlock()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Translates encrypted PIN block from and to ISO 9564 formats 0,1,3,4. For more information, see Translate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN block translation involves changing a PIN block from one encryption key to another and optionally change its format. PIN block translation occurs entirely within the HSM boundary and PIN data never enters or leaves Amazon Web Services Payment Cryptography in clear text. The encryption key transformation can be from PEK (Pin Encryption Key) to BDK (Base Derivation Key) for DUKPT or from BDK for DUKPT to PEK. Amazon Web Services Payment Cryptography also supports use of dynamic keys and ECDH (Elliptic Curve Diffie-Hellman) based key exchange for this operation. Dynamic keys allow you to pass a PEK as a TR-31 WrappedKeyBlock. They can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To translate PIN block using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped PEK. The incoming wrapped key shall have a key purpose of P0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. Using ECDH key exchange, you can receive cardholder selectable PINs into Amazon Web Services Payment Cryptography. The ECDH derived key protects the incoming PIN block, which is translated to a PEK encrypted PIN block for use within the service. You can also use ECDH for reveal PIN, wherein the service translates the PIN block from PEK to a ECDH derived encryption key. For more information on establishing ECDH derived keys, see the Creating keys in the Amazon Web Services Payment Cryptography User Guide. The allowed combinations of PIN block format translations are guided by PCI. It is important to note that not all encrypted PIN block formats (example, format 1) require PAN (Primary Account Number) as input. And as such, PIN block format that requires PAN (example, formats 0,3,4) cannot be translated to a format (format 1) that does not require a PAN for generation. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Amazon Web Services Payment Cryptography currently supports ISO PIN block 4 translation for PIN block built using legacy PAN length. That is, PAN is the right most 12 digits excluding the check digits. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData VerifyPinData"]moduleTranslatePinDataInput=structtypenonrect={incomingKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK. For dynamic keys, it is the keyARN of KEK of the TR-31 wrapped PEK. For ECDH, it is the keyARN of the asymmetric ECC key."];outgoingKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK. For ECDH, it is the keyARN of the asymmetric ECC key."];incomingTranslationAttributes:TranslationIsoFormats.t[@ocaml.doc"The format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography."];outgoingTranslationAttributes:TranslationIsoFormats.t[@ocaml.doc"The format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography."];encryptedPinBlock:HexEvenLengthBetween16And32.t[@ocaml.doc"The encrypted PIN block data that Amazon Web Services Payment Cryptography translates."];incomingDukptAttributes:DukptDerivationAttributes.toption[@ocaml.doc"The attributes and values to use for incoming DUKPT encryption key for PIN block translation."];outgoingDukptAttributes:DukptDerivationAttributes.toption[@ocaml.doc"The attributes and values to use for outgoing DUKPT encryption key after PIN block translation."];incomingWrappedKey:WrappedKey.toption[@ocaml.doc"The WrappedKeyBlock containing the encryption key under which incoming PIN block data is encrypted."];outgoingWrappedKey:WrappedKey.toption[@ocaml.doc"The WrappedKeyBlock containing the encryption key for encrypting outgoing PIN block data."];incomingAs2805Attributes:As2805PekDerivationAttributes.toption[@ocaml.doc"The attributes and values to use for incoming AS2805 encryption key for PIN block translation."]}letcontext_="TranslatePinDataInput"letmake?incomingDukptAttributes=fun?outgoingDukptAttributes->fun?incomingWrappedKey->fun?outgoingWrappedKey->fun?incomingAs2805Attributes->fun~incomingKeyIdentifier->fun~outgoingKeyIdentifier->fun~incomingTranslationAttributes->fun~outgoingTranslationAttributes->fun~encryptedPinBlock->fun()->{incomingDukptAttributes;outgoingDukptAttributes;incomingWrappedKey;outgoingWrappedKey;incomingAs2805Attributes;incomingKeyIdentifier;outgoingKeyIdentifier;incomingTranslationAttributes;outgoingTranslationAttributes;encryptedPinBlock}letto_valuex=structure_to_value[("IncomingKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.incomingKeyIdentifier)));("OutgoingKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.outgoingKeyIdentifier)));("IncomingTranslationAttributes",(Some(TranslationIsoFormats.to_valuex.incomingTranslationAttributes)));("OutgoingTranslationAttributes",(Some(TranslationIsoFormats.to_valuex.outgoingTranslationAttributes)));("EncryptedPinBlock",(Some(HexEvenLengthBetween16And32.to_valuex.encryptedPinBlock)));("IncomingDukptAttributes",(Option.mapx.incomingDukptAttributes~f:DukptDerivationAttributes.to_value));("OutgoingDukptAttributes",(Option.mapx.outgoingDukptAttributes~f:DukptDerivationAttributes.to_value));("IncomingWrappedKey",(Option.mapx.incomingWrappedKey~f:WrappedKey.to_value));("OutgoingWrappedKey",(Option.mapx.outgoingWrappedKey~f:WrappedKey.to_value));("IncomingAs2805Attributes",(Option.mapx.incomingAs2805Attributes~f:As2805PekDerivationAttributes.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letincomingAs2805Attributes=(Option.map~f:As2805PekDerivationAttributes.of_xml)(Xml.childxml_arg0"IncomingAs2805Attributes")inletoutgoingWrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"OutgoingWrappedKey")inletincomingWrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"IncomingWrappedKey")inletoutgoingDukptAttributes=(Option.map~f:DukptDerivationAttributes.of_xml)(Xml.childxml_arg0"OutgoingDukptAttributes")inletincomingDukptAttributes=(Option.map~f:DukptDerivationAttributes.of_xml)(Xml.childxml_arg0"IncomingDukptAttributes")inletencryptedPinBlock=HexEvenLengthBetween16And32.of_xml(Xml.child_exn~context:context_xml_arg0"EncryptedPinBlock")inletoutgoingTranslationAttributes=TranslationIsoFormats.of_xml(Xml.child_exn~context:context_xml_arg0"OutgoingTranslationAttributes")inletincomingTranslationAttributes=TranslationIsoFormats.of_xml(Xml.child_exn~context:context_xml_arg0"IncomingTranslationAttributes")inletoutgoingKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"OutgoingKeyIdentifier")inletincomingKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"IncomingKeyIdentifier")inmake?incomingAs2805Attributes?outgoingWrappedKey?incomingWrappedKey?outgoingDukptAttributes?incomingDukptAttributes~encryptedPinBlock~outgoingTranslationAttributes~incomingTranslationAttributes~outgoingKeyIdentifier~incomingKeyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letincomingAs2805Attributes=field_mapjson__"IncomingAs2805Attributes"As2805PekDerivationAttributes.of_jsoninletoutgoingWrappedKey=field_mapjson__"OutgoingWrappedKey"WrappedKey.of_jsoninletincomingWrappedKey=field_mapjson__"IncomingWrappedKey"WrappedKey.of_jsoninletoutgoingDukptAttributes=field_mapjson__"OutgoingDukptAttributes"DukptDerivationAttributes.of_jsoninletincomingDukptAttributes=field_mapjson__"IncomingDukptAttributes"DukptDerivationAttributes.of_jsoninletencryptedPinBlock=field_map_exnjson__"EncryptedPinBlock"HexEvenLengthBetween16And32.of_jsoninletoutgoingTranslationAttributes=field_map_exnjson__"OutgoingTranslationAttributes"TranslationIsoFormats.of_jsoninletincomingTranslationAttributes=field_map_exnjson__"IncomingTranslationAttributes"TranslationIsoFormats.of_jsoninletoutgoingKeyIdentifier=field_map_exnjson__"OutgoingKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletincomingKeyIdentifier=field_map_exnjson__"IncomingKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?incomingAs2805Attributes?outgoingWrappedKey?incomingWrappedKey?outgoingDukptAttributes?incomingDukptAttributes~encryptedPinBlock~outgoingTranslationAttributes~incomingTranslationAttributes~outgoingKeyIdentifier~incomingKeyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Translates encrypted PIN block from and to ISO 9564 formats 0,1,3,4. For more information, see Translate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN block translation involves changing a PIN block from one encryption key to another and optionally change its format. PIN block translation occurs entirely within the HSM boundary and PIN data never enters or leaves Amazon Web Services Payment Cryptography in clear text. The encryption key transformation can be from PEK (Pin Encryption Key) to BDK (Base Derivation Key) for DUKPT or from BDK for DUKPT to PEK. Amazon Web Services Payment Cryptography also supports use of dynamic keys and ECDH (Elliptic Curve Diffie-Hellman) based key exchange for this operation. Dynamic keys allow you to pass a PEK as a TR-31 WrappedKeyBlock. They can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To translate PIN block using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped PEK. The incoming wrapped key shall have a key purpose of P0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. Using ECDH key exchange, you can receive cardholder selectable PINs into Amazon Web Services Payment Cryptography. The ECDH derived key protects the incoming PIN block, which is translated to a PEK encrypted PIN block for use within the service. You can also use ECDH for reveal PIN, wherein the service translates the PIN block from PEK to a ECDH derived encryption key. For more information on establishing ECDH derived keys, see the Creating keys in the Amazon Web Services Payment Cryptography User Guide. The allowed combinations of PIN block format translations are guided by PCI. It is important to note that not all encrypted PIN block formats (example, format 1) require PAN (Primary Account Number) as input. And as such, PIN block format that requires PAN (example, formats 0,3,4) cannot be translated to a format (format 1) that does not require a PAN for generation. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Amazon Web Services Payment Cryptography currently supports ISO PIN block 4 translation for PIN block built using legacy PAN length. That is, PAN is the right most 12 digits excluding the check digits. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GeneratePinData VerifyPinData"]moduleTranslateKeyMaterialOutput=structtypenonrect={wrappedKey:WrappedWorkingKey.toption[@ocaml.doc"The outgoing KEK wrapped TR31WrappedKeyBlock."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?wrappedKey=fun()->{wrappedKey}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[("WrappedKey",(Option.mapx.wrappedKey~f:WrappedWorkingKey.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letwrappedKey=(Option.map~f:WrappedWorkingKey.of_xml)(Xml.childxml_arg0"WrappedKey")inmake?wrappedKey()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letwrappedKey=field_mapjson__"WrappedKey"WrappedWorkingKey.of_jsoninmake?wrappedKey()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Translates an cryptographic key between different wrapping keys without importing the key into Amazon Web Services Payment Cryptography. This operation can be used when key material is frequently rotated, such as during every card transaction, and there is a need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. It translates short-lived transaction keys such as PEK generated for each transaction and wrapped with an ECDH derived wrapping key to another KEK wrapping key. Before using this operation, you must first request the public key certificate of the ECC key pair generated within Amazon Web Services Payment Cryptography to establish an ECDH key agreement. In TranslateKeyData, the service uses its own ECC key pair, public certificate of receiving ECC key pair, and the key derivation parameters to generate a derived key. The service uses this derived key to unwrap the incoming transaction key received as a TR31WrappedKeyBlock and re-wrap using a user provided KEK to generate an outgoing Tr31WrappedKeyBlock. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateKey GetPublicCertificate ImportKey"]moduleTranslateKeyMaterialInput=structtypenonrect={incomingKeyMaterial:IncomingKeyMaterial.t[@ocaml.doc"Parameter information of the TR31WrappedKeyBlock containing the transaction key."];outgoingKeyMaterial:OutgoingKeyMaterial.t[@ocaml.doc"Parameter information of the wrapping key used to wrap the transaction key in the outgoing TR31WrappedKeyBlock."];keyCheckValueAlgorithm:KeyCheckValueAlgorithm.toption[@ocaml.doc"The key check value (KCV) algorithm used for calculating the KCV of the derived key."]}letcontext_="TranslateKeyMaterialInput"letmake?keyCheckValueAlgorithm=fun~incomingKeyMaterial->fun~outgoingKeyMaterial->fun()->{keyCheckValueAlgorithm;incomingKeyMaterial;outgoingKeyMaterial}letto_valuex=structure_to_value[("IncomingKeyMaterial",(Some(IncomingKeyMaterial.to_valuex.incomingKeyMaterial)));("OutgoingKeyMaterial",(Some(OutgoingKeyMaterial.to_valuex.outgoingKeyMaterial)));("KeyCheckValueAlgorithm",(Option.mapx.keyCheckValueAlgorithm~f:KeyCheckValueAlgorithm.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letkeyCheckValueAlgorithm=(Option.map~f:KeyCheckValueAlgorithm.of_xml)(Xml.childxml_arg0"KeyCheckValueAlgorithm")inletoutgoingKeyMaterial=OutgoingKeyMaterial.of_xml(Xml.child_exn~context:context_xml_arg0"OutgoingKeyMaterial")inletincomingKeyMaterial=IncomingKeyMaterial.of_xml(Xml.child_exn~context:context_xml_arg0"IncomingKeyMaterial")inmake?keyCheckValueAlgorithm~outgoingKeyMaterial~incomingKeyMaterial()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letkeyCheckValueAlgorithm=field_mapjson__"KeyCheckValueAlgorithm"KeyCheckValueAlgorithm.of_jsoninletoutgoingKeyMaterial=field_map_exnjson__"OutgoingKeyMaterial"OutgoingKeyMaterial.of_jsoninletincomingKeyMaterial=field_map_exnjson__"IncomingKeyMaterial"IncomingKeyMaterial.of_jsoninmake?keyCheckValueAlgorithm~outgoingKeyMaterial~incomingKeyMaterial()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Translates an cryptographic key between different wrapping keys without importing the key into Amazon Web Services Payment Cryptography. This operation can be used when key material is frequently rotated, such as during every card transaction, and there is a need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. It translates short-lived transaction keys such as PEK generated for each transaction and wrapped with an ECDH derived wrapping key to another KEK wrapping key. Before using this operation, you must first request the public key certificate of the ECC key pair generated within Amazon Web Services Payment Cryptography to establish an ECDH key agreement. In TranslateKeyData, the service uses its own ECC key pair, public certificate of receiving ECC key pair, and the key derivation parameters to generate a derived key. The service uses this derived key to unwrap the incoming transaction key received as a TR31WrappedKeyBlock and re-wrap using a user provided KEK to generate an outgoing Tr31WrappedKeyBlock. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateKey GetPublicCertificate ImportKey"]moduleReEncryptDataOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN (Amazon Resource Name) of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];cipherText:CipherTextType.toption[@ocaml.doc"The encrypted ciphertext."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun?cipherText->fun()->{keyArn;keyCheckValue;cipherText}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[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("CipherText",(Option.mapx.cipherText~f:CipherTextType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcipherText=(Option.map~f:CipherTextType.of_xml)(Xml.childxml_arg0"CipherText")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?cipherText?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcipherText=field_mapjson__"CipherText"CipherTextType.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?cipherText?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Re-encrypt ciphertext using DUKPT or Symmetric data encryption keys. You can either generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey or import your own encryption key by calling ImportKey. The KeyArn for use with this operation must be in a compatible key state with KeyModesOfUse set to Encrypt. This operation also supports dynamic keys, allowing you to pass a dynamic encryption key as a TR-31 WrappedKeyBlock. This can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To re-encrypt using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped encryption key material. The incoming wrapped key shall have a key purpose of D0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. To encrypt using DUKPT, a DUKPT key must already exist within your account with KeyModesOfUse set to DeriveKey or a new DUKPT can be generated by calling CreateKey. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: DecryptData EncryptData GetPublicCertificate ImportKey"]moduleReEncryptDataInput=structtypenonrect={incomingKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key of incoming ciphertext data. When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation."];outgoingKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography."];cipherText:CipherTextType.t[@ocaml.doc"Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes."];incomingEncryptionAttributes:ReEncryptionAttributes.t[@ocaml.doc"The attributes and values for incoming ciphertext."];outgoingEncryptionAttributes:ReEncryptionAttributes.t[@ocaml.doc"The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography."];incomingWrappedKey:WrappedKey.toption[@ocaml.doc"The WrappedKeyBlock containing the encryption key of incoming ciphertext data."];outgoingWrappedKey:WrappedKey.toption[@ocaml.doc"The WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography."]}letcontext_="ReEncryptDataInput"letmake?incomingWrappedKey=fun?outgoingWrappedKey->fun~incomingKeyIdentifier->fun~outgoingKeyIdentifier->fun~cipherText->fun~incomingEncryptionAttributes->fun~outgoingEncryptionAttributes->fun()->{incomingWrappedKey;outgoingWrappedKey;incomingKeyIdentifier;outgoingKeyIdentifier;cipherText;incomingEncryptionAttributes;outgoingEncryptionAttributes}letto_valuex=structure_to_value[("IncomingKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.incomingKeyIdentifier)));("OutgoingKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.outgoingKeyIdentifier)));("CipherText",(Some(CipherTextType.to_valuex.cipherText)));("IncomingEncryptionAttributes",(Some(ReEncryptionAttributes.to_valuex.incomingEncryptionAttributes)));("OutgoingEncryptionAttributes",(Some(ReEncryptionAttributes.to_valuex.outgoingEncryptionAttributes)));("IncomingWrappedKey",(Option.mapx.incomingWrappedKey~f:WrappedKey.to_value));("OutgoingWrappedKey",(Option.mapx.outgoingWrappedKey~f:WrappedKey.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letoutgoingWrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"OutgoingWrappedKey")inletincomingWrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"IncomingWrappedKey")inletoutgoingEncryptionAttributes=ReEncryptionAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"OutgoingEncryptionAttributes")inletincomingEncryptionAttributes=ReEncryptionAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"IncomingEncryptionAttributes")inletcipherText=CipherTextType.of_xml(Xml.child_exn~context:context_xml_arg0"CipherText")inletoutgoingKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"OutgoingKeyIdentifier")inletincomingKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"IncomingKeyIdentifier")inmake?outgoingWrappedKey?incomingWrappedKey~outgoingEncryptionAttributes~incomingEncryptionAttributes~cipherText~outgoingKeyIdentifier~incomingKeyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letoutgoingWrappedKey=field_mapjson__"OutgoingWrappedKey"WrappedKey.of_jsoninletincomingWrappedKey=field_mapjson__"IncomingWrappedKey"WrappedKey.of_jsoninletoutgoingEncryptionAttributes=field_map_exnjson__"OutgoingEncryptionAttributes"ReEncryptionAttributes.of_jsoninletincomingEncryptionAttributes=field_map_exnjson__"IncomingEncryptionAttributes"ReEncryptionAttributes.of_jsoninletcipherText=field_map_exnjson__"CipherText"CipherTextType.of_jsoninletoutgoingKeyIdentifier=field_map_exnjson__"OutgoingKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletincomingKeyIdentifier=field_map_exnjson__"IncomingKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?outgoingWrappedKey?incomingWrappedKey~outgoingEncryptionAttributes~incomingEncryptionAttributes~cipherText~outgoingKeyIdentifier~incomingKeyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Re-encrypt ciphertext using DUKPT or Symmetric data encryption keys. You can either generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey or import your own encryption key by calling ImportKey. The KeyArn for use with this operation must be in a compatible key state with KeyModesOfUse set to Encrypt. This operation also supports dynamic keys, allowing you to pass a dynamic encryption key as a TR-31 WrappedKeyBlock. This can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To re-encrypt using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped encryption key material. The incoming wrapped key shall have a key purpose of D0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. To encrypt using DUKPT, a DUKPT key must already exist within your account with KeyModesOfUse set to DeriveKey or a new DUKPT can be generated by calling CreateKey. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: DecryptData EncryptData GetPublicCertificate ImportKey"]moduleGeneratePinDataOutput=structtypenonrect={generationKeyArn:KeyArn.toption[@ocaml.doc"The keyARN of the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation."];generationKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];encryptionKeyArn:KeyArn.toption[@ocaml.doc"The keyARN of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation. For ECDH, it is the keyARN of the asymmetric ECC key."];encryptionKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];encryptedPinBlock:EncryptedPinBlockType.toption[@ocaml.doc"The PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard."];pinData:PinData.toption[@ocaml.doc"The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?generationKeyArn=fun?generationKeyCheckValue->fun?encryptionKeyArn->fun?encryptionKeyCheckValue->fun?encryptedPinBlock->fun?pinData->fun()->{generationKeyArn;generationKeyCheckValue;encryptionKeyArn;encryptionKeyCheckValue;encryptedPinBlock;pinData}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[("GenerationKeyArn",(Option.mapx.generationKeyArn~f:KeyArn.to_value));("GenerationKeyCheckValue",(Option.mapx.generationKeyCheckValue~f:KeyCheckValue.to_value));("EncryptionKeyArn",(Option.mapx.encryptionKeyArn~f:KeyArn.to_value));("EncryptionKeyCheckValue",(Option.mapx.encryptionKeyCheckValue~f:KeyCheckValue.to_value));("EncryptedPinBlock",(Option.mapx.encryptedPinBlock~f:EncryptedPinBlockType.to_value));("PinData",(Option.mapx.pinData~f:PinData.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpinData=(Option.map~f:PinData.of_xml)(Xml.childxml_arg0"PinData")inletencryptedPinBlock=(Option.map~f:EncryptedPinBlockType.of_xml)(Xml.childxml_arg0"EncryptedPinBlock")inletencryptionKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"EncryptionKeyCheckValue")inletencryptionKeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"EncryptionKeyArn")inletgenerationKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"GenerationKeyCheckValue")inletgenerationKeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"GenerationKeyArn")inmake?pinData?encryptedPinBlock?encryptionKeyCheckValue?encryptionKeyArn?generationKeyCheckValue?generationKeyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpinData=field_mapjson__"PinData"PinData.of_jsoninletencryptedPinBlock=field_mapjson__"EncryptedPinBlock"EncryptedPinBlockType.of_jsoninletencryptionKeyCheckValue=field_mapjson__"EncryptionKeyCheckValue"KeyCheckValue.of_jsoninletencryptionKeyArn=field_mapjson__"EncryptionKeyArn"KeyArn.of_jsoninletgenerationKeyCheckValue=field_mapjson__"GenerationKeyCheckValue"KeyCheckValue.of_jsoninletgenerationKeyArn=field_mapjson__"GenerationKeyArn"KeyArn.of_jsoninmake?pinData?encryptedPinBlock?encryptionKeyCheckValue?encryptionKeyArn?generationKeyCheckValue?generationKeyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates pin-related data such as PIN, PIN Verification Value (PVV), PIN Block, and PIN Offset during new card issuance or reissuance. For more information, see Generate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation generates PIN, PVV, or PIN Offset and then encrypts it using Pin Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. This operation uses a separate Pin Verification Key (PVK) for VISA PVV generation. Using ECDH key exchange, you can receive cardholder selectable PINs into Amazon Web Services Payment Cryptography. The ECDH derived key protects the incoming PIN block. You can also use it for reveal PIN, wherein the generated PIN block is protected by the ECDH derived key before transmission from Amazon Web Services Payment Cryptography. For more information on establishing ECDH derived keys, see the Generating keys in the Amazon Web Services Payment Cryptography User Guide. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData TranslatePinData VerifyPinData"]moduleGeneratePinDataInput=structtypenonrect={generationKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation."];encryptionKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is the keyARN of the asymmetric ECC key."];generationAttributes:PinGenerationAttributes.t[@ocaml.doc"The attributes and values to use for PIN, PVV, or PIN Offset generation."];pinDataLength:IntegerRangeBetween4And12.toption[@ocaml.doc"The length of PIN under generation."];primaryAccountNumber:PrimaryAccountNumberType.toption[@ocaml.doc"The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder."];pinBlockFormat:PinBlockFormatForPinData.t[@ocaml.doc"The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports ISO_Format_0, ISO_Format_3 and ISO_Format_4. The ISO_Format_0 PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length. The ISO_Format_3 PIN block format is the same as ISO_Format_0 except that the fill digits are random values from 10 to 15. The ISO_Format_4 PIN block format is the only one supporting AES encryption."];encryptionWrappedKey:WrappedKey.toption}letcontext_="GeneratePinDataInput"letmake?pinDataLength=fun?primaryAccountNumber->fun?encryptionWrappedKey->fun~generationKeyIdentifier->fun~encryptionKeyIdentifier->fun~generationAttributes->fun~pinBlockFormat->fun()->{pinDataLength;primaryAccountNumber;encryptionWrappedKey;generationKeyIdentifier;encryptionKeyIdentifier;generationAttributes;pinBlockFormat}letto_valuex=structure_to_value[("GenerationKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.generationKeyIdentifier)));("EncryptionKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.encryptionKeyIdentifier)));("GenerationAttributes",(Some(PinGenerationAttributes.to_valuex.generationAttributes)));("PinDataLength",(Option.mapx.pinDataLength~f:IntegerRangeBetween4And12.to_value));("PrimaryAccountNumber",(Option.mapx.primaryAccountNumber~f:PrimaryAccountNumberType.to_value));("PinBlockFormat",(Some(PinBlockFormatForPinData.to_valuex.pinBlockFormat)));("EncryptionWrappedKey",(Option.mapx.encryptionWrappedKey~f:WrappedKey.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letencryptionWrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"EncryptionWrappedKey")inletpinBlockFormat=PinBlockFormatForPinData.of_xml(Xml.child_exn~context:context_xml_arg0"PinBlockFormat")inletprimaryAccountNumber=(Option.map~f:PrimaryAccountNumberType.of_xml)(Xml.childxml_arg0"PrimaryAccountNumber")inletpinDataLength=(Option.map~f:IntegerRangeBetween4And12.of_xml)(Xml.childxml_arg0"PinDataLength")inletgenerationAttributes=PinGenerationAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"GenerationAttributes")inletencryptionKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"EncryptionKeyIdentifier")inletgenerationKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"GenerationKeyIdentifier")inmake?encryptionWrappedKey~pinBlockFormat?primaryAccountNumber?pinDataLength~generationAttributes~encryptionKeyIdentifier~generationKeyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letencryptionWrappedKey=field_mapjson__"EncryptionWrappedKey"WrappedKey.of_jsoninletpinBlockFormat=field_map_exnjson__"PinBlockFormat"PinBlockFormatForPinData.of_jsoninletprimaryAccountNumber=field_mapjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletpinDataLength=field_mapjson__"PinDataLength"IntegerRangeBetween4And12.of_jsoninletgenerationAttributes=field_map_exnjson__"GenerationAttributes"PinGenerationAttributes.of_jsoninletencryptionKeyIdentifier=field_map_exnjson__"EncryptionKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletgenerationKeyIdentifier=field_map_exnjson__"GenerationKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?encryptionWrappedKey~pinBlockFormat?primaryAccountNumber?pinDataLength~generationAttributes~encryptionKeyIdentifier~generationKeyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates pin-related data such as PIN, PIN Verification Value (PVV), PIN Block, and PIN Offset during new card issuance or reissuance. For more information, see Generate PIN data in the Amazon Web Services Payment Cryptography User Guide. PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation generates PIN, PVV, or PIN Offset and then encrypts it using Pin Encryption Key (PEK) to create an EncryptedPinBlock for transmission from Amazon Web Services Payment Cryptography. This operation uses a separate Pin Verification Key (PVK) for VISA PVV generation. Using ECDH key exchange, you can receive cardholder selectable PINs into Amazon Web Services Payment Cryptography. The ECDH derived key protects the incoming PIN block. You can also use it for reveal PIN, wherein the generated PIN block is protected by the ECDH derived key before transmission from Amazon Web Services Payment Cryptography. For more information on establishing ECDH derived keys, see the Generating keys in the Amazon Web Services Payment Cryptography User Guide. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: GenerateCardValidationData TranslatePinData VerifyPinData"]moduleGenerateMacOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for MAC generation."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];mac:MacOutputType.toption[@ocaml.doc"The MAC cryptogram generated within Amazon Web Services Payment Cryptography."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun?mac->fun()->{keyArn;keyCheckValue;mac}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[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("Mac",(Option.mapx.mac~f:MacOutputType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmac=(Option.map~f:MacOutputType.of_xml)(Xml.childxml_arg0"Mac")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?mac?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmac=field_mapjson__"Mac"MacOutputType.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?mac?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates a Message Authentication Code (MAC) cryptogram within Amazon Web Services Payment Cryptography. You can use this operation to authenticate card-related data by using known data values to generate MAC for data validation between the sending and receiving parties. This operation uses message data, a secret encryption key and MAC algorithm to generate a unique MAC value for transmission. The receiving party of the MAC must use the same message data, secret encryption key and MAC algorithm to reproduce another MAC value for comparision. You can use this operation to generate a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. The MAC generation encryption key must have valid values for KeyUsage such as TR31_M7_HMAC_KEY for HMAC generation, and the key must have KeyModesOfUse set to Generate. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: VerifyMac"]moduleGenerateMacInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the MAC generation encryption key."];messageData:MessageDataType.t[@ocaml.doc"The data for which a MAC is under generation. This value must be hexBinary."];generationAttributes:MacAttributes.t[@ocaml.doc"The attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography."];macLength:IntegerRangeBetween4And16.toption[@ocaml.doc"The length of a MAC under generation."]}letcontext_="GenerateMacInput"letmake?macLength=fun~keyIdentifier->fun~messageData->fun~generationAttributes->fun()->{macLength;keyIdentifier;messageData;generationAttributes}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("MessageData",(Some(MessageDataType.to_valuex.messageData)));("GenerationAttributes",(Some(MacAttributes.to_valuex.generationAttributes)));("MacLength",(Option.mapx.macLength~f:IntegerRangeBetween4And16.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmacLength=(Option.map~f:IntegerRangeBetween4And16.of_xml)(Xml.childxml_arg0"MacLength")inletgenerationAttributes=MacAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"GenerationAttributes")inletmessageData=MessageDataType.of_xml(Xml.child_exn~context:context_xml_arg0"MessageData")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake?macLength~generationAttributes~messageData~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmacLength=field_mapjson__"MacLength"IntegerRangeBetween4And16.of_jsoninletgenerationAttributes=field_map_exnjson__"GenerationAttributes"MacAttributes.of_jsoninletmessageData=field_map_exnjson__"MessageData"MessageDataType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?macLength~generationAttributes~messageData~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates a Message Authentication Code (MAC) cryptogram within Amazon Web Services Payment Cryptography. You can use this operation to authenticate card-related data by using known data values to generate MAC for data validation between the sending and receiving parties. This operation uses message data, a secret encryption key and MAC algorithm to generate a unique MAC value for transmission. The receiving party of the MAC must use the same message data, secret encryption key and MAC algorithm to reproduce another MAC value for comparision. You can use this operation to generate a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and algorithm to the associated values. The MAC generation encryption key must have valid values for KeyUsage such as TR31_M7_HMAC_KEY for HMAC generation, and the key must have KeyModesOfUse set to Generate. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: VerifyMac"]moduleGenerateMacEmvPinChangeOutput=structtypenonrect={newPinPekArn:KeyArn.toption[@ocaml.doc"Returns the keyArn of the PEK protecting the incoming new encrypted PIN block."];secureMessagingIntegrityKeyArn:KeyArn.toption[@ocaml.doc"Returns the keyArn of the IMK-SMI used by the operation."];secureMessagingConfidentialityKeyArn:KeyArn.toption[@ocaml.doc"Returns the keyArn of the IMK-SMC used by the operation."];mac:PinChangeMacOutputType.toption[@ocaml.doc"Returns the mac of the issuer script containing message data and appended target encrypted pin block in ISO2 format."];encryptedPinBlock:EncryptedPinBlockType.toption[@ocaml.doc"Returns the incoming new encrpted PIN block."];newPinPekKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the PEK uprotecting the incoming new encrypted PIN block."];secureMessagingIntegrityKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the SMI issuer master key used by the operation."];secureMessagingConfidentialityKeyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the SMC issuer master key used by the operation."];visaAmexDerivationOutputs:VisaAmexDerivationOutputs.toption[@ocaml.doc"The attribute values used for Amex and Visa derivation methods."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?newPinPekArn=fun?secureMessagingIntegrityKeyArn->fun?secureMessagingConfidentialityKeyArn->fun?mac->fun?encryptedPinBlock->fun?newPinPekKeyCheckValue->fun?secureMessagingIntegrityKeyCheckValue->fun?secureMessagingConfidentialityKeyCheckValue->fun?visaAmexDerivationOutputs->fun()->{newPinPekArn;secureMessagingIntegrityKeyArn;secureMessagingConfidentialityKeyArn;mac;encryptedPinBlock;newPinPekKeyCheckValue;secureMessagingIntegrityKeyCheckValue;secureMessagingConfidentialityKeyCheckValue;visaAmexDerivationOutputs}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[("NewPinPekArn",(Option.mapx.newPinPekArn~f:KeyArn.to_value));("SecureMessagingIntegrityKeyArn",(Option.mapx.secureMessagingIntegrityKeyArn~f:KeyArn.to_value));("SecureMessagingConfidentialityKeyArn",(Option.mapx.secureMessagingConfidentialityKeyArn~f:KeyArn.to_value));("Mac",(Option.mapx.mac~f:PinChangeMacOutputType.to_value));("EncryptedPinBlock",(Option.mapx.encryptedPinBlock~f:EncryptedPinBlockType.to_value));("NewPinPekKeyCheckValue",(Option.mapx.newPinPekKeyCheckValue~f:KeyCheckValue.to_value));("SecureMessagingIntegrityKeyCheckValue",(Option.mapx.secureMessagingIntegrityKeyCheckValue~f:KeyCheckValue.to_value));("SecureMessagingConfidentialityKeyCheckValue",(Option.mapx.secureMessagingConfidentialityKeyCheckValue~f:KeyCheckValue.to_value));("VisaAmexDerivationOutputs",(Option.mapx.visaAmexDerivationOutputs~f:VisaAmexDerivationOutputs.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvisaAmexDerivationOutputs=(Option.map~f:VisaAmexDerivationOutputs.of_xml)(Xml.childxml_arg0"VisaAmexDerivationOutputs")inletsecureMessagingConfidentialityKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"SecureMessagingConfidentialityKeyCheckValue")inletsecureMessagingIntegrityKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"SecureMessagingIntegrityKeyCheckValue")inletnewPinPekKeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"NewPinPekKeyCheckValue")inletencryptedPinBlock=(Option.map~f:EncryptedPinBlockType.of_xml)(Xml.childxml_arg0"EncryptedPinBlock")inletmac=(Option.map~f:PinChangeMacOutputType.of_xml)(Xml.childxml_arg0"Mac")inletsecureMessagingConfidentialityKeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"SecureMessagingConfidentialityKeyArn")inletsecureMessagingIntegrityKeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"SecureMessagingIntegrityKeyArn")inletnewPinPekArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"NewPinPekArn")inmake?visaAmexDerivationOutputs?secureMessagingConfidentialityKeyCheckValue?secureMessagingIntegrityKeyCheckValue?newPinPekKeyCheckValue?encryptedPinBlock?mac?secureMessagingConfidentialityKeyArn?secureMessagingIntegrityKeyArn?newPinPekArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvisaAmexDerivationOutputs=field_mapjson__"VisaAmexDerivationOutputs"VisaAmexDerivationOutputs.of_jsoninletsecureMessagingConfidentialityKeyCheckValue=field_mapjson__"SecureMessagingConfidentialityKeyCheckValue"KeyCheckValue.of_jsoninletsecureMessagingIntegrityKeyCheckValue=field_mapjson__"SecureMessagingIntegrityKeyCheckValue"KeyCheckValue.of_jsoninletnewPinPekKeyCheckValue=field_mapjson__"NewPinPekKeyCheckValue"KeyCheckValue.of_jsoninletencryptedPinBlock=field_mapjson__"EncryptedPinBlock"EncryptedPinBlockType.of_jsoninletmac=field_mapjson__"Mac"PinChangeMacOutputType.of_jsoninletsecureMessagingConfidentialityKeyArn=field_mapjson__"SecureMessagingConfidentialityKeyArn"KeyArn.of_jsoninletsecureMessagingIntegrityKeyArn=field_mapjson__"SecureMessagingIntegrityKeyArn"KeyArn.of_jsoninletnewPinPekArn=field_mapjson__"NewPinPekArn"KeyArn.of_jsoninmake?visaAmexDerivationOutputs?secureMessagingConfidentialityKeyCheckValue?secureMessagingIntegrityKeyCheckValue?newPinPekKeyCheckValue?encryptedPinBlock?mac?secureMessagingConfidentialityKeyArn?secureMessagingIntegrityKeyArn?newPinPekArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates an issuer script mac for EMV payment cards that use offline PINs as the cardholder verification method (CVM). This operation generates an authenticated issuer script response by appending the incoming message data (APDU command) with the target encrypted PIN block in ISO2 format. The command structure and method to send the issuer script update to the card is not defined by this operation and is typically determined by the applicable payment card scheme. The primary inputs to this operation include the incoming new encrypted pinblock, PIN encryption key (PEK), issuer master key (IMK), primary account number (PAN), and the payment card derivation method. The operation uses two issuer master keys - secure messaging for confidentiality (IMK-SMC) and secure messaging for integrity (IMK-SMI). The SMC key is used to internally derive a key to secure the pin, while SMI key is used to internally derive a key to authenticate the script reponse as per the EMV 4.4 - Book 2 - Security and Key Management specification. This operation supports Amex, EMV2000, EMVCommon, Mastercard and Visa derivation methods, each requiring specific input parameters. Users must follow the specific derivation method and input parameters defined by the respective payment card scheme. Use GenerateMac operation when sending a script update to an EMV card that does not involve PIN change. When assigning IAM permissions, it is important to understand that EncryptData using EMV keys and GenerateMac perform similar functions to this command. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: EncryptData GenerateMac"]moduleGenerateMacEmvPinChangeInput=structtypenonrect={newPinPekIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the PEK protecting the incoming new encrypted PIN block."];newEncryptedPinBlock:PinBlockLengthEquals16.t[@ocaml.doc"The incoming new encrypted PIN block data for offline pin change on an EMV card."];pinBlockFormat:PinBlockFormatForEmvPinChange.t[@ocaml.doc"The PIN encoding format of the incoming new encrypted PIN block as specified in ISO 9564."];secureMessagingIntegrityKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the issuer master key (IMK-SMI) used to authenticate the issuer script response."];secureMessagingConfidentialityKeyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the issuer master key (IMK-SMC) used to protect the PIN block data in the issuer script response."];messageData:CommandMessageDataType.t[@ocaml.doc"The message data is the APDU command from the card reader or terminal. The target encrypted PIN block, after translation to ISO2 format, is appended to this message data to generate an issuer script response."];derivationMethodAttributes:DerivationMethodAttributes.t[@ocaml.doc"The attributes and data values to derive payment card specific confidentiality and integrity keys."]}letcontext_="GenerateMacEmvPinChangeInput"letmake~newPinPekIdentifier=fun~newEncryptedPinBlock->fun~pinBlockFormat->fun~secureMessagingIntegrityKeyIdentifier->fun~secureMessagingConfidentialityKeyIdentifier->fun~messageData->fun~derivationMethodAttributes->fun()->{newPinPekIdentifier;newEncryptedPinBlock;pinBlockFormat;secureMessagingIntegrityKeyIdentifier;secureMessagingConfidentialityKeyIdentifier;messageData;derivationMethodAttributes}letto_valuex=structure_to_value[("NewPinPekIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.newPinPekIdentifier)));("NewEncryptedPinBlock",(Some(PinBlockLengthEquals16.to_valuex.newEncryptedPinBlock)));("PinBlockFormat",(Some(PinBlockFormatForEmvPinChange.to_valuex.pinBlockFormat)));("SecureMessagingIntegrityKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.secureMessagingIntegrityKeyIdentifier)));("SecureMessagingConfidentialityKeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.secureMessagingConfidentialityKeyIdentifier)));("MessageData",(Some(CommandMessageDataType.to_valuex.messageData)));("DerivationMethodAttributes",(Some(DerivationMethodAttributes.to_valuex.derivationMethodAttributes)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letderivationMethodAttributes=DerivationMethodAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"DerivationMethodAttributes")inletmessageData=CommandMessageDataType.of_xml(Xml.child_exn~context:context_xml_arg0"MessageData")inletsecureMessagingConfidentialityKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"SecureMessagingConfidentialityKeyIdentifier")inletsecureMessagingIntegrityKeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"SecureMessagingIntegrityKeyIdentifier")inletpinBlockFormat=PinBlockFormatForEmvPinChange.of_xml(Xml.child_exn~context:context_xml_arg0"PinBlockFormat")inletnewEncryptedPinBlock=PinBlockLengthEquals16.of_xml(Xml.child_exn~context:context_xml_arg0"NewEncryptedPinBlock")inletnewPinPekIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"NewPinPekIdentifier")inmake~derivationMethodAttributes~messageData~secureMessagingConfidentialityKeyIdentifier~secureMessagingIntegrityKeyIdentifier~pinBlockFormat~newEncryptedPinBlock~newPinPekIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letderivationMethodAttributes=field_map_exnjson__"DerivationMethodAttributes"DerivationMethodAttributes.of_jsoninletmessageData=field_map_exnjson__"MessageData"CommandMessageDataType.of_jsoninletsecureMessagingConfidentialityKeyIdentifier=field_map_exnjson__"SecureMessagingConfidentialityKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletsecureMessagingIntegrityKeyIdentifier=field_map_exnjson__"SecureMessagingIntegrityKeyIdentifier"KeyArnOrKeyAliasType.of_jsoninletpinBlockFormat=field_map_exnjson__"PinBlockFormat"PinBlockFormatForEmvPinChange.of_jsoninletnewEncryptedPinBlock=field_map_exnjson__"NewEncryptedPinBlock"PinBlockLengthEquals16.of_jsoninletnewPinPekIdentifier=field_map_exnjson__"NewPinPekIdentifier"KeyArnOrKeyAliasType.of_jsoninmake~derivationMethodAttributes~messageData~secureMessagingConfidentialityKeyIdentifier~secureMessagingIntegrityKeyIdentifier~pinBlockFormat~newEncryptedPinBlock~newPinPekIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates an issuer script mac for EMV payment cards that use offline PINs as the cardholder verification method (CVM). This operation generates an authenticated issuer script response by appending the incoming message data (APDU command) with the target encrypted PIN block in ISO2 format. The command structure and method to send the issuer script update to the card is not defined by this operation and is typically determined by the applicable payment card scheme. The primary inputs to this operation include the incoming new encrypted pinblock, PIN encryption key (PEK), issuer master key (IMK), primary account number (PAN), and the payment card derivation method. The operation uses two issuer master keys - secure messaging for confidentiality (IMK-SMC) and secure messaging for integrity (IMK-SMI). The SMC key is used to internally derive a key to secure the pin, while SMI key is used to internally derive a key to authenticate the script reponse as per the EMV 4.4 - Book 2 - Security and Key Management specification. This operation supports Amex, EMV2000, EMVCommon, Mastercard and Visa derivation methods, each requiring specific input parameters. Users must follow the specific derivation method and input parameters defined by the respective payment card scheme. Use GenerateMac operation when sending a script update to an EMV card that does not involve PIN change. When assigning IAM permissions, it is important to understand that EncryptData using EMV keys and GenerateMac perform similar functions to this command. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: EncryptData GenerateMac"]moduleGenerateCardValidationDataOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to generate CVV or CSC."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];validationData:ValidationDataType.toption[@ocaml.doc"The CVV or CSC value that Amazon Web Services Payment Cryptography generates for the card."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun?validationData->fun()->{keyArn;keyCheckValue;validationData}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[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("ValidationData",(Option.mapx.validationData~f:ValidationDataType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvalidationData=(Option.map~f:ValidationDataType.of_xml)(Xml.childxml_arg0"ValidationData")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?validationData?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvalidationData=field_mapjson__"ValidationData"ValidationDataType.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?validationData?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2), or Card Security Codes (CSC). For more information, see Generate card data in the Amazon Web Services Payment Cryptography User Guide. This operation generates a CVV or CSC value that is printed on a payment credit or debit card during card production. The CVV or CSC, PAN (Primary Account Number) and expiration date of the card are required to check its validity during transaction processing. To begin this operation, a CVK (Card Verification Key) encryption key is required. You can use CreateKey or ImportKey to establish a CVK within Amazon Web Services Payment Cryptography. The KeyModesOfUse should be set to Generate and Verify for a CVK encryption key. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: ImportKey VerifyCardValidationData"]moduleGenerateCardValidationDataInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the CVK encryption key that Amazon Web Services Payment Cryptography uses to generate card data."];primaryAccountNumber:PrimaryAccountNumberType.t[@ocaml.doc"The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder."];generationAttributes:CardGenerationAttributes.t[@ocaml.doc"The algorithm for generating CVV or CSC values for the card within Amazon Web Services Payment Cryptography."];validationDataLength:IntegerRangeBetween3And5Type.toption[@ocaml.doc"The length of the CVV or CSC to be generated. The default value is 3."]}letcontext_="GenerateCardValidationDataInput"letmake?validationDataLength=fun~keyIdentifier->fun~primaryAccountNumber->fun~generationAttributes->fun()->{validationDataLength;keyIdentifier;primaryAccountNumber;generationAttributes}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("PrimaryAccountNumber",(Some(PrimaryAccountNumberType.to_valuex.primaryAccountNumber)));("GenerationAttributes",(Some(CardGenerationAttributes.to_valuex.generationAttributes)));("ValidationDataLength",(Option.mapx.validationDataLength~f:IntegerRangeBetween3And5Type.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvalidationDataLength=(Option.map~f:IntegerRangeBetween3And5Type.of_xml)(Xml.childxml_arg0"ValidationDataLength")inletgenerationAttributes=CardGenerationAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"GenerationAttributes")inletprimaryAccountNumber=PrimaryAccountNumberType.of_xml(Xml.child_exn~context:context_xml_arg0"PrimaryAccountNumber")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake?validationDataLength~generationAttributes~primaryAccountNumber~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvalidationDataLength=field_mapjson__"ValidationDataLength"IntegerRangeBetween3And5Type.of_jsoninletgenerationAttributes=field_map_exnjson__"GenerationAttributes"CardGenerationAttributes.of_jsoninletprimaryAccountNumber=field_map_exnjson__"PrimaryAccountNumber"PrimaryAccountNumberType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?validationDataLength~generationAttributes~primaryAccountNumber~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card Verification Values (dCVV/dCVV2), or Card Security Codes (CSC). For more information, see Generate card data in the Amazon Web Services Payment Cryptography User Guide. This operation generates a CVV or CSC value that is printed on a payment credit or debit card during card production. The CVV or CSC, PAN (Primary Account Number) and expiration date of the card are required to check its validity during transaction processing. To begin this operation, a CVK (Card Verification Key) encryption key is required. You can use CreateKey or ImportKey to establish a CVK within Amazon Web Services Payment Cryptography. The KeyModesOfUse should be set to Generate and Verify for a CVK encryption key. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: ImportKey VerifyCardValidationData"]moduleGenerateAs2805KekValidationOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of sending KEK that Amazon Web Services Payment Cryptography validates for node-to-node initialization"];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the sending KEK that Amazon Web Services Payment Cryptography validates for node-to-node initialization."];randomKeySend:As2805RandomKeyMaterial.toption[@ocaml.doc"The random key generated for sending KEK validation."];randomKeyReceive:As2805RandomKeyMaterial.toption[@ocaml.doc"The random key generated for receiving KEK validation. The initiating node sends this key to its partner node for validation."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun?randomKeySend->fun?randomKeyReceive->fun()->{keyArn;keyCheckValue;randomKeySend;randomKeyReceive}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[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("RandomKeySend",(Option.mapx.randomKeySend~f:As2805RandomKeyMaterial.to_value));("RandomKeyReceive",(Option.mapx.randomKeyReceive~f:As2805RandomKeyMaterial.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letrandomKeyReceive=(Option.map~f:As2805RandomKeyMaterial.of_xml)(Xml.childxml_arg0"RandomKeyReceive")inletrandomKeySend=(Option.map~f:As2805RandomKeyMaterial.of_xml)(Xml.childxml_arg0"RandomKeySend")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?randomKeyReceive?randomKeySend?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letrandomKeyReceive=field_mapjson__"RandomKeyReceive"As2805RandomKeyMaterial.of_jsoninletrandomKeySend=field_mapjson__"RandomKeySend"As2805RandomKeyMaterial.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?randomKeyReceive?randomKeySend?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Establishes node-to-node initialization between payment processing nodes such as an acquirer, issuer or payment network using Australian Standard 2805 (AS2805). During node-to-node initialization, both communicating nodes must validate that they possess the correct Key Encrypting Keys (KEKs) before proceeding with session key exchange. In AS2805, the sending KEK (KEKs) of one node corresponds to the receiving KEK (KEKr) of its partner node. Each node uses its KEK to encrypt and decrypt session keys exchanged between the nodes. A KEK can be created or imported into Amazon Web Services Payment Cryptography using either the CreateKey or ImportKey operations. The node initiating communication can use GenerateAS2805KekValidation to generate a combined KEK validation request and KEK validation response to send to the partnering node for validation. When invoked, the API internally generates a random sending key encrypted under KEKs and provides a receiving key encrypted under KEKr as response. The initiating node sends the response returned by this API to its partner for validation. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts."]moduleGenerateAs2805KekValidationInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of sending KEK that Amazon Web Services Payment Cryptography uses for node-to-node initialization"];kekValidationType:As2805KekValidationType.t[@ocaml.doc"Parameter information for generating a random key for KEK validation to perform node-to-node initialization."];randomKeySendVariantMask:RandomKeySendVariantMask.t[@ocaml.doc"The key variant to use for generating a random key for KEK validation during node-to-node initialization."]}letcontext_="GenerateAs2805KekValidationInput"letmake~keyIdentifier=fun~kekValidationType->fun~randomKeySendVariantMask->fun()->{keyIdentifier;kekValidationType;randomKeySendVariantMask}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("KekValidationType",(Some(As2805KekValidationType.to_valuex.kekValidationType)));("RandomKeySendVariantMask",(Some(RandomKeySendVariantMask.to_valuex.randomKeySendVariantMask)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letrandomKeySendVariantMask=RandomKeySendVariantMask.of_xml(Xml.child_exn~context:context_xml_arg0"RandomKeySendVariantMask")inletkekValidationType=As2805KekValidationType.of_xml(Xml.child_exn~context:context_xml_arg0"KekValidationType")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake~randomKeySendVariantMask~kekValidationType~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letrandomKeySendVariantMask=field_map_exnjson__"RandomKeySendVariantMask"RandomKeySendVariantMask.of_jsoninletkekValidationType=field_map_exnjson__"KekValidationType"As2805KekValidationType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake~randomKeySendVariantMask~kekValidationType~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Establishes node-to-node initialization between payment processing nodes such as an acquirer, issuer or payment network using Australian Standard 2805 (AS2805). During node-to-node initialization, both communicating nodes must validate that they possess the correct Key Encrypting Keys (KEKs) before proceeding with session key exchange. In AS2805, the sending KEK (KEKs) of one node corresponds to the receiving KEK (KEKr) of its partner node. Each node uses its KEK to encrypt and decrypt session keys exchanged between the nodes. A KEK can be created or imported into Amazon Web Services Payment Cryptography using either the CreateKey or ImportKey operations. The node initiating communication can use GenerateAS2805KekValidation to generate a combined KEK validation request and KEK validation response to send to the partnering node for validation. When invoked, the API internally generates a random sending key encrypted under KEKs and provides a receiving key encrypted under KEKr as response. The initiating node sends the response returned by this API to its partner for validation. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts."]moduleEncryptDataOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];cipherText:CipherTextType.toption[@ocaml.doc"The encrypted ciphertext."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun?cipherText->fun()->{keyArn;keyCheckValue;cipherText}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[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("CipherText",(Option.mapx.cipherText~f:CipherTextType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcipherText=(Option.map~f:CipherTextType.of_xml)(Xml.childxml_arg0"CipherText")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?cipherText?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcipherText=field_mapjson__"CipherText"CipherTextType.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?cipherText?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Encrypts plaintext data to ciphertext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide. You can generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey. You can import your own encryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Encrypt. In asymmetric encryption, plaintext is encrypted using public component. You can import the public component of an asymmetric key pair created outside Amazon Web Services Payment Cryptography by calling ImportKey. This operation also supports dynamic keys, allowing you to pass a dynamic encryption key as a TR-31 WrappedKeyBlock. This can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To encrypt using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped encryption key material. The incoming wrapped key shall have a key purpose of D0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV encryption, Amazon Web Services Payment Cryptography supports TDES algorithms.For asymmetric encryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the plaintext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the plaintext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. To encrypt using DUKPT, you must already have a BDK (Base Derivation Key) key in your account with KeyModesOfUse set to DeriveKey, or you can generate a new DUKPT key by calling CreateKey. To encrypt using EMV, you must already have an IMK (Issuer Master Key) key in your account with KeyModesOfUse set to DeriveKey. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: DecryptData GetPublicCertificate ImportKey ReEncryptData"]moduleEncryptDataInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption. When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation."];plainText:PlainTextType.t[@ocaml.doc"The plaintext to be encrypted. For encryption using asymmetric keys, plaintext data length is constrained by encryption key strength that you define in KeyAlgorithm and padding type that you define in AsymmetricEncryptionAttributes. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide."];encryptionAttributes:EncryptionDecryptionAttributes.t[@ocaml.doc"The encryption key type and attributes for plaintext encryption."];wrappedKey:WrappedKey.toption[@ocaml.doc"The WrappedKeyBlock containing the encryption key for plaintext encryption."]}letcontext_="EncryptDataInput"letmake?wrappedKey=fun~keyIdentifier->fun~plainText->fun~encryptionAttributes->fun()->{wrappedKey;keyIdentifier;plainText;encryptionAttributes}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("PlainText",(Some(PlainTextType.to_valuex.plainText)));("EncryptionAttributes",(Some(EncryptionDecryptionAttributes.to_valuex.encryptionAttributes)));("WrappedKey",(Option.mapx.wrappedKey~f:WrappedKey.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letwrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"WrappedKey")inletencryptionAttributes=EncryptionDecryptionAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"EncryptionAttributes")inletplainText=PlainTextType.of_xml(Xml.child_exn~context:context_xml_arg0"PlainText")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake?wrappedKey~encryptionAttributes~plainText~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letwrappedKey=field_mapjson__"WrappedKey"WrappedKey.of_jsoninletencryptionAttributes=field_map_exnjson__"EncryptionAttributes"EncryptionDecryptionAttributes.of_jsoninletplainText=field_map_exnjson__"PlainText"PlainTextType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?wrappedKey~encryptionAttributes~plainText~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Encrypts plaintext data to ciphertext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide. You can generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey. You can import your own encryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Encrypt. In asymmetric encryption, plaintext is encrypted using public component. You can import the public component of an asymmetric key pair created outside Amazon Web Services Payment Cryptography by calling ImportKey. This operation also supports dynamic keys, allowing you to pass a dynamic encryption key as a TR-31 WrappedKeyBlock. This can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To encrypt using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped encryption key material. The incoming wrapped key shall have a key purpose of D0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV encryption, Amazon Web Services Payment Cryptography supports TDES algorithms.For asymmetric encryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the plaintext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the plaintext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. To encrypt using DUKPT, you must already have a BDK (Base Derivation Key) key in your account with KeyModesOfUse set to DeriveKey, or you can generate a new DUKPT key by calling CreateKey. To encrypt using EMV, you must already have an IMK (Issuer Master Key) key in your account with KeyModesOfUse set to DeriveKey. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: DecryptData GetPublicCertificate ImportKey ReEncryptData"]moduleDecryptDataOutput=structtypenonrect={keyArn:KeyArn.toption[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for ciphertext decryption."];keyCheckValue:KeyCheckValue.toption[@ocaml.doc"The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification."];plainText:PlainTextOutputType.toption[@ocaml.doc"The decrypted plaintext data in hexBinary format."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?keyArn=fun?keyCheckValue->fun?plainText->fun()->{keyArn;keyCheckValue;plainText}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[("KeyArn",(Option.mapx.keyArn~f:KeyArn.to_value));("KeyCheckValue",(Option.mapx.keyCheckValue~f:KeyCheckValue.to_value));("PlainText",(Option.mapx.plainText~f:PlainTextOutputType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letplainText=(Option.map~f:PlainTextOutputType.of_xml)(Xml.childxml_arg0"PlainText")inletkeyCheckValue=(Option.map~f:KeyCheckValue.of_xml)(Xml.childxml_arg0"KeyCheckValue")inletkeyArn=(Option.map~f:KeyArn.of_xml)(Xml.childxml_arg0"KeyArn")inmake?plainText?keyCheckValue?keyArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letplainText=field_mapjson__"PlainText"PlainTextOutputType.of_jsoninletkeyCheckValue=field_mapjson__"KeyCheckValue"KeyCheckValue.of_jsoninletkeyArn=field_mapjson__"KeyArn"KeyArn.of_jsoninmake?plainText?keyCheckValue?keyArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Decrypts ciphertext data to plaintext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Decrypt data in the Amazon Web Services Payment Cryptography User Guide. You can use an decryption key generated within Amazon Web Services Payment Cryptography, or you can import your own decryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Decrypt. In asymmetric decryption, Amazon Web Services Payment Cryptography decrypts the ciphertext using the private component of the asymmetric encryption key pair. For data encryption outside of Amazon Web Services Payment Cryptography, you can export the public component of the asymmetric key pair by calling GetPublicCertificate. This operation also supports dynamic keys, allowing you to pass a dynamic decryption key as a TR-31 WrappedKeyBlock. This can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To decrypt using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped decryption key material. The incoming wrapped key shall have a key purpose of D0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. For symmetric and DUKPT decryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV decryption, Amazon Web Services Payment Cryptography supports TDES algorithms. For asymmetric decryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the ciphertext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the ciphertext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: EncryptData GetPublicCertificate ImportKey"]moduleDecryptDataInput=structtypenonrect={keyIdentifier:KeyArnOrKeyAliasType.t[@ocaml.doc"The keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for ciphertext decryption. When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation."];cipherText:CipherTextType.t[@ocaml.doc"The ciphertext to decrypt."];decryptionAttributes:EncryptionDecryptionAttributes.t[@ocaml.doc"The encryption key type and attributes for ciphertext decryption."];wrappedKey:WrappedKey.toption[@ocaml.doc"The WrappedKeyBlock containing the encryption key for ciphertext decryption."]}letcontext_="DecryptDataInput"letmake?wrappedKey=fun~keyIdentifier->fun~cipherText->fun~decryptionAttributes->fun()->{wrappedKey;keyIdentifier;cipherText;decryptionAttributes}letto_valuex=structure_to_value[("KeyIdentifier",(Some(KeyArnOrKeyAliasType.to_valuex.keyIdentifier)));("CipherText",(Some(CipherTextType.to_valuex.cipherText)));("DecryptionAttributes",(Some(EncryptionDecryptionAttributes.to_valuex.decryptionAttributes)));("WrappedKey",(Option.mapx.wrappedKey~f:WrappedKey.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letwrappedKey=(Option.map~f:WrappedKey.of_xml)(Xml.childxml_arg0"WrappedKey")inletdecryptionAttributes=EncryptionDecryptionAttributes.of_xml(Xml.child_exn~context:context_xml_arg0"DecryptionAttributes")inletcipherText=CipherTextType.of_xml(Xml.child_exn~context:context_xml_arg0"CipherText")inletkeyIdentifier=KeyArnOrKeyAliasType.of_xml(Xml.child_exn~context:context_xml_arg0"KeyIdentifier")inmake?wrappedKey~decryptionAttributes~cipherText~keyIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letwrappedKey=field_mapjson__"WrappedKey"WrappedKey.of_jsoninletdecryptionAttributes=field_map_exnjson__"DecryptionAttributes"EncryptionDecryptionAttributes.of_jsoninletcipherText=field_map_exnjson__"CipherText"CipherTextType.of_jsoninletkeyIdentifier=field_map_exnjson__"KeyIdentifier"KeyArnOrKeyAliasType.of_jsoninmake?wrappedKey~decryptionAttributes~cipherText~keyIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Decrypts ciphertext data to plaintext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. For more information, see Decrypt data in the Amazon Web Services Payment Cryptography User Guide. You can use an decryption key generated within Amazon Web Services Payment Cryptography, or you can import your own decryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse set to Decrypt. In asymmetric decryption, Amazon Web Services Payment Cryptography decrypts the ciphertext using the private component of the asymmetric encryption key pair. For data encryption outside of Amazon Web Services Payment Cryptography, you can export the public component of the asymmetric key pair by calling GetPublicCertificate. This operation also supports dynamic keys, allowing you to pass a dynamic decryption key as a TR-31 WrappedKeyBlock. This can be used when key material is frequently rotated, such as during every card transaction, and there is need to avoid importing short-lived keys into Amazon Web Services Payment Cryptography. To decrypt using dynamic keys, the keyARN is the Key Encryption Key (KEK) of the TR-31 wrapped decryption key material. The incoming wrapped key shall have a key purpose of D0 with a mode of use of B or D. For more information, see Using Dynamic Keys in the Amazon Web Services Payment Cryptography User Guide. For symmetric and DUKPT decryption, Amazon Web Services Payment Cryptography supports TDES and AES algorithms. For EMV decryption, Amazon Web Services Payment Cryptography supports TDES algorithms. For asymmetric decryption, Amazon Web Services Payment Cryptography supports RSA. When you use TDES or TDES DUKPT, the ciphertext data length must be a multiple of 8 bytes. For AES or AES DUKPT, the ciphertext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless padding is enabled. For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: EncryptData GetPublicCertificate ImportKey"]