123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328(* 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.marketplace_reportingletapiVersion="2018-05-10"letendpointPrefix="reporting-marketplace"letserviceFullName="AWS Marketplace Reporting Service"letsignatureVersion="v4"letprotocol="rest_json"letglobalEndpoint=endpointPrefix^".amazonaws.com"letsimple_to_jsonto_valuex=Botodata.Json.value_to_json_scalar(to_valuex)letcomposed_to_jsonto_valuex=Botodata.Json.value_to_json(to_valuex)letto_queryto_valuex=Client.Query.of_value(to_valuex)letstructure_to_value_auxst~f=letfilter=function|(k,Somev)->Some(k,v)|_->Noneinletpairkv=(k,v)inletdefer_value(k,dv)=pairkdvin((List.filter_mapst~f:filter)|>(List.map~f:defer_value))|>(funx->`Structure(fx))letstructure_to_value=structure_to_value_aux~f:Fn.idletstructure_to_wrapped_value~wrapper~response=structure_to_value_aux~f:(funx->[(wrapper,(`Structurex));(response,(`Structure[]))])moduleString_=structtypenonrect=stringletcontext_="String"letmakei=iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"String"jletto_json=simple_to_jsonto_valueendmoduleEmbeddingDomain=structtypenonrect=stringletcontext_="EmbeddingDomain"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:2000)>>=(fun()->check_patterni~pattern:"(https://[a-zA-Z\\.\\*0-9\\-_]+[\\.]{1}[a-zA-Z]{1,}[a-zA-Z0-9&?/-_=]*[a-zA-Z\\*0-9/]+|http[s]*://localhost(:[0-9]{1,5})?)")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"EmbeddingDomain"jletto_json=simple_to_jsonto_valueendmoduleAccessDeniedException=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."]moduleBadRequestException=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 is malformed, or it contains an error such as an invalid parameter. Ensure the request has all required parameters."]moduleDashboardIdentifier=structtypenonrect=stringletcontext_="DashboardIdentifier"letmakei=letopenResultinok_or_failwith((check_string_mini~min:1)>>=(fun()->(check_string_maxi~max:1023)>>=(fun()->check_patterni~pattern:"arn:aws:aws-marketplace::[0-9]{12}:AWSMarketplace/ReportingData/(Agreement_V1/Dashboard/AgreementSummary_V1|BillingEvent_V1/Dashboard/CostAnalysis_V1)")));iletof_stringx=xletto_valuex=`Stringxletto_queryv=to_queryto_valuevletto_headerx=xletof_xml=Xml.string_data_exn~context:context_letof_jsonj=string_of_json~kind:"DashboardIdentifier"jletto_json=simple_to_jsonto_valueendmoduleEmbeddingDomains=structtypenonrect=EmbeddingDomain.tlistletmakei=letopenResultinok_or_failwith((check_list_maxi~max:2)>>=(fun()->check_list_mini~min:1));iletof_string_=failwithf"of_string is not implemented for List_shape objects"()[@@warning"-32"]letto_valuexs=(xs|>(List.map~f:EmbeddingDomain.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:EmbeddingDomain.of_xml)letof_jsonj=list_of_json~kind:"EmbeddingDomains"~of_json:EmbeddingDomain.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 operation failed due to a server error."]moduleUnauthorizedException=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 permission to perform this action."]moduleGetBuyerDashboardOutput=structtypenonrect={embedUrl:String_.toption[@ocaml.doc"The dashboard's embedding URL."];dashboardIdentifier:DashboardIdentifier.toption[@ocaml.doc"The ARN of the returned dashboard."];embeddingDomains:EmbeddingDomains.toption[@ocaml.doc"The fully qualified domains specified in the request. The domains enable access to the generated URL that is then embedded. You can list up to two domains or subdomains in each API call. To include all subdomains under a specific domain, use *. For example, https://*.amazon.com includes all subdomains under https://aws.amazon.com."]}typenonrecerror=[`AccessDeniedExceptionofAccessDeniedException.t|`BadRequestExceptionofBadRequestException.t|`InternalServerExceptionofInternalServerException.t|`UnauthorizedExceptionofUnauthorizedException.t|`Unknown_operation_errorof(string*stringoption)]letmake?embedUrl=fun?dashboardIdentifier->fun?embeddingDomains->fun()->{embedUrl;dashboardIdentifier;embeddingDomains}leterror_of_jsonnamejson=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_jsonjson)|"BadRequestException"->`BadRequestException(BadRequestException.of_jsonjson)|"InternalServerException"->`InternalServerException(InternalServerException.of_jsonjson)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.of_jsonjson)|name->`Unknown_operation_error(name,(Some(Yojson.Safe.to_stringjson)))leterror_of_xmlnamexml=matchnamewith|"AccessDeniedException"->`AccessDeniedException(AccessDeniedException.of_xmlxml)|"BadRequestException"->`BadRequestException(BadRequestException.of_xmlxml)|"InternalServerException"->`InternalServerException(InternalServerException.of_xmlxml)|"UnauthorizedException"->`UnauthorizedException(UnauthorizedException.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))]|`BadRequestExceptione->`Assoc[("error",(`String"BadRequestException"));("details",(BadRequestException.to_jsone))]|`InternalServerExceptione->`Assoc[("error",(`String"InternalServerException"));("details",(InternalServerException.to_jsone))]|`UnauthorizedExceptione->`Assoc[("error",(`String"UnauthorizedException"));("details",(UnauthorizedException.to_jsone))]|`Unknown_operation_error(code,msg)->`Assoc(("error",(`Stringcode))::((matchmsgwith|None->[]|Somem->[("message",(`Stringm))])))letto_valuex=structure_to_value[("embedUrl",(Option.mapx.embedUrl~f:String_.to_value));("dashboardIdentifier",(Option.mapx.dashboardIdentifier~f:DashboardIdentifier.to_value));("embeddingDomains",(Option.mapx.embeddingDomains~f:EmbeddingDomains.to_value))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letembeddingDomains=(Option.map~f:EmbeddingDomains.of_xml)(Xml.childxml_arg0"embeddingDomains")inletdashboardIdentifier=(Option.map~f:DashboardIdentifier.of_xml)(Xml.childxml_arg0"dashboardIdentifier")inletembedUrl=(Option.map~f:String_.of_xml)(Xml.childxml_arg0"embedUrl")inmake?embeddingDomains?dashboardIdentifier?embedUrl()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letembeddingDomains=field_mapjson__"embeddingDomains"EmbeddingDomains.of_jsoninletdashboardIdentifier=field_mapjson__"dashboardIdentifier"DashboardIdentifier.of_jsoninletembedUrl=field_mapjson__"embedUrl"String_.of_jsoninmake?embeddingDomains?dashboardIdentifier?embedUrl()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates an embedding URL for an Amazon QuickSight dashboard for an anonymous user. This API is available only to Amazon Web Services Organization management accounts or delegated administrators registered for the procurement insights (procurement-insights.marketplace.amazonaws.com) feature. The following rules apply to a generated URL: It contains a temporary bearer token, valid for 5 minutes after it is generated. Once redeemed within that period, it cannot be re-used again. It has a session lifetime of one hour. The 5-minute validity period runs separately from the session lifetime."]moduleGetBuyerDashboardInput=structtypenonrect={dashboardIdentifier:DashboardIdentifier.t[@ocaml.doc"The ARN of the requested dashboard."];embeddingDomains:EmbeddingDomains.t[@ocaml.doc"Fully qualified domains that you add to the allow list for access to the generated URL that is then embedded. You can list up to two domains or subdomains in each API call. To include all subdomains under a specific domain, use *. For example, https://*.amazon.com includes all subdomains under https://aws.amazon.com."]}letcontext_="GetBuyerDashboardInput"letmake~dashboardIdentifier=fun~embeddingDomains->fun()->{dashboardIdentifier;embeddingDomains}letto_valuex=structure_to_value[("dashboardIdentifier",(Some(DashboardIdentifier.to_valuex.dashboardIdentifier)));("embeddingDomains",(Some(EmbeddingDomains.to_valuex.embeddingDomains)))]letto_queryv=to_queryto_valuevletof_xmlxml_arg0=letembeddingDomains=EmbeddingDomains.of_xml(Xml.child_exn~context:context_xml_arg0"embeddingDomains")inletdashboardIdentifier=DashboardIdentifier.of_xml(Xml.child_exn~context:context_xml_arg0"dashboardIdentifier")inmake~embeddingDomains~dashboardIdentifier()letof_strings=of_xml(Awso.Xml.parse_responses)[@@warning"-32"]letof_jsonjson__=letembeddingDomains=field_map_exnjson__"embeddingDomains"EmbeddingDomains.of_jsoninletdashboardIdentifier=field_map_exnjson__"dashboardIdentifier"DashboardIdentifier.of_jsoninmake~embeddingDomains~dashboardIdentifier()letto_jsonv=composed_to_jsonto_valuevend[@@ocaml.doc"Generates an embedding URL for an Amazon QuickSight dashboard for an anonymous user. This API is available only to Amazon Web Services Organization management accounts or delegated administrators registered for the procurement insights (procurement-insights.marketplace.amazonaws.com) feature. The following rules apply to a generated URL: It contains a temporary bearer token, valid for 5 minutes after it is generated. Once redeemed within that period, it cannot be re-used again. It has a session lifetime of one hour. The 5-minute validity period runs separately from the session lifetime."]