1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087(* 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.sustainabilityletapiVersion="2018-05-10"letendpointPrefix="sustainability"letserviceFullName="AWS Sustainability"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[]))])moduleDouble=structtypenonrect=floatletmakei=iletof_string=Float.of_stringletto_valuex=`Doublexletto_queryv=to_queryto_valuevletto_headerx=Stdlib.Float.to_stringxletof_xmlxml_arg0=Float.of_string(string_of_xml~kind:"a double"xml_arg0)letof_jsonj=float_of_json~kind:"a double"jletto_json=simple_to_jsonto_valueendmoduleEmissionsUnit=structtypenonrect=|MTCO2e|Non_static_idofstringletmakei=iletto_string=function|MTCO2e->"MTCO2e"|Non_static_ids->sletof_string=function|"MTCO2e"->MTCO2e|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 EmissionsUnit"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"EmissionsUnit"j)letto_json=simple_to_jsonto_valueendmoduleDimension=structtypenonrect=|USAGE_ACCOUNT_ID|REGION|SERVICE|Non_static_idofstringletmakei=iletto_string=function|USAGE_ACCOUNT_ID->"USAGE_ACCOUNT_ID"|REGION->"REGION"|SERVICE->"SERVICE"|Non_static_ids->sletof_string=function|"USAGE_ACCOUNT_ID"->USAGE_ACCOUNT_ID|"REGION"->REGION|"SERVICE"->SERVICE|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 Dimension"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"Dimension"j)letto_json=simple_to_jsonto_valueendmoduleString_=structtypenonrect=stringletcontext_="String"letmakei=iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"String"jletto_json=simple_to_jsonto_valueendmoduleEmissions=structtypenonrect={value:Double.toption[@ocaml.doc"The numeric value of the emissions quantity."];unit:EmissionsUnit.toption[@ocaml.doc"The unit of measurement for the emissions value."]}letmake?value=fun?unit->fun()->{value;unit}letto_valuex=structure_to_value[("Value",(Option.mapx.value~f:Double.to_value));("Unit",(Option.mapx.unit~f:EmissionsUnit.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letunit=(Option.map~f:EmissionsUnit.of_xml)(Xml.childxml_arg0"Unit")inletvalue=(Option.map~f:Double.of_xml)(Xml.childxml_arg0"Value")inmake?unit?value()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letunit=field_mapjson__"Unit"EmissionsUnit.of_jsoninletvalue=field_mapjson__"Value"Double.of_jsoninmake?unit?value()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Represents a carbon emissions quantity with its value and unit of measurement."]moduleEmissionsType=structtypenonrect=|TOTAL_LBM_CARBON_EMISSIONS|TOTAL_MBM_CARBON_EMISSIONS|TOTAL_SCOPE_1_CARBON_EMISSIONS|TOTAL_SCOPE_2_LBM_CARBON_EMISSIONS|TOTAL_SCOPE_2_MBM_CARBON_EMISSIONS|TOTAL_SCOPE_3_LBM_CARBON_EMISSIONS|TOTAL_SCOPE_3_MBM_CARBON_EMISSIONS|Non_static_idofstringletmakei=iletto_string=function|TOTAL_LBM_CARBON_EMISSIONS->"TOTAL_LBM_CARBON_EMISSIONS"|TOTAL_MBM_CARBON_EMISSIONS->"TOTAL_MBM_CARBON_EMISSIONS"|TOTAL_SCOPE_1_CARBON_EMISSIONS->"TOTAL_SCOPE_1_CARBON_EMISSIONS"|TOTAL_SCOPE_2_LBM_CARBON_EMISSIONS->"TOTAL_SCOPE_2_LBM_CARBON_EMISSIONS"|TOTAL_SCOPE_2_MBM_CARBON_EMISSIONS->"TOTAL_SCOPE_2_MBM_CARBON_EMISSIONS"|TOTAL_SCOPE_3_LBM_CARBON_EMISSIONS->"TOTAL_SCOPE_3_LBM_CARBON_EMISSIONS"|TOTAL_SCOPE_3_MBM_CARBON_EMISSIONS->"TOTAL_SCOPE_3_MBM_CARBON_EMISSIONS"|Non_static_ids->sletof_string=function|"TOTAL_LBM_CARBON_EMISSIONS"->TOTAL_LBM_CARBON_EMISSIONS|"TOTAL_MBM_CARBON_EMISSIONS"->TOTAL_MBM_CARBON_EMISSIONS|"TOTAL_SCOPE_1_CARBON_EMISSIONS"->TOTAL_SCOPE_1_CARBON_EMISSIONS|"TOTAL_SCOPE_2_LBM_CARBON_EMISSIONS"->TOTAL_SCOPE_2_LBM_CARBON_EMISSIONS|"TOTAL_SCOPE_2_MBM_CARBON_EMISSIONS"->TOTAL_SCOPE_2_MBM_CARBON_EMISSIONS|"TOTAL_SCOPE_3_LBM_CARBON_EMISSIONS"->TOTAL_SCOPE_3_LBM_CARBON_EMISSIONS|"TOTAL_SCOPE_3_MBM_CARBON_EMISSIONS"->TOTAL_SCOPE_3_MBM_CARBON_EMISSIONS|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 EmissionsType"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"EmissionsType"j)letto_json=simple_to_jsonto_valueendmoduleTimestamp=structtypenonrect=stringletmakei=iletof_stringx=xletto_valuex=`Timestampxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=string_of_xml~kind:"a timestamp"letof_json=timestamp_of_jsonletto_json=simple_to_jsonto_valueendmoduleDimensionsMap=structtypenonrect=(Dimension.t*String_.t)listletmakei=iletof_headerxs=make(List.filter_mapxs~f:(fun(k,v)->(Base.String.chop_prefixk~prefix:"x-amz-meta-")|>(Option.map~f:(funchopped->((Dimension.of_stringchopped),(String_.of_stringv))))))letto_valuexs=(xs|>(List.map~f:(fun(x,y)->(Dimension.to_valuex)|>(funx->(String_.to_valuey)|>(funy->(x,y))))))|>(funx->`Mapx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for Map_shape objects"()letof_xml_=failwith"of_xml_converter_of_shape: Map_shape case not implemented"letof_jsonj=object_of_json~key_of_string:Dimension.of_string~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleEmissionsMap=structtypenonrect=(EmissionsType.t*Emissions.t)listletmakei=iletof_headerxs=make(List.filter_mapxs~f:(fun(k,v)->(Base.String.chop_prefixk~prefix:"x-amz-meta-")|>(Option.map~f:(funchopped->let(_:string)=vinlet(_:string)=choppedinfailwith"no of_header for complex types EmissionsType Emissions"))))letto_valuexs=(xs|>(List.map~f:(fun(x,y)->(EmissionsType.to_valuex)|>(funx->(Emissions.to_valuey)|>(funy->(x,y))))))|>(funx->`Mapx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for Map_shape objects"()letof_xml_=failwith"of_xml_converter_of_shape: Map_shape case not implemented"letof_jsonj=object_of_json~key_of_string:EmissionsType.of_string~of_json:Emissions.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleModelVersion=structtypenonrect=stringletcontext_="ModelVersion"letmakei=letopenResultinok_or_failwith(check_patterni~pattern:"v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[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:"ModelVersion"jletto_json=simple_to_jsonto_valueendmoduleTimePeriod=structtypenonrect={start:Timestamp.t[@ocaml.doc"The start (inclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ"];end_:Timestamp.t[@ocaml.doc"The end (exclusive) of the time period. ISO-8601 formatted timestamp, for example: YYYY-MM-DDThh:mm:ss.sssZ"]}letcontext_="TimePeriod"letmake~start=fun~end_->fun()->{start;end_}letto_valuex=structure_to_value[("Start",(Some(Timestamp.to_valuex.start)));("End",(Some(Timestamp.to_valuex.end_)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letend_=Timestamp.of_xml(Xml.child_exn~context:context_xml_arg0"End")inletstart=Timestamp.of_xml(Xml.child_exn~context:context_xml_arg0"Start")inmake~end_~start()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letend_=field_map_exnjson__"End"Timestamp.of_jsoninletstart=field_map_exnjson__"Start"Timestamp.of_jsoninmake~end_~start()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Represents a duration of time defined by start and end timestamps."]moduleDimensionValueList=structtypenonrect=String_.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:String_.to_value))|>(funx->`Listx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for List_shape objects"()letof_xmlx=make(List.map((Xml.all_childrenx)|>(List.filter~f:(function|`Datas->(matchStdlib.String.trimswith|""->false|_->true)|_->true)))~f:String_.of_xml)letof_jsonj=list_of_json~kind:"DimensionValueList"~of_json:String_.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleEstimatedCarbonEmissions=structtypenonrect={timePeriod:TimePeriod.toption[@ocaml.doc"The reporting period for emission values."];dimensionsValues:DimensionsMap.toption[@ocaml.doc"The dimensions used to group emissions values."];modelVersion:ModelVersion.toption[@ocaml.doc"The semantic version-formatted string that indicates the methodology version used to calculate the emission values. The AWS Sustainability service reflects the most recent model version for every month. You will not see two entries for the same month with different ModelVersion values. To track the evolution of the methodology and compare emission values from previous versions, we recommend creating a Data Export."];emissionsValues:EmissionsMap.toption[@ocaml.doc"The emissions values for the requested emissions types."]}letmake?timePeriod=fun?dimensionsValues->fun?modelVersion->fun?emissionsValues->fun()->{timePeriod;dimensionsValues;modelVersion;emissionsValues}letto_valuex=structure_to_value[("TimePeriod",(Option.mapx.timePeriod~f:TimePeriod.to_value));("DimensionsValues",(Option.mapx.dimensionsValues~f:DimensionsMap.to_value));("ModelVersion",(Option.mapx.modelVersion~f:ModelVersion.to_value));("EmissionsValues",(Option.mapx.emissionsValues~f:EmissionsMap.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letemissionsValues=(Option.map~f:EmissionsMap.of_xml)(Xml.childxml_arg0"EmissionsValues")inletmodelVersion=(Option.map~f:ModelVersion.of_xml)(Xml.childxml_arg0"ModelVersion")inletdimensionsValues=(Option.map~f:DimensionsMap.of_xml)(Xml.childxml_arg0"DimensionsValues")inlettimePeriod=(Option.map~f:TimePeriod.of_xml)(Xml.childxml_arg0"TimePeriod")inmake?emissionsValues?modelVersion?dimensionsValues?timePeriod()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letemissionsValues=field_mapjson__"EmissionsValues"EmissionsMap.of_jsoninletmodelVersion=field_mapjson__"ModelVersion"ModelVersion.of_jsoninletdimensionsValues=field_mapjson__"DimensionsValues"DimensionsMap.of_jsoninlettimePeriod=field_mapjson__"TimePeriod"TimePeriod.of_jsoninmake?emissionsValues?modelVersion?dimensionsValues?timePeriod()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Contains estimated carbon emissions data for a specific time period and dimension grouping."]moduleDimensionListMap=structtypenonrect=(Dimension.t*DimensionValueList.t)listletmakei=iletof_headerxs=make(List.filter_mapxs~f:(fun(k,v)->(Base.String.chop_prefixk~prefix:"x-amz-meta-")|>(Option.map~f:(funchopped->let(_:string)=vinlet(_:string)=choppedinfailwith"no of_header for complex types Dimension DimensionValueList"))))letto_valuexs=(xs|>(List.map~f:(fun(x,y)->(Dimension.to_valuex)|>(funx->(DimensionValueList.to_valuey)|>(funy->(x,y))))))|>(funx->`Mapx)letto_queryv=to_queryto_valuevletto_header_=failwithf"to_header is not implemented for Map_shape objects"()letof_xml_=failwith"of_xml_converter_of_shape: Map_shape case not implemented"letof_jsonj=object_of_json~key_of_string:Dimension.of_string~of_json:DimensionValueList.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleMonth=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:12)>>=(fun()->check_int_mini~min:1));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for Month"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleDimensionEntry=structtypenonrect={dimension:Dimension.toption[@ocaml.doc"The dimension type that categorizes this entry."];value:String_.toption[@ocaml.doc"The value for the specified dimension. Valid values vary based on the dimension type (e.g., us-east-1 for the REGION dimension, AmazonEC2 for the SERVICE dimension)."]}letmake?dimension=fun?value->fun()->{dimension;value}letto_valuex=structure_to_value[("Dimension",(Option.mapx.dimension~f:Dimension.to_value));("Value",(Option.mapx.value~f:String_.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvalue=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"Value")inletdimension=(Option.map~f:Dimension.of_xml)(Xml.childxml_arg0"Dimension")inmake?value?dimension()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvalue=field_mapjson__"Value"String_.of_jsoninletdimension=field_mapjson__"Dimension"Dimension.of_jsoninmake?value?dimension()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Represents a dimension and its corresponding value."]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."]moduleEstimatedCarbonEmissionsList=structtypenonrect=EstimatedCarbonEmissions.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:EstimatedCarbonEmissions.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:EstimatedCarbonEmissions.of_xml)letof_jsonj=list_of_json~kind:"EstimatedCarbonEmissionsList"~of_json:EstimatedCarbonEmissions.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleInternalServerException=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."]moduleNextToken=structtypenonrect=stringletcontext_="NextToken"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:2000)>>=(fun()->check_string_mini~min:1));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"NextToken"jletto_json=simple_to_jsonto_valueendmoduleThrottlingException=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}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 input fails to satisfy the constraints specified by an Amazon Web Services service."]moduleDimensionList=structtypenonrect=Dimension.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:Dimension.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:Dimension.of_xml)letof_jsonj=list_of_json~kind:"DimensionList"~of_json:Dimension.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleEmissionsTypeList=structtypenonrect=EmissionsType.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:EmissionsType.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:EmissionsType.of_xml)letof_jsonj=list_of_json~kind:"EmissionsTypeList"~of_json:EmissionsType.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleFilterExpression=structtypenonrect={dimensions:DimensionListMap.toption[@ocaml.doc"Filters emission values by specific dimension values."]}letmake?dimensions=fun()->{dimensions}letto_valuex=structure_to_value[("Dimensions",(Option.mapx.dimensions~f:DimensionListMap.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letdimensions=(Option.map~f:DimensionListMap.of_xml)(Xml.childxml_arg0"Dimensions")inmake?dimensions()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letdimensions=field_mapjson__"Dimensions"DimensionListMap.of_jsoninmake?dimensions()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Filters emission values by specific dimension values."]moduleGranularityConfiguration=structtypenonrect={fiscalYearStartMonth:Month.toption[@ocaml.doc"The month (1-12) when the fiscal year begins. Used for YEARLY_FISCAL and QUARTERLY_FISCAL granularity. Defaults to 1 (January)."]}letmake?fiscalYearStartMonth=fun()->{fiscalYearStartMonth}letto_valuex=structure_to_value[("FiscalYearStartMonth",(Option.mapx.fiscalYearStartMonth~f:Month.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letfiscalYearStartMonth=(Option.map~f:Month.of_xml)(Xml.childxml_arg0"FiscalYearStartMonth")inmake?fiscalYearStartMonth()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letfiscalYearStartMonth=field_mapjson__"FiscalYearStartMonth"Month.of_jsoninmake?fiscalYearStartMonth()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Contains configuration for the fiscal year granularities (e.g., YEARLY_FISCAL, QUARTERLY_FISCAL."]moduleMaxResults=structtypenonrect=intletmakei=letopenResultinok_or_failwith((check_int_maxi~max:5000)>>=(fun()->check_int_mini~min:1));iletof_string=Int.of_stringletto_valuex=`Integerxletto_queryv=to_queryto_valuevletto_headerx=Int.to_stringxletof_xmlxml_arg0=Int.of_string(string_of_xml~kind:"an integer for MaxResults"xml_arg0)letof_jsonj=Int.of_float(float_of_json~kind:"an integer"j)letto_json=simple_to_jsonto_valueendmoduleTimeGranularity=structtypenonrect=|YEARLY_CALENDAR|YEARLY_FISCAL|QUARTERLY_CALENDAR|QUARTERLY_FISCAL|MONTHLY|Non_static_idofstringletmakei=iletto_string=function|YEARLY_CALENDAR->"YEARLY_CALENDAR"|YEARLY_FISCAL->"YEARLY_FISCAL"|QUARTERLY_CALENDAR->"QUARTERLY_CALENDAR"|QUARTERLY_FISCAL->"QUARTERLY_FISCAL"|MONTHLY->"MONTHLY"|Non_static_ids->sletof_string=function|"YEARLY_CALENDAR"->YEARLY_CALENDAR|"YEARLY_FISCAL"->YEARLY_FISCAL|"QUARTERLY_CALENDAR"->QUARTERLY_CALENDAR|"QUARTERLY_FISCAL"->QUARTERLY_FISCAL|"MONTHLY"->MONTHLY|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 TimeGranularity"xml_arg0)letof_jsonj=of_string(string_of_json~kind:"TimeGranularity"j)letto_json=simple_to_jsonto_valueendmoduleDimensionEntryList=structtypenonrect=DimensionEntry.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:DimensionEntry.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:DimensionEntry.of_xml)letof_jsonj=list_of_json~kind:"DimensionEntryList"~of_json:DimensionEntry.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleGetEstimatedCarbonEmissionsResponse=structtypenonrect={results:EstimatedCarbonEmissionsList.toption[@ocaml.doc"The result of the requested inputs."];nextToken:NextToken.toption[@ocaml.doc"The pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?results=fun?nextToken->fun()->{results;nextToken}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Results",(Option.mapx.results~f:EstimatedCarbonEmissionsList.to_value));("NextToken",(Option.mapx.nextToken~f:NextToken.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"NextToken")inletresults=(Option.map~f:EstimatedCarbonEmissionsList.of_xml)(Xml.childxml_arg0"Results")inmake?nextToken?results()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"NextToken.of_jsoninletresults=field_mapjson__"Results"EstimatedCarbonEmissionsList.of_jsoninmake?nextToken?results()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns estimated carbon emission values based on customer grouping and filtering parameters. We recommend using pagination to ensure that the operation returns quickly and successfully."]moduleGetEstimatedCarbonEmissionsRequest=structtypenonrect={timePeriod:TimePeriod.t[@ocaml.doc"The date range for fetching estimated carbon emissions."];groupBy:DimensionList.toption[@ocaml.doc"The dimensions available for grouping estimated carbon emissions."];filterBy:FilterExpression.toption[@ocaml.doc"The criteria for filtering estimated carbon emissions."];emissionsTypes:EmissionsTypeList.toption[@ocaml.doc"The emission types to include in the results. If absent, returns TOTAL_LBM_CARBON_EMISSIONS and TOTAL_MBM_CARBON_EMISSIONS emissions types."];granularity:TimeGranularity.toption[@ocaml.doc"The time granularity for the results. If absent, uses MONTHLY time granularity."];granularityConfiguration:GranularityConfiguration.toption[@ocaml.doc"Configuration for fiscal year calculations when using YEARLY_FISCAL or QUARTERLY_FISCAL granularity."];maxResults:MaxResults.toption[@ocaml.doc"The maximum number of results to return in a single call. Default is 40."];nextToken:NextToken.toption[@ocaml.doc"The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page."]}letcontext_="GetEstimatedCarbonEmissionsRequest"letmake?groupBy=fun?filterBy->fun?emissionsTypes->fun?granularity->fun?granularityConfiguration->fun?maxResults->fun?nextToken->fun~timePeriod->fun()->{groupBy;filterBy;emissionsTypes;granularity;granularityConfiguration;maxResults;nextToken;timePeriod}letto_valuex=structure_to_value[("TimePeriod",(Some(TimePeriod.to_valuex.timePeriod)));("GroupBy",(Option.mapx.groupBy~f:DimensionList.to_value));("FilterBy",(Option.mapx.filterBy~f:FilterExpression.to_value));("EmissionsTypes",(Option.mapx.emissionsTypes~f:EmissionsTypeList.to_value));("Granularity",(Option.mapx.granularity~f:TimeGranularity.to_value));("GranularityConfiguration",(Option.mapx.granularityConfiguration~f:GranularityConfiguration.to_value));("MaxResults",(Option.mapx.maxResults~f:MaxResults.to_value));("NextToken",(Option.mapx.nextToken~f:NextToken.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"NextToken")inletmaxResults=(Option.map~f:MaxResults.of_xml)(Xml.childxml_arg0"MaxResults")inletgranularityConfiguration=(Option.map~f:GranularityConfiguration.of_xml)(Xml.childxml_arg0"GranularityConfiguration")inletgranularity=(Option.map~f:TimeGranularity.of_xml)(Xml.childxml_arg0"Granularity")inletemissionsTypes=(Option.map~f:EmissionsTypeList.of_xml)(Xml.childxml_arg0"EmissionsTypes")inletfilterBy=(Option.map~f:FilterExpression.of_xml)(Xml.childxml_arg0"FilterBy")inletgroupBy=(Option.map~f:DimensionList.of_xml)(Xml.childxml_arg0"GroupBy")inlettimePeriod=TimePeriod.of_xml(Xml.child_exn~context:context_xml_arg0"TimePeriod")inmake?nextToken?maxResults?granularityConfiguration?granularity?emissionsTypes?filterBy?groupBy~timePeriod()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"NextToken.of_jsoninletmaxResults=field_mapjson__"MaxResults"MaxResults.of_jsoninletgranularityConfiguration=field_mapjson__"GranularityConfiguration"GranularityConfiguration.of_jsoninletgranularity=field_mapjson__"Granularity"TimeGranularity.of_jsoninletemissionsTypes=field_mapjson__"EmissionsTypes"EmissionsTypeList.of_jsoninletfilterBy=field_mapjson__"FilterBy"FilterExpression.of_jsoninletgroupBy=field_mapjson__"GroupBy"DimensionList.of_jsoninlettimePeriod=field_map_exnjson__"TimePeriod"TimePeriod.of_jsoninmake?nextToken?maxResults?granularityConfiguration?granularity?emissionsTypes?filterBy?groupBy~timePeriod()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns estimated carbon emission values based on customer grouping and filtering parameters. We recommend using pagination to ensure that the operation returns quickly and successfully."]moduleGetEstimatedCarbonEmissionsDimensionValuesResponse=structtypenonrect={results:DimensionEntryList.toption[@ocaml.doc"The list of possible dimensions over which the emissions data is aggregated."];nextToken:NextToken.toption[@ocaml.doc"The pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`InternalServerExceptionofInternalServerException.t|`ThrottlingExceptionofThrottlingException.t|`ValidationExceptionofValidationException.t|`Unknown_operation_errorof(string*stringoption)]letmake?results=fun?nextToken->fun()->{results;nextToken}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_jsonjson)|"ValidationException"->`ValidationException(ValidationException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"ThrottlingException"->`ThrottlingException(ThrottlingException.of_xmlxml)|"ValidationException"->`ValidationException(ValidationException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`AccessDeniedExceptione->`Assoc[("error",(`String"AccessDeniedException"));("details",(AccessDeniedException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`ThrottlingExceptione->`Assoc[("error",(`String"ThrottlingException"));("details",(ThrottlingException.to_jsone))]|`ValidationExceptione->`Assoc[("error",(`String"ValidationException"));("details",(ValidationException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Results",(Option.mapx.results~f:DimensionEntryList.to_value));("NextToken",(Option.mapx.nextToken~f:NextToken.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"NextToken")inletresults=(Option.map~f:DimensionEntryList.of_xml)(Xml.childxml_arg0"Results")inmake?nextToken?results()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"NextToken.of_jsoninletresults=field_mapjson__"Results"DimensionEntryList.of_jsoninmake?nextToken?results()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns the possible dimension values available for a customer's account. We recommend using pagination to ensure that the operation returns quickly and successfully."]moduleGetEstimatedCarbonEmissionsDimensionValuesRequest=structtypenonrect={timePeriod:TimePeriod.t[@ocaml.doc"The date range for fetching the dimension values."];dimensions:DimensionList.t[@ocaml.doc"The dimensions available for grouping estimated carbon emissions."];maxResults:MaxResults.toption[@ocaml.doc"The maximum number of results to return in a single call. Default is 40."];nextToken:NextToken.toption[@ocaml.doc"The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page."]}letcontext_="GetEstimatedCarbonEmissionsDimensionValuesRequest"letmake?maxResults=fun?nextToken->fun~timePeriod->fun~dimensions->fun()->{maxResults;nextToken;timePeriod;dimensions}letto_valuex=structure_to_value[("TimePeriod",(Some(TimePeriod.to_valuex.timePeriod)));("Dimensions",(Some(DimensionList.to_valuex.dimensions)));("MaxResults",(Option.mapx.maxResults~f:MaxResults.to_value));("NextToken",(Option.mapx.nextToken~f:NextToken.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letnextToken=(Option.map~f:NextToken.of_xml)(Xml.childxml_arg0"NextToken")inletmaxResults=(Option.map~f:MaxResults.of_xml)(Xml.childxml_arg0"MaxResults")inletdimensions=DimensionList.of_xml(Xml.child_exn~context:context_xml_arg0"Dimensions")inlettimePeriod=TimePeriod.of_xml(Xml.child_exn~context:context_xml_arg0"TimePeriod")inmake?nextToken?maxResults~dimensions~timePeriod()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"NextToken.of_jsoninletmaxResults=field_mapjson__"MaxResults"MaxResults.of_jsoninletdimensions=field_map_exnjson__"Dimensions"DimensionList.of_jsoninlettimePeriod=field_map_exnjson__"TimePeriod"TimePeriod.of_jsoninmake?nextToken?maxResults~dimensions~timePeriod()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Returns the possible dimension values available for a customer's account. We recommend using pagination to ensure that the operation returns quickly and successfully."]