public GetFaceOptionsResponse GetFaceOptionsWithOptions(GetFaceOptionsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <GetFaceOptionsResponse>(DoRequest("GetFaceOptions", "HTTPS", "POST", "2020-05-15", "AK", null, request.ToMap(), runtime))); }
public UpdateMonitorResponse UpdateMonitorWithOptions(UpdateMonitorRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <UpdateMonitorResponse>(DoRequest("UpdateMonitor", "HTTPS", "POST", "2020-05-15", "AK", null, request.ToMap(), runtime))); }
public async Task <GetInventoryResponse> GetInventoryWithOptionsAsync(GetInventoryRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <GetInventoryResponse>(await DoRequestAsync("GetInventory", "HTTPS", "POST", "2020-05-15", "AK", null, request.ToMap(), runtime))); }
public async Task <TestFlowStrategy01Response> TestFlowStrategy01WithOptionsAsync(TestFlowStrategy01Request request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <TestFlowStrategy01Response>(await DoRequestAsync("TestFlowStrategy01", "HTTPS", "PUT", "2018-07-13", "AK", null, request.ToMap(), runtime))); }
public TestHttpApiResponse TestHttpApiWithOptions(TestHttpApiRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <TestHttpApiResponse>(DoRequest("TestHttpApi", "HTTPS", "POST", "2018-07-13", "AK", null, request.ToMap(), runtime))); }
public FtParamListResponse FtParamListWithOptions(FtParamListRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <FtParamListResponse>(DoRequest("FtParamList", "HTTPS", "POST", "2018-07-13", "AK", null, request.ToMap(), runtime))); }
public async Task <FtGatedLaunchPolicy4Response> FtGatedLaunchPolicy4WithOptionsAsync(FtGatedLaunchPolicy4Request request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <FtGatedLaunchPolicy4Response>(await DoRequestAsync("FtGatedLaunchPolicy4", "HTTPS", "POST", "2018-07-13", "AK", null, request.ToMap(), runtime))); }
public async Task <FtIpFlowControlResponse> FtIpFlowControlWithOptionsAsync(FtIpFlowControlRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <FtIpFlowControlResponse>(await DoRequestAsync("FtIpFlowControl", "HTTPS", "POST", "2018-07-13", "Anonymous", null, request.ToMap(), runtime))); }
public async Task <BatchAuditTest01Response> BatchAuditTest01WithOptionsAsync(BatchAuditTest01Request request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <BatchAuditTest01Response>(await DoRequestAsync("BatchAuditTest01", "HTTPS", "POST", "2018-07-13", "Anonymous", null, request.ToMap(), runtime))); }
public AlipayOpenAppMiniTemplatemessageSendResponse Send(string toUserId, string formId, string userTemplateId, string page, string data) { Dictionary <string, object> runtime_ = new Dictionary <string, object>() { { "connectTimeout", 15000 }, { "readTimeout", 15000 }, { "retry", new Dictionary <string, int?>() { { "maxAttempts", 0 }, } }, }; TeaRequest _lastRequest = null; Exception _lastException = null; long _now = System.DateTime.Now.Millisecond; int _retryTimes = 0; while (TeaCore.AllowRetry((IDictionary)runtime_["retry"], _retryTimes, _now)) { if (_retryTimes > 0) { int backoffTime = TeaCore.GetBackoffTime((IDictionary)runtime_["backoff"], _retryTimes); if (backoffTime > 0) { TeaCore.Sleep(backoffTime); } } _retryTimes = _retryTimes + 1; try { TeaRequest request_ = new TeaRequest(); Dictionary <string, string> systemParams = new Dictionary <string, string>() { { "method", "alipay.open.app.mini.templatemessage.send" }, { "app_id", _getConfig("appId") }, { "timestamp", _getTimestamp() }, { "format", "json" }, { "version", "1.0" }, { "alipay_sdk", _getSdkVersion() }, { "charset", "UTF-8" }, { "sign_type", _getConfig("signType") }, { "app_cert_sn", _getMerchantCertSN() }, { "alipay_root_cert_sn", _getAlipayRootCertSN() }, }; Dictionary <string, object> bizParams = new Dictionary <string, object>() { { "to_user_id", toUserId }, { "form_id", formId }, { "user_template_id", userTemplateId }, { "page", page }, { "data", data }, }; Dictionary <string, string> textParams = new Dictionary <string, string>() { }; request_.Protocol = _getConfig("protocol"); request_.Method = "POST"; request_.Pathname = "/gateway.do"; request_.Headers = new Dictionary <string, string>() { { "host", _getConfig("gatewayHost") }, { "content-type", "application/x-www-form-urlencoded;charset=utf-8" }, }; request_.Query = TeaConverter.merge <string>( new Dictionary <string, string>() { { "sign", _sign(systemParams, bizParams, textParams, _getConfig("merchantPrivateKey")) }, }, systemParams ); request_.Body = TeaCore.BytesReadable(_toUrlEncodedRequestBody(bizParams, textParams)); _lastRequest = request_; TeaResponse response_ = TeaCore.DoAction(request_, runtime_); Dictionary <string, object> respMap = _readAsJson(response_, "alipay.open.app.mini.templatemessage.send"); if (_isCertMode()) { if (_verify(respMap, _extractAlipayPublicKey(_getAlipayCertSN(respMap)))) { return(TeaModel.ToObject <AlipayOpenAppMiniTemplatemessageSendResponse>(_toRespModel(respMap))); } } else { if (_verify(respMap, _getConfig("alipayPublicKey"))) { return(TeaModel.ToObject <AlipayOpenAppMiniTemplatemessageSendResponse>(_toRespModel(respMap))); } } throw new TeaException(new Dictionary <string, string>() { { "message", "验签失败,请检查支付宝公钥设置是否正确。" }, }); } catch (Exception e) { if (TeaCore.IsRetryable(e)) { _lastException = e; continue; } throw e; } } throw new TeaUnretryableException(_lastRequest, _lastException); }
public async Task <AuthorizeFileUploadResponse> AuthorizeFileUploadWithOptionsAsync(AuthorizeFileUploadRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); return(TeaModel.ToObject <AuthorizeFileUploadResponse>(await DoRequestAsync("AuthorizeFileUpload", "HTTPS", "GET", "2019-12-19", "AK", request.ToMap(), null, runtime))); }
public AlipayOfflineMaterialImageUploadResponse Upload(string videoName, string videoFilePath) { Dictionary <string, object> runtime_ = new Dictionary <string, object> { { "httpProxy", this._kernel.GetConfig("httpProxy") }, { "connectTimeout", 100000 }, { "readTimeout", 100000 }, { "retry", new Dictionary <string, int?> { { "maxAttempts", 0 }, } }, }; TeaRequest _lastRequest = null; Exception _lastException = null; long _now = System.DateTime.Now.Millisecond; int _retryTimes = 0; while (TeaCore.AllowRetry((IDictionary)runtime_["retry"], _retryTimes, _now)) { if (_retryTimes > 0) { int backoffTime = TeaCore.GetBackoffTime((IDictionary)runtime_["backoff"], _retryTimes); if (backoffTime > 0) { TeaCore.Sleep(backoffTime); } } _retryTimes = _retryTimes + 1; try { TeaRequest request_ = new TeaRequest(); Dictionary <string, string> systemParams = new Dictionary <string, string> { { "method", "alipay.offline.material.image.upload" }, { "app_id", this._kernel.GetConfig("appId") }, { "timestamp", this._kernel.GetTimestamp() }, { "format", "json" }, { "version", "1.0" }, { "alipay_sdk", this._kernel.GetSdkVersion() }, { "charset", "UTF-8" }, { "sign_type", this._kernel.GetConfig("signType") }, { "app_cert_sn", this._kernel.GetMerchantCertSN() }, { "alipay_root_cert_sn", this._kernel.GetAlipayRootCertSN() }, }; Dictionary <string, object> bizParams = new Dictionary <string, object>() { }; Dictionary <string, string> textParams = new Dictionary <string, string> { { "image_type", "mp4" }, { "image_name", videoName }, }; Dictionary <string, string> fileParams = new Dictionary <string, string> { { "image_content", videoFilePath }, }; string boundary = this._kernel.GetRandomBoundary(); request_.Protocol = this._kernel.GetConfig("protocol"); request_.Method = "POST"; request_.Pathname = "/gateway.do"; request_.Headers = new Dictionary <string, string> { { "host", this._kernel.GetConfig("gatewayHost") }, { "content-type", this._kernel.ConcatStr("multipart/form-data;charset=utf-8;boundary=", boundary) }, }; request_.Query = this._kernel.SortMap(TeaConverter.merge <string> ( new Dictionary <string, string>() { { "sign", this._kernel.Sign(systemParams, bizParams, textParams, this._kernel.GetConfig("merchantPrivateKey")) }, }, systemParams )); request_.Body = this._kernel.ToMultipartRequestBody(textParams, fileParams, boundary); _lastRequest = request_; TeaResponse response_ = TeaCore.DoAction(request_, runtime_); Dictionary <string, object> respMap = this._kernel.ReadAsJson(response_, "alipay.offline.material.image.upload"); if (this._kernel.IsCertMode()) { if (this._kernel.Verify(respMap, this._kernel.ExtractAlipayPublicKey(this._kernel.GetAlipayCertSN(respMap)))) { return(TeaModel.ToObject <AlipayOfflineMaterialImageUploadResponse>(this._kernel.ToRespModel(respMap))); } } else { if (this._kernel.Verify(respMap, this._kernel.GetConfig("alipayPublicKey"))) { return(TeaModel.ToObject <AlipayOfflineMaterialImageUploadResponse>(this._kernel.ToRespModel(respMap))); } } throw new TeaException(new Dictionary <string, string> { { "message", "验签失败,请检查支付宝公钥设置是否正确。" }, }); } catch (Exception e) { if (TeaCore.IsRetryable(e)) { _lastException = e; continue; } throw e; } } throw new TeaUnretryableException(_lastRequest, _lastException); }