123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702(* 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.forecastqueryletapiVersion="2018-06-26"letendpointPrefix="forecastquery"letserviceFullName="Amazon Forecast Query Service"letsignatureVersion="v4"letprotocol="json"letglobalEndpoint=endpointPrefix^".amazonaws.com"lettargetPrefix="AmazonForecastRuntime"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_valueendmoduleTimestamp=structtypenonrect=stringletcontext_="Timestamp"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:"Timestamp"jletto_json=simple_to_jsonto_valueendmoduleDataPoint=structtypenonrect={timestamp:Timestamp.toption[@ocaml.doc"The timestamp of the specific forecast."];value:Double.toption[@ocaml.doc"The forecast value."]}letmake?timestamp=fun?value->fun()->{timestamp;value}letto_valuex=structure_to_value[("Timestamp",(Option.mapx.timestamp~f:Timestamp.to_value));("Value",(Option.mapx.value~f:Double.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letvalue=(Option.map~f:Double.of_xml)(Xml.childxml_arg0"Value")inlettimestamp=(Option.map~f:Timestamp.of_xml)(Xml.childxml_arg0"Timestamp")inmake?value?timestamp()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letvalue=field_mapjson__"Value"Double.of_jsoninlettimestamp=field_mapjson__"Timestamp"Timestamp.of_jsoninmake?value?timestamp()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The forecast value for a specific date. Part of the Forecast object."]moduleStatistic=structtypenonrect=stringletcontext_="Statistic"letmakei=letopenResultinok_or_failwith(check_string_maxi~max:4);iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"Statistic"jletto_json=simple_to_jsonto_valueendmoduleTimeSeries=structtypenonrect=DataPoint.tlistletmakei=iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:DataPoint.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:DataPoint.of_xml)letof_jsonj=list_of_json~kind:"TimeSeries"~of_json:DataPoint.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmodulePredictions=structtypenonrect=(Statistic.t*TimeSeries.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 Statistic TimeSeries"))))letto_valuexs=(xs|>(List.map~f:(fun(x,y)->(Statistic.to_valuex)|>(funx->(TimeSeries.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:Statistic.of_string~of_json:TimeSeries.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleErrorMessage=structtypenonrect=stringletcontext_="ErrorMessage"letmakei=iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"ErrorMessage"jletto_json=simple_to_jsonto_valueendmoduleAttributeName=structtypenonrect=stringletcontext_="AttributeName"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:256)>>=(fun()->check_patterni~pattern:"^[a-zA-Z0-9\\_\\-]+$"));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"AttributeName"jletto_json=simple_to_jsonto_valueendmoduleAttributeValue=structtypenonrect=stringletcontext_="AttributeValue"letmakei=letopenResultinok_or_failwith(check_string_maxi~max:256);iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"AttributeValue"jletto_json=simple_to_jsonto_valueendmoduleForecast=structtypenonrect={predictions:Predictions.toption[@ocaml.doc"The forecast. The string of the string-to-array map is one of the following values: p10 p50 p90 The default setting is \\[\"0.1\", \"0.5\", \"0.9\"\\]. Use the optional ForecastTypes parameter of the CreateForecast operation to change the values. The values will vary depending on how this is set, with a minimum of 1 and a maximum of 5."]}letmake?predictions=fun()->{predictions}letto_valuex=structure_to_value[("Predictions",(Option.mapx.predictions~f:Predictions.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letpredictions=(Option.map~f:Predictions.of_xml)(Xml.childxml_arg0"Predictions")inmake?predictions()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letpredictions=field_mapjson__"Predictions"Predictions.of_jsoninmake?predictions()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Provides information about a forecast. Returned as part of the QueryForecast response."]moduleInvalidInputException=structtypenonrect={message:ErrorMessage.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The value is invalid or is too long."]moduleInvalidNextTokenException=structtypenonrect={message:ErrorMessage.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The token is not valid. Tokens expire after 24 hours."]moduleLimitExceededException=structtypenonrect={message:ErrorMessage.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The limit on the number of requests per second has been exceeded."]moduleResourceInUseException=structtypenonrect={message:ErrorMessage.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"The specified resource is in use."]moduleResourceNotFoundException=structtypenonrect={message:ErrorMessage.toption}letmake?message=fun()->{message}letto_valuex=structure_to_value[("Message",(Option.mapx.message~f:ErrorMessage.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letmessage=(Option.map~f:ErrorMessage.of_xml)(Xml.childxml_arg0"Message")inmake?message()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letmessage=field_mapjson__"Message"ErrorMessage.of_jsoninmake?message()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"We can't find that resource. Check the information that you've provided and try again."]moduleDateTime=structtypenonrect=stringletcontext_="DateTime"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:"DateTime"jletto_json=simple_to_jsonto_valueendmoduleFilters=structtypenonrect=(AttributeName.t*AttributeValue.t)listletmakei=letopenResultinok_or_failwith((check_list_maxi~max:50)>>=(fun()->check_list_mini~min:1));iletof_headerxs=make(List.filter_mapxs~f:(fun(k,v)->(Base.String.chop_prefixk~prefix:"x-amz-meta-")|>(Option.map~f:(funchopped->((AttributeName.of_stringchopped),(AttributeValue.of_stringv))))))letto_valuexs=(xs|>(List.map~f:(fun(x,y)->(AttributeName.to_valuex)|>(funx->(AttributeValue.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:AttributeName.of_string~of_json:AttributeValue.of_jsonjletto_jsonv=composed_to_jsonto_valuevendmoduleLongArn=structtypenonrect=stringletcontext_="LongArn"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:300)>>=(fun()->check_patterni~pattern:"arn:([a-z\\d-]+):forecast:.*:.*:.+"));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"LongArn"jletto_json=simple_to_jsonto_valueendmoduleNextToken=structtypenonrect=stringletcontext_="NextToken"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:3000)>>=(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_valueendmoduleArn=structtypenonrect=stringletcontext_="Arn"letmakei=letopenResultinok_or_failwith((check_string_maxi~max:256)>>=(fun()->check_patterni~pattern:"arn:([a-z\\d-]+):forecast:.*:.*:.+"));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"Arn"jletto_json=simple_to_jsonto_valueendmoduleQueryWhatIfForecastResponse=structtypenonrect={forecast:Forecast.toption}typenonrecerror=[`InvalidInputExceptionofInvalidInputException.t|`InvalidNextTokenExceptionofInvalidNextTokenException.t|`LimitExceededExceptionofLimitExceededException.t|`ResourceInUseExceptionofResourceInUseException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`Unknown_operation_errorof(string*stringoption)]letmake?forecast=fun()->{forecast}leterror_of_jsonnamejson=matchnamewith|"InvalidInputException"->`InvalidInputException(InvalidInputException.of_jsonjson)|"InvalidNextTokenException"->`InvalidNextTokenException(InvalidNextTokenException.of_jsonjson)|"LimitExceededException"->`LimitExceededException(LimitExceededException.of_jsonjson)|"ResourceInUseException"->`ResourceInUseException(ResourceInUseException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InvalidInputException"->`InvalidInputException(InvalidInputException.of_xmlxml)|"InvalidNextTokenException"->`InvalidNextTokenException(InvalidNextTokenException.of_xmlxml)|"LimitExceededException"->`LimitExceededException(LimitExceededException.of_xmlxml)|"ResourceInUseException"->`ResourceInUseException(ResourceInUseException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InvalidInputExceptione->`Assoc[("error",(`String"InvalidInputException"));("details",(InvalidInputException.to_jsone))]|`InvalidNextTokenExceptione->`Assoc[("error",(`String"InvalidNextTokenException"));("details",(InvalidNextTokenException.to_jsone))]|`LimitExceededExceptione->`Assoc[("error",(`String"LimitExceededException"));("details",(LimitExceededException.to_jsone))]|`ResourceInUseExceptione->`Assoc[("error",(`String"ResourceInUseException"));("details",(ResourceInUseException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Forecast",(Option.mapx.forecast~f:Forecast.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letforecast=(Option.map~f:Forecast.of_xml)(Xml.childxml_arg0"Forecast")inmake?forecast()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letforecast=field_mapjson__"Forecast"Forecast.of_jsoninmake?forecast()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Retrieves a what-if forecast."]moduleQueryWhatIfForecastRequest=structtypenonrect={whatIfForecastArn:LongArn.t[@ocaml.doc"The Amazon Resource Name (ARN) of the what-if forecast to query."];startDate:DateTime.toption[@ocaml.doc"The start date for the what-if forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00."];endDate:DateTime.toption[@ocaml.doc"The end date for the what-if forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00."];filters:Filters.t[@ocaml.doc"The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for client_21 in the electricity usage dataset, specify the following: \\{\"item_id\" : \"client_21\"\\} To get the full what-if forecast, use the CreateForecastExportJob operation."];nextToken:NextToken.toption[@ocaml.doc"If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours."]}letcontext_="QueryWhatIfForecastRequest"letmake?startDate=fun?endDate->fun?nextToken->fun~whatIfForecastArn->fun~filters->fun()->{startDate;endDate;nextToken;whatIfForecastArn;filters}letto_valuex=structure_to_value[("WhatIfForecastArn",(Some(LongArn.to_valuex.whatIfForecastArn)));("StartDate",(Option.mapx.startDate~f:DateTime.to_value));("EndDate",(Option.mapx.endDate~f:DateTime.to_value));("Filters",(Some(Filters.to_valuex.filters)));("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")inletfilters=Filters.of_xml(Xml.child_exn~context:context_xml_arg0"Filters")inletendDate=(Option.map~f:DateTime.of_xml)(Xml.childxml_arg0"EndDate")inletstartDate=(Option.map~f:DateTime.of_xml)(Xml.childxml_arg0"StartDate")inletwhatIfForecastArn=LongArn.of_xml(Xml.child_exn~context:context_xml_arg0"WhatIfForecastArn")inmake?nextToken~filters?endDate?startDate~whatIfForecastArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"NextToken.of_jsoninletfilters=field_map_exnjson__"Filters"Filters.of_jsoninletendDate=field_mapjson__"EndDate"DateTime.of_jsoninletstartDate=field_mapjson__"StartDate"DateTime.of_jsoninletwhatIfForecastArn=field_map_exnjson__"WhatIfForecastArn"LongArn.of_jsoninmake?nextToken~filters?endDate?startDate~whatIfForecastArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Retrieves a what-if forecast."]moduleQueryForecastResponse=structtypenonrect={forecast:Forecast.toption[@ocaml.doc"The forecast."]}typenonrecerror=[`InvalidInputExceptionofInvalidInputException.t|`InvalidNextTokenExceptionofInvalidNextTokenException.t|`LimitExceededExceptionofLimitExceededException.t|`ResourceInUseExceptionofResourceInUseException.t|`ResourceNotFoundExceptionofResourceNotFoundException.t|`Unknown_operation_errorof(string*stringoption)]letmake?forecast=fun()->{forecast}leterror_of_jsonnamejson=matchnamewith|"InvalidInputException"->`InvalidInputException(InvalidInputException.of_jsonjson)|"InvalidNextTokenException"->`InvalidNextTokenException(InvalidNextTokenException.of_jsonjson)|"LimitExceededException"->`LimitExceededException(LimitExceededException.of_jsonjson)|"ResourceInUseException"->`ResourceInUseException(ResourceInUseException.of_jsonjson)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"InvalidInputException"->`InvalidInputException(InvalidInputException.of_xmlxml)|"InvalidNextTokenException"->`InvalidNextTokenException(InvalidNextTokenException.of_xmlxml)|"LimitExceededException"->`LimitExceededException(LimitExceededException.of_xmlxml)|"ResourceInUseException"->`ResourceInUseException(ResourceInUseException.of_xmlxml)|"ResourceNotFoundException"->`ResourceNotFoundException(ResourceNotFoundException.of_xmlxml)|name->`Unknown_operation_error(name,(Some(Awso.Xml.to_stringxml)))leterror_to_json:error->Yojson.Safe.t=function|`InvalidInputExceptione->`Assoc[("error",(`String"InvalidInputException"));("details",(InvalidInputException.to_jsone))]|`InvalidNextTokenExceptione->`Assoc[("error",(`String"InvalidNextTokenException"));("details",(InvalidNextTokenException.to_jsone))]|`LimitExceededExceptione->`Assoc[("error",(`String"LimitExceededException"));("details",(LimitExceededException.to_jsone))]|`ResourceInUseExceptione->`Assoc[("error",(`String"ResourceInUseException"));("details",(ResourceInUseException.to_jsone))]|`ResourceNotFoundExceptione->`Assoc[("error",(`String"ResourceNotFoundException"));("details",(ResourceNotFoundException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("Forecast",(Option.mapx.forecast~f:Forecast.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letforecast=(Option.map~f:Forecast.of_xml)(Xml.childxml_arg0"Forecast")inmake?forecast()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letforecast=field_mapjson__"Forecast"Forecast.of_jsoninmake?forecast()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Retrieves a forecast for a single item, filtered by the supplied criteria. The criteria is a key-value pair. The key is either item_id (or the equivalent non-timestamp, non-target field) from the TARGET_TIME_SERIES dataset, or one of the forecast dimensions specified as part of the FeaturizationConfig object. By default, QueryForecast returns the complete date range for the filtered forecast. You can request a specific date range. To get the full forecast, use the CreateForecastExportJob operation. The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor."]moduleQueryForecastRequest=structtypenonrect={forecastArn:Arn.t[@ocaml.doc"The Amazon Resource Name (ARN) of the forecast to query."];startDate:DateTime.toption[@ocaml.doc"The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00."];endDate:DateTime.toption[@ocaml.doc"The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00."];filters:Filters.t[@ocaml.doc"The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for client_21 in the electricity usage dataset, specify the following: \\{\"item_id\" : \"client_21\"\\} To get the full forecast, use the CreateForecastExportJob operation."];nextToken:NextToken.toption[@ocaml.doc"If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours."]}letcontext_="QueryForecastRequest"letmake?startDate=fun?endDate->fun?nextToken->fun~forecastArn->fun~filters->fun()->{startDate;endDate;nextToken;forecastArn;filters}letto_valuex=structure_to_value[("ForecastArn",(Some(Arn.to_valuex.forecastArn)));("StartDate",(Option.mapx.startDate~f:DateTime.to_value));("EndDate",(Option.mapx.endDate~f:DateTime.to_value));("Filters",(Some(Filters.to_valuex.filters)));("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")inletfilters=Filters.of_xml(Xml.child_exn~context:context_xml_arg0"Filters")inletendDate=(Option.map~f:DateTime.of_xml)(Xml.childxml_arg0"EndDate")inletstartDate=(Option.map~f:DateTime.of_xml)(Xml.childxml_arg0"StartDate")inletforecastArn=Arn.of_xml(Xml.child_exn~context:context_xml_arg0"ForecastArn")inmake?nextToken~filters?endDate?startDate~forecastArn()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letnextToken=field_mapjson__"NextToken"NextToken.of_jsoninletfilters=field_map_exnjson__"Filters"Filters.of_jsoninletendDate=field_mapjson__"EndDate"DateTime.of_jsoninletstartDate=field_mapjson__"StartDate"DateTime.of_jsoninletforecastArn=field_map_exnjson__"ForecastArn"Arn.of_jsoninmake?nextToken~filters?endDate?startDate~forecastArn()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Retrieves a forecast for a single item, filtered by the supplied criteria. The criteria is a key-value pair. The key is either item_id (or the equivalent non-timestamp, non-target field) from the TARGET_TIME_SERIES dataset, or one of the forecast dimensions specified as part of the FeaturizationConfig object. By default, QueryForecast returns the complete date range for the filtered forecast. You can request a specific date range. To get the full forecast, use the CreateForecastExportJob operation. The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor."]