Compare commits

..

18 Commits

Author SHA1 Message Date
sdk-team
44130b741e Public beta version. 2020-07-17 11:47:07 +08:00
sdk-team
1ac661d847 Edit ListTraceApp api. 2020-07-15 20:11:42 +08:00
sdk-team
401f5f7e4c Modify ConfigureBackupPlan. 2020-07-15 18:18:52 +08:00
sdk-team
eee5186ffd Support ModifyImageAttribute by LaunchPermission. 2020-07-15 17:26:53 +08:00
sdk-team
ac957846a2 Add ListEventAlgorithmResult API. 2020-07-14 19:42:20 +08:00
sdk-team
bf6b90c665 Add ListEventAlgorithmResult API. 2020-07-14 17:51:23 +08:00
sdk-team
499b696774 Add ListBodyAlgorithmResult API. 2020-07-14 17:44:54 +08:00
sdk-team
8bcded107d Add ListBodyAlgorithmResult API. 2020-07-14 17:32:48 +08:00
sdk-team
26788350a5 Add ListBodyAlgorithmResult API. 2020-07-14 15:29:19 +08:00
sdk-team
37e0116875 Add ListBodyAlgorithmResult API. 2020-07-10 13:58:39 +08:00
sdk-team
6a5e45a550 Add ListBodyAlgorithmResult API. 2020-07-10 13:25:08 +08:00
sdk-team
fd6a6949fb Remove GetFootwearPosition PullTakeShoesEvent PullTryOnShoesEvent. 2020-07-08 19:54:20 +08:00
sdk-team
4cda4f477d Generated 2020-05-18 for dataworks-public. 2020-07-08 17:40:37 +08:00
sdk-team
7959141d87 Add video compose api. 2020-07-08 17:39:55 +08:00
sdk-team
53ce2f6947 Add video summarization related API. 2020-07-08 16:02:33 +08:00
sdk-team
161e51556b Add video summarization related API. 2020-07-07 23:35:51 +08:00
sdk-team
fc24f8e624 Generated 2020-05-18 for dataworks-public. 2020-07-07 17:20:53 +08:00
wb-hx510875
b5602fc4a4 fix code style 2020-07-07 14:19:04 +08:00
175 changed files with 5680 additions and 1514 deletions

View File

@@ -1,3 +1,63 @@
2020-07-17 Version: 1.36.520
- Public beta version.
- Add Api Overseas.
2020-07-15 Version: 1.36.519
- Edit ListTraceApp api.
- Edit SearchTraceAppByName api.
- Edut SearchTraceAppByPage api.
2020-07-15 Version: 1.36.518
- Modify ConfigureBackupPlan.
- Modify DescribeFullBackupList.
- Modify DescribeBackupPlanList.
- Modify DescribeRestoreRangeInfo.
2020-07-15 Version: 1.36.517
- Support ModifyImageAttribute by LaunchPermission.
- Support ImageFamily.
2020-07-14 Version: 1.36.516
- Add ListEventAlgorithmResult API.
2020-07-14 Version: 1.36.515
- Add ListEventAlgorithmResult API.
2020-07-14 Version: 1.36.514
- Add ListBodyAlgorithmResult API.
2020-07-14 Version: 1.36.513
- Add ListBodyAlgorithmResult API.
2020-07-14 Version: 1.36.512
- Add ListBodyAlgorithmResult API.
2020-07-10 Version: 1.36.511
- Add ListBodyAlgorithmResult API.
2020-07-10 Version: 1.36.510
- Add ListBodyAlgorithmResult API.
2020-07-08 Version: 1.36.509
- Remove GetFootwearPosition PullTakeShoesEvent PullTryOnShoesEvent.
- Add GetFootwearEvent.
- Please ignore the pd s pot.
2020-07-08 Version: 1.36.508
- Generated 2020-05-18 for `dataworks-public`.
2020-07-08 Version: 1.36.507
- Add video compose api.
2020-07-08 Version: 1.36.506
- Add video summarization related API.
2020-07-07 Version: 1.36.505
- Add video summarization related API.
2020-07-07 Version: 1.36.504
- Generated 2020-05-18 for `dataworks-public`.
2020-07-03 Version: 1.36.503
- Supported UpdateUserBucketConfig.

View File

@@ -1 +1 @@
1.36.503
1.36.520

View File

