_endpointRule = 'central'; $this->_endpointMap = [ 'ap-southeast-1' => 'dysmsapi.ap-southeast-1.aliyuncs.com', 'ap-southeast-5' => 'dysmsapi-xman.ap-southeast-5.aliyuncs.com', 'cn-beijing' => 'dysmsapi-proxy.cn-beijing.aliyuncs.com', 'cn-hongkong' => 'dysmsapi-xman.cn-hongkong.aliyuncs.com', ]; $this->checkConfig($config); $this->_endpoint = $this->getEndpoint('dysmsapi', $this->_regionId, $this->_endpointRule, $this->_network, $this->_suffix, $this->_endpointMap, $this->_endpoint); } /** * @param string $productId * @param string $regionId * @param string $endpointRule * @param string $network * @param string $suffix * @param string[] $endpointMap * @param string $endpoint * * @return string */ public function getEndpoint($productId, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint) { if (!Utils::empty_($endpoint)) { return $endpoint; } if (!Utils::isUnset($endpointMap) && !Utils::empty_(@$endpointMap[$regionId])) { return @$endpointMap[$regionId]; } return Endpoint::getEndpointRules($productId, $regionId, $endpointRule, $network, $suffix); } /** * @param AddShortUrlRequest $request * @param RuntimeOptions $runtime * * @return AddShortUrlResponse */ public function addShortUrlWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } $body = []; if (!Utils::isUnset($request->effectiveDays)) { $body['EffectiveDays'] = $request->effectiveDays; } if (!Utils::isUnset($request->shortUrlName)) { $body['ShortUrlName'] = $request->shortUrlName; } if (!Utils::isUnset($request->sourceUrl)) { $body['SourceUrl'] = $request->sourceUrl; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), 'body' => OpenApiUtilClient::parseToMap($body), ]); $params = new Params([ 'action' => 'AddShortUrl', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return AddShortUrlResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param AddShortUrlRequest $request * * @return AddShortUrlResponse */ public function addShortUrl($request) { $runtime = new RuntimeOptions([]); return $this->addShortUrlWithOptions($request, $runtime); } /** * @param AddSmsSignRequest $request * @param RuntimeOptions $runtime * * @return AddSmsSignResponse */ public function addSmsSignWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->remark)) { $query['Remark'] = $request->remark; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->signName)) { $query['SignName'] = $request->signName; } if (!Utils::isUnset($request->signSource)) { $query['SignSource'] = $request->signSource; } $body = []; if (!Utils::isUnset($request->signFileList)) { $body['SignFileList'] = $request->signFileList; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), 'body' => OpenApiUtilClient::parseToMap($body), ]); $params = new Params([ 'action' => 'AddSmsSign', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return AddSmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param AddSmsSignRequest $request * * @return AddSmsSignResponse */ public function addSmsSign($request) { $runtime = new RuntimeOptions([]); return $this->addSmsSignWithOptions($request, $runtime); } /** * @param AddSmsTemplateRequest $request * @param RuntimeOptions $runtime * * @return AddSmsTemplateResponse */ public function addSmsTemplateWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->remark)) { $query['Remark'] = $request->remark; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->templateContent)) { $query['TemplateContent'] = $request->templateContent; } if (!Utils::isUnset($request->templateName)) { $query['TemplateName'] = $request->templateName; } if (!Utils::isUnset($request->templateType)) { $query['TemplateType'] = $request->templateType; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'AddSmsTemplate', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return AddSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param AddSmsTemplateRequest $request * * @return AddSmsTemplateResponse */ public function addSmsTemplate($request) { $runtime = new RuntimeOptions([]); return $this->addSmsTemplateWithOptions($request, $runtime); } /** * @param DeleteShortUrlRequest $request * @param RuntimeOptions $runtime * * @return DeleteShortUrlResponse */ public function deleteShortUrlWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } $body = []; if (!Utils::isUnset($request->sourceUrl)) { $body['SourceUrl'] = $request->sourceUrl; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), 'body' => OpenApiUtilClient::parseToMap($body), ]); $params = new Params([ 'action' => 'DeleteShortUrl', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return DeleteShortUrlResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param DeleteShortUrlRequest $request * * @return DeleteShortUrlResponse */ public function deleteShortUrl($request) { $runtime = new RuntimeOptions([]); return $this->deleteShortUrlWithOptions($request, $runtime); } /** * @param DeleteSmsSignRequest $request * @param RuntimeOptions $runtime * * @return DeleteSmsSignResponse */ public function deleteSmsSignWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->signName)) { $query['SignName'] = $request->signName; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'DeleteSmsSign', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return DeleteSmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param DeleteSmsSignRequest $request * * @return DeleteSmsSignResponse */ public function deleteSmsSign($request) { $runtime = new RuntimeOptions([]); return $this->deleteSmsSignWithOptions($request, $runtime); } /** * @param DeleteSmsTemplateRequest $request * @param RuntimeOptions $runtime * * @return DeleteSmsTemplateResponse */ public function deleteSmsTemplateWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->templateCode)) { $query['TemplateCode'] = $request->templateCode; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'DeleteSmsTemplate', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return DeleteSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param DeleteSmsTemplateRequest $request * * @return DeleteSmsTemplateResponse */ public function deleteSmsTemplate($request) { $runtime = new RuntimeOptions([]); return $this->deleteSmsTemplateWithOptions($request, $runtime); } /** * @param ListTagResourcesRequest $request * @param RuntimeOptions $runtime * * @return ListTagResourcesResponse */ public function listTagResourcesWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->nextToken)) { $query['NextToken'] = $request->nextToken; } if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->pageSize)) { $query['PageSize'] = $request->pageSize; } if (!Utils::isUnset($request->prodCode)) { $query['ProdCode'] = $request->prodCode; } if (!Utils::isUnset($request->regionId)) { $query['RegionId'] = $request->regionId; } if (!Utils::isUnset($request->resourceId)) { $query['ResourceId'] = $request->resourceId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->resourceType)) { $query['ResourceType'] = $request->resourceType; } if (!Utils::isUnset($request->tag)) { $query['Tag'] = $request->tag; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'ListTagResources', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return ListTagResourcesResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param ListTagResourcesRequest $request * * @return ListTagResourcesResponse */ public function listTagResources($request) { $runtime = new RuntimeOptions([]); return $this->listTagResourcesWithOptions($request, $runtime); } /** * @param ModifySmsSignRequest $request * @param RuntimeOptions $runtime * * @return ModifySmsSignResponse */ public function modifySmsSignWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->remark)) { $query['Remark'] = $request->remark; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->signName)) { $query['SignName'] = $request->signName; } if (!Utils::isUnset($request->signSource)) { $query['SignSource'] = $request->signSource; } $body = []; if (!Utils::isUnset($request->signFileList)) { $body['SignFileList'] = $request->signFileList; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), 'body' => OpenApiUtilClient::parseToMap($body), ]); $params = new Params([ 'action' => 'ModifySmsSign', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return ModifySmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param ModifySmsSignRequest $request * * @return ModifySmsSignResponse */ public function modifySmsSign($request) { $runtime = new RuntimeOptions([]); return $this->modifySmsSignWithOptions($request, $runtime); } /** * @param ModifySmsTemplateRequest $request * @param RuntimeOptions $runtime * * @return ModifySmsTemplateResponse */ public function modifySmsTemplateWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->remark)) { $query['Remark'] = $request->remark; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->templateCode)) { $query['TemplateCode'] = $request->templateCode; } if (!Utils::isUnset($request->templateContent)) { $query['TemplateContent'] = $request->templateContent; } if (!Utils::isUnset($request->templateName)) { $query['TemplateName'] = $request->templateName; } if (!Utils::isUnset($request->templateType)) { $query['TemplateType'] = $request->templateType; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'ModifySmsTemplate', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return ModifySmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param ModifySmsTemplateRequest $request * * @return ModifySmsTemplateResponse */ public function modifySmsTemplate($request) { $runtime = new RuntimeOptions([]); return $this->modifySmsTemplateWithOptions($request, $runtime); } /** * @param QuerySendDetailsRequest $request * @param RuntimeOptions $runtime * * @return QuerySendDetailsResponse */ public function querySendDetailsWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->bizId)) { $query['BizId'] = $request->bizId; } if (!Utils::isUnset($request->currentPage)) { $query['CurrentPage'] = $request->currentPage; } if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->pageSize)) { $query['PageSize'] = $request->pageSize; } if (!Utils::isUnset($request->phoneNumber)) { $query['PhoneNumber'] = $request->phoneNumber; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->sendDate)) { $query['SendDate'] = $request->sendDate; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'QuerySendDetails', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return QuerySendDetailsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param QuerySendDetailsRequest $request * * @return QuerySendDetailsResponse */ public function querySendDetails($request) { $runtime = new RuntimeOptions([]); return $this->querySendDetailsWithOptions($request, $runtime); } /** * @param QuerySendStatisticsRequest $request * @param RuntimeOptions $runtime * * @return QuerySendStatisticsResponse */ public function querySendStatisticsWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->endDate)) { $query['EndDate'] = $request->endDate; } if (!Utils::isUnset($request->isGlobe)) { $query['IsGlobe'] = $request->isGlobe; } if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->pageIndex)) { $query['PageIndex'] = $request->pageIndex; } if (!Utils::isUnset($request->pageSize)) { $query['PageSize'] = $request->pageSize; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->startDate)) { $query['StartDate'] = $request->startDate; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'QuerySendStatistics', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return QuerySendStatisticsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param QuerySendStatisticsRequest $request * * @return QuerySendStatisticsResponse */ public function querySendStatistics($request) { $runtime = new RuntimeOptions([]); return $this->querySendStatisticsWithOptions($request, $runtime); } /** * @param QueryShortUrlRequest $request * @param RuntimeOptions $runtime * * @return QueryShortUrlResponse */ public function queryShortUrlWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } $body = []; if (!Utils::isUnset($request->shortUrl)) { $body['ShortUrl'] = $request->shortUrl; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), 'body' => OpenApiUtilClient::parseToMap($body), ]); $params = new Params([ 'action' => 'QueryShortUrl', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return QueryShortUrlResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param QueryShortUrlRequest $request * * @return QueryShortUrlResponse */ public function queryShortUrl($request) { $runtime = new RuntimeOptions([]); return $this->queryShortUrlWithOptions($request, $runtime); } /** * @param QuerySmsSignRequest $request * @param RuntimeOptions $runtime * * @return QuerySmsSignResponse */ public function querySmsSignWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->signName)) { $query['SignName'] = $request->signName; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'QuerySmsSign', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return QuerySmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param QuerySmsSignRequest $request * * @return QuerySmsSignResponse */ public function querySmsSign($request) { $runtime = new RuntimeOptions([]); return $this->querySmsSignWithOptions($request, $runtime); } /** * @param QuerySmsSignListRequest $request * @param RuntimeOptions $runtime * * @return QuerySmsSignListResponse */ public function querySmsSignListWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->pageIndex)) { $query['PageIndex'] = $request->pageIndex; } if (!Utils::isUnset($request->pageSize)) { $query['PageSize'] = $request->pageSize; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'QuerySmsSignList', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return QuerySmsSignListResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param QuerySmsSignListRequest $request * * @return QuerySmsSignListResponse */ public function querySmsSignList($request) { $runtime = new RuntimeOptions([]); return $this->querySmsSignListWithOptions($request, $runtime); } /** * @param QuerySmsTemplateRequest $request * @param RuntimeOptions $runtime * * @return QuerySmsTemplateResponse */ public function querySmsTemplateWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->templateCode)) { $query['TemplateCode'] = $request->templateCode; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'QuerySmsTemplate', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return QuerySmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param QuerySmsTemplateRequest $request * * @return QuerySmsTemplateResponse */ public function querySmsTemplate($request) { $runtime = new RuntimeOptions([]); return $this->querySmsTemplateWithOptions($request, $runtime); } /** * @param QuerySmsTemplateListRequest $request * @param RuntimeOptions $runtime * * @return QuerySmsTemplateListResponse */ public function querySmsTemplateListWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->pageIndex)) { $query['PageIndex'] = $request->pageIndex; } if (!Utils::isUnset($request->pageSize)) { $query['PageSize'] = $request->pageSize; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'QuerySmsTemplateList', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return QuerySmsTemplateListResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param QuerySmsTemplateListRequest $request * * @return QuerySmsTemplateListResponse */ public function querySmsTemplateList($request) { $runtime = new RuntimeOptions([]); return $this->querySmsTemplateListWithOptions($request, $runtime); } /** * @param SendBatchSmsRequest $request * @param RuntimeOptions $runtime * * @return SendBatchSmsResponse */ public function sendBatchSmsWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->phoneNumberJson)) { $query['PhoneNumberJson'] = $request->phoneNumberJson; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->signNameJson)) { $query['SignNameJson'] = $request->signNameJson; } if (!Utils::isUnset($request->smsUpExtendCodeJson)) { $query['SmsUpExtendCodeJson'] = $request->smsUpExtendCodeJson; } if (!Utils::isUnset($request->templateCode)) { $query['TemplateCode'] = $request->templateCode; } if (!Utils::isUnset($request->templateParamJson)) { $query['TemplateParamJson'] = $request->templateParamJson; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'SendBatchSms', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return SendBatchSmsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param SendBatchSmsRequest $request * * @return SendBatchSmsResponse */ public function sendBatchSms($request) { $runtime = new RuntimeOptions([]); return $this->sendBatchSmsWithOptions($request, $runtime); } /** * @param SendSmsRequest $request * @param RuntimeOptions $runtime * * @return SendSmsResponse */ public function sendSmsWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->outId)) { $query['OutId'] = $request->outId; } if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->phoneNumbers)) { $query['PhoneNumbers'] = $request->phoneNumbers; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->signName)) { $query['SignName'] = $request->signName; } if (!Utils::isUnset($request->smsUpExtendCode)) { $query['SmsUpExtendCode'] = $request->smsUpExtendCode; } if (!Utils::isUnset($request->templateCode)) { $query['TemplateCode'] = $request->templateCode; } if (!Utils::isUnset($request->templateParam)) { $query['TemplateParam'] = $request->templateParam; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'SendSms', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return SendSmsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param SendSmsRequest $request * * @return SendSmsResponse */ public function sendSms($request) { $runtime = new RuntimeOptions([]); return $this->sendSmsWithOptions($request, $runtime); } /** * @param TagResourcesRequest $request * @param RuntimeOptions $runtime * * @return TagResourcesResponse */ public function tagResourcesWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->prodCode)) { $query['ProdCode'] = $request->prodCode; } if (!Utils::isUnset($request->regionId)) { $query['RegionId'] = $request->regionId; } if (!Utils::isUnset($request->resourceId)) { $query['ResourceId'] = $request->resourceId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->resourceType)) { $query['ResourceType'] = $request->resourceType; } if (!Utils::isUnset($request->tag)) { $query['Tag'] = $request->tag; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'TagResources', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return TagResourcesResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param TagResourcesRequest $request * * @return TagResourcesResponse */ public function tagResources($request) { $runtime = new RuntimeOptions([]); return $this->tagResourcesWithOptions($request, $runtime); } /** * @param UntagResourcesRequest $request * @param RuntimeOptions $runtime * * @return UntagResourcesResponse */ public function untagResourcesWithOptions($request, $runtime) { Utils::validateModel($request); $query = []; if (!Utils::isUnset($request->all)) { $query['All'] = $request->all; } if (!Utils::isUnset($request->ownerId)) { $query['OwnerId'] = $request->ownerId; } if (!Utils::isUnset($request->prodCode)) { $query['ProdCode'] = $request->prodCode; } if (!Utils::isUnset($request->regionId)) { $query['RegionId'] = $request->regionId; } if (!Utils::isUnset($request->resourceId)) { $query['ResourceId'] = $request->resourceId; } if (!Utils::isUnset($request->resourceOwnerAccount)) { $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } if (!Utils::isUnset($request->resourceOwnerId)) { $query['ResourceOwnerId'] = $request->resourceOwnerId; } if (!Utils::isUnset($request->resourceType)) { $query['ResourceType'] = $request->resourceType; } if (!Utils::isUnset($request->tagKey)) { $query['TagKey'] = $request->tagKey; } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); $params = new Params([ 'action' => 'UntagResources', 'version' => '2017-05-25', 'protocol' => 'HTTPS', 'pathname' => '/', 'method' => 'POST', 'authType' => 'AK', 'style' => 'RPC', 'reqBodyType' => 'formData', 'bodyType' => 'json', ]); return UntagResourcesResponse::fromMap($this->callApi($params, $req, $runtime)); } /** * @param UntagResourcesRequest $request * * @return UntagResourcesResponse */ public function untagResources($request) { $runtime = new RuntimeOptions([]); return $this->untagResourcesWithOptions($request, $runtime); } }