Supported getUserUploadSign for user.
This commit is contained in:
@@ -31,21 +31,21 @@ AlinlpClient::AlinlpClient(const Credentials &credentials, const ClientConfigura
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "alinlp");
|
||||
}
|
||||
|
||||
AlinlpClient::AlinlpClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "alinlp");
|
||||
}
|
||||
|
||||
AlinlpClient::AlinlpClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "alinlp");
|
||||
}
|
||||
|
||||
AlinlpClient::~AlinlpClient()
|
||||
@@ -1239,6 +1239,42 @@ AlinlpClient::GetTsChEcomOutcomeCallable AlinlpClient::getTsChEcomCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetUserUploadSignOutcome AlinlpClient::getUserUploadSign(const GetUserUploadSignRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetUserUploadSignOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetUserUploadSignOutcome(GetUserUploadSignResult(outcome.result()));
|
||||
else
|
||||
return GetUserUploadSignOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlinlpClient::getUserUploadSignAsync(const GetUserUploadSignRequest& request, const GetUserUploadSignAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getUserUploadSign(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlinlpClient::GetUserUploadSignOutcomeCallable AlinlpClient::getUserUploadSignCallable(const GetUserUploadSignRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetUserUploadSignOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getUserUploadSign(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetWeChCommentOutcome AlinlpClient::getWeChComment(const GetWeChCommentRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1743,6 +1779,42 @@ AlinlpClient::GetWsCustomizedSeaGeneralOutcomeCallable AlinlpClient::getWsCustom
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::InsertCustomOutcome AlinlpClient::insertCustom(const InsertCustomRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return InsertCustomOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return InsertCustomOutcome(InsertCustomResult(outcome.result()));
|
||||
else
|
||||
return InsertCustomOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlinlpClient::insertCustomAsync(const InsertCustomRequest& request, const InsertCustomAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, insertCustom(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlinlpClient::InsertCustomOutcomeCallable AlinlpClient::insertCustomCallable(const InsertCustomRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<InsertCustomOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->insertCustom(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::OpenAlinlpServiceOutcome AlinlpClient::openAlinlpService(const OpenAlinlpServiceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
36
alinlp/src/model/GetUserUploadSignRequest.cc
Normal file
36
alinlp/src/model/GetUserUploadSignRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/alinlp/model/GetUserUploadSignRequest.h>
|
||||
|
||||
using AlibabaCloud::Alinlp::Model::GetUserUploadSignRequest;
|
||||
|
||||
GetUserUploadSignRequest::GetUserUploadSignRequest()
|
||||
: RpcServiceRequest("alinlp", "2020-06-29", "GetUserUploadSign") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetUserUploadSignRequest::~GetUserUploadSignRequest() {}
|
||||
|
||||
std::string GetUserUploadSignRequest::getServiceCode() const {
|
||||
return serviceCode_;
|
||||
}
|
||||
|
||||
void GetUserUploadSignRequest::setServiceCode(const std::string &serviceCode) {
|
||||
serviceCode_ = serviceCode;
|
||||
setBodyParameter(std::string("ServiceCode"), serviceCode);
|
||||
}
|
||||
|
||||
51
alinlp/src/model/GetUserUploadSignResult.cc
Normal file
51
alinlp/src/model/GetUserUploadSignResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/alinlp/model/GetUserUploadSignResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alinlp;
|
||||
using namespace AlibabaCloud::Alinlp::Model;
|
||||
|
||||
GetUserUploadSignResult::GetUserUploadSignResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetUserUploadSignResult::GetUserUploadSignResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetUserUploadSignResult::~GetUserUploadSignResult()
|
||||
{}
|
||||
|
||||
void GetUserUploadSignResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetUserUploadSignResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
81
alinlp/src/model/InsertCustomRequest.cc
Normal file
81
alinlp/src/model/InsertCustomRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/alinlp/model/InsertCustomRequest.h>
|
||||
|
||||
using AlibabaCloud::Alinlp::Model::InsertCustomRequest;
|
||||
|
||||
InsertCustomRequest::InsertCustomRequest()
|
||||
: RpcServiceRequest("alinlp", "2020-06-29", "InsertCustom") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
InsertCustomRequest::~InsertCustomRequest() {}
|
||||
|
||||
std::string InsertCustomRequest::getCustomUrl() const {
|
||||
return customUrl_;
|
||||
}
|
||||
|
||||
void InsertCustomRequest::setCustomUrl(const std::string &customUrl) {
|
||||
customUrl_ = customUrl;
|
||||
setBodyParameter(std::string("CustomUrl"), customUrl);
|
||||
}
|
||||
|
||||
std::string InsertCustomRequest::getRegUrl() const {
|
||||
return regUrl_;
|
||||
}
|
||||
|
||||
void InsertCustomRequest::setRegUrl(const std::string ®Url) {
|
||||
regUrl_ = regUrl;
|
||||
setBodyParameter(std::string("RegUrl"), regUrl);
|
||||
}
|
||||
|
||||
std::string InsertCustomRequest::getServiceCode() const {
|
||||
return serviceCode_;
|
||||
}
|
||||
|
||||
void InsertCustomRequest::setServiceCode(const std::string &serviceCode) {
|
||||
serviceCode_ = serviceCode;
|
||||
setBodyParameter(std::string("ServiceCode"), serviceCode);
|
||||
}
|
||||
|
||||
std::string InsertCustomRequest::getRegFileName() const {
|
||||
return regFileName_;
|
||||
}
|
||||
|
||||
void InsertCustomRequest::setRegFileName(const std::string ®FileName) {
|
||||
regFileName_ = regFileName;
|
||||
setBodyParameter(std::string("RegFileName"), regFileName);
|
||||
}
|
||||
|
||||
std::string InsertCustomRequest::getCustomFileName() const {
|
||||
return customFileName_;
|
||||
}
|
||||
|
||||
void InsertCustomRequest::setCustomFileName(const std::string &customFileName) {
|
||||
customFileName_ = customFileName;
|
||||
setBodyParameter(std::string("CustomFileName"), customFileName);
|
||||
}
|
||||
|
||||
int InsertCustomRequest::getApiId() const {
|
||||
return apiId_;
|
||||
}
|
||||
|
||||
void InsertCustomRequest::setApiId(int apiId) {
|
||||
apiId_ = apiId;
|
||||
setBodyParameter(std::string("ApiId"), std::to_string(apiId));
|
||||
}
|
||||
|
||||
51
alinlp/src/model/InsertCustomResult.cc
Normal file
51
alinlp/src/model/InsertCustomResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/alinlp/model/InsertCustomResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alinlp;
|
||||
using namespace AlibabaCloud::Alinlp::Model;
|
||||
|
||||
InsertCustomResult::InsertCustomResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
InsertCustomResult::InsertCustomResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
InsertCustomResult::~InsertCustomResult()
|
||||
{}
|
||||
|
||||
void InsertCustomResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string InsertCustomResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user