@@ -45,6 +45,8 @@ set(aliyuncvc_public_header_model
include/alibabacloud/aliyuncvc/model/CreateUserResult.h
include/alibabacloud/aliyuncvc/model/CreateUserInternationalRequest.h
include/alibabacloud/aliyuncvc/model/CreateUserInternationalResult.h
include/alibabacloud/aliyuncvc/model/CustomGonggeLayoutRequest.h
include/alibabacloud/aliyuncvc/model/CustomGonggeLayoutResult.h
include/alibabacloud/aliyuncvc/model/DeleteDeviceRequest.h
include/alibabacloud/aliyuncvc/model/DeleteDeviceResult.h
include/alibabacloud/aliyuncvc/model/DeleteLiveRequest.h
@@ -134,6 +136,8 @@ set(aliyuncvc_src
src/model/CreateUserResult.cc
src/model/CreateUserInternationalRequest.cc
src/model/CreateUserInternationalResult.cc
src/model/CustomGonggeLayoutRequest.cc
src/model/CustomGonggeLayoutResult.cc
src/model/DeleteDeviceRequest.cc
src/model/DeleteDeviceResult.cc
src/model/DeleteLiveRequest.cc

View File

@@ -46,6 +46,8 @@
#include "model/CreateUserResult.h"
#include "model/CreateUserInternationalRequest.h"
#include "model/CreateUserInternationalResult.h"
#include "model/CustomGonggeLayoutRequest.h"
#include "model/CustomGonggeLayoutResult.h"
#include "model/DeleteDeviceRequest.h"
#include "model/DeleteDeviceResult.h"
#include "model/DeleteLiveRequest.h"
@@ -153,6 +155,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateUserInternationalResult> CreateUserInternationalOutcome;
typedef std::future<CreateUserInternationalOutcome> CreateUserInternationalOutcomeCallable;
typedef std::function<void(const AliyuncvcClient*, const Model::CreateUserInternationalRequest&, const CreateUserInternationalOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateUserInternationalAsyncHandler;
typedef Outcome<Error, Model::CustomGonggeLayoutResult> CustomGonggeLayoutOutcome;
typedef std::future<CustomGonggeLayoutOutcome> CustomGonggeLayoutOutcomeCallable;
typedef std::function<void(const AliyuncvcClient*, const Model::CustomGonggeLayoutRequest&, const CustomGonggeLayoutOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CustomGonggeLayoutAsyncHandler;
typedef Outcome<Error, Model::DeleteDeviceResult> DeleteDeviceOutcome;
typedef std::future<DeleteDeviceOutcome> DeleteDeviceOutcomeCallable;
typedef std::function<void(const AliyuncvcClient*, const Model::DeleteDeviceRequest&, const DeleteDeviceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteDeviceAsyncHandler;
@@ -287,6 +292,9 @@ namespace AlibabaCloud
CreateUserInternationalOutcome createUserInternational(const Model::CreateUserInternationalRequest &request)const;
void createUserInternationalAsync(const Model::CreateUserInternationalRequest& request, const CreateUserInternationalAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateUserInternationalOutcomeCallable createUserInternationalCallable(const Model::CreateUserInternationalRequest& request) const;
CustomGonggeLayoutOutcome customGonggeLayout(const Model::CustomGonggeLayoutRequest &request)const;
void customGonggeLayoutAsync(const Model::CustomGonggeLayoutRequest& request, const CustomGonggeLayoutAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CustomGonggeLayoutOutcomeCallable customGonggeLayoutCallable(const Model::CustomGonggeLayoutRequest& request) const;
DeleteDeviceOutcome deleteDevice(const Model::DeleteDeviceRequest &request)const;
void deleteDeviceAsync(const Model::DeleteDeviceRequest& request, const DeleteDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteDeviceOutcomeCallable deleteDeviceCallable(const Model::DeleteDeviceRequest& request) const;

View 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.
*/
#ifndef ALIBABACLOUD_ALIYUNCVC_MODEL_CUSTOMGONGGELAYOUTREQUEST_H_
#define ALIBABACLOUD_ALIYUNCVC_MODEL_CUSTOMGONGGELAYOUTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/aliyuncvc/AliyuncvcExport.h>
namespace AlibabaCloud
{
namespace Aliyuncvc
{
namespace Model
{
class ALIBABACLOUD_ALIYUNCVC_EXPORT CustomGonggeLayoutRequest : public RpcServiceRequest
{
public:
CustomGonggeLayoutRequest();
~CustomGonggeLayoutRequest();
std::string getMeetingUUID()const;
void setMeetingUUID(const std::string& meetingUUID);
std::string getLayoutSolution()const;
void setLayoutSolution(const std::string& layoutSolution);
private:
std::string meetingUUID_;
std::string layoutSolution_;
};
}
}
}
#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_CUSTOMGONGGELAYOUTREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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_ALIYUNCVC_MODEL_CUSTOMGONGGELAYOUTRESULT_H_
#define ALIBABACLOUD_ALIYUNCVC_MODEL_CUSTOMGONGGELAYOUTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aliyuncvc/AliyuncvcExport.h>
namespace AlibabaCloud
{
namespace Aliyuncvc
{
namespace Model
{
class ALIBABACLOUD_ALIYUNCVC_EXPORT CustomGonggeLayoutResult : public ServiceResult
{
public:
CustomGonggeLayoutResult();
explicit CustomGonggeLayoutResult(const std::string &payload);
~CustomGonggeLayoutResult();
std::string getMessage()const;
int getErrorCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int errorCode_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_CUSTOMGONGGELAYOUTRESULT_H_

View File

@@ -483,6 +483,42 @@ AliyuncvcClient::CreateUserInternationalOutcomeCallable AliyuncvcClient::createU
return task->get_future();
}
AliyuncvcClient::CustomGonggeLayoutOutcome AliyuncvcClient::customGonggeLayout(const CustomGonggeLayoutRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CustomGonggeLayoutOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CustomGonggeLayoutOutcome(CustomGonggeLayoutResult(outcome.result()));
else
return CustomGonggeLayoutOutcome(outcome.error());
}
void AliyuncvcClient::customGonggeLayoutAsync(const CustomGonggeLayoutRequest& request, const CustomGonggeLayoutAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, customGonggeLayout(request), context);
};
asyncExecute(new Runnable(fn));
}
AliyuncvcClient::CustomGonggeLayoutOutcomeCallable AliyuncvcClient::customGonggeLayoutCallable(const CustomGonggeLayoutRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CustomGonggeLayoutOutcome()>>(
[this, request]()
{
return this->customGonggeLayout(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AliyuncvcClient::DeleteDeviceOutcome AliyuncvcClient::deleteDevice(const DeleteDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View 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/aliyuncvc/model/CustomGonggeLayoutRequest.h>
using AlibabaCloud::Aliyuncvc::Model::CustomGonggeLayoutRequest;
CustomGonggeLayoutRequest::CustomGonggeLayoutRequest() :
RpcServiceRequest("aliyuncvc", "2019-10-30", "CustomGonggeLayout")
{
setMethod(HttpRequest::Method::Post);
}
CustomGonggeLayoutRequest::~CustomGonggeLayoutRequest()
{}
std::string CustomGonggeLayoutRequest::getMeetingUUID()const
{
return meetingUUID_;
}
void CustomGonggeLayoutRequest::setMeetingUUID(const std::string& meetingUUID)
{
meetingUUID_ = meetingUUID;
setBodyParameter("MeetingUUID", meetingUUID);
}
std::string CustomGonggeLayoutRequest::getLayoutSolution()const
{
return layoutSolution_;
}
void CustomGonggeLayoutRequest::setLayoutSolution(const std::string& layoutSolution)
{
layoutSolution_ = layoutSolution;
setBodyParameter("LayoutSolution", layoutSolution);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/aliyuncvc/model/CustomGonggeLayoutResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Aliyuncvc;
using namespace AlibabaCloud::Aliyuncvc::Model;
CustomGonggeLayoutResult::CustomGonggeLayoutResult() :
ServiceResult()
{}
CustomGonggeLayoutResult::CustomGonggeLayoutResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CustomGonggeLayoutResult::~CustomGonggeLayoutResult()
{}
void CustomGonggeLayoutResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string CustomGonggeLayoutResult::getMessage()const
{
return message_;
}
int CustomGonggeLayoutResult::getErrorCode()const
{
return errorCode_;
}
bool CustomGonggeLayoutResult::getSuccess()const
{
return success_;
}

View File

@@ -29,6 +29,8 @@ set(arms_public_header_model
include/alibabacloud/arms/model/CheckDataConsistencyResult.h
include/alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingRequest.h
include/alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingResult.h
include/alibabacloud/arms/model/ConfigAppRequest.h
include/alibabacloud/arms/model/ConfigAppResult.h
include/alibabacloud/arms/model/CreateAlertContactRequest.h
include/alibabacloud/arms/model/CreateAlertContactResult.h
include/alibabacloud/arms/model/CreateAlertContactGroupRequest.h
@@ -122,6 +124,8 @@ set(arms_src
src/model/CheckDataConsistencyResult.cc
src/model/CheckServiceLinkedRoleForDeletingRequest.cc
src/model/CheckServiceLinkedRoleForDeletingResult.cc
src/model/ConfigAppRequest.cc
src/model/ConfigAppResult.cc
src/model/CreateAlertContactRequest.cc
src/model/CreateAlertContactResult.cc
src/model/CreateAlertContactGroupRequest.cc

View File

@@ -30,6 +30,8 @@
#include "model/CheckDataConsistencyResult.h"
#include "model/CheckServiceLinkedRoleForDeletingRequest.h"
#include "model/CheckServiceLinkedRoleForDeletingResult.h"
#include "model/ConfigAppRequest.h"
#include "model/ConfigAppResult.h"
#include "model/CreateAlertContactRequest.h"
#include "model/CreateAlertContactResult.h"
#include "model/CreateAlertContactGroupRequest.h"
@@ -133,6 +135,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CheckServiceLinkedRoleForDeletingResult> CheckServiceLinkedRoleForDeletingOutcome;
typedef std::future<CheckServiceLinkedRoleForDeletingOutcome> CheckServiceLinkedRoleForDeletingOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::CheckServiceLinkedRoleForDeletingRequest&, const CheckServiceLinkedRoleForDeletingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckServiceLinkedRoleForDeletingAsyncHandler;
typedef Outcome<Error, Model::ConfigAppResult> ConfigAppOutcome;
typedef std::future<ConfigAppOutcome> ConfigAppOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::ConfigAppRequest&, const ConfigAppOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ConfigAppAsyncHandler;
typedef Outcome<Error, Model::CreateAlertContactResult> CreateAlertContactOutcome;
typedef std::future<CreateAlertContactOutcome> CreateAlertContactOutcomeCallable;
typedef std::function<void(const ARMSClient*, const Model::CreateAlertContactRequest&, const CreateAlertContactOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAlertContactAsyncHandler;
@@ -273,6 +278,9 @@ namespace AlibabaCloud
CheckServiceLinkedRoleForDeletingOutcome checkServiceLinkedRoleForDeleting(const Model::CheckServiceLinkedRoleForDeletingRequest &request)const;
void checkServiceLinkedRoleForDeletingAsync(const Model::CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CheckServiceLinkedRoleForDeletingOutcomeCallable checkServiceLinkedRoleForDeletingCallable(const Model::CheckServiceLinkedRoleForDeletingRequest& request) const;
ConfigAppOutcome configApp(const Model::ConfigAppRequest &request)const;
void configAppAsync(const Model::ConfigAppRequest& request, const ConfigAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ConfigAppOutcomeCallable configAppCallable(const Model::ConfigAppRequest& request) const;
CreateAlertContactOutcome createAlertContact(const Model::CreateAlertContactRequest &request)const;
void createAlertContactAsync(const Model::CreateAlertContactRequest& request, const CreateAlertContactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateAlertContactOutcomeCallable createAlertContactCallable(const Model::CreateAlertContactRequest& request) const;

View File

@@ -0,0 +1,54 @@
/*
* 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_ARMS_MODEL_CONFIGAPPREQUEST_H_
#define ALIBABACLOUD_ARMS_MODEL_CONFIGAPPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT ConfigAppRequest : public RpcServiceRequest
{
public:
ConfigAppRequest();
~ConfigAppRequest();
std::string getAppIds()const;
void setAppIds(const std::string& appIds);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
bool getEnable()const;
void setEnable(bool enable);
private:
std::string appIds_;
std::string regionId_;
bool enable_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_CONFIGAPPREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_ARMS_MODEL_CONFIGAPPRESULT_H_
#define ALIBABACLOUD_ARMS_MODEL_CONFIGAPPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/arms/ARMSExport.h>
namespace AlibabaCloud
{
namespace ARMS
{
namespace Model
{
class ALIBABACLOUD_ARMS_EXPORT ConfigAppResult : public ServiceResult
{
public:
ConfigAppResult();
explicit ConfigAppResult(const std::string &payload);
~ConfigAppResult();
std::string getData()const;
protected:
void parse(const std::string &payload);
private:
std::string data_;
};
}
}
}
#endif // !ALIBABACLOUD_ARMS_MODEL_CONFIGAPPRESULT_H_

View File

@@ -40,6 +40,7 @@ namespace AlibabaCloud
long createTime;
long updateTime;
std::string pid;
bool show;
std::string regionId;
std::string appName;
};

View File

@@ -40,6 +40,7 @@ namespace AlibabaCloud
long createTime;
long updateTime;
std::string pid;
bool show;
std::string regionId;
std::string appName;
};

View File

@@ -42,6 +42,7 @@ namespace AlibabaCloud
long createTime;
long updateTime;
std::string pid;
bool show;
std::string regionId;
std::string appName;
};

View File

@@ -195,6 +195,42 @@ ARMSClient::CheckServiceLinkedRoleForDeletingOutcomeCallable ARMSClient::checkSe
return task->get_future();
}
ARMSClient::ConfigAppOutcome ARMSClient::configApp(const ConfigAppRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ConfigAppOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ConfigAppOutcome(ConfigAppResult(outcome.result()));
else
return ConfigAppOutcome(outcome.error());
}
void ARMSClient::configAppAsync(const ConfigAppRequest& request, const ConfigAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, configApp(request), context);
};
asyncExecute(new Runnable(fn));
}
ARMSClient::ConfigAppOutcomeCallable ARMSClient::configAppCallable(const ConfigAppRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ConfigAppOutcome()>>(
[this, request]()
{
return this->configApp(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ARMSClient::CreateAlertContactOutcome ARMSClient::createAlertContact(const CreateAlertContactRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,62 @@
/*
* 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/arms/model/ConfigAppRequest.h>
using AlibabaCloud::ARMS::Model::ConfigAppRequest;
ConfigAppRequest::ConfigAppRequest() :
RpcServiceRequest("arms", "2019-08-08", "ConfigApp")
{
setMethod(HttpRequest::Method::Post);
}
ConfigAppRequest::~ConfigAppRequest()
{}
std::string ConfigAppRequest::getAppIds()const
{
return appIds_;
}
void ConfigAppRequest::setAppIds(const std::string& appIds)
{
appIds_ = appIds;
setParameter("AppIds", appIds);
}
std::string ConfigAppRequest::getRegionId()const
{
return regionId_;
}
void ConfigAppRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
bool ConfigAppRequest::getEnable()const
{
return enable_;
}
void ConfigAppRequest::setEnable(bool enable)
{
enable_ = enable;
setParameter("Enable", enable ? "true" : "false");
}

View 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/arms/model/ConfigAppResult.h>
#include <json/json.h>
using namespace AlibabaCloud::ARMS;
using namespace AlibabaCloud::ARMS::Model;
ConfigAppResult::ConfigAppResult() :
ServiceResult()
{}
ConfigAppResult::ConfigAppResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ConfigAppResult::~ConfigAppResult()
{}
void ConfigAppResult::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 ConfigAppResult::getData()const
{
return data_;
}

View File

@@ -59,6 +59,8 @@ void ListTraceAppsResult::parse(const std::string &payload)
traceAppsObject.updateTime = std::stol(valueTraceAppsTraceApp["UpdateTime"].asString());
if(!valueTraceAppsTraceApp["RegionId"].isNull())
traceAppsObject.regionId = valueTraceAppsTraceApp["RegionId"].asString();
if(!valueTraceAppsTraceApp["Show"].isNull())
traceAppsObject.show = valueTraceAppsTraceApp["Show"].asString() == "true";
traceApps_.push_back(traceAppsObject);
}
if(!value["Success"].isNull())

View File

@@ -59,6 +59,8 @@ void SearchTraceAppByNameResult::parse(const std::string &payload)
traceAppsObject.createTime = std::stol(valueTraceAppsTraceApp["CreateTime"].asString());
if(!valueTraceAppsTraceApp["UpdateTime"].isNull())
traceAppsObject.updateTime = std::stol(valueTraceAppsTraceApp["UpdateTime"].asString());
if(!valueTraceAppsTraceApp["Show"].isNull())
traceAppsObject.show = valueTraceAppsTraceApp["Show"].asString() == "true";
traceApps_.push_back(traceAppsObject);
}

View File

@@ -66,6 +66,8 @@ void SearchTraceAppByPageResult::parse(const std::string &payload)
traceAppObject.createTime = std::stol(pageBeanNodeTraceAppsTraceApp["CreateTime"].asString());
if(!pageBeanNodeTraceAppsTraceApp["UpdateTime"].isNull())
traceAppObject.updateTime = std::stol(pageBeanNodeTraceAppsTraceApp["UpdateTime"].asString());
if(!pageBeanNodeTraceAppsTraceApp["Show"].isNull())
traceAppObject.show = pageBeanNodeTraceAppsTraceApp["Show"].asString() == "true";
pageBean_.traceApps.push_back(traceAppObject);
}

View File

@@ -30,6 +30,6 @@ const long kDefaultReadTimeout = 10000;
ALIBABACLOUD_CORE_EXPORT void InitializeSdk();
ALIBABACLOUD_CORE_EXPORT bool IsSdkInitialized();
ALIBABACLOUD_CORE_EXPORT void ShutdownSdk();
} // namespace AlibabaCloud
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ALIBABACLOUD_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ALIBABACLOUD_H_

View File

@@ -17,21 +17,21 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_ASYNCCALLERCONTEXT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_ASYNCCALLERCONTEXT_H_
#include <string>
#include "CoreExport.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT AsyncCallerContext {
public:
public:
AsyncCallerContext();
explicit AsyncCallerContext(const std::string &uuid);
virtual ~AsyncCallerContext();
std::string uuid()const;
std::string uuid() const;
void setUuid(const std::string &uuid);
private:
private:
std::string uuid_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ASYNCCALLERCONTEXT_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ASYNCCALLERCONTEXT_H_

View File

@@ -17,23 +17,23 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_CLIENTCONFIGURATION_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_CLIENTCONFIGURATION_H_
#include <memory>
#include <string>
#include "CredentialsProvider.h"
#include "CoreExport.h"
#include "CredentialsProvider.h"
#include "NetworkProxy.h"
#include "Signer.h"
#include <memory>
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT ClientConfiguration {
public:
public:
explicit ClientConfiguration(const std::string &regionId = "cn-hangzhou",
const NetworkProxy &proxy = NetworkProxy());
const NetworkProxy &proxy = NetworkProxy());
~ClientConfiguration();
std::string endpoint()const;
NetworkProxy proxy()const;
std::string regionId()const;
std::string endpoint() const;
NetworkProxy proxy() const;
std::string regionId() const;
void setEndpoint(const std::string &endpoint);
void setProxy(const NetworkProxy &proxy);
void setRegionId(const std::string &regionId);
@@ -46,7 +46,7 @@ class ALIBABACLOUD_CORE_EXPORT ClientConfiguration {
bool rejectUnauthorized() const;
void setRejectUnauthorized(const bool rejectUnauthorized);
private:
private:
std::string endpoint_;
NetworkProxy proxy_;
std::string regionId_;
@@ -54,6 +54,6 @@ class ALIBABACLOUD_CORE_EXPORT ClientConfiguration {
long readTimeout_;
bool rejectUnauthorized_ = true;
};
} // namespace AlibabaCloud
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CLIENTCONFIGURATION_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CLIENTCONFIGURATION_H_

View File

@@ -1,77 +1,81 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONCLIENT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONCLIENT_H_
#include "AsyncCallerContext.h"
#include "ClientConfiguration.h"
#include "CommonRequest.h"
#include "CommonResponse.h"
#include "CoreClient.h"
#include "CoreExport.h"
#include "CredentialsProvider.h"
#include <future>
#include <memory>
#include <string>
#include "AsyncCallerContext.h"
#include "ClientConfiguration.h"
#include "CoreExport.h"
#include "CoreClient.h"
#include "CommonRequest.h"
#include "CommonResponse.h"
#include "CredentialsProvider.h"
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT CommonClient : public CoreClient {
public:
public:
typedef Outcome<Error, CommonResponse> CommonResponseOutcome;
typedef std::future<CommonResponseOutcome> CommonResponseOutcomeCallable;
typedef std::function<void(const CommonClient*, const CommonRequest&,
const CommonResponseOutcome&,
const std::shared_ptr<const AsyncCallerContext>&)>
CommonResponseAsyncHandler;
typedef std::function<void(const CommonClient *, const CommonRequest &,
const CommonResponseOutcome &,
const std::shared_ptr<const AsyncCallerContext> &)>
CommonResponseAsyncHandler;
typedef Outcome<Error, std::string> JsonOutcome;
CommonClient(const Credentials &credentials,
const ClientConfiguration &configuration);
const ClientConfiguration &configuration);
CommonClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration);
const ClientConfiguration &configuration);
CommonClient(const std::string &accessKeyId,
const std::string &accessKeySecret,
const ClientConfiguration &configuration);
const std::string &accessKeySecret,
const ClientConfiguration &configuration);
~CommonClient();
CommonResponseOutcome commonResponse(const CommonRequest &request) const;
void commonResponseAsync(const CommonRequest& request,
const CommonResponseAsyncHandler& handler,
const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CommonResponseOutcomeCallable commonResponseCallable(
const CommonRequest& request) const;
void commonResponseAsync(
const CommonRequest &request, const CommonResponseAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context = nullptr) const;
CommonResponseOutcomeCallable
commonResponseCallable(const CommonRequest &request) const;
protected:
HttpRequest buildHttpRequest(const std::string & endpoint,
const ServiceRequest & msg, HttpRequest::Method method) const override;
HttpRequest buildHttpRequest(const std::string & endpoint,
const CommonRequest &msg, HttpRequest::Method method) const;
HttpRequest buildRoaHttpRequest(const std::string & endpoint,
const CommonRequest &msg, HttpRequest::Method method) const;
HttpRequest buildRpcHttpRequest(const std::string & endpoint,
const CommonRequest &msg, HttpRequest::Method method) const;
JsonOutcome makeRequest(const std::string &endpoint,
const CommonRequest &msg, HttpRequest::Method method =
HttpRequest::Method::Get) const;
protected:
HttpRequest buildHttpRequest(const std::string &endpoint,
const ServiceRequest &msg,
HttpRequest::Method method) const override;
HttpRequest buildHttpRequest(const std::string &endpoint,
const CommonRequest &msg,
HttpRequest::Method method) const;
HttpRequest buildRoaHttpRequest(const std::string &endpoint,
const CommonRequest &msg,
HttpRequest::Method method) const;
HttpRequest buildRpcHttpRequest(const std::string &endpoint,
const CommonRequest &msg,
HttpRequest::Method method) const;
JsonOutcome
makeRequest(const std::string &endpoint, const CommonRequest &msg,
HttpRequest::Method method = HttpRequest::Method::Get) const;
using CoreClient::asyncExecute;
private:
private:
std::shared_ptr<CredentialsProvider> credentialsProvider_;
std::shared_ptr<Signer> signer_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONCLIENT_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONCLIENT_H_

View File

@@ -1,34 +1,31 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONREQUEST_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONREQUEST_H_
#include <string>
#include "CoreExport.h"
#include "ServiceRequest.h"
#include "HttpRequest.h"
#include "ServiceRequest.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT CommonRequest : public ServiceRequest {
public:
enum RequestPattern {
RpcPattern,
RoaPattern
};
public:
enum RequestPattern { RpcPattern, RoaPattern };
explicit CommonRequest(RequestPattern pattern = RpcPattern);
~CommonRequest();
@@ -42,25 +39,25 @@ class ALIBABACLOUD_CORE_EXPORT CommonRequest : public ServiceRequest {
using ServiceRequest::setContent;
void setDomain(const std::string &domain);
void setHeaderParameter(const ParameterNameType &name,
const ParameterValueType &value);
const ParameterValueType &value);
void setHttpMethod(HttpRequest::Method method);
void setQueryParameter(const ParameterNameType &name,
const ParameterValueType &value);
const ParameterValueType &value);
using ServiceRequest::setResourcePath;
void setRequestPattern(RequestPattern pattern);
using ServiceRequest::setVersion;
using ServiceRequest::setScheme;
using ServiceRequest::setVersion;
RequestPattern requestPattern() const;
protected:
protected:
using ServiceRequest::product;
private:
private:
std::string domain_;
RequestPattern requestPattern_;
ParameterCollection queryParams_;
ParameterCollection headerParams_;
HttpRequest::Method httpMethod_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONREQUEST_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONREQUEST_H_

View File

@@ -1,36 +1,36 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONRESPONSE_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONRESPONSE_H_
#include <string>
#include "CoreExport.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT CommonResponse {
public:
public:
CommonResponse();
explicit CommonResponse(const std::string &payload);
~CommonResponse();
std::string payload()const;
std::string payload() const;
private:
private:
std::string payload_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONRESPONSE_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COMMONRESPONSE_H_

View File

@@ -17,43 +17,44 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_CORECLIENT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_CORECLIENT_H_
#include <functional>
#include <memory>
#include <string>
#include "ClientConfiguration.h"
#include "CoreExport.h"
#include "HttpClient.h"
#include "HttpResponse.h"
#include "HttpRequest.h"
#include "HttpResponse.h"
#include "Outcome.h"
#include "ServiceRequest.h"
#include "Runnable.h"
#include "ServiceRequest.h"
#include <functional>
#include <memory>
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT CoreClient {
public:
CoreClient(const std::string & servicename,
const ClientConfiguration &configuration);
public:
CoreClient(const std::string &servicename,
const ClientConfiguration &configuration);
virtual ~CoreClient();
ClientConfiguration configuration() const;
std::string serviceName() const;
protected:
virtual HttpClient::HttpResponseOutcome AttemptRequest(
const std::string & endpoint,
const ServiceRequest &request, HttpRequest::Method method) const;
Error buildCoreError(const HttpResponse &response)const;
bool hasResponseError(const HttpResponse &response)const;
virtual HttpRequest buildHttpRequest(const std::string & endpoint,
const ServiceRequest &msg, HttpRequest::Method method) const = 0;
void asyncExecute(Runnable * r) const;
protected:
virtual HttpClient::HttpResponseOutcome
AttemptRequest(const std::string &endpoint, const ServiceRequest &request,
HttpRequest::Method method) const;
Error buildCoreError(const HttpResponse &response) const;
bool hasResponseError(const HttpResponse &response) const;
virtual HttpRequest buildHttpRequest(const std::string &endpoint,
const ServiceRequest &msg,
HttpRequest::Method method) const = 0;
void asyncExecute(Runnable *r) const;
private:
private:
std::string serviceName_;
ClientConfiguration configuration_;
std::shared_ptr<CredentialsProvider> credentialsProvider_;
HttpClient *httpClient_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CORECLIENT_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CORECLIENT_H_

View File

@@ -20,13 +20,13 @@
#include "Global.h"
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_CORE_LIBRARY)
# define ALIBABACLOUD_CORE_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_CORE_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#if defined(ALIBABACLOUD_CORE_LIBRARY)
#define ALIBABACLOUD_CORE_EXPORT ALIBABACLOUD_DECL_EXPORT
#else
# define ALIBABACLOUD_CORE_EXPORT
#define ALIBABACLOUD_CORE_EXPORT ALIBABACLOUD_DECL_IMPORT
#endif
#else
#define ALIBABACLOUD_CORE_EXPORT
#endif
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COREEXPORT_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_COREEXPORT_H_

View File

@@ -17,15 +17,15 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_CREDENTIALS_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_CREDENTIALS_H_
#include <string>
#include "CoreExport.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT Credentials {
public:
public:
Credentials(const std::string &accessKeyId,
const std::string &accessKeySecret,
const std::string &sessionToken = "");
const std::string &accessKeySecret,
const std::string &sessionToken = "");
~Credentials();
std::string accessKeyId() const;
@@ -35,11 +35,11 @@ class ALIBABACLOUD_CORE_EXPORT Credentials {
void setSessionToken(const std::string &sessionToken);
std::string sessionToken() const;
private:
private:
std::string accessKeyId_;
std::string accessKeySecret_;
std::string sessionToken_;
};
} // namespace AlibabaCloud
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CREDENTIALS_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CREDENTIALS_H_

View File

@@ -22,12 +22,12 @@
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT CredentialsProvider {
public:
public:
CredentialsProvider() = default;
virtual ~CredentialsProvider() = default;
virtual ~CredentialsProvider() = default;
virtual Credentials getCredentials() = 0;
private:
private:
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CREDENTIALSPROVIDER_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_CREDENTIALSPROVIDER_H_

View File

@@ -1,63 +1,60 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_ENDPOINTPROVIDER_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_ENDPOINTPROVIDER_H_
#include <alibabacloud/core/location/LocationClient.h>
#include <alibabacloud/core/CoreClient.h>
#include <string>
#include <alibabacloud/core/location/LocationClient.h>
#include <chrono>
#include <list>
#include <map>
#include <memory>
#include <mutex>
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT EndpointProvider :
public Location::LocationClient {
public:
class ALIBABACLOUD_CORE_EXPORT EndpointProvider
: public Location::LocationClient {
public:
typedef Outcome<Error, std::string> EndpointOutcome;
EndpointProvider(
const std::shared_ptr<Location::LocationClient>& locationClient,
const std::string regionId,
const std::string product,
const std::string serviceCode = std::string(),
int durationSeconds = 3600);
const std::shared_ptr<Location::LocationClient> &locationClient,
const std::string regionId, const std::string product,
const std::string serviceCode = std::string(),
int durationSeconds = 3600);
EndpointProvider(
const Credentials &credentials,
const ClientConfiguration &configuration,
const std::string &regionId,
const std::string &product,
const std::string &serviceCode = std::string(),
int durationSeconds = 3600);
EndpointProvider(const Credentials &credentials,
const ClientConfiguration &configuration,
const std::string &regionId, const std::string &product,
const std::string &serviceCode = std::string(),
int durationSeconds = 3600);
~EndpointProvider();
EndpointOutcome getEndpoint();
using LocationClient::describeEndpoints;
private:
private:
EndpointOutcome loadRemoteEndpoint();
bool checkExpiry()const;
bool checkExpiry() const;
bool loadLocalProductsInfo();
std::string localEndpoint(const std::string regionId,
const std::string product);
const std::string product);
std::mutex cachedMutex_;
std::string cachedEndpoint_;
@@ -67,5 +64,5 @@ class ALIBABACLOUD_CORE_EXPORT EndpointProvider :
std::string product_;
std::string serviceCode_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ENDPOINTPROVIDER_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ENDPOINTPROVIDER_H_

View File

@@ -17,12 +17,12 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_ERROR_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_ERROR_H_
#include <string>
#include "CoreExport.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT Error {
public:
public:
Error() = default;
Error(std::string code, const std::string message);
~Error() = default;
@@ -33,18 +33,18 @@ class ALIBABACLOUD_CORE_EXPORT Error {
std::string requestId() const;
std::string detail() const;
void setErrorCode(const std::string &code);
void setErrorMessage(const std::string& message);
void setHost(const std::string& host);
void setRequestId(const std::string& request);
void setDetail(const std::string& detail);
void setErrorMessage(const std::string &message);
void setHost(const std::string &host);
void setRequestId(const std::string &request);
void setDetail(const std::string &detail);
private:
private:
std::string errorCode_;
std::string message_;
std::string host_;
std::string requestId_;
std::string detail_;
};
} // namespace AlibabaCloud
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ERROR_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ERROR_H_

View File

@@ -20,22 +20,22 @@
#include "Config.h"
#if defined(_WIN32)
# ifdef _MSC_VER
# pragma warning(disable : 4251)
# endif // _MSC_VER
# define ALIBABACLOUD_DECL_EXPORT __declspec(dllexport)
# define ALIBABACLOUD_DECL_IMPORT __declspec(dllimport)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#define ALIBABACLOUD_DECL_EXPORT __declspec(dllexport)
#define ALIBABACLOUD_DECL_IMPORT __declspec(dllimport)
#elif defined(__linux__)
# define ALIBABACLOUD_DECL_EXPORT __attribute__((visibility("default")))
# define ALIBABACLOUD_DECL_IMPORT __attribute__((visibility("default")))
#define ALIBABACLOUD_DECL_EXPORT __attribute__((visibility("default")))
#define ALIBABACLOUD_DECL_IMPORT __attribute__((visibility("default")))
#endif
#if !defined(ALIBABACLOUD_DECL_EXPORT)
# define ALIBABACLOUD_DECL_EXPORT
#define ALIBABACLOUD_DECL_EXPORT
#endif
#if !defined(ALIBABACLOUD_DECL_IMPORT)
# define ALIBABACLOUD_DECL_IMPORT
#define ALIBABACLOUD_DECL_IMPORT
#endif
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_GLOBAL_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_GLOBAL_H_

View File

@@ -22,13 +22,13 @@
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT HmacSha1Signer : public Signer {
public:
public:
HmacSha1Signer();
~HmacSha1Signer();
std::string generate(const std::string &src,
const std::string &secret) const override;
const std::string &secret) const override;
};
} // namespace AlibabaCloud
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HMACSHA1SIGNER_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HMACSHA1SIGNER_H_

View File

@@ -17,29 +17,29 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPCLIENT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPCLIENT_H_
#include <alibabacloud/core/Error.h>
#include <alibabacloud/core/HttpRequest.h>
#include <alibabacloud/core/HttpResponse.h>
#include <alibabacloud/core/NetworkProxy.h>
#include <alibabacloud/core/Outcome.h>
#include <alibabacloud/core/Error.h>
namespace AlibabaCloud {
class HttpClient {
public:
public:
typedef Outcome<Error, HttpResponse> HttpResponseOutcome;
HttpClient();
virtual ~HttpClient();
virtual HttpResponseOutcome makeRequest(const HttpRequest &request) = 0;
NetworkProxy proxy()const;
NetworkProxy proxy() const;
void setProxy(const NetworkProxy &proxy);
bool rejectUnauthorized()const;
bool rejectUnauthorized() const;
void setRejectUnauthorized(const bool &rejectUnauthorized);
private:
private:
NetworkProxy proxy_;
bool rejectUnauthorized_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPCLIENT_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPCLIENT_H_

View File

@@ -17,18 +17,18 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPMESSAGE_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPMESSAGE_H_
#include "CoreExport.h"
#include <map>
#include <string>
#include "CoreExport.h"
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT HttpMessage {
private:
private:
struct ALIBABACLOUD_CORE_EXPORT nocaseLess {
bool operator() (const std::string & s1, const std::string & s2) const;
bool operator()(const std::string &s1, const std::string &s2) const;
};
public:
public:
enum KnownHeader {
Accept,
AcceptCharset,
@@ -52,31 +52,31 @@ class ALIBABACLOUD_CORE_EXPORT HttpMessage {
HttpMessage(const HttpMessage &other);
HttpMessage(HttpMessage &&other);
HttpMessage& operator=(const HttpMessage &other);
HttpMessage& operator=(HttpMessage &&other);
HttpMessage &operator=(const HttpMessage &other);
HttpMessage &operator=(HttpMessage &&other);
virtual ~HttpMessage();
void addHeader(const HeaderNameType &name, const HeaderValueType &value);
void addHeader(KnownHeader header, const HeaderValueType &value);
const char* body()const;
size_t bodySize()const;
bool hasBody()const;
const char *body() const;
size_t bodySize() const;
bool hasBody() const;
HeaderValueType header(const HeaderNameType &name) const;
HeaderValueType header(KnownHeader header) const;
HeaderCollection headers()const;
HeaderCollection headers() const;
void removeHeader(const HeaderNameType &name);
void removeHeader(KnownHeader header);
void setBody(const char *data, size_t size);
void setHeader(const HeaderNameType &name, const HeaderValueType &value);
void setHeader(KnownHeader header, const std::string &value);
protected:
protected:
HttpMessage();
private:
private:
char *body_;
size_t bodySize_;
HeaderCollection headers_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPMESSAGE_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPMESSAGE_H_

View File

@@ -17,41 +17,31 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPREQUEST_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPREQUEST_H_
#include <string>
#include "HttpMessage.h"
#include "Url.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT HttpRequest : public HttpMessage {
public:
enum Method {
Get,
Head,
Post,
Put,
Delete,
Connect,
Options,
Patch,
Trace
};
public:
enum Method { Get, Head, Post, Put, Delete, Connect, Options, Patch, Trace };
explicit HttpRequest(const Url &url = Url(), Method method = Get);
~HttpRequest();
Method method()const;
Method method() const;
void setMethod(Method method);
void setUrl(const Url &url);
Url url()const;
Url url() const;
long connectTimeout() const;
long readTimeout() const;
void setConnectTimeout(const long connectTimeout);
void setReadTimeout(const long readTimeout);
private:
private:
Method method_;
Url url_;
long connectTimeout_;
long readTimeout_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPREQUEST_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPREQUEST_H_

View File

@@ -17,26 +17,26 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPRESPONSE_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPRESPONSE_H_
#include <string>
#include "CoreExport.h"
#include "HttpMessage.h"
#include "HttpRequest.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT HttpResponse : public HttpMessage {
public:
public:
HttpResponse();
explicit HttpResponse(const HttpRequest & request);
explicit HttpResponse(const HttpRequest &request);
~HttpResponse();
HttpRequest request()const;
HttpRequest request() const;
void setStatusCode(int code);
int statusCode()const;
int statusCode() const;
private:
private:
int statusCode_;
HttpRequest request_;
};
} // namespace AlibabaCloud
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPRESPONSE_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_HTTPRESPONSE_H_

View File

@@ -21,11 +21,11 @@
namespace AlibabaCloud {
class InstanceProfileCredentials : public BasicSessionCredentials {
public:
public:
InstanceProfileCredentials();
~InstanceProfileCredentials();
private:
private:
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_INSTANCEPROFILECREDENTIALS_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_INSTANCEPROFILECREDENTIALS_H_

View File

@@ -17,36 +17,37 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_INSTANCEPROFILECREDENTIALSPROVIDER_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_INSTANCEPROFILECREDENTIALSPROVIDER_H_
#include <chrono>
#include <mutex>
#include <memory>
#include <string>
#include "CredentialsProvider.h"
#include "Credentials.h"
#include "../src/EcsMetadataFetcher.h"
#include "Credentials.h"
#include "CredentialsProvider.h"
#include <chrono>
#include <memory>
#include <mutex>
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT InstanceProfileCredentialsProvider :
public CredentialsProvider, public EcsMetadataFetcher {
public:
class ALIBABACLOUD_CORE_EXPORT InstanceProfileCredentialsProvider
: public CredentialsProvider,
public EcsMetadataFetcher {
public:
InstanceProfileCredentialsProvider(const std::string &roleName,
int durationSeconds = 3600);
int durationSeconds = 3600);
~InstanceProfileCredentialsProvider();
std::string roleName()const;
std::string roleName() const;
Credentials getCredentials() override;
using EcsMetadataFetcher::getMetadata;
using EcsMetadataFetcher::roleName;
using EcsMetadataFetcher::setRoleName;
using EcsMetadataFetcher::getMetadata;
private:
private:
void loadCredentials();
bool checkExpiry()const;
bool checkExpiry() const;
std::mutex cachedMutex_;
Credentials cachedCredentials_;
int durationSeconds_;
std::chrono::system_clock::time_point expiry_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_INSTANCEPROFILECREDENTIALSPROVIDER_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_INSTANCEPROFILECREDENTIALSPROVIDER_H_

View File

@@ -17,26 +17,20 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_NETWORKPROXY_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_NETWORKPROXY_H_
#include <string>
#include "CoreExport.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT NetworkProxy {
public:
enum Type {
None = 0,
Http,
Socks5
};
NetworkProxy(Type type = None,
const std::string &hostName = "",
uint16_t port = 0,
const std::string &user = "",
const std::string &password = "");
public:
enum Type { None = 0, Http, Socks5 };
NetworkProxy(Type type = None, const std::string &hostName = "",
uint16_t port = 0, const std::string &user = "",
const std::string &password = "");
~NetworkProxy();
std::string hostName() const;
std::string password() const;
std::string hostName() const;
std::string password() const;
uint16_t port() const;
void setHostName(const std::string &hostName);
void setPassword(const std::string &password);
@@ -44,14 +38,14 @@ class ALIBABACLOUD_CORE_EXPORT NetworkProxy {
void setType(Type type);
void setUser(const std::string &user);
Type type() const;
std::string user() const;
std::string user() const;
private:
private:
std::string hostName_;
std::string password_;
uint16_t port_;
Type type_;
std::string user_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_NETWORKPROXY_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_NETWORKPROXY_H_

View File

@@ -20,24 +20,15 @@
#include <utility>
namespace AlibabaCloud {
template<typename E, typename R>
class Outcome {
public:
Outcome() :
success_(true), e_(), r_() { }
explicit Outcome(const E &e) :
e_(e), success_(false), r_() { }
explicit Outcome(const R &r) :
r_(r), success_(true), e_() { }
Outcome(const Outcome &other) :
success_(other.success_),
e_(other.e_),
r_(other.r_)
{ }
Outcome(Outcome &&other) {
*this = std::move(other);
}
Outcome & operator=(const Outcome &other) {
template <typename E, typename R> class Outcome {
public:
Outcome() : success_(true), e_(), r_() {}
explicit Outcome(const E &e) : e_(e), success_(false), r_() {}
explicit Outcome(const R &r) : r_(r), success_(true), e_() {}
Outcome(const Outcome &other)
: success_(other.success_), e_(other.e_), r_(other.r_) {}
Outcome(Outcome &&other) { *this = std::move(other); }
Outcome &operator=(const Outcome &other) {
if (this != &other) {
success_ = other.success_;
e_ = other.e_;
@@ -45,7 +36,7 @@ class Outcome {
}
return *this;
}
Outcome & operator=(Outcome &&other) {
Outcome &operator=(Outcome &&other) {
if (this != &other) {
success_ = other.success_;
r_ = other.r_;
@@ -54,14 +45,14 @@ class Outcome {
return *this;
}
bool isSuccess()const { return success_; }
E error()const { return e_; }
R result()const { return r_; }
bool isSuccess() const { return success_; }
E error() const { return e_; }
R result() const { return r_; }
private:
private:
bool success_;
E e_;
R r_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_OUTCOME_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_OUTCOME_H_

View File

@@ -17,39 +17,43 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_ROASERVICECLIENT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_ROASERVICECLIENT_H_
#include <map>
#include <memory>
#include <string>
#include "CoreClient.h"
#include "CredentialsProvider.h"
#include "HmacSha1Signer.h"
#include "HttpRequest.h"
#include "RoaServiceRequest.h"
#include <map>
#include <memory>
#include <string>
namespace AlibabaCloud {
class RoaErrorMarshaller;
class ALIBABACLOUD_CORE_EXPORT RoaServiceClient : public CoreClient {
public:
public:
typedef Outcome<Error, std::string> JsonOutcome;
RoaServiceClient(const std::string & servicename,
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration,
const std::shared_ptr<Signer> &signer =
std::make_shared<HmacSha1Signer>());
RoaServiceClient(
const std::string &servicename,
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration,
const std::shared_ptr<Signer> &signer =
std::make_shared<HmacSha1Signer>());
virtual ~RoaServiceClient();
protected:
JsonOutcome makeRequest(const std::string &endpoint,
const RoaServiceRequest &msg, HttpRequest::Method method = HttpRequest::Method::Get) const;
HttpRequest buildHttpRequest(const std::string &endpoint,
const ServiceRequest &msg, HttpRequest::Method method) const override;
HttpRequest buildHttpRequest(const std::string &endpoint,
const RoaServiceRequest &msg, HttpRequest::Method method) const;
protected:
JsonOutcome
makeRequest(const std::string &endpoint, const RoaServiceRequest &msg,
HttpRequest::Method method = HttpRequest::Method::Get) const;
HttpRequest buildHttpRequest(const std::string &endpoint,
const ServiceRequest &msg,
HttpRequest::Method method) const override;
HttpRequest buildHttpRequest(const std::string &endpoint,
const RoaServiceRequest &msg,
HttpRequest::Method method) const;
private:
private:
std::shared_ptr<CredentialsProvider> credentialsProvider_;
std::shared_ptr<Signer> signer_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ROASERVICECLIENT_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ROASERVICECLIENT_H_

View File

@@ -22,15 +22,15 @@
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT RoaServiceRequest : public ServiceRequest {
public:
public:
RoaServiceRequest(const std::string &product, const std::string &version);
virtual ~RoaServiceRequest();
using ServiceRequest::setParameter;
using ServiceRequest::setContent;
using ServiceRequest::parameter;
using ServiceRequest::setScheme;
using ServiceRequest::setResourcePath;
using ServiceRequest::setContent;
using ServiceRequest::setMethod;
using ServiceRequest::setParameter;
using ServiceRequest::setResourcePath;
using ServiceRequest::setScheme;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ROASERVICEREQUEST_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ROASERVICEREQUEST_H_

View File

@@ -17,47 +17,51 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_RPCSERVICECLIENT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_RPCSERVICECLIENT_H_
#include <map>
#include <memory>
#include <string>
#include "CoreClient.h"
#include "CredentialsProvider.h"
#include "HmacSha1Signer.h"
#include "HttpRequest.h"
#include "RpcServiceRequest.h"
#include "Outcome.h"
#include "RpcServiceRequest.h"
#include <map>
#include <memory>
#include <string>
namespace AlibabaCloud {
class RpcErrorMarshaller;
class RpcServiceRequest;
class ALIBABACLOUD_CORE_EXPORT RpcServiceClient : public CoreClient {
public:
public:
typedef Outcome<Error, std::string> JsonOutcome;
RpcServiceClient(const std::string & servicename,
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration,
const std::shared_ptr<Signer> &signer =
std::make_shared<HmacSha1Signer>());
RpcServiceClient(
const std::string &servicename,
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration,
const std::shared_ptr<Signer> &signer =
std::make_shared<HmacSha1Signer>());
virtual ~RpcServiceClient();
std::shared_ptr<CredentialsProvider> credentialsProvider() {
return credentialsProvider_;
}
using CoreClient::configuration;
using CoreClient::AttemptRequest;
using CoreClient::configuration;
protected:
virtual JsonOutcome makeRequest(const std::string &endpoint,
const RpcServiceRequest &msg, HttpRequest::Method method = HttpRequest::Method::Get) const;
HttpRequest buildHttpRequest(const std::string &endpoint,
const ServiceRequest &msg, HttpRequest::Method method) const override;
HttpRequest buildHttpRequest(const std::string &endpoint,
const RpcServiceRequest &msg, HttpRequest::Method method) const;
protected:
virtual JsonOutcome
makeRequest(const std::string &endpoint, const RpcServiceRequest &msg,
HttpRequest::Method method = HttpRequest::Method::Get) const;
HttpRequest buildHttpRequest(const std::string &endpoint,
const ServiceRequest &msg,
HttpRequest::Method method) const override;
HttpRequest buildHttpRequest(const std::string &endpoint,
const RpcServiceRequest &msg,
HttpRequest::Method method) const;
private:
private:
std::shared_ptr<CredentialsProvider> credentialsProvider_;
std::shared_ptr<Signer> signer_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_RPCSERVICECLIENT_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_RPCSERVICECLIENT_H_

View File

@@ -22,17 +22,17 @@
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT RpcServiceRequest : public ServiceRequest {
public:
public:
RpcServiceRequest(const std::string &product, const std::string &version,
const std::string & action);
const std::string &action);
virtual ~RpcServiceRequest();
std::string actionName()const;
std::string actionName() const;
using ServiceRequest::setMethod;
using ServiceRequest::setScheme;
protected:
void setActionName(const std::string &name);
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_RPCSERVICEREQUEST_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_RPCSERVICEREQUEST_H_

View File

@@ -1,33 +1,33 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_RUNNABLE_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_RUNNABLE_H_
#include <functional>
#include "CoreExport.h"
#include <functional>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT Runnable {
public:
public:
explicit Runnable(const std::function<void()> f);
void run()const;
void run() const;
private:
private:
std::function<void()> f_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_RUNNABLE_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_RUNNABLE_H_

View File

@@ -18,10 +18,10 @@
#define CORE_INCLUDE_ALIBABACLOUD_CORE_SERVICEREQUEST_H_
#include "CoreExport.h"
#include "HttpRequest.h"
#include "Url.h"
#include <map>
#include <string>
#include "HttpRequest.h"
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT ServiceRequest {
@@ -47,11 +47,13 @@ public:
void setConnectTimeout(const long connectTimeout);
void setReadTimeout(const long readTimeout);
void setMethod(const HttpRequest::Method method);
void setHeader(const ParameterNameType &name, const ParameterValueType &value);
void setHeader(const ParameterNameType &name,
const ParameterValueType &value);
ParameterValueType getHeader(const ParameterNameType &name);
void removeHeader(const ParameterNameType &name);
ParameterCollection headers() const;
void setBodyParameter(const ParameterNameType &name, const ParameterValueType &value);
void setBodyParameter(const ParameterNameType &name,
const ParameterValueType &value);
protected:
ServiceRequest(const std::string &product, const std::string &version);
@@ -73,7 +75,8 @@ protected:
const ParameterValueType &value);
void setParameters(const ParameterCollection &params);
void setJsonParameters(const ParameterNameType &name, const ParameterCollection &params);
void setJsonParameters(const ParameterNameType &name,
const ParameterCollection &params);
void setResourcePath(const std::string &path);
void setProduct(const std::string &product);
void setVersion(const std::string &version);

View File

@@ -17,23 +17,23 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_SERVICERESULT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_SERVICERESULT_H_
#include <string>
#include "CoreExport.h"
#include <string>
namespace AlibabaCloud {
class PayloadReader;
class ALIBABACLOUD_CORE_EXPORT ServiceResult {
public:
public:
ServiceResult();
virtual ~ServiceResult();
std::string requestId()const;
std::string requestId() const;
protected:
protected:
void setRequestId(const std::string &requestId);
private:
private:
std::string requestId_;
};
} // namespace AlibabaCloud
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_SERVICERESULT_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_SERVICERESULT_H_

View File

@@ -17,31 +17,31 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_SIGNER_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_SIGNER_H_
#include <string>
#include "CoreExport.h"
#include <string>
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT Signer {
public:
public:
enum Type {
HmacSha1,
};
virtual ~Signer();
virtual std::string generate(const std::string &src,
const std::string &secret)const = 0;
std::string name()const;
const std::string &secret) const = 0;
std::string name() const;
Type type() const;
std::string version()const;
std::string version() const;
protected:
protected:
Signer(Type type, const std::string &name,
const std::string &version = "1.0");
const std::string &version = "1.0");
private:
private:
std::string name_;
std::string version_;
Type type_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_SIGNER_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_SIGNER_H_

View File

@@ -23,16 +23,16 @@
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT SimpleCredentialsProvider
: public CredentialsProvider {
public:
public:
explicit SimpleCredentialsProvider(const Credentials &credentials);
SimpleCredentialsProvider(const std::string &accessKeyId,
const std::string &accessKeySecret);
const std::string &accessKeySecret);
~SimpleCredentialsProvider();
Credentials getCredentials() override;
private:
private:
Credentials credentials_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_SIMPLECREDENTIALSPROVIDER_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_SIMPLECREDENTIALSPROVIDER_H_

View File

@@ -1,18 +1,18 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_STSASSUMEROLECREDENTIALSPROVIDER_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_STSASSUMEROLECREDENTIALSPROVIDER_H_
@@ -25,23 +25,23 @@
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT StsAssumeRoleCredentialsProvider
: public CredentialsProvider, public Sts::StsClient {
public:
StsAssumeRoleCredentialsProvider(
const Credentials &credentials,
const ClientConfiguration &configuration,
const std::string &roleArn,
const std::string &roleSessionName,
const std::string &policy = "",
int durationSeconds = 3600);
: public CredentialsProvider,
public Sts::StsClient {
public:
StsAssumeRoleCredentialsProvider(const Credentials &credentials,
const ClientConfiguration &configuration,
const std::string &roleArn,
const std::string &roleSessionName,
const std::string &policy = "",
int durationSeconds = 3600);
~StsAssumeRoleCredentialsProvider();
Credentials getCredentials() override;
using StsClient::assumeRole;
private:
private:
void loadCredentials();
bool checkExpiry()const;
bool checkExpiry() const;
std::mutex cachedMutex_;
Credentials cachedCredentials_;
@@ -51,5 +51,5 @@ class ALIBABACLOUD_CORE_EXPORT StsAssumeRoleCredentialsProvider
std::string roleArn_;
std::string roleSessionName_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_STSASSUMEROLECREDENTIALSPROVIDER_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_STSASSUMEROLECREDENTIALSPROVIDER_H_

View File

@@ -22,13 +22,13 @@
namespace AlibabaCloud {
class ALIBABACLOUD_CORE_EXPORT Url {
public:
public:
explicit Url(const std::string &url = "");
Url(const Url &other) = default;
Url(Url &&other) = default;
~Url();
Url & operator=(const Url &url) = default;
Url & operator=(Url &&other) = default;
Url &operator=(const Url &url) = default;
Url &operator=(Url &&other) = default;
bool operator==(const Url &url) const;
bool operator!=(const Url &url) const;
@@ -38,11 +38,11 @@ class ALIBABACLOUD_CORE_EXPORT Url {
void fromString(const std::string &url);
bool hasFragment() const;
bool hasQuery() const;
std::string host()const;
std::string host() const;
bool isEmpty() const;
bool isValid() const;
int port()const;
std::string password() const;
int port() const;
std::string password() const;
std::string path() const;
std::string query() const;
std::string scheme() const;
@@ -58,9 +58,9 @@ class ALIBABACLOUD_CORE_EXPORT Url {
void setUserName(const std::string &userName);
std::string toString() const;
std::string userInfo() const;
std::string userName() const;
std::string userName() const;
private:
private:
std::string scheme_;
std::string userName_;
std::string password_;
@@ -70,5 +70,5 @@ class ALIBABACLOUD_CORE_EXPORT Url {
std::string query_;
std::string fragment_;
};
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_URL_H_
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_URL_H_

View File

@@ -23,8 +23,7 @@
#include <map>
#include <string>
namespace AlibabaCloud
{
namespace AlibabaCloud {
std::string ComputeContentMD5(const char *data, size_t size);
std::string GenerateUuid();
std::string HttpMethodToString(HttpRequest::Method method);

View File

@@ -17,50 +17,51 @@
#ifndef CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_LOCATIONCLIENT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_LOCATIONCLIENT_H_
#include "model/DescribeEndpointsRequest.h"
#include "model/DescribeEndpointsResult.h"
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include <future>
#include <memory>
#include <string>
#include "model/DescribeEndpointsRequest.h"
#include "model/DescribeEndpointsResult.h"
namespace AlibabaCloud {
namespace Location {
class ALIBABACLOUD_CORE_EXPORT LocationClient : public RpcServiceClient {
public:
public:
typedef Outcome<Error, Model::DescribeEndpointsResult>
DescribeEndpointsOutcome;
typedef std::future<DescribeEndpointsOutcome>
DescribeEndpointsOutcomeCallable;
typedef std::function<void(const LocationClient*,
const Model::DescribeEndpointsRequest&, const DescribeEndpointsOutcome&,
const std::shared_ptr<const AsyncCallerContext>&)>
typedef std::function<void(const LocationClient *,
const Model::DescribeEndpointsRequest &,
const DescribeEndpointsOutcome &,
const std::shared_ptr<const AsyncCallerContext> &)>
DescribeEndpointsAsyncHandler;
LocationClient(const Credentials &credentials,
const ClientConfiguration &configuration);
const ClientConfiguration &configuration);
LocationClient(
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration);
LocationClient(const std::string &accessKeyId,
const std::string &accessKeySecret,
const ClientConfiguration &configuration);
const std::string &accessKeySecret,
const ClientConfiguration &configuration);
LocationClient(
const std::shared_ptr<Location::LocationClient>& locationClient);
const std::shared_ptr<Location::LocationClient> &locationClient);
~LocationClient();
virtual DescribeEndpointsOutcome describeEndpoints(
const Model::DescribeEndpointsRequest &request)const;
void describeEndpointsAsync(const Model::DescribeEndpointsRequest& request,
const DescribeEndpointsAsyncHandler& handler,
const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
virtual DescribeEndpointsOutcome
describeEndpoints(const Model::DescribeEndpointsRequest &request) const;
void describeEndpointsAsync(
const Model::DescribeEndpointsRequest &request,
const DescribeEndpointsAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context = nullptr) const;
DescribeEndpointsOutcomeCallable describeEndpointsCallable(
const Model::DescribeEndpointsRequest& request) const;
using RpcServiceClient::makeRequest;
const Model::DescribeEndpointsRequest &request) const;
using RpcServiceClient::configuration;
using RpcServiceClient::makeRequest;
};
} // namespace Location
} // namespace AlibabaCloud
} // namespace Location
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_LOCATIONCLIENT_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_LOCATIONCLIENT_H_

View File

@@ -23,13 +23,13 @@
namespace AlibabaCloud {
namespace Location {
class ALIBABACLOUD_CORE_EXPORT LocationRequest : public RpcServiceRequest {
public:
explicit LocationRequest(const std::string & action);
public:
explicit LocationRequest(const std::string &action);
virtual ~LocationRequest();
private:
private:
};
} // namespace Location
} // namespace AlibabaCloud
} // namespace Location
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_LOCATIONREQUEST_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_LOCATIONREQUEST_H_

View File

@@ -25,18 +25,18 @@ namespace Location {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT DescribeEndpointsRequest
: public LocationRequest {
public:
public:
DescribeEndpointsRequest();
~DescribeEndpointsRequest();
std::string serviceCode()const;
void setServiceCode(const std::string& serviceCode);
std::string id()const;
void setId(const std::string& id);
std::string type()const;
void setType(const std::string& type);
std::string serviceCode() const;
void setServiceCode(const std::string &serviceCode);
std::string id() const;
void setId(const std::string &id);
std::string type() const;
void setType(const std::string &type);
};
} // namespace Model
} // namespace Location
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_MODEL_DESCRIBEENDPOINTSREQUEST_H_
} // namespace Model
} // namespace Location
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_MODEL_DESCRIBEENDPOINTSREQUEST_H_

View File

@@ -19,14 +19,14 @@
#include <alibabacloud/core/ServiceResult.h>
#include <string>
#include <vector>
#include <utility>
#include <vector>
namespace AlibabaCloud {
namespace Location {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT DescribeEndpointsResult : public ServiceResult {
public:
public:
struct Endpoint {
std::string endpoint;
std::string id;
@@ -40,20 +40,20 @@ class ALIBABACLOUD_CORE_EXPORT DescribeEndpointsResult : public ServiceResult {
explicit DescribeEndpointsResult(const std::string &payload);
~DescribeEndpointsResult();
std::vector<Endpoint> endpoints()const;
std::vector<Endpoint> endpoints() const;
void setEndpoints(const std::vector<Endpoint> &endpoints);
bool success()const;
bool success() const;
void setSuccess(const bool &success);
protected:
protected:
void parse(const std::string &payload);
private:
private:
std::vector<Endpoint> endpoints_;
bool success_;
};
} // namespace Model
} // namespace Location
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_MODEL_DESCRIBEENDPOINTSRESULT_H_
} // namespace Model
} // namespace Location
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_LOCATION_MODEL_DESCRIBEENDPOINTSRESULT_H_

View File

@@ -1,77 +1,81 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSCLIENT_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSCLIENT_H_
#include "model/AssumeRoleRequest.h"
#include "model/AssumeRoleResult.h"
#include "model/GetCallerIdentityRequest.h"
#include "model/GetCallerIdentityResult.h"
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include <future>
#include <memory>
#include <string>
#include "model/AssumeRoleRequest.h"
#include "model/AssumeRoleResult.h"
#include "model/GetCallerIdentityRequest.h"
#include "model/GetCallerIdentityResult.h"
namespace AlibabaCloud {
namespace Sts {
class ALIBABACLOUD_CORE_EXPORT StsClient : public RpcServiceClient {
public:
public:
typedef Outcome<Error, Model::AssumeRoleResult> AssumeRoleOutcome;
typedef std::future<AssumeRoleOutcome> AssumeRoleOutcomeCallable;
typedef std::function<void(const StsClient*,
const Model::AssumeRoleRequest&, const AssumeRoleOutcome&,
const std::shared_ptr<const AsyncCallerContext>&)> AssumeRoleAsyncHandler;
typedef std::function<void(const StsClient *,
const Model::AssumeRoleRequest &,
const AssumeRoleOutcome &,
const std::shared_ptr<const AsyncCallerContext> &)>
AssumeRoleAsyncHandler;
typedef Outcome<Error, Model::GetCallerIdentityResult>
GetCallerIdentityOutcome;
GetCallerIdentityOutcome;
typedef std::future<GetCallerIdentityOutcome>
GetCallerIdentityOutcomeCallable;
typedef std::function<void(const StsClient*,
const Model::GetCallerIdentityRequest&, const GetCallerIdentityOutcome&,
const std::shared_ptr<const AsyncCallerContext>&)>
GetCallerIdentityAsyncHandler;
GetCallerIdentityOutcomeCallable;
typedef std::function<void(const StsClient *,
const Model::GetCallerIdentityRequest &,
const GetCallerIdentityOutcome &,
const std::shared_ptr<const AsyncCallerContext> &)>
GetCallerIdentityAsyncHandler;
StsClient(const Credentials &credentials,
const ClientConfiguration &configuration);
const ClientConfiguration &configuration);
StsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration);
const ClientConfiguration &configuration);
StsClient(const std::string &accessKeyId, const std::string &accessKeySecret,
const ClientConfiguration &configuration);
const ClientConfiguration &configuration);
~StsClient();
virtual AssumeRoleOutcome assumeRole(
const Model::AssumeRoleRequest &request) const;
void assumeRoleAsync(const Model::AssumeRoleRequest& request,
const AssumeRoleAsyncHandler& handler,
const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AssumeRoleOutcomeCallable assumeRoleCallable(
const Model::AssumeRoleRequest& request) const;
GetCallerIdentityOutcome getCallerIdentity(
const Model::GetCallerIdentityRequest &request)const;
void getCallerIdentityAsync(const Model::GetCallerIdentityRequest& request,
const GetCallerIdentityAsyncHandler& handler,
const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
virtual AssumeRoleOutcome
assumeRole(const Model::AssumeRoleRequest &request) const;
void assumeRoleAsync(
const Model::AssumeRoleRequest &request,
const AssumeRoleAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context = nullptr) const;
AssumeRoleOutcomeCallable
assumeRoleCallable(const Model::AssumeRoleRequest &request) const;
GetCallerIdentityOutcome
getCallerIdentity(const Model::GetCallerIdentityRequest &request) const;
void getCallerIdentityAsync(
const Model::GetCallerIdentityRequest &request,
const GetCallerIdentityAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context = nullptr) const;
GetCallerIdentityOutcomeCallable getCallerIdentityCallable(
const Model::GetCallerIdentityRequest& request) const;
const Model::GetCallerIdentityRequest &request) const;
using RpcServiceClient::makeRequest;
};
} // namespace Sts
} // namespace AlibabaCloud
} // namespace Sts
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSCLIENT_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSCLIENT_H_

View File

@@ -1,18 +1,18 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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 CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSREQUEST_H_
#define CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSREQUEST_H_
@@ -23,13 +23,13 @@
namespace AlibabaCloud {
namespace Sts {
class ALIBABACLOUD_CORE_EXPORT StsRequest : public RpcServiceRequest {
public:
explicit StsRequest(const std::string & action);
public:
explicit StsRequest(const std::string &action);
virtual ~StsRequest();
private:
private:
};
} // namespace Sts
} // namespace AlibabaCloud
} // namespace Sts
} // namespace AlibabaCloud
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSREQUEST_H_
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_STS_STSREQUEST_H_

View File

@@ -1,43 +1,43 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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_CORE_STS_MODEL_ASSUMEROLEREQUEST_H_
#define ALIBABACLOUD_CORE_STS_MODEL_ASSUMEROLEREQUEST_H_
#include <string>
#include <alibabacloud/core/sts/StsRequest.h>
#include <string>
namespace AlibabaCloud {
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT AssumeRoleRequest : public StsRequest {
public:
AssumeRoleRequest();
~AssumeRoleRequest();
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT AssumeRoleRequest : public StsRequest {
public:
AssumeRoleRequest();
~AssumeRoleRequest();
int durationSeconds()const;
std::string policy()const;
std::string roleArn()const;
std::string roleSessionName()const;
void setDurationSeconds(int durationSeconds);
void setPolicy(const std::string &policy);
void setRoleArn(const std::string & roleArn);
void setRoleSessionName(const std::string & roleSessionName);
};
}
}
}
int durationSeconds() const;
std::string policy() const;
std::string roleArn() const;
std::string roleSessionName() const;
void setDurationSeconds(int durationSeconds);
void setPolicy(const std::string &policy);
void setRoleArn(const std::string &roleArn);
void setRoleSessionName(const std::string &roleSessionName);
};
} // namespace Model
} // namespace Sts
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_CORE_STS_MODEL_ASSUMEROLEREQUEST_H_

View File

@@ -1,18 +1,18 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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_CORE_STS_MODEL_ASSUMEROLERESULT_H_
#define ALIBABACLOUD_CORE_STS_MODEL_ASSUMEROLERESULT_H_
@@ -20,34 +20,35 @@
#include <alibabacloud/core/ServiceResult.h>
namespace AlibabaCloud {
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT AssumeRoleResult : public ServiceResult {
public:
struct AssumedRoleUser {
std::string arn;
std::string assumedRoleId;
};
struct Credentials {
std::string accessKeyId;
std::string accessKeySecret;
std::string expiration;
std::string securityToken;
};
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT AssumeRoleResult : public ServiceResult {
public:
struct AssumedRoleUser {
std::string arn;
std::string assumedRoleId;
};
struct Credentials {
std::string accessKeyId;
std::string accessKeySecret;
std::string expiration;
std::string securityToken;
};
AssumeRoleResult();
explicit AssumeRoleResult(const std::string &payload);
~AssumeRoleResult();
AssumeRoleResult();
explicit AssumeRoleResult(const std::string &payload);
~AssumeRoleResult();
AssumedRoleUser assumedRoleUser()const;
Credentials credentials()const;
private:
void parse(const std::string &payload);
AssumedRoleUser assumedRoleUser() const;
Credentials credentials() const;
AssumedRoleUser assumedRoleUser_;
Credentials credentials_;
};
}
}
}
private:
void parse(const std::string &payload);
AssumedRoleUser assumedRoleUser_;
Credentials credentials_;
};
} // namespace Model
} // namespace Sts
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_CORE_STS_MODEL_ASSUMEROLERESULT_H_

View File

@@ -1,37 +1,36 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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_CORE_STS_MODEL_GETCALLERIDENTITYREQUEST_H_
#define ALIBABACLOUD_CORE_STS_MODEL_GETCALLERIDENTITYREQUEST_H_
#include <string>
#include <alibabacloud/core/sts/StsRequest.h>
#include <string>
namespace AlibabaCloud {
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT GetCallerIdentityRequest : public StsRequest {
public:
GetCallerIdentityRequest();
~GetCallerIdentityRequest();
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT GetCallerIdentityRequest : public StsRequest {
public:
GetCallerIdentityRequest();
~GetCallerIdentityRequest();
private:
};
}
}
}
private:
};
} // namespace Model
} // namespace Sts
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_CORE_STS_MODEL_GETCALLERIDENTITYREQUEST_H_

View File

@@ -1,18 +1,18 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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_CORE_STS_MODEL_GETCALLERIDENTITYRESULT_H_
#define ALIBABACLOUD_CORE_STS_MODEL_GETCALLERIDENTITYRESULT_H_
@@ -20,26 +20,27 @@
#include <alibabacloud/core/ServiceResult.h>
namespace AlibabaCloud {
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT GetCallerIdentityResult : public ServiceResult {
public:
GetCallerIdentityResult();
explicit GetCallerIdentityResult(const std::string &payload);
~GetCallerIdentityResult();
namespace Sts {
namespace Model {
class ALIBABACLOUD_CORE_EXPORT GetCallerIdentityResult : public ServiceResult {
public:
GetCallerIdentityResult();
explicit GetCallerIdentityResult(const std::string &payload);
~GetCallerIdentityResult();
std::string accountId();
std::string arn()const;
std::string userId()const;
private:
void parse(const std::string &payload);
std::string accountId();
std::string arn() const;
std::string userId() const;
std::string accountId_;
std::string arn_;
std::string userId_;
};
}
}
}
private:
void parse(const std::string &payload);
std::string accountId_;
std::string arn_;
std::string userId_;
};
} // namespace Model
} // namespace Sts
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_CORE_STS_MODEL_GETCALLERIDENTITYRESULT_H_

View File

@@ -14,75 +14,68 @@
* limitations under the License.
*/
#include <alibabacloud/core/location/LocationClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
#include <alibabacloud/core/location/LocationClient.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
namespace {
const std::string SERVICE_NAME = "Location";
const std::string ENDPOINT = "location.aliyuncs.com";
}
const std::string SERVICE_NAME = "Location";
const std::string ENDPOINT = "location.aliyuncs.com";
} // namespace
LocationClient::LocationClient(const Credentials &credentials,
const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(credentials), configuration) {
}
const ClientConfiguration &configuration)
: RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(credentials),
configuration) {}
LocationClient::LocationClient(
const std::shared_ptr<CredentialsProvider>& credentialsProvider,
const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) {
}
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration)
: RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) {}
LocationClient::LocationClient(const std::string & accessKeyId,
const std::string & accessKeySecret,
const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(accessKeyId,
accessKeySecret), configuration) {
}
LocationClient::LocationClient(const std::string &accessKeyId,
const std::string &accessKeySecret,
const ClientConfiguration &configuration)
: RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(
accessKeyId, accessKeySecret),
configuration) {}
LocationClient::LocationClient(
const std::shared_ptr<Location::LocationClient>& locationClient):
RpcServiceClient(SERVICE_NAME,
locationClient->credentialsProvider(),
locationClient->configuration()) {
}
const std::shared_ptr<Location::LocationClient> &locationClient)
: RpcServiceClient(SERVICE_NAME, locationClient->credentialsProvider(),
locationClient->configuration()) {}
LocationClient::~LocationClient() {}
LocationClient::DescribeEndpointsOutcome LocationClient::describeEndpoints(
const Model::DescribeEndpointsRequest &request) const {
const Model::DescribeEndpointsRequest &request) const {
auto outcome = makeRequest(ENDPOINT, request);
if (outcome.isSuccess())
return DescribeEndpointsOutcome(
Model::DescribeEndpointsResult(outcome.result()));
Model::DescribeEndpointsResult(outcome.result()));
else
return DescribeEndpointsOutcome(outcome.error());
}
void LocationClient::describeEndpointsAsync(
const Model::DescribeEndpointsRequest& request,
const DescribeEndpointsAsyncHandler& handler,
const std::shared_ptr<const AsyncCallerContext>& context) const {
std::async(std::launch::async,
[this, request, handler, context]() {
const Model::DescribeEndpointsRequest &request,
const DescribeEndpointsAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context) const {
std::async(std::launch::async, [this, request, handler, context]() {
handler(this, request, describeEndpoints(request), context);
});
}
LocationClient::DescribeEndpointsOutcomeCallable
LocationClient::describeEndpointsCallable(
const Model::DescribeEndpointsRequest &request) const {
const Model::DescribeEndpointsRequest &request) const {
auto task = std::make_shared<std::packaged_task<DescribeEndpointsOutcome()>>(
[this, request]() {
return this->describeEndpoints(request);
});
[this, request]() { return this->describeEndpoints(request); });
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();

View File

@@ -18,9 +18,7 @@
using namespace AlibabaCloud::Location;
LocationRequest::LocationRequest(const std::string & action) :
RpcServiceRequest("location", "2015-06-12", action) {
}
LocationRequest::LocationRequest(const std::string &action)
: RpcServiceRequest("location", "2015-06-12", action) {}
LocationRequest::~LocationRequest() {
}
LocationRequest::~LocationRequest() {}

View File

@@ -19,33 +19,27 @@
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Location::Model;
DescribeEndpointsRequest::DescribeEndpointsRequest() :
LocationRequest("DescribeEndpoints")
{}
DescribeEndpointsRequest::DescribeEndpointsRequest()
: LocationRequest("DescribeEndpoints") {}
DescribeEndpointsRequest::~DescribeEndpointsRequest()
{}
DescribeEndpointsRequest::~DescribeEndpointsRequest() {}
std::string DescribeEndpointsRequest::serviceCode()const {
std::string DescribeEndpointsRequest::serviceCode() const {
return parameter("ServiceCode");
}
void DescribeEndpointsRequest::setServiceCode(const std::string & serviceCode) {
void DescribeEndpointsRequest::setServiceCode(const std::string &serviceCode) {
setParameter("ServiceCode", serviceCode);
}
std::string DescribeEndpointsRequest::id()const {
return parameter("Id");
}
std::string DescribeEndpointsRequest::id() const { return parameter("Id"); }
void DescribeEndpointsRequest::setId(const std::string & id) {
void DescribeEndpointsRequest::setId(const std::string &id) {
setParameter("Id", id);
}
std::string DescribeEndpointsRequest::type()const {
return parameter("Type");
}
std::string DescribeEndpointsRequest::type() const { return parameter("Type"); }
void DescribeEndpointsRequest::setType(const std::string & type) {
void DescribeEndpointsRequest::setType(const std::string &type) {
setParameter("Type", type);
}

View File

@@ -1,57 +1,55 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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/core/sts/StsClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
#include <alibabacloud/core/sts/StsClient.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Sts;
using namespace AlibabaCloud::Sts::Model;
namespace {
const std::string SERVICE_NAME = "Sts";
const std::string ENDPOINT = "sts.aliyuncs.com";
}
const std::string SERVICE_NAME = "Sts";
const std::string ENDPOINT = "sts.aliyuncs.com";
} // namespace
StsClient::StsClient(const Credentials &credentials,
const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(credentials), configuration) {
}
const ClientConfiguration &configuration)
: RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(credentials),
configuration) {}
StsClient::StsClient(
const std::shared_ptr<CredentialsProvider>& credentialsProvider,
const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) {
}
const std::shared_ptr<CredentialsProvider> &credentialsProvider,
const ClientConfiguration &configuration)
: RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) {}
StsClient::StsClient(const std::string & accessKeyId,
const std::string & accessKeySecret,
const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(accessKeyId,
accessKeySecret), configuration) {
}
StsClient::StsClient(const std::string &accessKeyId,
const std::string &accessKeySecret,
const ClientConfiguration &configuration)
: RpcServiceClient(SERVICE_NAME,
std::make_shared<SimpleCredentialsProvider>(
accessKeyId, accessKeySecret),
configuration) {}
StsClient::~StsClient() {
}
StsClient::~StsClient() {}
StsClient::AssumeRoleOutcome StsClient::assumeRole(
const Model::AssumeRoleRequest &request)const {
StsClient::AssumeRoleOutcome
StsClient::assumeRole(const Model::AssumeRoleRequest &request) const {
auto outcome = makeRequest(ENDPOINT, request);
if (outcome.isSuccess())
@@ -60,9 +58,10 @@ StsClient::AssumeRoleOutcome StsClient::assumeRole(
return AssumeRoleOutcome(Error(outcome.error()));
}
void StsClient::assumeRoleAsync(const Model::AssumeRoleRequest & request,
const AssumeRoleAsyncHandler & handler,
const std::shared_ptr<const AsyncCallerContext>& context) const {
void StsClient::assumeRoleAsync(
const Model::AssumeRoleRequest &request,
const AssumeRoleAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context) const {
auto fn = [this, request, handler, context]() {
handler(this, request, assumeRole(request), context);
};
@@ -70,19 +69,17 @@ void StsClient::assumeRoleAsync(const Model::AssumeRoleRequest & request,
asyncExecute(new Runnable(fn));
}
StsClient::AssumeRoleOutcomeCallable StsClient::assumeRoleCallable(
const Model::AssumeRoleRequest & request) const {
StsClient::AssumeRoleOutcomeCallable
StsClient::assumeRoleCallable(const Model::AssumeRoleRequest &request) const {
auto task = std::make_shared<std::packaged_task<AssumeRoleOutcome()>>(
[this, request]() {
return this->assumeRole(request);
});
[this, request]() { return this->assumeRole(request); });
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
StsClient::GetCallerIdentityOutcome StsClient::getCallerIdentity(
const GetCallerIdentityRequest &request) const {
StsClient::GetCallerIdentityOutcome
StsClient::getCallerIdentity(const GetCallerIdentityRequest &request) const {
auto outcome = makeRequest(ENDPOINT, request);
if (outcome.isSuccess())
@@ -91,9 +88,10 @@ StsClient::GetCallerIdentityOutcome StsClient::getCallerIdentity(
return GetCallerIdentityOutcome(Error(outcome.error()));
}
void StsClient::getCallerIdentityAsync(const GetCallerIdentityRequest& request,
const GetCallerIdentityAsyncHandler& handler,
const std::shared_ptr<const AsyncCallerContext>& context) const {
void StsClient::getCallerIdentityAsync(
const GetCallerIdentityRequest &request,
const GetCallerIdentityAsyncHandler &handler,
const std::shared_ptr<const AsyncCallerContext> &context) const {
auto fn = [this, request, handler, context]() {
handler(this, request, getCallerIdentity(request), context);
};
@@ -103,11 +101,9 @@ void StsClient::getCallerIdentityAsync(const GetCallerIdentityRequest& request,
StsClient::GetCallerIdentityOutcomeCallable
StsClient::getCallerIdentityCallable(
const GetCallerIdentityRequest &request) const {
const GetCallerIdentityRequest &request) const {
auto task = std::make_shared<std::packaged_task<GetCallerIdentityOutcome()>>(
[this, request]() {
return this->getCallerIdentity(request);
});
[this, request]() { return this->getCallerIdentity(request); });
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();

View File

@@ -1,27 +1,25 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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/core/sts/StsRequest.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Sts;
StsRequest::StsRequest(const std::string & action) :
RpcServiceRequest("sts", "2015-04-01", action) {
}
StsRequest::StsRequest(const std::string &action)
: RpcServiceRequest("sts", "2015-04-01", action) {}
StsRequest::~StsRequest() {
}
StsRequest::~StsRequest() {}

View File

@@ -1,18 +1,18 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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/core/sts/model/AssumeRoleRequest.h>
@@ -20,27 +20,21 @@
using namespace AlibabaCloud::Sts;
using namespace AlibabaCloud::Sts::Model;
AssumeRoleRequest::AssumeRoleRequest() :
StsRequest("AssumeRole") {
AssumeRoleRequest::AssumeRoleRequest() : StsRequest("AssumeRole") {
setRoleArn("");
setRoleSessionName("");
setDurationSeconds(3600);
}
AssumeRoleRequest::~AssumeRoleRequest() {
}
AssumeRoleRequest::~AssumeRoleRequest() {}
int AssumeRoleRequest::durationSeconds() const {
return std::stoi(parameter("DurationSeconds"));
}
std::string AssumeRoleRequest::policy() const {
return parameter("Policy");
}
std::string AssumeRoleRequest::policy() const { return parameter("Policy"); }
std::string AssumeRoleRequest::roleArn() const {
return parameter("RoleArn");
}
std::string AssumeRoleRequest::roleArn() const { return parameter("RoleArn"); }
std::string AssumeRoleRequest::roleSessionName() const {
return parameter("RoleSessionName");
@@ -50,15 +44,14 @@ void AssumeRoleRequest::setDurationSeconds(int durationSeconds) {
setParameter("DurationSeconds", std::to_string(durationSeconds));
}
void AssumeRoleRequest::setPolicy(const std::string & policy) {
void AssumeRoleRequest::setPolicy(const std::string &policy) {
setParameter("Policy", policy);
}
void AssumeRoleRequest::setRoleArn(const std::string & roleArn) {
void AssumeRoleRequest::setRoleArn(const std::string &roleArn) {
setParameter("RoleArn", roleArn);
}
void AssumeRoleRequest::setRoleSessionName(
const std::string & roleSessionName) {
void AssumeRoleRequest::setRoleSessionName(const std::string &roleSessionName) {
setParameter("RoleSessionName", roleSessionName);
}

View File

@@ -25,25 +25,21 @@ AssumeRoleResult::AssumeRoleResult()
: ServiceResult(), assumedRoleUser_(), credentials_() {}
AssumeRoleResult::AssumeRoleResult(const std::string &payload)
: ServiceResult(), assumedRoleUser_(), credentials_()
{
: ServiceResult(), assumedRoleUser_(), credentials_() {
parse(payload);
}
AssumeRoleResult::~AssumeRoleResult() {}
AssumeRoleResult::AssumedRoleUser AssumeRoleResult::assumedRoleUser() const
{
AssumeRoleResult::AssumedRoleUser AssumeRoleResult::assumedRoleUser() const {
return assumedRoleUser_;
}
AssumeRoleResult::Credentials AssumeRoleResult::credentials() const
{
AssumeRoleResult::Credentials AssumeRoleResult::credentials() const {
return credentials_;
}
void AssumeRoleResult::parse(const std::string &payload)
{
void AssumeRoleResult::parse(const std::string &payload) {
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);

View File

@@ -1,18 +1,18 @@
/*
* Copyright 1999-2019 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.
*/
* Copyright 1999-2019 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/core/sts/model/GetCallerIdentityRequest.h>
@@ -20,9 +20,7 @@ using namespace AlibabaCloud;
using namespace AlibabaCloud::Sts;
using namespace AlibabaCloud::Sts::Model;
GetCallerIdentityRequest::GetCallerIdentityRequest() :
StsRequest("GetCallerIdentity") {
}
GetCallerIdentityRequest::GetCallerIdentityRequest()
: StsRequest("GetCallerIdentity") {}
GetCallerIdentityRequest::~GetCallerIdentityRequest() {
}
GetCallerIdentityRequest::~GetCallerIdentityRequest() {}

View File

@@ -31,6 +31,10 @@ set(dataworks-public_public_header_model
include/alibabacloud/dataworks-public/model/CheckMetaTableResult.h
include/alibabacloud/dataworks-public/model/CreateConnectionRequest.h
include/alibabacloud/dataworks-public/model/CreateConnectionResult.h
include/alibabacloud/dataworks-public/model/CreateDagComplementRequest.h
include/alibabacloud/dataworks-public/model/CreateDagComplementResult.h
include/alibabacloud/dataworks-public/model/CreateDagTestRequest.h
include/alibabacloud/dataworks-public/model/CreateDagTestResult.h
include/alibabacloud/dataworks-public/model/CreateDataServiceApiRequest.h
include/alibabacloud/dataworks-public/model/CreateDataServiceApiResult.h
include/alibabacloud/dataworks-public/model/CreateFileRequest.h
@@ -39,10 +43,6 @@ set(dataworks-public_public_header_model
include/alibabacloud/dataworks-public/model/CreateFolderResult.h
include/alibabacloud/dataworks-public/model/CreateMetaCategoryRequest.h
include/alibabacloud/dataworks-public/model/CreateMetaCategoryResult.h
include/alibabacloud/dataworks-public/model/CreateNodeComplementRequest.h
include/alibabacloud/dataworks-public/model/CreateNodeComplementResult.h
include/alibabacloud/dataworks-public/model/CreateNodeTestRequest.h
include/alibabacloud/dataworks-public/model/CreateNodeTestResult.h
include/alibabacloud/dataworks-public/model/CreateQualityEntityRequest.h
include/alibabacloud/dataworks-public/model/CreateQualityEntityResult.h
include/alibabacloud/dataworks-public/model/CreateQualityFollowerRequest.h
@@ -246,6 +246,10 @@ set(dataworks-public_src
src/model/CheckMetaTableResult.cc
src/model/CreateConnectionRequest.cc
src/model/CreateConnectionResult.cc
src/model/CreateDagComplementRequest.cc
src/model/CreateDagComplementResult.cc
src/model/CreateDagTestRequest.cc
src/model/CreateDagTestResult.cc
src/model/CreateDataServiceApiRequest.cc
src/model/CreateDataServiceApiResult.cc
src/model/CreateFileRequest.cc
@@ -254,10 +258,6 @@ set(dataworks-public_src
src/model/CreateFolderResult.cc
src/model/CreateMetaCategoryRequest.cc
src/model/CreateMetaCategoryResult.cc
src/model/CreateNodeComplementRequest.cc
src/model/CreateNodeComplementResult.cc
src/model/CreateNodeTestRequest.cc
src/model/CreateNodeTestResult.cc
src/model/CreateQualityEntityRequest.cc
src/model/CreateQualityEntityResult.cc
src/model/CreateQualityFollowerRequest.cc

View File

@@ -32,6 +32,10 @@
#include "model/CheckMetaTableResult.h"
#include "model/CreateConnectionRequest.h"
#include "model/CreateConnectionResult.h"
#include "model/CreateDagComplementRequest.h"
#include "model/CreateDagComplementResult.h"
#include "model/CreateDagTestRequest.h"
#include "model/CreateDagTestResult.h"
#include "model/CreateDataServiceApiRequest.h"
#include "model/CreateDataServiceApiResult.h"
#include "model/CreateFileRequest.h"
@@ -40,10 +44,6 @@
#include "model/CreateFolderResult.h"
#include "model/CreateMetaCategoryRequest.h"
#include "model/CreateMetaCategoryResult.h"
#include "model/CreateNodeComplementRequest.h"
#include "model/CreateNodeComplementResult.h"
#include "model/CreateNodeTestRequest.h"
#include "model/CreateNodeTestResult.h"
#include "model/CreateQualityEntityRequest.h"
#include "model/CreateQualityEntityResult.h"
#include "model/CreateQualityFollowerRequest.h"
@@ -258,6 +258,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateConnectionResult> CreateConnectionOutcome;
typedef std::future<CreateConnectionOutcome> CreateConnectionOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateConnectionRequest&, const CreateConnectionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateConnectionAsyncHandler;
typedef Outcome<Error, Model::CreateDagComplementResult> CreateDagComplementOutcome;
typedef std::future<CreateDagComplementOutcome> CreateDagComplementOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateDagComplementRequest&, const CreateDagComplementOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateDagComplementAsyncHandler;
typedef Outcome<Error, Model::CreateDagTestResult> CreateDagTestOutcome;
typedef std::future<CreateDagTestOutcome> CreateDagTestOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateDagTestRequest&, const CreateDagTestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateDagTestAsyncHandler;
typedef Outcome<Error, Model::CreateDataServiceApiResult> CreateDataServiceApiOutcome;
typedef std::future<CreateDataServiceApiOutcome> CreateDataServiceApiOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateDataServiceApiRequest&, const CreateDataServiceApiOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateDataServiceApiAsyncHandler;
@@ -270,12 +276,6 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateMetaCategoryResult> CreateMetaCategoryOutcome;
typedef std::future<CreateMetaCategoryOutcome> CreateMetaCategoryOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateMetaCategoryRequest&, const CreateMetaCategoryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateMetaCategoryAsyncHandler;
typedef Outcome<Error, Model::CreateNodeComplementResult> CreateNodeComplementOutcome;
typedef std::future<CreateNodeComplementOutcome> CreateNodeComplementOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateNodeComplementRequest&, const CreateNodeComplementOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateNodeComplementAsyncHandler;
typedef Outcome<Error, Model::CreateNodeTestResult> CreateNodeTestOutcome;
typedef std::future<CreateNodeTestOutcome> CreateNodeTestOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateNodeTestRequest&, const CreateNodeTestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateNodeTestAsyncHandler;
typedef Outcome<Error, Model::CreateQualityEntityResult> CreateQualityEntityOutcome;
typedef std::future<CreateQualityEntityOutcome> CreateQualityEntityOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateQualityEntityRequest&, const CreateQualityEntityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateQualityEntityAsyncHandler;
@@ -581,6 +581,12 @@ namespace AlibabaCloud
CreateConnectionOutcome createConnection(const Model::CreateConnectionRequest &request)const;
void createConnectionAsync(const Model::CreateConnectionRequest& request, const CreateConnectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateConnectionOutcomeCallable createConnectionCallable(const Model::CreateConnectionRequest& request) const;
CreateDagComplementOutcome createDagComplement(const Model::CreateDagComplementRequest &request)const;
void createDagComplementAsync(const Model::CreateDagComplementRequest& request, const CreateDagComplementAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateDagComplementOutcomeCallable createDagComplementCallable(const Model::CreateDagComplementRequest& request) const;
CreateDagTestOutcome createDagTest(const Model::CreateDagTestRequest &request)const;
void createDagTestAsync(const Model::CreateDagTestRequest& request, const CreateDagTestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateDagTestOutcomeCallable createDagTestCallable(const Model::CreateDagTestRequest& request) const;
CreateDataServiceApiOutcome createDataServiceApi(const Model::CreateDataServiceApiRequest &request)const;
void createDataServiceApiAsync(const Model::CreateDataServiceApiRequest& request, const CreateDataServiceApiAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateDataServiceApiOutcomeCallable createDataServiceApiCallable(const Model::CreateDataServiceApiRequest& request) const;
@@ -593,12 +599,6 @@ namespace AlibabaCloud
CreateMetaCategoryOutcome createMetaCategory(const Model::CreateMetaCategoryRequest &request)const;
void createMetaCategoryAsync(const Model::CreateMetaCategoryRequest& request, const CreateMetaCategoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateMetaCategoryOutcomeCallable createMetaCategoryCallable(const Model::CreateMetaCategoryRequest& request) const;
CreateNodeComplementOutcome createNodeComplement(const Model::CreateNodeComplementRequest &request)const;
void createNodeComplementAsync(const Model::CreateNodeComplementRequest& request, const CreateNodeComplementAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateNodeComplementOutcomeCallable createNodeComplementCallable(const Model::CreateNodeComplementRequest& request) const;
CreateNodeTestOutcome createNodeTest(const Model::CreateNodeTestRequest &request)const;
void createNodeTestAsync(const Model::CreateNodeTestRequest& request, const CreateNodeTestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateNodeTestOutcomeCallable createNodeTestCallable(const Model::CreateNodeTestRequest& request) const;
CreateQualityEntityOutcome createQualityEntity(const Model::CreateQualityEntityRequest &request)const;
void createQualityEntityAsync(const Model::CreateQualityEntityRequest& request, const CreateQualityEntityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateQualityEntityOutcomeCallable createQualityEntityCallable(const Model::CreateQualityEntityRequest& request) const;

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODECOMPLEMENTREQUEST_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODECOMPLEMENTREQUEST_H_
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGCOMPLEMENTREQUEST_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGCOMPLEMENTREQUEST_H_
#include <string>
#include <vector>
@@ -28,12 +28,12 @@ namespace AlibabaCloud
{
namespace Model
{
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateNodeComplementRequest : public RpcServiceRequest
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateDagComplementRequest : public RpcServiceRequest
{
public:
CreateNodeComplementRequest();
~CreateNodeComplementRequest();
CreateDagComplementRequest();
~CreateDagComplementRequest();
std::string getProjectEnv()const;
void setProjectEnv(const std::string& projectEnv);
@@ -41,6 +41,8 @@ namespace AlibabaCloud
void setStartBizDate(const std::string& startBizDate);
bool getParallelism()const;
void setParallelism(bool parallelism);
long getRootNodeId()const;
void setRootNodeId(long rootNodeId);
std::string getBizBeginTime()const;
void setBizBeginTime(const std::string& bizBeginTime);
std::string getEndBizDate()const;
@@ -53,26 +55,24 @@ namespace AlibabaCloud
void setName(const std::string& name);
std::string getExcludeNodeIds()const;
void setExcludeNodeIds(const std::string& excludeNodeIds);
long getNodeId()const;
void setNodeId(long nodeId);
long getNodeProjectId()const;
void setNodeProjectId(long nodeProjectId);
std::string getNodeParams()const;
void setNodeParams(const std::string& nodeParams);
private:
std::string projectEnv_;
std::string startBizDate_;
bool parallelism_;
long rootNodeId_;
std::string bizBeginTime_;
std::string endBizDate_;
std::string includeNodeIds_;
std::string bizEndTime_;
std::string name_;
std::string excludeNodeIds_;
long nodeId_;
long nodeProjectId_;
std::string nodeParams_;
};
}
}
}
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODECOMPLEMENTREQUEST_H_
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGCOMPLEMENTREQUEST_H_

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODECOMPLEMENTRESULT_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODECOMPLEMENTRESULT_H_
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGCOMPLEMENTRESULT_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGCOMPLEMENTRESULT_H_
#include <string>
#include <vector>
@@ -29,16 +29,16 @@ namespace AlibabaCloud
{
namespace Model
{
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateNodeComplementResult : public ServiceResult
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateDagComplementResult : public ServiceResult
{
public:
CreateNodeComplementResult();
explicit CreateNodeComplementResult(const std::string &payload);
~CreateNodeComplementResult();
CreateDagComplementResult();
explicit CreateDagComplementResult(const std::string &payload);
~CreateDagComplementResult();
int getHttpStatusCode()const;
long getData()const;
std::vector<std::string> getData()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
bool getSuccess()const;
@@ -47,7 +47,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
int httpStatusCode_;
long data_;
std::vector<std::string> data_;
std::string errorCode_;
std::string errorMessage_;
bool success_;
@@ -56,4 +56,4 @@ namespace AlibabaCloud
}
}
}
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODECOMPLEMENTRESULT_H_
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGCOMPLEMENTRESULT_H_

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODETESTREQUEST_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODETESTREQUEST_H_
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGTESTREQUEST_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGTESTREQUEST_H_
#include <string>
#include <vector>
@@ -28,48 +28,33 @@ namespace AlibabaCloud
{
namespace Model
{
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateNodeTestRequest : public RpcServiceRequest
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateDagTestRequest : public RpcServiceRequest
{
public:
CreateNodeTestRequest();
~CreateNodeTestRequest();
CreateDagTestRequest();
~CreateDagTestRequest();
std::string getProjectEnv()const;
void setProjectEnv(const std::string& projectEnv);
bool getParallelism()const;
void setParallelism(bool parallelism);
std::string getBizBeginTime()const;
void setBizBeginTime(const std::string& bizBeginTime);
std::string getIncludeNodeIds()const;
void setIncludeNodeIds(const std::string& includeNodeIds);
std::string getBizdate()const;
void setBizdate(const std::string& bizdate);
std::string getBizEndTime()const;
void setBizEndTime(const std::string& bizEndTime);
std::string getName()const;
void setName(const std::string& name);
std::string getExcludeNodeIds()const;
void setExcludeNodeIds(const std::string& excludeNodeIds);
std::string getNodeParams()const;
void setNodeParams(const std::string& nodeParams);
long getNodeId()const;
void setNodeId(long nodeId);
long getNodeProjectId()const;
void setNodeProjectId(long nodeProjectId);
private:
std::string projectEnv_;
bool parallelism_;
std::string bizBeginTime_;
std::string includeNodeIds_;
std::string bizdate_;
std::string bizEndTime_;
std::string name_;
std::string excludeNodeIds_;
std::string nodeParams_;
long nodeId_;
long nodeProjectId_;
};
}
}
}
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODETESTREQUEST_H_
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGTESTREQUEST_H_

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODETESTRESULT_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODETESTRESULT_H_
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGTESTRESULT_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGTESTRESULT_H_
#include <string>
#include <vector>
@@ -29,14 +29,14 @@ namespace AlibabaCloud
{
namespace Model
{
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateNodeTestResult : public ServiceResult
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateDagTestResult : public ServiceResult
{
public:
CreateNodeTestResult();
explicit CreateNodeTestResult(const std::string &payload);
~CreateNodeTestResult();
CreateDagTestResult();
explicit CreateDagTestResult(const std::string &payload);
~CreateDagTestResult();
int getHttpStatusCode()const;
long getData()const;
std::string getErrorCode()const;
@@ -56,4 +56,4 @@ namespace AlibabaCloud
}
}
}
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATENODETESTRESULT_H_
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEDAGTESTRESULT_H_

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
int getFileType()const;
void setFileType(int fileType);
std::string getDependentNodeIdList()const;
void setDependentNodeIdList(const std::string& dependentNodeIdList);
std::string getContent()const;
void setContent(const std::string& content);
std::string getProjectIdentifier()const;
@@ -51,8 +53,6 @@ namespace AlibabaCloud
void setOwner(const std::string& owner);
int getAutoRerunIntervalMillis()const;
void setAutoRerunIntervalMillis(int autoRerunIntervalMillis);
std::string getDependentCloudUuidList()const;
void setDependentCloudUuidList(const std::string& dependentCloudUuidList);
std::string getInputList()const;
void setInputList(const std::string& inputList);
std::string getRerunMode()const;
@@ -78,6 +78,7 @@ namespace AlibabaCloud
private:
int fileType_;
std::string dependentNodeIdList_;
std::string content_;
std::string projectIdentifier_;
long projectId_;
@@ -85,7 +86,6 @@ namespace AlibabaCloud
std::string cycleType_;
std::string owner_;
int autoRerunIntervalMillis_;
std::string dependentCloudUuidList_;
std::string inputList_;
std::string rerunMode_;
std::string paraValue_;

View File

@@ -39,7 +39,7 @@ namespace AlibabaCloud
~DeleteQualityEntityResult();
int getHttpStatusCode()const;
bool getData()const;
bool getErrorCode()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
bool getSuccess()const;
@@ -48,7 +48,7 @@ namespace AlibabaCloud
private:
int httpStatusCode_;
bool data_;
bool errorCode_;
std::string errorCode_;
std::string errorMessage_;
bool success_;

View File

@@ -40,7 +40,7 @@ namespace AlibabaCloud
std::string owner;
long createTime;
std::string fileName;
int useType;
std::string useType;
int currentVersion;
std::string createUser;
bool isMaxCompute;
@@ -66,16 +66,16 @@ namespace AlibabaCloud
std::string output;
std::string refTableName;
};
int taskRerunTime;
int taskRerunIntervalMillis;
std::string cycleType;
std::vector<NodeInputOutput> inputList;
bool stop;
std::string dependentType;
std::string cronExpress;
long endEffectDate;
int autoRerunIntervalMillis;
std::string dependentNodeIdList;
long startEffectDate;
int autoRerunTimes;
std::string rerunMode;
std::string paraValue;
std::vector<NodeInputOutput1> outputList;

View File

@@ -34,32 +34,22 @@ namespace AlibabaCloud
public:
struct Data
{
int destination;
std::string projectIdentifier;
int status;
std::string projectOwnerBaseId;
int schedulerMaxRetryTimes;
std::string projectName;
int isAllowDownload;
std::string gmtModified;
int developmentType;
bool disableDevelopment;
bool baseProject;
int projectMode;
std::string projectDescription;
std::string devStorageQuota;
int isDefault;
std::string projectIdentifier;
int status;
int schedulerMaxRetryTimes;
int projectId;
int developmentType;
std::string residentArea;
bool useProxyOdpsAccount;
std::string gmtCreate;
long tenantId;
int maxFlowNode;
int protectedMode;
std::string appkey;
int tablePrivacyMode;
std::string prodStorageQuota;
std::string defaultDiResourceGroupIdentifier;
int projectMode;
std::string projectDescription;
std::vector<std::string> envTypes;
int schedulerRetryInterval;
};

View File

@@ -52,6 +52,7 @@ namespace AlibabaCloud
std::string name;
std::string gmtCreate;
long tenantId;
std::string content;
int id;
};
std::vector<ConnectionsItem> connections;

View File

@@ -51,8 +51,8 @@ namespace AlibabaCloud
void setKeyword(const std::string& keyword);
long getProjectId()const;
void setProjectId(long projectId);
int getUseType()const;
void setUseType(int useType);
std::string getUseType()const;
void setUseType(const std::string& useType);
private:
std::string owner_;
@@ -63,7 +63,7 @@ namespace AlibabaCloud
int pageSize_;
std::string keyword_;
long projectId_;
int useType_;
std::string useType_;
};
}

View File

@@ -40,7 +40,7 @@ namespace AlibabaCloud
std::string owner;
long createTime;
std::string fileName;
int useType;
std::string useType;
int currentVersion;
std::string createUser;
bool isMaxCompute;

View File

@@ -37,10 +37,10 @@ namespace AlibabaCloud
std::string getProjectEnv()const;
void setProjectEnv(const std::string& projectEnv);
std::string getOwner()const;
void setOwner(const std::string& owner);
std::string getBizName()const;
void setBizName(const std::string& bizName);
std::string getOwnerId()const;
void setOwnerId(const std::string& ownerId);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getNodeName()const;
@@ -56,8 +56,8 @@ namespace AlibabaCloud
private:
std::string projectEnv_;
std::string owner_;
std::string bizName_;
std::string ownerId_;
int pageNumber_;
std::string nodeName_;
std::string programType_;

View File

@@ -34,7 +34,7 @@ namespace AlibabaCloud
public:
struct Data
{
struct InstancesItem
struct Instance
{
std::string status;
long modifyTime;
@@ -52,7 +52,7 @@ namespace AlibabaCloud
int nodeId;
long beginWaitResTime;
};
std::vector<InstancesItem> instances;
std::vector<Instance> instances;
int totalCount;
int pageSize;
int pageNumber;

View File

@@ -37,15 +37,15 @@ namespace AlibabaCloud
std::string getProjectEnv()const;
void setProjectEnv(const std::string& projectEnv);
std::string getType()const;
void setType(const std::string& type);
long getNodeId()const;
void setNodeId(long nodeId);
std::string getIoType()const;
void setIoType(const std::string& ioType);
private:
std::string projectEnv_;
std::string type_;
long nodeId_;
std::string ioType_;
};
}

View File

@@ -35,12 +35,12 @@ namespace AlibabaCloud
ListNodesRequest();
~ListNodesRequest();
std::string getOwner()const;
void setOwner(const std::string& owner);
std::string getProjectEnv()const;
void setProjectEnv(const std::string& projectEnv);
std::string getBizName()const;
void setBizName(const std::string& bizName);
std::string getOwnerId()const;
void setOwnerId(const std::string& ownerId);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getNodeName()const;
@@ -53,9 +53,9 @@ namespace AlibabaCloud
void setProjectId(long projectId);
private:
std::string owner_;
std::string projectEnv_;
std::string bizName_;
std::string ownerId_;
int pageNumber_;
std::string nodeName_;
std::string programType_;

View File

@@ -231,6 +231,78 @@ Dataworks_publicClient::CreateConnectionOutcomeCallable Dataworks_publicClient::
return task->get_future();
}
Dataworks_publicClient::CreateDagComplementOutcome Dataworks_publicClient::createDagComplement(const CreateDagComplementRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateDagComplementOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateDagComplementOutcome(CreateDagComplementResult(outcome.result()));
else
return CreateDagComplementOutcome(outcome.error());
}
void Dataworks_publicClient::createDagComplementAsync(const CreateDagComplementRequest& request, const CreateDagComplementAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createDagComplement(request), context);
};
asyncExecute(new Runnable(fn));
}
Dataworks_publicClient::CreateDagComplementOutcomeCallable Dataworks_publicClient::createDagComplementCallable(const CreateDagComplementRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateDagComplementOutcome()>>(
[this, request]()
{
return this->createDagComplement(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dataworks_publicClient::CreateDagTestOutcome Dataworks_publicClient::createDagTest(const CreateDagTestRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateDagTestOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateDagTestOutcome(CreateDagTestResult(outcome.result()));
else
return CreateDagTestOutcome(outcome.error());
}
void Dataworks_publicClient::createDagTestAsync(const CreateDagTestRequest& request, const CreateDagTestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createDagTest(request), context);
};
asyncExecute(new Runnable(fn));
}
Dataworks_publicClient::CreateDagTestOutcomeCallable Dataworks_publicClient::createDagTestCallable(const CreateDagTestRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateDagTestOutcome()>>(
[this, request]()
{
return this->createDagTest(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dataworks_publicClient::CreateDataServiceApiOutcome Dataworks_publicClient::createDataServiceApi(const CreateDataServiceApiRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -375,78 +447,6 @@ Dataworks_publicClient::CreateMetaCategoryOutcomeCallable Dataworks_publicClient
return task->get_future();
}
Dataworks_publicClient::CreateNodeComplementOutcome Dataworks_publicClient::createNodeComplement(const CreateNodeComplementRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateNodeComplementOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateNodeComplementOutcome(CreateNodeComplementResult(outcome.result()));
else
return CreateNodeComplementOutcome(outcome.error());
}
void Dataworks_publicClient::createNodeComplementAsync(const CreateNodeComplementRequest& request, const CreateNodeComplementAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createNodeComplement(request), context);
};
asyncExecute(new Runnable(fn));
}
Dataworks_publicClient::CreateNodeComplementOutcomeCallable Dataworks_publicClient::createNodeComplementCallable(const CreateNodeComplementRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateNodeComplementOutcome()>>(
[this, request]()
{
return this->createNodeComplement(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dataworks_publicClient::CreateNodeTestOutcome Dataworks_publicClient::createNodeTest(const CreateNodeTestRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateNodeTestOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateNodeTestOutcome(CreateNodeTestResult(outcome.result()));
else
return CreateNodeTestOutcome(outcome.error());
}
void Dataworks_publicClient::createNodeTestAsync(const CreateNodeTestRequest& request, const CreateNodeTestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createNodeTest(request), context);
};
asyncExecute(new Runnable(fn));
}
Dataworks_publicClient::CreateNodeTestOutcomeCallable Dataworks_publicClient::createNodeTestCallable(const CreateNodeTestRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateNodeTestOutcome()>>(
[this, request]()
{
return this->createNodeTest(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dataworks_publicClient::CreateQualityEntityOutcome Dataworks_publicClient::createQualityEntity(const CreateQualityEntityRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,150 @@
/*
* 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/dataworks-public/model/CreateDagComplementRequest.h>
using AlibabaCloud::Dataworks_public::Model::CreateDagComplementRequest;
CreateDagComplementRequest::CreateDagComplementRequest() :
RpcServiceRequest("dataworks-public", "2020-05-18", "CreateDagComplement")
{
setMethod(HttpRequest::Method::Post);
}
CreateDagComplementRequest::~CreateDagComplementRequest()
{}
std::string CreateDagComplementRequest::getProjectEnv()const
{
return projectEnv_;
}
void CreateDagComplementRequest::setProjectEnv(const std::string& projectEnv)
{
projectEnv_ = projectEnv;
setBodyParameter("ProjectEnv", projectEnv);
}
std::string CreateDagComplementRequest::getStartBizDate()const
{
return startBizDate_;
}
void CreateDagComplementRequest::setStartBizDate(const std::string& startBizDate)
{
startBizDate_ = startBizDate;
setBodyParameter("StartBizDate", startBizDate);
}
bool CreateDagComplementRequest::getParallelism()const
{
return parallelism_;
}
void CreateDagComplementRequest::setParallelism(bool parallelism)
{
parallelism_ = parallelism;
setBodyParameter("Parallelism", parallelism ? "true" : "false");
}
long CreateDagComplementRequest::getRootNodeId()const
{
return rootNodeId_;
}
void CreateDagComplementRequest::setRootNodeId(long rootNodeId)
{
rootNodeId_ = rootNodeId;
setBodyParameter("RootNodeId", std::to_string(rootNodeId));
}
std::string CreateDagComplementRequest::getBizBeginTime()const
{
return bizBeginTime_;
}
void CreateDagComplementRequest::setBizBeginTime(const std::string& bizBeginTime)
{
bizBeginTime_ = bizBeginTime;
setBodyParameter("BizBeginTime", bizBeginTime);
}
std::string CreateDagComplementRequest::getEndBizDate()const
{
return endBizDate_;
}
void CreateDagComplementRequest::setEndBizDate(const std::string& endBizDate)
{
endBizDate_ = endBizDate;
setBodyParameter("EndBizDate", endBizDate);
}
std::string CreateDagComplementRequest::getIncludeNodeIds()const
{
return includeNodeIds_;
}
void CreateDagComplementRequest::setIncludeNodeIds(const std::string& includeNodeIds)
{
includeNodeIds_ = includeNodeIds;
setBodyParameter("IncludeNodeIds", includeNodeIds);
}
std::string CreateDagComplementRequest::getBizEndTime()const
{
return bizEndTime_;
}
void CreateDagComplementRequest::setBizEndTime(const std::string& bizEndTime)
{
bizEndTime_ = bizEndTime;
setBodyParameter("BizEndTime", bizEndTime);
}
std::string CreateDagComplementRequest::getName()const
{
return name_;
}
void CreateDagComplementRequest::setName(const std::string& name)
{
name_ = name;
setBodyParameter("Name", name);
}
std::string CreateDagComplementRequest::getExcludeNodeIds()const
{
return excludeNodeIds_;
}
void CreateDagComplementRequest::setExcludeNodeIds(const std::string& excludeNodeIds)
{
excludeNodeIds_ = excludeNodeIds;
setBodyParameter("ExcludeNodeIds", excludeNodeIds);
}
std::string CreateDagComplementRequest::getNodeParams()const
{
return nodeParams_;
}
void CreateDagComplementRequest::setNodeParams(const std::string& nodeParams)
{
nodeParams_ = nodeParams;
setBodyParameter("NodeParams", nodeParams);
}

View File

@@ -14,31 +14,34 @@
* limitations under the License.
*/
#include <alibabacloud/dataworks-public/model/CreateNodeComplementResult.h>
#include <alibabacloud/dataworks-public/model/CreateDagComplementResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dataworks_public;
using namespace AlibabaCloud::Dataworks_public::Model;
CreateNodeComplementResult::CreateNodeComplementResult() :
CreateDagComplementResult::CreateDagComplementResult() :
ServiceResult()
{}
CreateNodeComplementResult::CreateNodeComplementResult(const std::string &payload) :
CreateDagComplementResult::CreateDagComplementResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateNodeComplementResult::~CreateNodeComplementResult()
CreateDagComplementResult::~CreateDagComplementResult()
{}
void CreateNodeComplementResult::parse(const std::string &payload)
void CreateDagComplementResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["dagId"];
for (const auto &item : allData)
data_.push_back(item.asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
@@ -47,32 +50,30 @@ void CreateNodeComplementResult::parse(const std::string &payload)
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Data"].isNull())
data_ = std::stol(value["Data"].asString());
}
int CreateNodeComplementResult::getHttpStatusCode()const
int CreateDagComplementResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
long CreateNodeComplementResult::getData()const
std::vector<std::string> CreateDagComplementResult::getData()const
{
return data_;
}
std::string CreateNodeComplementResult::getErrorCode()const
std::string CreateDagComplementResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateNodeComplementResult::getErrorMessage()const
std::string CreateDagComplementResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateNodeComplementResult::getSuccess()const
bool CreateDagComplementResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,84 @@
/*
* 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/dataworks-public/model/CreateDagTestRequest.h>
using AlibabaCloud::Dataworks_public::Model::CreateDagTestRequest;
CreateDagTestRequest::CreateDagTestRequest() :
RpcServiceRequest("dataworks-public", "2020-05-18", "CreateDagTest")
{
setMethod(HttpRequest::Method::Post);
}
CreateDagTestRequest::~CreateDagTestRequest()
{}
std::string CreateDagTestRequest::getProjectEnv()const
{
return projectEnv_;
}
void CreateDagTestRequest::setProjectEnv(const std::string& projectEnv)
{
projectEnv_ = projectEnv;
setBodyParameter("ProjectEnv", projectEnv);
}
std::string CreateDagTestRequest::getBizdate()const
{
return bizdate_;
}
void CreateDagTestRequest::setBizdate(const std::string& bizdate)
{
bizdate_ = bizdate;
setBodyParameter("Bizdate", bizdate);
}
std::string CreateDagTestRequest::getName()const
{
return name_;
}
void CreateDagTestRequest::setName(const std::string& name)
{
name_ = name;
setBodyParameter("Name", name);
}
std::string CreateDagTestRequest::getNodeParams()const
{
return nodeParams_;
}
void CreateDagTestRequest::setNodeParams(const std::string& nodeParams)
{
nodeParams_ = nodeParams;
setBodyParameter("NodeParams", nodeParams);
}
long CreateDagTestRequest::getNodeId()const
{
return nodeId_;
}
void CreateDagTestRequest::setNodeId(long nodeId)
{
nodeId_ = nodeId;
setBodyParameter("NodeId", std::to_string(nodeId));
}

View File

@@ -14,26 +14,26 @@
* limitations under the License.
*/
#include <alibabacloud/dataworks-public/model/CreateNodeTestResult.h>
#include <alibabacloud/dataworks-public/model/CreateDagTestResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dataworks_public;
using namespace AlibabaCloud::Dataworks_public::Model;
CreateNodeTestResult::CreateNodeTestResult() :
CreateDagTestResult::CreateDagTestResult() :
ServiceResult()
{}
CreateNodeTestResult::CreateNodeTestResult(const std::string &payload) :
CreateDagTestResult::CreateDagTestResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateNodeTestResult::~CreateNodeTestResult()
CreateDagTestResult::~CreateDagTestResult()
{}
void CreateNodeTestResult::parse(const std::string &payload)
void CreateDagTestResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
@@ -52,27 +52,27 @@ void CreateNodeTestResult::parse(const std::string &payload)
}
int CreateNodeTestResult::getHttpStatusCode()const
int CreateDagTestResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
long CreateNodeTestResult::getData()const
long CreateDagTestResult::getData()const
{
return data_;
}
std::string CreateNodeTestResult::getErrorCode()const
std::string CreateDagTestResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateNodeTestResult::getErrorMessage()const
std::string CreateDagTestResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateNodeTestResult::getSuccess()const
bool CreateDagTestResult::getSuccess()const
{
return success_;
}

View File

@@ -38,6 +38,17 @@ void CreateFileRequest::setFileType(int fileType)
setBodyParameter("FileType", std::to_string(fileType));
}
std::string CreateFileRequest::getDependentNodeIdList()const
{
return dependentNodeIdList_;
}
void CreateFileRequest::setDependentNodeIdList(const std::string& dependentNodeIdList)
{
dependentNodeIdList_ = dependentNodeIdList;
setBodyParameter("DependentNodeIdList", dependentNodeIdList);
}
std::string CreateFileRequest::getContent()const
{
return content_;
@@ -115,17 +126,6 @@ void CreateFileRequest::setAutoRerunIntervalMillis(int autoRerunIntervalMillis)
setBodyParameter("AutoRerunIntervalMillis", std::to_string(autoRerunIntervalMillis));
}
std::string CreateFileRequest::getDependentCloudUuidList()const
{
return dependentCloudUuidList_;
}
void CreateFileRequest::setDependentCloudUuidList(const std::string& dependentCloudUuidList)
{
dependentCloudUuidList_ = dependentCloudUuidList;
setBodyParameter("DependentCloudUuidList", dependentCloudUuidList);
}
std::string CreateFileRequest::getInputList()const
{
return inputList_;

View File

@@ -1,150 +0,0 @@
/*
* 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/dataworks-public/model/CreateNodeComplementRequest.h>
using AlibabaCloud::Dataworks_public::Model::CreateNodeComplementRequest;
CreateNodeComplementRequest::CreateNodeComplementRequest() :
RpcServiceRequest("dataworks-public", "2020-05-18", "CreateNodeComplement")
{
setMethod(HttpRequest::Method::Post);
}
CreateNodeComplementRequest::~CreateNodeComplementRequest()
{}
std::string CreateNodeComplementRequest::getProjectEnv()const
{
return projectEnv_;
}
void CreateNodeComplementRequest::setProjectEnv(const std::string& projectEnv)
{
projectEnv_ = projectEnv;
setBodyParameter("ProjectEnv", projectEnv);
}
std::string CreateNodeComplementRequest::getStartBizDate()const
{
return startBizDate_;
}
void CreateNodeComplementRequest::setStartBizDate(const std::string& startBizDate)
{
startBizDate_ = startBizDate;
setBodyParameter("StartBizDate", startBizDate);
}
bool CreateNodeComplementRequest::getParallelism()const
{
return parallelism_;
}
void CreateNodeComplementRequest::setParallelism(bool parallelism)
{
parallelism_ = parallelism;
setBodyParameter("Parallelism", parallelism ? "true" : "false");
}
std::string CreateNodeComplementRequest::getBizBeginTime()const
{
return bizBeginTime_;
}
void CreateNodeComplementRequest::setBizBeginTime(const std::string& bizBeginTime)
{
bizBeginTime_ = bizBeginTime;
setBodyParameter("BizBeginTime", bizBeginTime);
}
std::string CreateNodeComplementRequest::getEndBizDate()const
{
return endBizDate_;
}
void CreateNodeComplementRequest::setEndBizDate(const std::string& endBizDate)
{
endBizDate_ = endBizDate;
setBodyParameter("EndBizDate", endBizDate);
}
std::string CreateNodeComplementRequest::getIncludeNodeIds()const
{
return includeNodeIds_;
}
void CreateNodeComplementRequest::setIncludeNodeIds(const std::string& includeNodeIds)
{
includeNodeIds_ = includeNodeIds;
setBodyParameter("IncludeNodeIds", includeNodeIds);
}
std::string CreateNodeComplementRequest::getBizEndTime()const
{
return bizEndTime_;
}
void CreateNodeComplementRequest::setBizEndTime(const std::string& bizEndTime)
{
bizEndTime_ = bizEndTime;
setBodyParameter("BizEndTime", bizEndTime);
}
std::string CreateNodeComplementRequest::getName()const
{
return name_;
}
void CreateNodeComplementRequest::setName(const std::string& name)
{
name_ = name;
setBodyParameter("Name", name);
}
std::string CreateNodeComplementRequest::getExcludeNodeIds()const
{
return excludeNodeIds_;
}
void CreateNodeComplementRequest::setExcludeNodeIds(const std::string& excludeNodeIds)
{
excludeNodeIds_ = excludeNodeIds;
setBodyParameter("ExcludeNodeIds", excludeNodeIds);
}
long CreateNodeComplementRequest::getNodeId()const
{
return nodeId_;
}
void CreateNodeComplementRequest::setNodeId(long nodeId)
{
nodeId_ = nodeId;
setBodyParameter("NodeId", std::to_string(nodeId));
}
long CreateNodeComplementRequest::getNodeProjectId()const
{
return nodeProjectId_;
}
void CreateNodeComplementRequest::setNodeProjectId(long nodeProjectId)
{
nodeProjectId_ = nodeProjectId;
setBodyParameter("NodeProjectId", std::to_string(nodeProjectId));
}

View File

@@ -1,139 +0,0 @@
/*
* 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/dataworks-public/model/CreateNodeTestRequest.h>
using AlibabaCloud::Dataworks_public::Model::CreateNodeTestRequest;
CreateNodeTestRequest::CreateNodeTestRequest() :
RpcServiceRequest("dataworks-public", "2020-05-18", "CreateNodeTest")
{
setMethod(HttpRequest::Method::Post);
}
CreateNodeTestRequest::~CreateNodeTestRequest()
{}
std::string CreateNodeTestRequest::getProjectEnv()const
{
return projectEnv_;
}
void CreateNodeTestRequest::setProjectEnv(const std::string& projectEnv)
{
projectEnv_ = projectEnv;
setBodyParameter("ProjectEnv", projectEnv);
}
bool CreateNodeTestRequest::getParallelism()const
{
return parallelism_;
}
void CreateNodeTestRequest::setParallelism(bool parallelism)
{
parallelism_ = parallelism;
setBodyParameter("Parallelism", parallelism ? "true" : "false");
}
std::string CreateNodeTestRequest::getBizBeginTime()const
{
return bizBeginTime_;
}
void CreateNodeTestRequest::setBizBeginTime(const std::string& bizBeginTime)
{
bizBeginTime_ = bizBeginTime;
setBodyParameter("BizBeginTime", bizBeginTime);
}
std::string CreateNodeTestRequest::getIncludeNodeIds()const
{
return includeNodeIds_;
}
void CreateNodeTestRequest::setIncludeNodeIds(const std::string& includeNodeIds)
{
includeNodeIds_ = includeNodeIds;
setBodyParameter("IncludeNodeIds", includeNodeIds);
}
std::string CreateNodeTestRequest::getBizdate()const
{
return bizdate_;
}
void CreateNodeTestRequest::setBizdate(const std::string& bizdate)
{
bizdate_ = bizdate;
setBodyParameter("Bizdate", bizdate);
}
std::string CreateNodeTestRequest::getBizEndTime()const
{
return bizEndTime_;
}
void CreateNodeTestRequest::setBizEndTime(const std::string& bizEndTime)
{
bizEndTime_ = bizEndTime;
setBodyParameter("BizEndTime", bizEndTime);
}
std::string CreateNodeTestRequest::getName()const
{
return name_;
}
void CreateNodeTestRequest::setName(const std::string& name)
{
name_ = name;
setBodyParameter("Name", name);
}
std::string CreateNodeTestRequest::getExcludeNodeIds()const
{
return excludeNodeIds_;
}
void CreateNodeTestRequest::setExcludeNodeIds(const std::string& excludeNodeIds)
{
excludeNodeIds_ = excludeNodeIds;
setBodyParameter("ExcludeNodeIds", excludeNodeIds);
}
long CreateNodeTestRequest::getNodeId()const
{
return nodeId_;
}
void CreateNodeTestRequest::setNodeId(long nodeId)
{
nodeId_ = nodeId;
setBodyParameter("NodeId", std::to_string(nodeId));
}
long CreateNodeTestRequest::getNodeProjectId()const
{
return nodeProjectId_;
}
void CreateNodeTestRequest::setNodeProjectId(long nodeProjectId)
{
nodeProjectId_ = nodeProjectId;
setBodyParameter("NodeProjectId", std::to_string(nodeProjectId));
}

View File

@@ -42,7 +42,7 @@ void DeleteQualityEntityResult::parse(const std::string &payload)
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString() == "true";
errorCode_ = value["ErrorCode"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["HttpStatusCode"].isNull())
@@ -62,7 +62,7 @@ bool DeleteQualityEntityResult::getData()const
return data_;
}
bool DeleteQualityEntityResult::getErrorCode()const
std::string DeleteQualityEntityResult::getErrorCode()const
{
return errorCode_;
}

Some files were not shown because too many files have changed in this diff Show More