1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155(* 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.sso_oidcletapiVersion="2019-06-10"letendpointPrefix="oidc"letserviceFullName="AWS SSO OIDC"letsignatureVersion="v4"letprotocol="rest_json"letglobalEndpoint=endpointPrefix^".amazonaws.com"letserviceAbbreviation="SSO OIDC"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[]))])moduleError=structtypenonrect=stringletcontext_="Error"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:"Error"jletto_json=simple_to_jsonto_valueendmoduleErrorDescription=structtypenonrect=stringletcontext_="ErrorDescription"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:"ErrorDescription"jletto_json=simple_to_jsonto_valueendmoduleInvalidRequestExceptionReason=structtypenonrect=|KMS_NotFoundException|KMS_InvalidKeyUsageException|KMS_InvalidStateException|KMS_DisabledException|Non_static_idofstringletmakei=iletto_string=function|KMS_NotFoundException->"KMS_NotFoundException"|KMS_InvalidKeyUsageException->"KMS_InvalidKeyUsageException"|KMS_InvalidStateException->"KMS_InvalidStateException"|KMS_DisabledException->"KMS_DisabledException"|Non_static_ids->sletof_string=function|"KMS_NotFoundException"->KMS_NotFoundException|"KMS_InvalidKeyUsageException"->KMS_InvalidKeyUsageException|"KMS_InvalidStateException"->KMS_InvalidStateException|"KMS_DisabledException"->KMS_DisabledException|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 InvalidRequestExceptionReason"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"InvalidRequestExceptionReason"j)letto_json=simple_to_jsonto_valueendmoduleGrantType=structtypenonrect=stringletcontext_="GrantType"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:"GrantType"jletto_json=simple_to_jsonto_valueendmoduleURI=structtypenonrect=stringletcontext_="URI"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:"URI"jletto_json=simple_to_jsonto_valueendmoduleScope=structtypenonrect=stringletcontext_="Scope"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:"Scope"jletto_json=simple_to_jsonto_valueendmoduleAccessDeniedExceptionReason=structtypenonrect=|KMS_AccessDeniedException|Non_static_idofstringletmakei=iletto_string=function|KMS_AccessDeniedException->"KMS_AccessDeniedException"|Non_static_ids->sletof_string=function|"KMS_AccessDeniedException"->KMS_AccessDeniedException|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 AccessDeniedExceptionReason"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"AccessDeniedExceptionReason"j)letto_json=simple_to_jsonto_valueendmoduleIdentityContext=structtypenonrect=stringletcontext_="IdentityContext"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:"IdentityContext"jletto_json=simple_to_jsonto_valueendmoduleLocation=structtypenonrect=stringletcontext_="Location"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:"Location"jletto_json=simple_to_jsonto_valueendmoduleRegion=structtypenonrect=stringletcontext_="Region"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:"Region"jletto_json=simple_to_jsonto_valueendmoduleDeviceCode=structtypenonrect=stringletcontext_="DeviceCode"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:"DeviceCode"jletto_json=simple_to_jsonto_valueendmoduleExpirationInSeconds=structtypenonrect=intletmakei=iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for ExpirationInSeconds"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleInternalServerException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be server_error."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that an error from the service occurred while trying to process a request."]moduleIntervalInSeconds=structtypenonrect=intletmakei=iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for IntervalInSeconds"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleInvalidClientException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be invalid_client."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the clientId or clientSecret in the request is invalid. For example, this can occur when a client sends an incorrect clientId or an expired clientSecret."]moduleInvalidRequestException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be invalid_request."];reason:InvalidRequestExceptionReason.toption[@ocaml.doc"A string that uniquely identifies a reason for the error."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?reason->fun?error_description->fun()->{error;reason;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("reason",(Option.mapx.reason~f:InvalidRequestExceptionReason.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inletreason=(Option.map~f:InvalidRequestExceptionReason.of_xml)(Xml.childxml_arg0"reason")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?reason?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninletreason=field_mapjson__"reason"InvalidRequestExceptionReason.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?reason?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that something is wrong with the input to the request. For example, a required parameter might be missing or out of range."]moduleSlowDownException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be slow_down."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the client is making the request too frequently and is more than the service can handle."]moduleUnauthorizedClientException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be unauthorized_client."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the client is not currently authorized to make the request. This can happen when a clientId is not issued for a public client."]moduleUserCode=structtypenonrect=stringletcontext_="UserCode"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:"UserCode"jletto_json=simple_to_jsonto_valueendmoduleClientId=structtypenonrect=stringletcontext_="ClientId"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:"ClientId"jletto_json=simple_to_jsonto_valueendmoduleClientSecret=structtypenonrect=stringletcontext_="ClientSecret"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:"ClientSecret"jletto_json=simple_to_jsonto_valueendmoduleInvalidClientMetadataException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be invalid_client_metadata."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the client information sent in the request during registration is invalid."]moduleInvalidRedirectUriException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be invalid_redirect_uri."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that one or more redirect URI in the request is not supported for this operation."]moduleInvalidScopeException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be invalid_scope."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the scope provided in the request is invalid."]moduleLongTimeStampType=structtypenonrect=Int64.tletmakei=iletof_string=Int64.of_stringletto_valuex=`Longxletto_queryv=to_queryto_valuevletto_headerx=Int64.to_stringxletof_xmlxml_arg0=Int64.of_string(string_of_xml~kind:"a long"xml_arg0)letof_jsonj=Int64.of_float(float_of_json~kind:"a long"j)letto_json=simple_to_jsonto_valueendmoduleUnsupportedGrantTypeException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be unsupported_grant_type."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the grant type in the request is not supported by the service."]moduleArnType=structtypenonrect=stringletcontext_="ArnType"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:"ArnType"jletto_json=simple_to_jsonto_valueendmoduleClientName=structtypenonrect=stringletcontext_="ClientName"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:"ClientName"jletto_json=simple_to_jsonto_valueendmoduleClientType=structtypenonrect=stringletcontext_="ClientType"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:"ClientType"jletto_json=simple_to_jsonto_valueendmoduleGrantTypes=structtypenonrect=GrantType.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:GrantType.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:GrantType.of_xml)letof_jsonj=list_of_json~kind:"GrantTypes"~of_json:GrantType.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleRedirectUris=structtypenonrect=URI.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:URI.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:URI.of_xml)letof_jsonj=list_of_json~kind:"RedirectUris"~of_json:URI.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleScopes=structtypenonrect=Scope.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:Scope.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:Scope.of_xml)letof_jsonj=list_of_json~kind:"Scopes"~of_json:Scope.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleAccessDeniedException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be access_denied."];reason:AccessDeniedExceptionReason.toption[@ocaml.doc"A string that uniquely identifies a reason for the error."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?reason->fun?error_description->fun()->{error;reason;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("reason",(Option.mapx.reason~f:AccessDeniedExceptionReason.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inletreason=(Option.map~f:AccessDeniedExceptionReason.of_xml)(Xml.childxml_arg0"reason")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?reason?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninletreason=field_mapjson__"reason"AccessDeniedExceptionReason.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?reason?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"You do not have sufficient access to perform this action."]moduleAccessToken=structtypenonrect=stringletcontext_="AccessToken"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:"AccessToken"jletto_json=simple_to_jsonto_valueendmoduleAuthorizationPendingException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be authorization_pending."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that a request to authorize a client with an access user session token is pending."]moduleAwsAdditionalDetails=structtypenonrect={identityContext:IdentityContext.toption[@ocaml.doc"The trusted context assertion is signed and encrypted by STS. It provides access to sts:identity_context claim in the idToken without JWT parsing Identity context comprises information that Amazon Web Services services use to make authorization decisions when they receive requests."]}letmake?identityContext=fun()->{identityContext}letto_valuex=structure_to_value[("identityContext",(Option.mapx.identityContext~f:IdentityContext.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letidentityContext=(Option.map~f:IdentityContext.of_xml)(Xml.childxml_arg0"identityContext")inmake?identityContext()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letidentityContext=field_mapjson__"identityContext"IdentityContext.of_jsoninmake?identityContext()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"This structure contains Amazon Web Services-specific parameter extensions and the identity context."]moduleExpiredTokenException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be expired_token."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that the token issued by the service is expired and is no longer valid."]moduleIdToken=structtypenonrect=stringletcontext_="IdToken"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:"IdToken"jletto_json=simple_to_jsonto_valueendmoduleInvalidGrantException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be invalid_grant."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."]}letmake?error=fun?error_description->fun()->{error;error_description}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=leterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=leterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that a request contains an invalid grant. This can occur if a client makes a CreateToken request with an invalid grant type."]moduleInvalidRequestRegionException=structtypenonrect={error:Error.toption[@ocaml.doc"Single error code. For this exception the value will be invalid_request."];error_description:ErrorDescription.toption[@ocaml.doc"Human-readable text providing additional information, used to assist the client developer in understanding the error that occurred."];endpoint:Location.toption[@ocaml.doc"Indicates the IAM Identity Center endpoint which the requester may call with this token."];region:Region.toption[@ocaml.doc"Indicates the region which the requester may call with this token."]}letmake?error=fun?error_description->fun?endpoint->fun?region->fun()->{error;error_description;endpoint;region}letto_valuex=structure_to_value[("error",(Option.mapx.error~f:Error.to_value));("error_description",(Option.mapx.error_description~f:ErrorDescription.to_value));("endpoint",(Option.mapx.endpoint~f:Location.to_value));("region",(Option.mapx.region~f:Region.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letregion=(Option.map~f:Region.of_xml)(Xml.childxml_arg0"region")inletendpoint=(Option.map~f:Location.of_xml)(Xml.childxml_arg0"endpoint")inleterror_description=(Option.map~f:ErrorDescription.of_xml)(Xml.childxml_arg0"error_description")inleterror=(Option.map~f:Error.of_xml)(Xml.childxml_arg0"error")inmake?region?endpoint?error_description?error()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letregion=field_mapjson__"region"Region.of_jsoninletendpoint=field_mapjson__"endpoint"Location.of_jsoninleterror_description=field_mapjson__"error_description"ErrorDescription.of_jsoninleterror=field_mapjson__"error"Error.of_jsoninmake?region?endpoint?error_description?error()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Indicates that a token provided as input to the request was issued by and is only usable by calling IAM Identity Center endpoints in another region."]moduleRefreshToken=structtypenonrect=stringletcontext_="RefreshToken"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:"RefreshToken"jletto_json=simple_to_jsonto_valueendmoduleTokenType=structtypenonrect=stringletcontext_="TokenType"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:"TokenType"jletto_json=simple_to_jsonto_valueendmoduleTokenTypeURI=structtypenonrect=stringletcontext_="TokenTypeURI"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:"TokenTypeURI"jletto_json=simple_to_jsonto_valueendmoduleAssertion=structtypenonrect=stringletcontext_="Assertion"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:"Assertion"jletto_json=simple_to_jsonto_valueendmoduleAuthCode=structtypenonrect=stringletcontext_="AuthCode"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:"AuthCode"jletto_json=simple_to_jsonto_valueendmoduleCodeVerifier=structtypenonrect=stringletcontext_="CodeVerifier"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:"CodeVerifier"jletto_json=simple_to_jsonto_valueendmoduleSubjectToken=structtypenonrect=stringletcontext_="SubjectToken"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:"SubjectToken"jletto_json=simple_to_jsonto_valueendmoduleStartDeviceAuthorizationResponse=structtypenonrect={deviceCode:DeviceCode.toption[@ocaml.doc"The short-lived code that is used by the device when polling for a session token."];userCode:UserCode.toption[@ocaml.doc"A one-time user verification code. This is needed to authorize an in-use device."];verificationUri:URI.toption[@ocaml.doc"The URI of the verification page that takes the userCode to authorize the device."];verificationUriComplete:URI.toption[@ocaml.doc"An alternate URL that the client can use to automatically launch a browser. This process skips the manual step in which the user visits the verification page and enters their code."];expiresIn:ExpirationInSeconds.toption[@ocaml.doc"Indicates the number of seconds in which the verification code will become invalid."];interval:IntervalInSeconds.toption[@ocaml.doc"Indicates the number of seconds the client must wait between attempts when polling for a session."]}typenonrecerror=[`InternalServerExceptionofInternalServerException.t|`InvalidClientExceptionofInvalidClientException.t|`InvalidRequestExceptionofInvalidRequestException.t|`SlowDownExceptionofSlowDownException.t|`UnauthorizedClientExceptionofUnauthorizedClientException.t|`Unknown_operation_errorof(string*stringoption)]letmake?deviceCode=fun?userCode->fun?verificationUri->fun?verificationUriComplete->fun?expiresIn->fun?interval->fun()->{deviceCode;userCode;verificationUri;verificationUriComplete;expiresIn;interval}leterror_of_jsonnamejson=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"InvalidClientException"->`InvalidClientException(InvalidClientException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"SlowDownException"->`SlowDownException(SlowDownException.of_jsonjson)|"UnauthorizedClientException"->`UnauthorizedClientException(UnauthorizedClientException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"InvalidClientException"->`InvalidClientException(InvalidClientException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"SlowDownException"->`SlowDownException(SlowDownException.of_xmlxml)|"UnauthorizedClientException"->`UnauthorizedClientException(UnauthorizedClientException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`InvalidClientExceptione->`Assoc[("error",(`String"InvalidClientException"));("details",(InvalidClientException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`SlowDownExceptione->`Assoc[("error",(`String"SlowDownException"));("details",(SlowDownException.to_jsone))]|`UnauthorizedClientExceptione->`Assoc[("error",(`String"UnauthorizedClientException"));("details",(UnauthorizedClientException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("deviceCode",(Option.mapx.deviceCode~f:DeviceCode.to_value));("userCode",(Option.mapx.userCode~f:UserCode.to_value));("verificationUri",(Option.mapx.verificationUri~f:URI.to_value));("verificationUriComplete",(Option.mapx.verificationUriComplete~f:URI.to_value));("expiresIn",(Option.mapx.expiresIn~f:ExpirationInSeconds.to_value));("interval",(Option.mapx.interval~f:IntervalInSeconds.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letinterval=(Option.map~f:IntervalInSeconds.of_xml)(Xml.childxml_arg0"interval")inletexpiresIn=(Option.map~f:ExpirationInSeconds.of_xml)(Xml.childxml_arg0"expiresIn")inletverificationUriComplete=(Option.map~f:URI.of_xml)(Xml.childxml_arg0"verificationUriComplete")inletverificationUri=(Option.map~f:URI.of_xml)(Xml.childxml_arg0"verificationUri")inletuserCode=(Option.map~f:UserCode.of_xml)(Xml.childxml_arg0"userCode")inletdeviceCode=(Option.map~f:DeviceCode.of_xml)(Xml.childxml_arg0"deviceCode")inmake?interval?expiresIn?verificationUriComplete?verificationUri?userCode?deviceCode()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letinterval=field_mapjson__"interval"IntervalInSeconds.of_jsoninletexpiresIn=field_mapjson__"expiresIn"ExpirationInSeconds.of_jsoninletverificationUriComplete=field_mapjson__"verificationUriComplete"URI.of_jsoninletverificationUri=field_mapjson__"verificationUri"URI.of_jsoninletuserCode=field_mapjson__"userCode"UserCode.of_jsoninletdeviceCode=field_mapjson__"deviceCode"DeviceCode.of_jsoninmake?interval?expiresIn?verificationUriComplete?verificationUri?userCode?deviceCode()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Initiates device authorization by requesting a pair of verification codes from the authorization service."]moduleStartDeviceAuthorizationRequest=structtypenonrect={clientId:ClientId.t[@ocaml.doc"The unique identifier string for the client that is registered with IAM Identity Center. This value should come from the persisted result of the RegisterClient API operation."];clientSecret:ClientSecret.t[@ocaml.doc"A secret string that is generated for the client. This value should come from the persisted result of the RegisterClient API operation."];startUrl:URI.t[@ocaml.doc"The URL for the Amazon Web Services access portal. For more information, see Using the Amazon Web Services access portal in the IAM Identity Center User Guide."]}letcontext_="StartDeviceAuthorizationRequest"letmake~clientId=fun~clientSecret->fun~startUrl->fun()->{clientId;clientSecret;startUrl}letto_valuex=structure_to_value[("clientId",(Some(ClientId.to_valuex.clientId)));("clientSecret",(Some(ClientSecret.to_valuex.clientSecret)));("startUrl",(Some(URI.to_valuex.startUrl)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letstartUrl=URI.of_xml(Xml.child_exn~context:context_xml_arg0"startUrl")inletclientSecret=ClientSecret.of_xml(Xml.child_exn~context:context_xml_arg0"clientSecret")inletclientId=ClientId.of_xml(Xml.child_exn~context:context_xml_arg0"clientId")inmake~startUrl~clientSecret~clientId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letstartUrl=field_map_exnjson__"startUrl"URI.of_jsoninletclientSecret=field_map_exnjson__"clientSecret"ClientSecret.of_jsoninletclientId=field_map_exnjson__"clientId"ClientId.of_jsoninmake~startUrl~clientSecret~clientId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Initiates device authorization by requesting a pair of verification codes from the authorization service."]moduleRegisterClientResponse=structtypenonrect={clientId:ClientId.toption[@ocaml.doc"The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls."];clientSecret:ClientSecret.toption[@ocaml.doc"A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls."];clientIdIssuedAt:LongTimeStampType.toption[@ocaml.doc"Indicates the time at which the clientId and clientSecret were issued."];clientSecretExpiresAt:LongTimeStampType.toption[@ocaml.doc"Indicates the time at which the clientId and clientSecret will become invalid."];authorizationEndpoint:URI.toption[@ocaml.doc"An endpoint that the client can use to request authorization."];tokenEndpoint:URI.toption[@ocaml.doc"An endpoint that the client can use to create tokens."]}typenonrecerror=[`InternalServerExceptionofInternalServerException.t|`InvalidClientMetadataExceptionofInvalidClientMetadataException.t|`InvalidRedirectUriExceptionofInvalidRedirectUriException.t|`InvalidRequestExceptionofInvalidRequestException.t|`InvalidScopeExceptionofInvalidScopeException.t|`SlowDownExceptionofSlowDownException.t|`UnsupportedGrantTypeExceptionofUnsupportedGrantTypeException.t|`Unknown_operation_errorof(string*stringoption)]letmake?clientId=fun?clientSecret->fun?clientIdIssuedAt->fun?clientSecretExpiresAt->fun?authorizationEndpoint->fun?tokenEndpoint->fun()->{clientId;clientSecret;clientIdIssuedAt;clientSecretExpiresAt;authorizationEndpoint;tokenEndpoint}leterror_of_jsonnamejson=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"InvalidClientMetadataException"->`InvalidClientMetadataException(InvalidClientMetadataException.of_jsonjson)|"InvalidRedirectUriException"->`InvalidRedirectUriException(InvalidRedirectUriException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"InvalidScopeException"->`InvalidScopeException(InvalidScopeException.of_jsonjson)|"SlowDownException"->`SlowDownException(SlowDownException.of_jsonjson)|"UnsupportedGrantTypeException"->`UnsupportedGrantTypeException(UnsupportedGrantTypeException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"InvalidClientMetadataException"->`InvalidClientMetadataException(InvalidClientMetadataException.of_xmlxml)|"InvalidRedirectUriException"->`InvalidRedirectUriException(InvalidRedirectUriException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"InvalidScopeException"->`InvalidScopeException(InvalidScopeException.of_xmlxml)|"SlowDownException"->`SlowDownException(SlowDownException.of_xmlxml)|"UnsupportedGrantTypeException"->`UnsupportedGrantTypeException(UnsupportedGrantTypeException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`InvalidClientMetadataExceptione->`Assoc[("error",(`String"InvalidClientMetadataException"));("details",(InvalidClientMetadataException.to_jsone))]|`InvalidRedirectUriExceptione->`Assoc[("error",(`String"InvalidRedirectUriException"));("details",(InvalidRedirectUriException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`InvalidScopeExceptione->`Assoc[("error",(`String"InvalidScopeException"));("details",(InvalidScopeException.to_jsone))]|`SlowDownExceptione->`Assoc[("error",(`String"SlowDownException"));("details",(SlowDownException.to_jsone))]|`UnsupportedGrantTypeExceptione->`Assoc[("error",(`String"UnsupportedGrantTypeException"));("details",(UnsupportedGrantTypeException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("clientId",(Option.mapx.clientId~f:ClientId.to_value));("clientSecret",(Option.mapx.clientSecret~f:ClientSecret.to_value));("clientIdIssuedAt",(Option.mapx.clientIdIssuedAt~f:LongTimeStampType.to_value));("clientSecretExpiresAt",(Option.mapx.clientSecretExpiresAt~f:LongTimeStampType.to_value));("authorizationEndpoint",(Option.mapx.authorizationEndpoint~f:URI.to_value));("tokenEndpoint",(Option.mapx.tokenEndpoint~f:URI.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=lettokenEndpoint=(Option.map~f:URI.of_xml)(Xml.childxml_arg0"tokenEndpoint")inletauthorizationEndpoint=(Option.map~f:URI.of_xml)(Xml.childxml_arg0"authorizationEndpoint")inletclientSecretExpiresAt=(Option.map~f:LongTimeStampType.of_xml)(Xml.childxml_arg0"clientSecretExpiresAt")inletclientIdIssuedAt=(Option.map~f:LongTimeStampType.of_xml)(Xml.childxml_arg0"clientIdIssuedAt")inletclientSecret=(Option.map~f:ClientSecret.of_xml)(Xml.childxml_arg0"clientSecret")inletclientId=(Option.map~f:ClientId.of_xml)(Xml.childxml_arg0"clientId")inmake?tokenEndpoint?authorizationEndpoint?clientSecretExpiresAt?clientIdIssuedAt?clientSecret?clientId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=lettokenEndpoint=field_mapjson__"tokenEndpoint"URI.of_jsoninletauthorizationEndpoint=field_mapjson__"authorizationEndpoint"URI.of_jsoninletclientSecretExpiresAt=field_mapjson__"clientSecretExpiresAt"LongTimeStampType.of_jsoninletclientIdIssuedAt=field_mapjson__"clientIdIssuedAt"LongTimeStampType.of_jsoninletclientSecret=field_mapjson__"clientSecret"ClientSecret.of_jsoninletclientId=field_mapjson__"clientId"ClientId.of_jsoninmake?tokenEndpoint?authorizationEndpoint?clientSecretExpiresAt?clientIdIssuedAt?clientSecret?clientId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Registers a public\194\160client with IAM Identity Center. This allows clients to\194\160perform authorization using the\194\160authorization code\194\160grant\194\160with Proof Key for Code Exchange (PKCE) or\194\160the\194\160device code\194\160grant."]moduleRegisterClientRequest=structtypenonrect={clientName:ClientName.t[@ocaml.doc"The friendly name of the client."];clientType:ClientType.t[@ocaml.doc"The type of client. The service supports only public as a client type. Anything other than public will be rejected by the service."];scopes:Scopes.toption[@ocaml.doc"The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token."];redirectUris:RedirectUris.toption[@ocaml.doc"The list of redirect URI that are defined by the client. At completion of authorization, this list is used to restrict what locations the user agent can be redirected back to."];grantTypes:GrantTypes.toption[@ocaml.doc"The list of OAuth 2.0 grant types that are defined by the client. This list is used to restrict the token granting flows available to the client. Supports the following OAuth 2.0 grant types: Authorization Code, Device Code, and Refresh Token. * Authorization Code - authorization_code * Device Code - urn:ietf:params:oauth:grant-type:device_code * Refresh Token - refresh_token"];issuerUrl:URI.toption[@ocaml.doc"The IAM Identity Center Issuer URL associated with an instance of IAM Identity Center. This value is needed for user access to resources through the client."];entitledApplicationArn:ArnType.toption[@ocaml.doc"This IAM Identity Center application ARN is used to define administrator-managed configuration for public client access to resources. At authorization, the scopes, grants, and redirect URI available to this client will be restricted by this application resource."]}letcontext_="RegisterClientRequest"letmake?scopes=fun?redirectUris->fun?grantTypes->fun?issuerUrl->fun?entitledApplicationArn->fun~clientName->fun~clientType->fun()->{scopes;redirectUris;grantTypes;issuerUrl;entitledApplicationArn;clientName;clientType}letto_valuex=structure_to_value[("clientName",(Some(ClientName.to_valuex.clientName)));("clientType",(Some(ClientType.to_valuex.clientType)));("scopes",(Option.mapx.scopes~f:Scopes.to_value));("redirectUris",(Option.mapx.redirectUris~f:RedirectUris.to_value));("grantTypes",(Option.mapx.grantTypes~f:GrantTypes.to_value));("issuerUrl",(Option.mapx.issuerUrl~f:URI.to_value));("entitledApplicationArn",(Option.mapx.entitledApplicationArn~f:ArnType.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letentitledApplicationArn=(Option.map~f:ArnType.of_xml)(Xml.childxml_arg0"entitledApplicationArn")inletissuerUrl=(Option.map~f:URI.of_xml)(Xml.childxml_arg0"issuerUrl")inletgrantTypes=(Option.map~f:GrantTypes.of_xml)(Xml.childxml_arg0"grantTypes")inletredirectUris=(Option.map~f:RedirectUris.of_xml)(Xml.childxml_arg0"redirectUris")inletscopes=(Option.map~f:Scopes.of_xml)(Xml.childxml_arg0"scopes")inletclientType=ClientType.of_xml(Xml.child_exn~context:context_xml_arg0"clientType")inletclientName=ClientName.of_xml(Xml.child_exn~context:context_xml_arg0"clientName")inmake?entitledApplicationArn?issuerUrl?grantTypes?redirectUris?scopes~clientType~clientName()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letentitledApplicationArn=field_mapjson__"entitledApplicationArn"ArnType.of_jsoninletissuerUrl=field_mapjson__"issuerUrl"URI.of_jsoninletgrantTypes=field_mapjson__"grantTypes"GrantTypes.of_jsoninletredirectUris=field_mapjson__"redirectUris"RedirectUris.of_jsoninletscopes=field_mapjson__"scopes"Scopes.of_jsoninletclientType=field_map_exnjson__"clientType"ClientType.of_jsoninletclientName=field_map_exnjson__"clientName"ClientName.of_jsoninmake?entitledApplicationArn?issuerUrl?grantTypes?redirectUris?scopes~clientType~clientName()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Registers a public\194\160client with IAM Identity Center. This allows clients to\194\160perform authorization using the\194\160authorization code\194\160grant\194\160with Proof Key for Code Exchange (PKCE) or\194\160the\194\160device code\194\160grant."]moduleCreateTokenWithIAMResponse=structtypenonrect={accessToken:AccessToken.toption[@ocaml.doc"A bearer token to access Amazon Web Services accounts and applications assigned to a user."];tokenType:TokenType.toption[@ocaml.doc"Used to notify the requester that the returned token is an access token. The supported token type is Bearer."];expiresIn:ExpirationInSeconds.toption[@ocaml.doc"Indicates the time in seconds when an access token will expire."];refreshToken:RefreshToken.toption[@ocaml.doc"A token that, if present, can be used to refresh a previously issued access token that might have expired. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see Considerations for Using this Guide in the IAM Identity Center OIDC API Reference."];idToken:IdToken.toption[@ocaml.doc"A JSON Web Token (JWT) that identifies the user associated with the issued access token."];issuedTokenType:TokenTypeURI.toption[@ocaml.doc"Indicates the type of tokens that are issued by IAM Identity Center. The following values are supported: * Access Token - urn:ietf:params:oauth:token-type:access_token * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token"];scope:Scopes.toption[@ocaml.doc"The list of scopes for which authorization is granted. The access token that is issued is limited to the scopes that are granted."];awsAdditionalDetails:AwsAdditionalDetails.toption[@ocaml.doc"A structure containing information from IAM Identity Center managed user and group information."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`AuthorizationPendingExceptionofAuthorizationPendingException.t|`ExpiredTokenExceptionofExpiredTokenException.t|`InternalServerExceptionofInternalServerException.t|`InvalidClientExceptionofInvalidClientException.t|`InvalidGrantExceptionofInvalidGrantException.t|`InvalidRequestExceptionofInvalidRequestException.t|`InvalidRequestRegionExceptionofInvalidRequestRegionException.t|`InvalidScopeExceptionofInvalidScopeException.t|`SlowDownExceptionofSlowDownException.t|`UnauthorizedClientExceptionofUnauthorizedClientException.t|`UnsupportedGrantTypeExceptionofUnsupportedGrantTypeException.t|`Unknown_operation_errorof(string*stringoption)]letmake?accessToken=fun?tokenType->fun?expiresIn->fun?refreshToken->fun?idToken->fun?issuedTokenType->fun?scope->fun?awsAdditionalDetails->fun()->{accessToken;tokenType;expiresIn;refreshToken;idToken;issuedTokenType;scope;awsAdditionalDetails}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"AuthorizationPendingException"->`AuthorizationPendingException(AuthorizationPendingException.of_jsonjson)|"ExpiredTokenException"->`ExpiredTokenException(ExpiredTokenException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"InvalidClientException"->`InvalidClientException(InvalidClientException.of_jsonjson)|"InvalidGrantException"->`InvalidGrantException(InvalidGrantException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"InvalidRequestRegionException"->`InvalidRequestRegionException(InvalidRequestRegionException.of_jsonjson)|"InvalidScopeException"->`InvalidScopeException(InvalidScopeException.of_jsonjson)|"SlowDownException"->`SlowDownException(SlowDownException.of_jsonjson)|"UnauthorizedClientException"->`UnauthorizedClientException(UnauthorizedClientException.of_jsonjson)|"UnsupportedGrantTypeException"->`UnsupportedGrantTypeException(UnsupportedGrantTypeException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"AuthorizationPendingException"->`AuthorizationPendingException(AuthorizationPendingException.of_xmlxml)|"ExpiredTokenException"->`ExpiredTokenException(ExpiredTokenException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"InvalidClientException"->`InvalidClientException(InvalidClientException.of_xmlxml)|"InvalidGrantException"->`InvalidGrantException(InvalidGrantException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"InvalidRequestRegionException"->`InvalidRequestRegionException(InvalidRequestRegionException.of_xmlxml)|"InvalidScopeException"->`InvalidScopeException(InvalidScopeException.of_xmlxml)|"SlowDownException"->`SlowDownException(SlowDownException.of_xmlxml)|"UnauthorizedClientException"->`UnauthorizedClientException(UnauthorizedClientException.of_xmlxml)|"UnsupportedGrantTypeException"->`UnsupportedGrantTypeException(UnsupportedGrantTypeException.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))]|`AuthorizationPendingExceptione->`Assoc[("error",(`String"AuthorizationPendingException"));("details",(AuthorizationPendingException.to_jsone))]|`ExpiredTokenExceptione->`Assoc[("error",(`String"ExpiredTokenException"));("details",(ExpiredTokenException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`InvalidClientExceptione->`Assoc[("error",(`String"InvalidClientException"));("details",(InvalidClientException.to_jsone))]|`InvalidGrantExceptione->`Assoc[("error",(`String"InvalidGrantException"));("details",(InvalidGrantException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`InvalidRequestRegionExceptione->`Assoc[("error",(`String"InvalidRequestRegionException"));("details",(InvalidRequestRegionException.to_jsone))]|`InvalidScopeExceptione->`Assoc[("error",(`String"InvalidScopeException"));("details",(InvalidScopeException.to_jsone))]|`SlowDownExceptione->`Assoc[("error",(`String"SlowDownException"));("details",(SlowDownException.to_jsone))]|`UnauthorizedClientExceptione->`Assoc[("error",(`String"UnauthorizedClientException"));("details",(UnauthorizedClientException.to_jsone))]|`UnsupportedGrantTypeExceptione->`Assoc[("error",(`String"UnsupportedGrantTypeException"));("details",(UnsupportedGrantTypeException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("accessToken",(Option.mapx.accessToken~f:AccessToken.to_value));("tokenType",(Option.mapx.tokenType~f:TokenType.to_value));("expiresIn",(Option.mapx.expiresIn~f:ExpirationInSeconds.to_value));("refreshToken",(Option.mapx.refreshToken~f:RefreshToken.to_value));("idToken",(Option.mapx.idToken~f:IdToken.to_value));("issuedTokenType",(Option.mapx.issuedTokenType~f:TokenTypeURI.to_value));("scope",(Option.mapx.scope~f:Scopes.to_value));("awsAdditionalDetails",(Option.mapx.awsAdditionalDetails~f:AwsAdditionalDetails.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letawsAdditionalDetails=(Option.map~f:AwsAdditionalDetails.of_xml)(Xml.childxml_arg0"awsAdditionalDetails")inletscope=(Option.map~f:Scopes.of_xml)(Xml.childxml_arg0"scope")inletissuedTokenType=(Option.map~f:TokenTypeURI.of_xml)(Xml.childxml_arg0"issuedTokenType")inletidToken=(Option.map~f:IdToken.of_xml)(Xml.childxml_arg0"idToken")inletrefreshToken=(Option.map~f:RefreshToken.of_xml)(Xml.childxml_arg0"refreshToken")inletexpiresIn=(Option.map~f:ExpirationInSeconds.of_xml)(Xml.childxml_arg0"expiresIn")inlettokenType=(Option.map~f:TokenType.of_xml)(Xml.childxml_arg0"tokenType")inletaccessToken=(Option.map~f:AccessToken.of_xml)(Xml.childxml_arg0"accessToken")inmake?awsAdditionalDetails?scope?issuedTokenType?idToken?refreshToken?expiresIn?tokenType?accessToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letawsAdditionalDetails=field_mapjson__"awsAdditionalDetails"AwsAdditionalDetails.of_jsoninletscope=field_mapjson__"scope"Scopes.of_jsoninletissuedTokenType=field_mapjson__"issuedTokenType"TokenTypeURI.of_jsoninletidToken=field_mapjson__"idToken"IdToken.of_jsoninletrefreshToken=field_mapjson__"refreshToken"RefreshToken.of_jsoninletexpiresIn=field_mapjson__"expiresIn"ExpirationInSeconds.of_jsoninlettokenType=field_mapjson__"tokenType"TokenType.of_jsoninletaccessToken=field_mapjson__"accessToken"AccessToken.of_jsoninmake?awsAdditionalDetails?scope?issuedTokenType?idToken?refreshToken?expiresIn?tokenType?accessToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Creates and returns access and refresh tokens for authorized client applications that are authenticated using any IAM entity, such as a service role or user. These tokens might contain defined scopes that specify permissions such as read:profile or write:data. Through downscoping, you can use the scopes parameter to request tokens with reduced permissions compared to the original client application's permissions or, if applicable, the refresh token's scopes. The access token can be used to fetch short-lived credentials for the assigned Amazon Web Services accounts or to access application APIs using bearer authentication. This API is used with Signature Version 4. For more information, see Amazon Web Services Signature Version 4 for API Requests."]moduleCreateTokenWithIAMRequest=structtypenonrect={clientId:ClientId.t[@ocaml.doc"The unique identifier string for the client or application. This value is an application ARN that has OAuth grants configured."];grantType:GrantType.t[@ocaml.doc"Supports the following OAuth grant types: Authorization Code, Refresh Token, JWT Bearer, and Token Exchange. Specify one of the following values, depending on the grant type that you want: * Authorization Code - authorization_code * Refresh Token - refresh_token * JWT Bearer - urn:ietf:params:oauth:grant-type:jwt-bearer * Token Exchange - urn:ietf:params:oauth:grant-type:token-exchange"];code:AuthCode.toption[@ocaml.doc"Used only when calling this API for the Authorization Code grant type. This short-lived code is used to identify this authorization request. The code is obtained through a redirect from IAM Identity Center to a redirect URI persisted in the Authorization Code GrantOptions for the application."];refreshToken:RefreshToken.toption[@ocaml.doc"Used only when calling this API for the Refresh Token grant type. This token is used to refresh short-lived tokens, such as the access token, that might expire. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see Considerations for Using this Guide in the IAM Identity Center OIDC API Reference."];assertion:Assertion.toption[@ocaml.doc"Used only when calling this API for the JWT Bearer grant type. This value specifies the JSON Web Token (JWT) issued by a trusted token issuer. To authorize a trusted token issuer, configure the JWT Bearer GrantOptions for the application."];scope:Scopes.toption[@ocaml.doc"The list of scopes for which authorization is requested. The access token that is issued is limited to the scopes that are granted. If the value is not specified, IAM Identity Center authorizes all scopes configured for the application, including the following default scopes: openid, aws, sts:identity_context."];redirectUri:URI.toption[@ocaml.doc"Used only when calling this API for the Authorization Code grant type. This value specifies the location of the client or application that has registered to receive the authorization code."];subjectToken:SubjectToken.toption[@ocaml.doc"Used only when calling this API for the Token Exchange grant type. This value specifies the subject of the exchange. The value of the subject token must be an access token issued by IAM Identity Center to a different client or application. The access token must have authorized scopes that indicate the requested application as a target audience."];subjectTokenType:TokenTypeURI.toption[@ocaml.doc"Used only when calling this API for the Token Exchange grant type. This value specifies the type of token that is passed as the subject of the exchange. The following value is supported: * Access Token - urn:ietf:params:oauth:token-type:access_token"];requestedTokenType:TokenTypeURI.toption[@ocaml.doc"Used only when calling this API for the Token Exchange grant type. This value specifies the type of token that the requester can receive. The following values are supported: * Access Token - urn:ietf:params:oauth:token-type:access_token * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token"];codeVerifier:CodeVerifier.toption[@ocaml.doc"Used only when calling this API for the Authorization Code grant type. This value is generated by the client and presented to validate the original code challenge value the client passed at authorization time."]}letcontext_="CreateTokenWithIAMRequest"letmake?code=fun?refreshToken->fun?assertion->fun?scope->fun?redirectUri->fun?subjectToken->fun?subjectTokenType->fun?requestedTokenType->fun?codeVerifier->fun~clientId->fun~grantType->fun()->{code;refreshToken;assertion;scope;redirectUri;subjectToken;subjectTokenType;requestedTokenType;codeVerifier;clientId;grantType}letto_valuex=structure_to_value[("clientId",(Some(ClientId.to_valuex.clientId)));("grantType",(Some(GrantType.to_valuex.grantType)));("code",(Option.mapx.code~f:AuthCode.to_value));("refreshToken",(Option.mapx.refreshToken~f:RefreshToken.to_value));("assertion",(Option.mapx.assertion~f:Assertion.to_value));("scope",(Option.mapx.scope~f:Scopes.to_value));("redirectUri",(Option.mapx.redirectUri~f:URI.to_value));("subjectToken",(Option.mapx.subjectToken~f:SubjectToken.to_value));("subjectTokenType",(Option.mapx.subjectTokenType~f:TokenTypeURI.to_value));("requestedTokenType",(Option.mapx.requestedTokenType~f:TokenTypeURI.to_value));("codeVerifier",(Option.mapx.codeVerifier~f:CodeVerifier.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcodeVerifier=(Option.map~f:CodeVerifier.of_xml)(Xml.childxml_arg0"codeVerifier")inletrequestedTokenType=(Option.map~f:TokenTypeURI.of_xml)(Xml.childxml_arg0"requestedTokenType")inletsubjectTokenType=(Option.map~f:TokenTypeURI.of_xml)(Xml.childxml_arg0"subjectTokenType")inletsubjectToken=(Option.map~f:SubjectToken.of_xml)(Xml.childxml_arg0"subjectToken")inletredirectUri=(Option.map~f:URI.of_xml)(Xml.childxml_arg0"redirectUri")inletscope=(Option.map~f:Scopes.of_xml)(Xml.childxml_arg0"scope")inletassertion=(Option.map~f:Assertion.of_xml)(Xml.childxml_arg0"assertion")inletrefreshToken=(Option.map~f:RefreshToken.of_xml)(Xml.childxml_arg0"refreshToken")inletcode=(Option.map~f:AuthCode.of_xml)(Xml.childxml_arg0"code")inletgrantType=GrantType.of_xml(Xml.child_exn~context:context_xml_arg0"grantType")inletclientId=ClientId.of_xml(Xml.child_exn~context:context_xml_arg0"clientId")inmake?codeVerifier?requestedTokenType?subjectTokenType?subjectToken?redirectUri?scope?assertion?refreshToken?code~grantType~clientId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcodeVerifier=field_mapjson__"codeVerifier"CodeVerifier.of_jsoninletrequestedTokenType=field_mapjson__"requestedTokenType"TokenTypeURI.of_jsoninletsubjectTokenType=field_mapjson__"subjectTokenType"TokenTypeURI.of_jsoninletsubjectToken=field_mapjson__"subjectToken"SubjectToken.of_jsoninletredirectUri=field_mapjson__"redirectUri"URI.of_jsoninletscope=field_mapjson__"scope"Scopes.of_jsoninletassertion=field_mapjson__"assertion"Assertion.of_jsoninletrefreshToken=field_mapjson__"refreshToken"RefreshToken.of_jsoninletcode=field_mapjson__"code"AuthCode.of_jsoninletgrantType=field_map_exnjson__"grantType"GrantType.of_jsoninletclientId=field_map_exnjson__"clientId"ClientId.of_jsoninmake?codeVerifier?requestedTokenType?subjectTokenType?subjectToken?redirectUri?scope?assertion?refreshToken?code~grantType~clientId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Creates and returns access and refresh tokens for authorized client applications that are authenticated using any IAM entity, such as a service role or user. These tokens might contain defined scopes that specify permissions such as read:profile or write:data. Through downscoping, you can use the scopes parameter to request tokens with reduced permissions compared to the original client application's permissions or, if applicable, the refresh token's scopes. The access token can be used to fetch short-lived credentials for the assigned Amazon Web Services accounts or to access application APIs using bearer authentication. This API is used with Signature Version 4. For more information, see Amazon Web Services Signature Version 4 for API Requests."]moduleCreateTokenResponse=structtypenonrect={accessToken:AccessToken.toption[@ocaml.doc"A bearer token to access Amazon Web Services accounts and applications assigned to a user."];tokenType:TokenType.toption[@ocaml.doc"Used to notify the client that the returned token is an access token. The supported token type is Bearer."];expiresIn:ExpirationInSeconds.toption[@ocaml.doc"Indicates the time in seconds when an access token will expire."];refreshToken:RefreshToken.toption[@ocaml.doc"A token that, if present, can be used to refresh a previously issued access token that might have expired. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see Considerations for Using this Guide in the IAM Identity Center OIDC API Reference."];idToken:IdToken.toption[@ocaml.doc"The idToken is not implemented or supported. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see Considerations for Using this Guide in the IAM Identity Center OIDC API Reference. A JSON Web Token (JWT) that identifies who is associated with the issued access token."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`AuthorizationPendingExceptionofAuthorizationPendingException.t|`ExpiredTokenExceptionofExpiredTokenException.t|`InternalServerExceptionofInternalServerException.t|`InvalidClientExceptionofInvalidClientException.t|`InvalidGrantExceptionofInvalidGrantException.t|`InvalidRequestExceptionofInvalidRequestException.t|`InvalidScopeExceptionofInvalidScopeException.t|`SlowDownExceptionofSlowDownException.t|`UnauthorizedClientExceptionofUnauthorizedClientException.t|`UnsupportedGrantTypeExceptionofUnsupportedGrantTypeException.t|`Unknown_operation_errorof(string*stringoption)]letmake?accessToken=fun?tokenType->fun?expiresIn->fun?refreshToken->fun?idToken->fun()->{accessToken;tokenType;expiresIn;refreshToken;idToken}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"AuthorizationPendingException"->`AuthorizationPendingException(AuthorizationPendingException.of_jsonjson)|"ExpiredTokenException"->`ExpiredTokenException(ExpiredTokenException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"InvalidClientException"->`InvalidClientException(InvalidClientException.of_jsonjson)|"InvalidGrantException"->`InvalidGrantException(InvalidGrantException.of_jsonjson)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_jsonjson)|"InvalidScopeException"->`InvalidScopeException(InvalidScopeException.of_jsonjson)|"SlowDownException"->`SlowDownException(SlowDownException.of_jsonjson)|"UnauthorizedClientException"->`UnauthorizedClientException(UnauthorizedClientException.of_jsonjson)|"UnsupportedGrantTypeException"->`UnsupportedGrantTypeException(UnsupportedGrantTypeException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"AuthorizationPendingException"->`AuthorizationPendingException(AuthorizationPendingException.of_xmlxml)|"ExpiredTokenException"->`ExpiredTokenException(ExpiredTokenException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"InvalidClientException"->`InvalidClientException(InvalidClientException.of_xmlxml)|"InvalidGrantException"->`InvalidGrantException(InvalidGrantException.of_xmlxml)|"InvalidRequestException"->`InvalidRequestException(InvalidRequestException.of_xmlxml)|"InvalidScopeException"->`InvalidScopeException(InvalidScopeException.of_xmlxml)|"SlowDownException"->`SlowDownException(SlowDownException.of_xmlxml)|"UnauthorizedClientException"->`UnauthorizedClientException(UnauthorizedClientException.of_xmlxml)|"UnsupportedGrantTypeException"->`UnsupportedGrantTypeException(UnsupportedGrantTypeException.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))]|`AuthorizationPendingExceptione->`Assoc[("error",(`String"AuthorizationPendingException"));("details",(AuthorizationPendingException.to_jsone))]|`ExpiredTokenExceptione->`Assoc[("error",(`String"ExpiredTokenException"));("details",(ExpiredTokenException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`InvalidClientExceptione->`Assoc[("error",(`String"InvalidClientException"));("details",(InvalidClientException.to_jsone))]|`InvalidGrantExceptione->`Assoc[("error",(`String"InvalidGrantException"));("details",(InvalidGrantException.to_jsone))]|`InvalidRequestExceptione->`Assoc[("error",(`String"InvalidRequestException"));("details",(InvalidRequestException.to_jsone))]|`InvalidScopeExceptione->`Assoc[("error",(`String"InvalidScopeException"));("details",(InvalidScopeException.to_jsone))]|`SlowDownExceptione->`Assoc[("error",(`String"SlowDownException"));("details",(SlowDownException.to_jsone))]|`UnauthorizedClientExceptione->`Assoc[("error",(`String"UnauthorizedClientException"));("details",(UnauthorizedClientException.to_jsone))]|`UnsupportedGrantTypeExceptione->`Assoc[("error",(`String"UnsupportedGrantTypeException"));("details",(UnsupportedGrantTypeException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("accessToken",(Option.mapx.accessToken~f:AccessToken.to_value));("tokenType",(Option.mapx.tokenType~f:TokenType.to_value));("expiresIn",(Option.mapx.expiresIn~f:ExpirationInSeconds.to_value));("refreshToken",(Option.mapx.refreshToken~f:RefreshToken.to_value));("idToken",(Option.mapx.idToken~f:IdToken.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letidToken=(Option.map~f:IdToken.of_xml)(Xml.childxml_arg0"idToken")inletrefreshToken=(Option.map~f:RefreshToken.of_xml)(Xml.childxml_arg0"refreshToken")inletexpiresIn=(Option.map~f:ExpirationInSeconds.of_xml)(Xml.childxml_arg0"expiresIn")inlettokenType=(Option.map~f:TokenType.of_xml)(Xml.childxml_arg0"tokenType")inletaccessToken=(Option.map~f:AccessToken.of_xml)(Xml.childxml_arg0"accessToken")inmake?idToken?refreshToken?expiresIn?tokenType?accessToken()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letidToken=field_mapjson__"idToken"IdToken.of_jsoninletrefreshToken=field_mapjson__"refreshToken"RefreshToken.of_jsoninletexpiresIn=field_mapjson__"expiresIn"ExpirationInSeconds.of_jsoninlettokenType=field_mapjson__"tokenType"TokenType.of_jsoninletaccessToken=field_mapjson__"accessToken"AccessToken.of_jsoninmake?idToken?refreshToken?expiresIn?tokenType?accessToken()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Creates and returns access and refresh tokens for clients that are authenticated using client secrets. The access token can be used to fetch short-lived credentials for the assigned AWS accounts or to access application APIs using bearer authentication."]moduleCreateTokenRequest=structtypenonrect={clientId:ClientId.t[@ocaml.doc"The unique identifier string for the client or application. This value comes from the result of the RegisterClient API."];clientSecret:ClientSecret.t[@ocaml.doc"A secret string generated for the client. This value should come from the persisted result of the RegisterClient API."];grantType:GrantType.t[@ocaml.doc"Supports the following OAuth grant types: Authorization Code, Device Code, and Refresh Token. Specify one of the following values, depending on the grant type that you want: * Authorization Code - authorization_code * Device Code - urn:ietf:params:oauth:grant-type:device_code * Refresh Token - refresh_token"];deviceCode:DeviceCode.toption[@ocaml.doc"Used only when calling this API for the Device Code grant type. This short-lived code is used to identify this authorization request. This comes from the result of the StartDeviceAuthorization API."];code:AuthCode.toption[@ocaml.doc"Used only when calling this API for the Authorization Code grant type. The short-lived code is used to identify this authorization request."];refreshToken:RefreshToken.toption[@ocaml.doc"Used only when calling this API for the Refresh Token grant type. This token is used to refresh short-lived tokens, such as the access token, that might expire. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see Considerations for Using this Guide in the IAM Identity Center OIDC API Reference."];scope:Scopes.toption[@ocaml.doc"The list of scopes for which authorization is requested. This parameter has no effect; the access token will always include all scopes configured during client registration."];redirectUri:URI.toption[@ocaml.doc"Used only when calling this API for the Authorization Code grant type. This value specifies the location of the client or application that has registered to receive the authorization code."];codeVerifier:CodeVerifier.toption[@ocaml.doc"Used only when calling this API for the Authorization Code grant type. This value is generated by the client and presented to validate the original code challenge value the client passed at authorization time."]}letcontext_="CreateTokenRequest"letmake?deviceCode=fun?code->fun?refreshToken->fun?scope->fun?redirectUri->fun?codeVerifier->fun~clientId->fun~clientSecret->fun~grantType->fun()->{deviceCode;code;refreshToken;scope;redirectUri;codeVerifier;clientId;clientSecret;grantType}letto_valuex=structure_to_value[("clientId",(Some(ClientId.to_valuex.clientId)));("clientSecret",(Some(ClientSecret.to_valuex.clientSecret)));("grantType",(Some(GrantType.to_valuex.grantType)));("deviceCode",(Option.mapx.deviceCode~f:DeviceCode.to_value));("code",(Option.mapx.code~f:AuthCode.to_value));("refreshToken",(Option.mapx.refreshToken~f:RefreshToken.to_value));("scope",(Option.mapx.scope~f:Scopes.to_value));("redirectUri",(Option.mapx.redirectUri~f:URI.to_value));("codeVerifier",(Option.mapx.codeVerifier~f:CodeVerifier.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letcodeVerifier=(Option.map~f:CodeVerifier.of_xml)(Xml.childxml_arg0"codeVerifier")inletredirectUri=(Option.map~f:URI.of_xml)(Xml.childxml_arg0"redirectUri")inletscope=(Option.map~f:Scopes.of_xml)(Xml.childxml_arg0"scope")inletrefreshToken=(Option.map~f:RefreshToken.of_xml)(Xml.childxml_arg0"refreshToken")inletcode=(Option.map~f:AuthCode.of_xml)(Xml.childxml_arg0"code")inletdeviceCode=(Option.map~f:DeviceCode.of_xml)(Xml.childxml_arg0"deviceCode")inletgrantType=GrantType.of_xml(Xml.child_exn~context:context_xml_arg0"grantType")inletclientSecret=ClientSecret.of_xml(Xml.child_exn~context:context_xml_arg0"clientSecret")inletclientId=ClientId.of_xml(Xml.child_exn~context:context_xml_arg0"clientId")inmake?codeVerifier?redirectUri?scope?refreshToken?code?deviceCode~grantType~clientSecret~clientId()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letcodeVerifier=field_mapjson__"codeVerifier"CodeVerifier.of_jsoninletredirectUri=field_mapjson__"redirectUri"URI.of_jsoninletscope=field_mapjson__"scope"Scopes.of_jsoninletrefreshToken=field_mapjson__"refreshToken"RefreshToken.of_jsoninletcode=field_mapjson__"code"AuthCode.of_jsoninletdeviceCode=field_mapjson__"deviceCode"DeviceCode.of_jsoninletgrantType=field_map_exnjson__"grantType"GrantType.of_jsoninletclientSecret=field_map_exnjson__"clientSecret"ClientSecret.of_jsoninletclientId=field_map_exnjson__"clientId"ClientId.of_jsoninmake?codeVerifier?redirectUri?scope?refreshToken?code?deviceCode~grantType~clientSecret~clientId()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Creates and returns access and refresh tokens for clients that are authenticated using client secrets. The access token can be used to fetch short-lived credentials for the assigned AWS accounts or to access application APIs using bearer authentication."]