Supported getUserUploadSign for user.
This commit is contained in:
@@ -87,6 +87,8 @@ set(alinlp_public_header_model
|
||||
include/alibabacloud/alinlp/model/GetTcChGeneralResult.h
|
||||
include/alibabacloud/alinlp/model/GetTsChEcomRequest.h
|
||||
include/alibabacloud/alinlp/model/GetTsChEcomResult.h
|
||||
include/alibabacloud/alinlp/model/GetUserUploadSignRequest.h
|
||||
include/alibabacloud/alinlp/model/GetUserUploadSignResult.h
|
||||
include/alibabacloud/alinlp/model/GetWeChCommentRequest.h
|
||||
include/alibabacloud/alinlp/model/GetWeChCommentResult.h
|
||||
include/alibabacloud/alinlp/model/GetWeChEcomRequest.h
|
||||
@@ -115,6 +117,8 @@ set(alinlp_public_header_model
|
||||
include/alibabacloud/alinlp/model/GetWsCustomizedSeaEcomResult.h
|
||||
include/alibabacloud/alinlp/model/GetWsCustomizedSeaGeneralRequest.h
|
||||
include/alibabacloud/alinlp/model/GetWsCustomizedSeaGeneralResult.h
|
||||
include/alibabacloud/alinlp/model/InsertCustomRequest.h
|
||||
include/alibabacloud/alinlp/model/InsertCustomResult.h
|
||||
include/alibabacloud/alinlp/model/OpenAlinlpServiceRequest.h
|
||||
include/alibabacloud/alinlp/model/OpenAlinlpServiceResult.h
|
||||
include/alibabacloud/alinlp/model/RequestTableQARequest.h
|
||||
@@ -190,6 +194,8 @@ set(alinlp_src
|
||||
src/model/GetTcChGeneralResult.cc
|
||||
src/model/GetTsChEcomRequest.cc
|
||||
src/model/GetTsChEcomResult.cc
|
||||
src/model/GetUserUploadSignRequest.cc
|
||||
src/model/GetUserUploadSignResult.cc
|
||||
src/model/GetWeChCommentRequest.cc
|
||||
src/model/GetWeChCommentResult.cc
|
||||
src/model/GetWeChEcomRequest.cc
|
||||
@@ -218,6 +224,8 @@ set(alinlp_src
|
||||
src/model/GetWsCustomizedSeaEcomResult.cc
|
||||
src/model/GetWsCustomizedSeaGeneralRequest.cc
|
||||
src/model/GetWsCustomizedSeaGeneralResult.cc
|
||||
src/model/InsertCustomRequest.cc
|
||||
src/model/InsertCustomResult.cc
|
||||
src/model/OpenAlinlpServiceRequest.cc
|
||||
src/model/OpenAlinlpServiceResult.cc
|
||||
src/model/RequestTableQARequest.cc
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
#include "model/GetTcChGeneralResult.h"
|
||||
#include "model/GetTsChEcomRequest.h"
|
||||
#include "model/GetTsChEcomResult.h"
|
||||
#include "model/GetUserUploadSignRequest.h"
|
||||
#include "model/GetUserUploadSignResult.h"
|
||||
#include "model/GetWeChCommentRequest.h"
|
||||
#include "model/GetWeChCommentResult.h"
|
||||
#include "model/GetWeChEcomRequest.h"
|
||||
@@ -116,6 +118,8 @@
|
||||
#include "model/GetWsCustomizedSeaEcomResult.h"
|
||||
#include "model/GetWsCustomizedSeaGeneralRequest.h"
|
||||
#include "model/GetWsCustomizedSeaGeneralResult.h"
|
||||
#include "model/InsertCustomRequest.h"
|
||||
#include "model/InsertCustomResult.h"
|
||||
#include "model/OpenAlinlpServiceRequest.h"
|
||||
#include "model/OpenAlinlpServiceResult.h"
|
||||
#include "model/RequestTableQARequest.h"
|
||||
@@ -230,6 +234,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetTsChEcomResult> GetTsChEcomOutcome;
|
||||
typedef std::future<GetTsChEcomOutcome> GetTsChEcomOutcomeCallable;
|
||||
typedef std::function<void(const AlinlpClient*, const Model::GetTsChEcomRequest&, const GetTsChEcomOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTsChEcomAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetUserUploadSignResult> GetUserUploadSignOutcome;
|
||||
typedef std::future<GetUserUploadSignOutcome> GetUserUploadSignOutcomeCallable;
|
||||
typedef std::function<void(const AlinlpClient*, const Model::GetUserUploadSignRequest&, const GetUserUploadSignOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetUserUploadSignAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetWeChCommentResult> GetWeChCommentOutcome;
|
||||
typedef std::future<GetWeChCommentOutcome> GetWeChCommentOutcomeCallable;
|
||||
typedef std::function<void(const AlinlpClient*, const Model::GetWeChCommentRequest&, const GetWeChCommentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetWeChCommentAsyncHandler;
|
||||
@@ -272,6 +279,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetWsCustomizedSeaGeneralResult> GetWsCustomizedSeaGeneralOutcome;
|
||||
typedef std::future<GetWsCustomizedSeaGeneralOutcome> GetWsCustomizedSeaGeneralOutcomeCallable;
|
||||
typedef std::function<void(const AlinlpClient*, const Model::GetWsCustomizedSeaGeneralRequest&, const GetWsCustomizedSeaGeneralOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetWsCustomizedSeaGeneralAsyncHandler;
|
||||
typedef Outcome<Error, Model::InsertCustomResult> InsertCustomOutcome;
|
||||
typedef std::future<InsertCustomOutcome> InsertCustomOutcomeCallable;
|
||||
typedef std::function<void(const AlinlpClient*, const Model::InsertCustomRequest&, const InsertCustomOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InsertCustomAsyncHandler;
|
||||
typedef Outcome<Error, Model::OpenAlinlpServiceResult> OpenAlinlpServiceOutcome;
|
||||
typedef std::future<OpenAlinlpServiceOutcome> OpenAlinlpServiceOutcomeCallable;
|
||||
typedef std::function<void(const AlinlpClient*, const Model::OpenAlinlpServiceRequest&, const OpenAlinlpServiceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> OpenAlinlpServiceAsyncHandler;
|
||||
@@ -385,6 +395,9 @@ namespace AlibabaCloud
|
||||
GetTsChEcomOutcome getTsChEcom(const Model::GetTsChEcomRequest &request)const;
|
||||
void getTsChEcomAsync(const Model::GetTsChEcomRequest& request, const GetTsChEcomAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetTsChEcomOutcomeCallable getTsChEcomCallable(const Model::GetTsChEcomRequest& request) const;
|
||||
GetUserUploadSignOutcome getUserUploadSign(const Model::GetUserUploadSignRequest &request)const;
|
||||
void getUserUploadSignAsync(const Model::GetUserUploadSignRequest& request, const GetUserUploadSignAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetUserUploadSignOutcomeCallable getUserUploadSignCallable(const Model::GetUserUploadSignRequest& request) const;
|
||||
GetWeChCommentOutcome getWeChComment(const Model::GetWeChCommentRequest &request)const;
|
||||
void getWeChCommentAsync(const Model::GetWeChCommentRequest& request, const GetWeChCommentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetWeChCommentOutcomeCallable getWeChCommentCallable(const Model::GetWeChCommentRequest& request) const;
|
||||
@@ -427,6 +440,9 @@ namespace AlibabaCloud
|
||||
GetWsCustomizedSeaGeneralOutcome getWsCustomizedSeaGeneral(const Model::GetWsCustomizedSeaGeneralRequest &request)const;
|
||||
void getWsCustomizedSeaGeneralAsync(const Model::GetWsCustomizedSeaGeneralRequest& request, const GetWsCustomizedSeaGeneralAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetWsCustomizedSeaGeneralOutcomeCallable getWsCustomizedSeaGeneralCallable(const Model::GetWsCustomizedSeaGeneralRequest& request) const;
|
||||
InsertCustomOutcome insertCustom(const Model::InsertCustomRequest &request)const;
|
||||
void insertCustomAsync(const Model::InsertCustomRequest& request, const InsertCustomAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
InsertCustomOutcomeCallable insertCustomCallable(const Model::InsertCustomRequest& request) const;
|
||||
OpenAlinlpServiceOutcome openAlinlpService(const Model::OpenAlinlpServiceRequest &request)const;
|
||||
void openAlinlpServiceAsync(const Model::OpenAlinlpServiceRequest& request, const OpenAlinlpServiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
OpenAlinlpServiceOutcomeCallable openAlinlpServiceCallable(const Model::OpenAlinlpServiceRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNREQUEST_H_
|
||||
#define ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNREQUEST_H_
|
||||
|
||||
#include <alibabacloud/alinlp/AlinlpExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Alinlp {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALINLP_EXPORT GetUserUploadSignRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GetUserUploadSignRequest();
|
||||
~GetUserUploadSignRequest();
|
||||
std::string getServiceCode() const;
|
||||
void setServiceCode(const std::string &serviceCode);
|
||||
|
||||
private:
|
||||
std::string serviceCode_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Alinlp
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNRESULT_H_
|
||||
#define ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/alinlp/AlinlpExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Alinlp
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALINLP_EXPORT GetUserUploadSignResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GetUserUploadSignResult();
|
||||
explicit GetUserUploadSignResult(const std::string &payload);
|
||||
~GetUserUploadSignResult();
|
||||
std::string getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNRESULT_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMREQUEST_H_
|
||||
#define ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMREQUEST_H_
|
||||
|
||||
#include <alibabacloud/alinlp/AlinlpExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Alinlp {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALINLP_EXPORT InsertCustomRequest : public RpcServiceRequest {
|
||||
public:
|
||||
InsertCustomRequest();
|
||||
~InsertCustomRequest();
|
||||
std::string getCustomUrl() const;
|
||||
void setCustomUrl(const std::string &customUrl);
|
||||
std::string getRegUrl() const;
|
||||
void setRegUrl(const std::string ®Url);
|
||||
std::string getServiceCode() const;
|
||||
void setServiceCode(const std::string &serviceCode);
|
||||
std::string getRegFileName() const;
|
||||
void setRegFileName(const std::string ®FileName);
|
||||
std::string getCustomFileName() const;
|
||||
void setCustomFileName(const std::string &customFileName);
|
||||
int getApiId() const;
|
||||
void setApiId(int apiId);
|
||||
|
||||
private:
|
||||
std::string customUrl_;
|
||||
std::string regUrl_;
|
||||
std::string serviceCode_;
|
||||
std::string regFileName_;
|
||||
std::string customFileName_;
|
||||
int apiId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Alinlp
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMRESULT_H_
|
||||
#define ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/alinlp/AlinlpExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Alinlp
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALINLP_EXPORT InsertCustomResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
InsertCustomResult();
|
||||
explicit InsertCustomResult(const std::string &payload);
|
||||
~InsertCustomResult();
|
||||
std::string getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMRESULT_H_
|
||||
@@ -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