Compare commits

...

8 Commits

Author SHA1 Message Date
sdk-team
f82391b140 Add Content. 2020-09-16 01:31:22 +00:00
sdk-team
c920c94335 Add describe devices to return device status. 2020-09-15 03:07:47 +00:00
wb-hx510875
d7f985a33b Adding some request header
when constructing request
2020-09-14 14:21:49 +08:00
sdk-team
7db054750e Support corp name search. 2020-09-14 02:30:34 +00:00
sdk-team
73412a8d8d Support corp name search. 2020-09-14 02:24:32 +00:00
sdk-team
51f047d6f3 Support execute database script via open api. 2020-09-11 03:24:25 +00:00
sdk-team
2d5bf1dbd8 Add DisableBackupLog. 2020-09-10 07:25:08 +00:00
sdk-team
a60cd6a5ae Update HasRenewChangeOrder type to Boolean in DescribeInstances. 2020-09-10 06:49:15 +00:00
75 changed files with 2391 additions and 416 deletions

View File

@@ -1,3 +1,29 @@
2020-09-16 Version: patch
- Add Content.
2020-09-15 Version: patch
- Add describe devices to return device status.
2020-09-14 Version: patch
- Support corp name search.
2020-09-14 Version: patch
- Support corp name search.
2020-09-11 Version: patch
- Support execute database script via open api.
2020-09-10 Version: patch
- Add DisableBackupLog.
- Add EnableBackupLog.
- Add ReleaseBackupPlan.
- Add ModifyStorageStrategy.
- Modify ModifyBackupStrategy.
- Modify ModifyBackupSetDownloadRules.
2020-09-10 Version: patch
- Update HasRenewChangeOrder type to Boolean in DescribeInstances.
2020-09-09 Version: patch
- Add support cn-beijing service region.
- Add ai video cover interface,include submit and query.

View File

@@ -23,6 +23,7 @@ RpcServiceRequest::RpcServiceRequest(const std::string &product,
const std::string &action)
: ServiceRequest(product, version) {
setActionName(action);
setHeader(std::string("x-acs-action"), action);
}
RpcServiceRequest::~RpcServiceRequest() {}

View File

@@ -25,7 +25,9 @@ ServiceRequest::ServiceRequest(const std::string &product,
: content_(nullptr), contentSize_(0), params_(), product_(product),
resourcePath_("/"), version_(version), scheme_("https"),
connectTimeout_(kInvalidTimeout), readTimeout_(kInvalidTimeout),
method_(HttpRequest::Method::Get) {}
method_(HttpRequest::Method::Get) {
setHeader(std::string("x-acs-version"), version);
}
ServiceRequest::ServiceRequest(const ServiceRequest &other)
: content_(nullptr), contentSize_(other.contentSize_),

View File

@@ -57,6 +57,10 @@ set(dbs_public_header_model
include/alibabacloud/dbs/model/DescribeRestoreRangeInfoResult.h
include/alibabacloud/dbs/model/DescribeRestoreTaskListRequest.h
include/alibabacloud/dbs/model/DescribeRestoreTaskListResult.h
include/alibabacloud/dbs/model/DisableBackupLogRequest.h
include/alibabacloud/dbs/model/DisableBackupLogResult.h
include/alibabacloud/dbs/model/EnableBackupLogRequest.h
include/alibabacloud/dbs/model/EnableBackupLogResult.h
include/alibabacloud/dbs/model/GetDBListFromAgentRequest.h
include/alibabacloud/dbs/model/GetDBListFromAgentResult.h
include/alibabacloud/dbs/model/ModifyBackupObjectsRequest.h
@@ -69,6 +73,10 @@ set(dbs_public_header_model
include/alibabacloud/dbs/model/ModifyBackupSourceEndpointResult.h
include/alibabacloud/dbs/model/ModifyBackupStrategyRequest.h
include/alibabacloud/dbs/model/ModifyBackupStrategyResult.h
include/alibabacloud/dbs/model/ModifyStorageStrategyRequest.h
include/alibabacloud/dbs/model/ModifyStorageStrategyResult.h
include/alibabacloud/dbs/model/ReleaseBackupPlanRequest.h
include/alibabacloud/dbs/model/ReleaseBackupPlanResult.h
include/alibabacloud/dbs/model/RenewBackupPlanRequest.h
include/alibabacloud/dbs/model/RenewBackupPlanResult.h
include/alibabacloud/dbs/model/StartBackupPlanRequest.h
@@ -120,6 +128,10 @@ set(dbs_src
src/model/DescribeRestoreRangeInfoResult.cc
src/model/DescribeRestoreTaskListRequest.cc
src/model/DescribeRestoreTaskListResult.cc
src/model/DisableBackupLogRequest.cc
src/model/DisableBackupLogResult.cc
src/model/EnableBackupLogRequest.cc
src/model/EnableBackupLogResult.cc
src/model/GetDBListFromAgentRequest.cc
src/model/GetDBListFromAgentResult.cc
src/model/ModifyBackupObjectsRequest.cc
@@ -132,6 +144,10 @@ set(dbs_src
src/model/ModifyBackupSourceEndpointResult.cc
src/model/ModifyBackupStrategyRequest.cc
src/model/ModifyBackupStrategyResult.cc
src/model/ModifyStorageStrategyRequest.cc
src/model/ModifyStorageStrategyResult.cc
src/model/ReleaseBackupPlanRequest.cc
src/model/ReleaseBackupPlanResult.cc
src/model/RenewBackupPlanRequest.cc
src/model/RenewBackupPlanResult.cc
src/model/StartBackupPlanRequest.cc

View File

@@ -58,6 +58,10 @@
#include "model/DescribeRestoreRangeInfoResult.h"
#include "model/DescribeRestoreTaskListRequest.h"
#include "model/DescribeRestoreTaskListResult.h"
#include "model/DisableBackupLogRequest.h"
#include "model/DisableBackupLogResult.h"
#include "model/EnableBackupLogRequest.h"
#include "model/EnableBackupLogResult.h"
#include "model/GetDBListFromAgentRequest.h"
#include "model/GetDBListFromAgentResult.h"
#include "model/ModifyBackupObjectsRequest.h"
@@ -70,6 +74,10 @@
#include "model/ModifyBackupSourceEndpointResult.h"
#include "model/ModifyBackupStrategyRequest.h"
#include "model/ModifyBackupStrategyResult.h"
#include "model/ModifyStorageStrategyRequest.h"
#include "model/ModifyStorageStrategyResult.h"
#include "model/ReleaseBackupPlanRequest.h"
#include "model/ReleaseBackupPlanResult.h"
#include "model/RenewBackupPlanRequest.h"
#include "model/RenewBackupPlanResult.h"
#include "model/StartBackupPlanRequest.h"
@@ -145,6 +153,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeRestoreTaskListResult> DescribeRestoreTaskListOutcome;
typedef std::future<DescribeRestoreTaskListOutcome> DescribeRestoreTaskListOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::DescribeRestoreTaskListRequest&, const DescribeRestoreTaskListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRestoreTaskListAsyncHandler;
typedef Outcome<Error, Model::DisableBackupLogResult> DisableBackupLogOutcome;
typedef std::future<DisableBackupLogOutcome> DisableBackupLogOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::DisableBackupLogRequest&, const DisableBackupLogOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DisableBackupLogAsyncHandler;
typedef Outcome<Error, Model::EnableBackupLogResult> EnableBackupLogOutcome;
typedef std::future<EnableBackupLogOutcome> EnableBackupLogOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::EnableBackupLogRequest&, const EnableBackupLogOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnableBackupLogAsyncHandler;
typedef Outcome<Error, Model::GetDBListFromAgentResult> GetDBListFromAgentOutcome;
typedef std::future<GetDBListFromAgentOutcome> GetDBListFromAgentOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::GetDBListFromAgentRequest&, const GetDBListFromAgentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDBListFromAgentAsyncHandler;
@@ -163,6 +177,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ModifyBackupStrategyResult> ModifyBackupStrategyOutcome;
typedef std::future<ModifyBackupStrategyOutcome> ModifyBackupStrategyOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::ModifyBackupStrategyRequest&, const ModifyBackupStrategyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyBackupStrategyAsyncHandler;
typedef Outcome<Error, Model::ModifyStorageStrategyResult> ModifyStorageStrategyOutcome;
typedef std::future<ModifyStorageStrategyOutcome> ModifyStorageStrategyOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::ModifyStorageStrategyRequest&, const ModifyStorageStrategyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyStorageStrategyAsyncHandler;
typedef Outcome<Error, Model::ReleaseBackupPlanResult> ReleaseBackupPlanOutcome;
typedef std::future<ReleaseBackupPlanOutcome> ReleaseBackupPlanOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::ReleaseBackupPlanRequest&, const ReleaseBackupPlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReleaseBackupPlanAsyncHandler;
typedef Outcome<Error, Model::RenewBackupPlanResult> RenewBackupPlanOutcome;
typedef std::future<RenewBackupPlanOutcome> RenewBackupPlanOutcomeCallable;
typedef std::function<void(const DbsClient*, const Model::RenewBackupPlanRequest&, const RenewBackupPlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RenewBackupPlanAsyncHandler;
@@ -240,6 +260,12 @@ namespace AlibabaCloud
DescribeRestoreTaskListOutcome describeRestoreTaskList(const Model::DescribeRestoreTaskListRequest &request)const;
void describeRestoreTaskListAsync(const Model::DescribeRestoreTaskListRequest& request, const DescribeRestoreTaskListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeRestoreTaskListOutcomeCallable describeRestoreTaskListCallable(const Model::DescribeRestoreTaskListRequest& request) const;
DisableBackupLogOutcome disableBackupLog(const Model::DisableBackupLogRequest &request)const;
void disableBackupLogAsync(const Model::DisableBackupLogRequest& request, const DisableBackupLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DisableBackupLogOutcomeCallable disableBackupLogCallable(const Model::DisableBackupLogRequest& request) const;
EnableBackupLogOutcome enableBackupLog(const Model::EnableBackupLogRequest &request)const;
void enableBackupLogAsync(const Model::EnableBackupLogRequest& request, const EnableBackupLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
EnableBackupLogOutcomeCallable enableBackupLogCallable(const Model::EnableBackupLogRequest& request) const;
GetDBListFromAgentOutcome getDBListFromAgent(const Model::GetDBListFromAgentRequest &request)const;
void getDBListFromAgentAsync(const Model::GetDBListFromAgentRequest& request, const GetDBListFromAgentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetDBListFromAgentOutcomeCallable getDBListFromAgentCallable(const Model::GetDBListFromAgentRequest& request) const;
@@ -258,6 +284,12 @@ namespace AlibabaCloud
ModifyBackupStrategyOutcome modifyBackupStrategy(const Model::ModifyBackupStrategyRequest &request)const;
void modifyBackupStrategyAsync(const Model::ModifyBackupStrategyRequest& request, const ModifyBackupStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifyBackupStrategyOutcomeCallable modifyBackupStrategyCallable(const Model::ModifyBackupStrategyRequest& request) const;
ModifyStorageStrategyOutcome modifyStorageStrategy(const Model::ModifyStorageStrategyRequest &request)const;
void modifyStorageStrategyAsync(const Model::ModifyStorageStrategyRequest& request, const ModifyStorageStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifyStorageStrategyOutcomeCallable modifyStorageStrategyCallable(const Model::ModifyStorageStrategyRequest& request) const;
ReleaseBackupPlanOutcome releaseBackupPlan(const Model::ReleaseBackupPlanRequest &request)const;
void releaseBackupPlanAsync(const Model::ReleaseBackupPlanRequest& request, const ReleaseBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ReleaseBackupPlanOutcomeCallable releaseBackupPlanCallable(const Model::ReleaseBackupPlanRequest& request) const;
RenewBackupPlanOutcome renewBackupPlan(const Model::RenewBackupPlanRequest &request)const;
void renewBackupPlanAsync(const Model::RenewBackupPlanRequest& request, const RenewBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RenewBackupPlanOutcomeCallable renewBackupPlanCallable(const Model::RenewBackupPlanRequest& request) const;

View File

@@ -37,6 +37,7 @@ namespace AlibabaCloud
std::string sourceEndpointIpPort;
std::string storageMethod;
long endTime;
std::string backupSetJobId;
long backupSize;
long startTime;
long backupSetExpiredTime;

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_DBS_MODEL_DISABLEBACKUPLOGREQUEST_H_
#define ALIBABACLOUD_DBS_MODEL_DISABLEBACKUPLOGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_DBS_EXPORT DisableBackupLogRequest : public RpcServiceRequest
{
public:
DisableBackupLogRequest();
~DisableBackupLogRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getBackupPlanId()const;
void setBackupPlanId(const std::string& backupPlanId);
std::string getOwnerId()const;
void setOwnerId(const std::string& ownerId);
private:
std::string clientToken_;
std::string backupPlanId_;
std::string ownerId_;
};
}
}
}
#endif // !ALIBABACLOUD_DBS_MODEL_DISABLEBACKUPLOGREQUEST_H_

View File

@@ -0,0 +1,61 @@
/*
* 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_DBS_MODEL_DISABLEBACKUPLOGRESULT_H_
#define ALIBABACLOUD_DBS_MODEL_DISABLEBACKUPLOGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_DBS_EXPORT DisableBackupLogResult : public ServiceResult
{
public:
DisableBackupLogResult();
explicit DisableBackupLogResult(const std::string &payload);
~DisableBackupLogResult();
int getHttpStatusCode()const;
std::string getBackupPlanId()const;
bool getNeedPrecheck()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
int httpStatusCode_;
std::string backupPlanId_;
bool needPrecheck_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_DBS_MODEL_DISABLEBACKUPLOGRESULT_H_

View File

@@ -14,38 +14,41 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTRECKONINGVALUEREQUEST_H_
#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTRECKONINGVALUEREQUEST_H_
#ifndef ALIBABACLOUD_DBS_MODEL_ENABLEBACKUPLOGREQUEST_H_
#define ALIBABACLOUD_DBS_MODEL_ENABLEBACKUPLOGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/industry-brain/Industry_brainExport.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Industry_brain
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetPointReckoningValueRequest : public RpcServiceRequest
class ALIBABACLOUD_DBS_EXPORT EnableBackupLogRequest : public RpcServiceRequest
{
public:
GetPointReckoningValueRequest();
~GetPointReckoningValueRequest();
EnableBackupLogRequest();
~EnableBackupLogRequest();
std::string getTimeType()const;
void setTimeType(const std::string& timeType);
std::string getTemplateId()const;
void setTemplateId(const std::string& templateId);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getBackupPlanId()const;
void setBackupPlanId(const std::string& backupPlanId);
std::string getOwnerId()const;
void setOwnerId(const std::string& ownerId);
private:
std::string timeType_;
std::string templateId_;
std::string clientToken_;
std::string backupPlanId_;
std::string ownerId_;
};
}
}
}
#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTRECKONINGVALUEREQUEST_H_
#endif // !ALIBABACLOUD_DBS_MODEL_ENABLEBACKUPLOGREQUEST_H_

View File

@@ -0,0 +1,61 @@
/*
* 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_DBS_MODEL_ENABLEBACKUPLOGRESULT_H_
#define ALIBABACLOUD_DBS_MODEL_ENABLEBACKUPLOGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_DBS_EXPORT EnableBackupLogResult : public ServiceResult
{
public:
EnableBackupLogResult();
explicit EnableBackupLogResult(const std::string &payload);
~EnableBackupLogResult();
int getHttpStatusCode()const;
std::string getBackupPlanId()const;
bool getNeedPrecheck()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
int httpStatusCode_;
std::string backupPlanId_;
bool needPrecheck_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_DBS_MODEL_ENABLEBACKUPLOGRESULT_H_

View File

@@ -51,6 +51,8 @@ namespace AlibabaCloud
void setOpenAutoDownload(bool openAutoDownload);
std::string getIncrementDataFormat()const;
void setIncrementDataFormat(const std::string& incrementDataFormat);
std::string getBackupSetDownloadTargetTypeLocation()const;
void setBackupSetDownloadTargetTypeLocation(const std::string& backupSetDownloadTargetTypeLocation);
std::string getBackupSetDownloadDir()const;
void setBackupSetDownloadDir(const std::string& backupSetDownloadDir);
@@ -63,6 +65,7 @@ namespace AlibabaCloud
std::string ownerId_;
bool openAutoDownload_;
std::string incrementDataFormat_;
std::string backupSetDownloadTargetTypeLocation_;
std::string backupSetDownloadDir_;
};

View File

@@ -35,6 +35,8 @@ namespace AlibabaCloud
ModifyBackupStrategyRequest();
~ModifyBackupStrategyRequest();
int getBackupLogIntervalSeconds()const;
void setBackupLogIntervalSeconds(int backupLogIntervalSeconds);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getBackupPlanId()const;
@@ -49,6 +51,7 @@ namespace AlibabaCloud
void setBackupStrategyType(const std::string& backupStrategyType);
private:
int backupLogIntervalSeconds_;
std::string clientToken_;
std::string backupPlanId_;
std::string ownerId_;

View File

@@ -0,0 +1,63 @@
/*
* 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_DBS_MODEL_MODIFYSTORAGESTRATEGYREQUEST_H_
#define ALIBABACLOUD_DBS_MODEL_MODIFYSTORAGESTRATEGYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_DBS_EXPORT ModifyStorageStrategyRequest : public RpcServiceRequest
{
public:
ModifyStorageStrategyRequest();
~ModifyStorageStrategyRequest();
int getDuplicationArchivePeriod()const;
void setDuplicationArchivePeriod(int duplicationArchivePeriod);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getBackupPlanId()const;
void setBackupPlanId(const std::string& backupPlanId);
std::string getOwnerId()const;
void setOwnerId(const std::string& ownerId);
int getBackupRetentionPeriod()const;
void setBackupRetentionPeriod(int backupRetentionPeriod);
int getDuplicationInfrequentAccessPeriod()const;
void setDuplicationInfrequentAccessPeriod(int duplicationInfrequentAccessPeriod);
private:
int duplicationArchivePeriod_;
std::string clientToken_;
std::string backupPlanId_;
std::string ownerId_;
int backupRetentionPeriod_;
int duplicationInfrequentAccessPeriod_;
};
}
}
}
#endif // !ALIBABACLOUD_DBS_MODEL_MODIFYSTORAGESTRATEGYREQUEST_H_

View File

@@ -0,0 +1,61 @@
/*
* 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_DBS_MODEL_MODIFYSTORAGESTRATEGYRESULT_H_
#define ALIBABACLOUD_DBS_MODEL_MODIFYSTORAGESTRATEGYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_DBS_EXPORT ModifyStorageStrategyResult : public ServiceResult
{
public:
ModifyStorageStrategyResult();
explicit ModifyStorageStrategyResult(const std::string &payload);
~ModifyStorageStrategyResult();
int getHttpStatusCode()const;
std::string getBackupPlanId()const;
bool getNeedPrecheck()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
int httpStatusCode_;
std::string backupPlanId_;
bool needPrecheck_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_DBS_MODEL_MODIFYSTORAGESTRATEGYRESULT_H_

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_DBS_MODEL_RELEASEBACKUPPLANREQUEST_H_
#define ALIBABACLOUD_DBS_MODEL_RELEASEBACKUPPLANREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_DBS_EXPORT ReleaseBackupPlanRequest : public RpcServiceRequest
{
public:
ReleaseBackupPlanRequest();
~ReleaseBackupPlanRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getBackupPlanId()const;
void setBackupPlanId(const std::string& backupPlanId);
std::string getOwnerId()const;
void setOwnerId(const std::string& ownerId);
private:
std::string clientToken_;
std::string backupPlanId_;
std::string ownerId_;
};
}
}
}
#endif // !ALIBABACLOUD_DBS_MODEL_RELEASEBACKUPPLANREQUEST_H_

View File

@@ -14,42 +14,46 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTRECKONINGVALUERESULT_H_
#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTRECKONINGVALUERESULT_H_
#ifndef ALIBABACLOUD_DBS_MODEL_RELEASEBACKUPPLANRESULT_H_
#define ALIBABACLOUD_DBS_MODEL_RELEASEBACKUPPLANRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/industry-brain/Industry_brainExport.h>
#include <alibabacloud/dbs/DbsExport.h>
namespace AlibabaCloud
{
namespace Industry_brain
namespace Dbs
{
namespace Model
{
class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetPointReckoningValueResult : public ServiceResult
class ALIBABACLOUD_DBS_EXPORT ReleaseBackupPlanResult : public ServiceResult
{
public:
GetPointReckoningValueResult();
explicit GetPointReckoningValueResult(const std::string &payload);
~GetPointReckoningValueResult();
std::string getMessage()const;
std::string getData()const;
std::string getCode()const;
ReleaseBackupPlanResult();
explicit ReleaseBackupPlanResult(const std::string &payload);
~ReleaseBackupPlanResult();
int getHttpStatusCode()const;
std::string getBackupPlanId()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string data_;
std::string code_;
int httpStatusCode_;
std::string backupPlanId_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTRECKONINGVALUERESULT_H_
#endif // !ALIBABACLOUD_DBS_MODEL_RELEASEBACKUPPLANRESULT_H_

View File

@@ -699,6 +699,78 @@ DbsClient::DescribeRestoreTaskListOutcomeCallable DbsClient::describeRestoreTask
return task->get_future();
}
DbsClient::DisableBackupLogOutcome DbsClient::disableBackupLog(const DisableBackupLogRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DisableBackupLogOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DisableBackupLogOutcome(DisableBackupLogResult(outcome.result()));
else
return DisableBackupLogOutcome(outcome.error());
}
void DbsClient::disableBackupLogAsync(const DisableBackupLogRequest& request, const DisableBackupLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, disableBackupLog(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::DisableBackupLogOutcomeCallable DbsClient::disableBackupLogCallable(const DisableBackupLogRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DisableBackupLogOutcome()>>(
[this, request]()
{
return this->disableBackupLog(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::EnableBackupLogOutcome DbsClient::enableBackupLog(const EnableBackupLogRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EnableBackupLogOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EnableBackupLogOutcome(EnableBackupLogResult(outcome.result()));
else
return EnableBackupLogOutcome(outcome.error());
}
void DbsClient::enableBackupLogAsync(const EnableBackupLogRequest& request, const EnableBackupLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, enableBackupLog(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::EnableBackupLogOutcomeCallable DbsClient::enableBackupLogCallable(const EnableBackupLogRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EnableBackupLogOutcome()>>(
[this, request]()
{
return this->enableBackupLog(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::GetDBListFromAgentOutcome DbsClient::getDBListFromAgent(const GetDBListFromAgentRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -915,6 +987,78 @@ DbsClient::ModifyBackupStrategyOutcomeCallable DbsClient::modifyBackupStrategyCa
return task->get_future();
}
DbsClient::ModifyStorageStrategyOutcome DbsClient::modifyStorageStrategy(const ModifyStorageStrategyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyStorageStrategyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyStorageStrategyOutcome(ModifyStorageStrategyResult(outcome.result()));
else
return ModifyStorageStrategyOutcome(outcome.error());
}
void DbsClient::modifyStorageStrategyAsync(const ModifyStorageStrategyRequest& request, const ModifyStorageStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyStorageStrategy(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::ModifyStorageStrategyOutcomeCallable DbsClient::modifyStorageStrategyCallable(const ModifyStorageStrategyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyStorageStrategyOutcome()>>(
[this, request]()
{
return this->modifyStorageStrategy(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::ReleaseBackupPlanOutcome DbsClient::releaseBackupPlan(const ReleaseBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ReleaseBackupPlanOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ReleaseBackupPlanOutcome(ReleaseBackupPlanResult(outcome.result()));
else
return ReleaseBackupPlanOutcome(outcome.error());
}
void DbsClient::releaseBackupPlanAsync(const ReleaseBackupPlanRequest& request, const ReleaseBackupPlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, releaseBackupPlan(request), context);
};
asyncExecute(new Runnable(fn));
}
DbsClient::ReleaseBackupPlanOutcomeCallable DbsClient::releaseBackupPlanCallable(const ReleaseBackupPlanRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ReleaseBackupPlanOutcome()>>(
[this, request]()
{
return this->releaseBackupPlan(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DbsClient::RenewBackupPlanOutcome DbsClient::renewBackupPlan(const RenewBackupPlanRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -45,6 +45,8 @@ void DescribeIncrementBackupListResult::parse(const std::string &payload)
IncrementBackupFile itemsObject;
if(!valueItemsIncrementBackupFile["BackupSetId"].isNull())
itemsObject.backupSetId = valueItemsIncrementBackupFile["BackupSetId"].asString();
if(!valueItemsIncrementBackupFile["BackupSetJobId"].isNull())
itemsObject.backupSetJobId = valueItemsIncrementBackupFile["BackupSetJobId"].asString();
if(!valueItemsIncrementBackupFile["SourceEndpointIpPort"].isNull())
itemsObject.sourceEndpointIpPort = valueItemsIncrementBackupFile["SourceEndpointIpPort"].asString();
if(!valueItemsIncrementBackupFile["StartTime"].isNull())

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/dbs/model/DisableBackupLogRequest.h>
using AlibabaCloud::Dbs::Model::DisableBackupLogRequest;
DisableBackupLogRequest::DisableBackupLogRequest() :
RpcServiceRequest("dbs", "2019-03-06", "DisableBackupLog")
{
setMethod(HttpRequest::Method::Post);
}
DisableBackupLogRequest::~DisableBackupLogRequest()
{}
std::string DisableBackupLogRequest::getClientToken()const
{
return clientToken_;
}
void DisableBackupLogRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string DisableBackupLogRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void DisableBackupLogRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setParameter("BackupPlanId", backupPlanId);
}
std::string DisableBackupLogRequest::getOwnerId()const
{
return ownerId_;
}
void DisableBackupLogRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/dbs/model/DisableBackupLogResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
DisableBackupLogResult::DisableBackupLogResult() :
ServiceResult()
{}
DisableBackupLogResult::DisableBackupLogResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableBackupLogResult::~DisableBackupLogResult()
{}
void DisableBackupLogResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMessage"].isNull())
errMessage_ = value["ErrMessage"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
if(!value["NeedPrecheck"].isNull())
needPrecheck_ = value["NeedPrecheck"].asString() == "true";
}
int DisableBackupLogResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string DisableBackupLogResult::getBackupPlanId()const
{
return backupPlanId_;
}
bool DisableBackupLogResult::getNeedPrecheck()const
{
return needPrecheck_;
}
std::string DisableBackupLogResult::getErrMessage()const
{
return errMessage_;
}
bool DisableBackupLogResult::getSuccess()const
{
return success_;
}
std::string DisableBackupLogResult::getErrCode()const
{
return errCode_;
}

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/dbs/model/EnableBackupLogRequest.h>
using AlibabaCloud::Dbs::Model::EnableBackupLogRequest;
EnableBackupLogRequest::EnableBackupLogRequest() :
RpcServiceRequest("dbs", "2019-03-06", "EnableBackupLog")
{
setMethod(HttpRequest::Method::Post);
}
EnableBackupLogRequest::~EnableBackupLogRequest()
{}
std::string EnableBackupLogRequest::getClientToken()const
{
return clientToken_;
}
void EnableBackupLogRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string EnableBackupLogRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void EnableBackupLogRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setParameter("BackupPlanId", backupPlanId);
}
std::string EnableBackupLogRequest::getOwnerId()const
{
return ownerId_;
}
void EnableBackupLogRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/dbs/model/EnableBackupLogResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
EnableBackupLogResult::EnableBackupLogResult() :
ServiceResult()
{}
EnableBackupLogResult::EnableBackupLogResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableBackupLogResult::~EnableBackupLogResult()
{}
void EnableBackupLogResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMessage"].isNull())
errMessage_ = value["ErrMessage"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
if(!value["NeedPrecheck"].isNull())
needPrecheck_ = value["NeedPrecheck"].asString() == "true";
}
int EnableBackupLogResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string EnableBackupLogResult::getBackupPlanId()const
{
return backupPlanId_;
}
bool EnableBackupLogResult::getNeedPrecheck()const
{
return needPrecheck_;
}
std::string EnableBackupLogResult::getErrMessage()const
{
return errMessage_;
}
bool EnableBackupLogResult::getSuccess()const
{
return success_;
}
std::string EnableBackupLogResult::getErrCode()const
{
return errCode_;
}

View File

@@ -115,6 +115,17 @@ void ModifyBackupSetDownloadRulesRequest::setIncrementDataFormat(const std::stri
setParameter("IncrementDataFormat", incrementDataFormat);
}
std::string ModifyBackupSetDownloadRulesRequest::getBackupSetDownloadTargetTypeLocation()const
{
return backupSetDownloadTargetTypeLocation_;
}
void ModifyBackupSetDownloadRulesRequest::setBackupSetDownloadTargetTypeLocation(const std::string& backupSetDownloadTargetTypeLocation)
{
backupSetDownloadTargetTypeLocation_ = backupSetDownloadTargetTypeLocation;
setParameter("BackupSetDownloadTargetTypeLocation", backupSetDownloadTargetTypeLocation);
}
std::string ModifyBackupSetDownloadRulesRequest::getBackupSetDownloadDir()const
{
return backupSetDownloadDir_;

View File

@@ -27,6 +27,17 @@ ModifyBackupStrategyRequest::ModifyBackupStrategyRequest() :
ModifyBackupStrategyRequest::~ModifyBackupStrategyRequest()
{}
int ModifyBackupStrategyRequest::getBackupLogIntervalSeconds()const
{
return backupLogIntervalSeconds_;
}
void ModifyBackupStrategyRequest::setBackupLogIntervalSeconds(int backupLogIntervalSeconds)
{
backupLogIntervalSeconds_ = backupLogIntervalSeconds;
setParameter("BackupLogIntervalSeconds", std::to_string(backupLogIntervalSeconds));
}
std::string ModifyBackupStrategyRequest::getClientToken()const
{
return clientToken_;

View File

@@ -0,0 +1,95 @@
/*
* 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/dbs/model/ModifyStorageStrategyRequest.h>
using AlibabaCloud::Dbs::Model::ModifyStorageStrategyRequest;
ModifyStorageStrategyRequest::ModifyStorageStrategyRequest() :
RpcServiceRequest("dbs", "2019-03-06", "ModifyStorageStrategy")
{
setMethod(HttpRequest::Method::Post);
}
ModifyStorageStrategyRequest::~ModifyStorageStrategyRequest()
{}
int ModifyStorageStrategyRequest::getDuplicationArchivePeriod()const
{
return duplicationArchivePeriod_;
}
void ModifyStorageStrategyRequest::setDuplicationArchivePeriod(int duplicationArchivePeriod)
{
duplicationArchivePeriod_ = duplicationArchivePeriod;
setParameter("DuplicationArchivePeriod", std::to_string(duplicationArchivePeriod));
}
std::string ModifyStorageStrategyRequest::getClientToken()const
{
return clientToken_;
}
void ModifyStorageStrategyRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string ModifyStorageStrategyRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void ModifyStorageStrategyRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setParameter("BackupPlanId", backupPlanId);
}
std::string ModifyStorageStrategyRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyStorageStrategyRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", ownerId);
}
int ModifyStorageStrategyRequest::getBackupRetentionPeriod()const
{
return backupRetentionPeriod_;
}
void ModifyStorageStrategyRequest::setBackupRetentionPeriod(int backupRetentionPeriod)
{
backupRetentionPeriod_ = backupRetentionPeriod;
setParameter("BackupRetentionPeriod", std::to_string(backupRetentionPeriod));
}
int ModifyStorageStrategyRequest::getDuplicationInfrequentAccessPeriod()const
{
return duplicationInfrequentAccessPeriod_;
}
void ModifyStorageStrategyRequest::setDuplicationInfrequentAccessPeriod(int duplicationInfrequentAccessPeriod)
{
duplicationInfrequentAccessPeriod_ = duplicationInfrequentAccessPeriod;
setParameter("DuplicationInfrequentAccessPeriod", std::to_string(duplicationInfrequentAccessPeriod));
}

View File

@@ -0,0 +1,86 @@
/*
* 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/dbs/model/ModifyStorageStrategyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
ModifyStorageStrategyResult::ModifyStorageStrategyResult() :
ServiceResult()
{}
ModifyStorageStrategyResult::ModifyStorageStrategyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifyStorageStrategyResult::~ModifyStorageStrategyResult()
{}
void ModifyStorageStrategyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMessage"].isNull())
errMessage_ = value["ErrMessage"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
if(!value["NeedPrecheck"].isNull())
needPrecheck_ = value["NeedPrecheck"].asString() == "true";
}
int ModifyStorageStrategyResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ModifyStorageStrategyResult::getBackupPlanId()const
{
return backupPlanId_;
}
bool ModifyStorageStrategyResult::getNeedPrecheck()const
{
return needPrecheck_;
}
std::string ModifyStorageStrategyResult::getErrMessage()const
{
return errMessage_;
}
bool ModifyStorageStrategyResult::getSuccess()const
{
return success_;
}
std::string ModifyStorageStrategyResult::getErrCode()const
{
return errCode_;
}

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/dbs/model/ReleaseBackupPlanRequest.h>
using AlibabaCloud::Dbs::Model::ReleaseBackupPlanRequest;
ReleaseBackupPlanRequest::ReleaseBackupPlanRequest() :
RpcServiceRequest("dbs", "2019-03-06", "ReleaseBackupPlan")
{
setMethod(HttpRequest::Method::Post);
}
ReleaseBackupPlanRequest::~ReleaseBackupPlanRequest()
{}
std::string ReleaseBackupPlanRequest::getClientToken()const
{
return clientToken_;
}
void ReleaseBackupPlanRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string ReleaseBackupPlanRequest::getBackupPlanId()const
{
return backupPlanId_;
}
void ReleaseBackupPlanRequest::setBackupPlanId(const std::string& backupPlanId)
{
backupPlanId_ = backupPlanId;
setParameter("BackupPlanId", backupPlanId);
}
std::string ReleaseBackupPlanRequest::getOwnerId()const
{
return ownerId_;
}
void ReleaseBackupPlanRequest::setOwnerId(const std::string& ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", ownerId);
}

View File

@@ -0,0 +1,79 @@
/*
* 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/dbs/model/ReleaseBackupPlanResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dbs;
using namespace AlibabaCloud::Dbs::Model;
ReleaseBackupPlanResult::ReleaseBackupPlanResult() :
ServiceResult()
{}
ReleaseBackupPlanResult::ReleaseBackupPlanResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ReleaseBackupPlanResult::~ReleaseBackupPlanResult()
{}
void ReleaseBackupPlanResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMessage"].isNull())
errMessage_ = value["ErrMessage"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["BackupPlanId"].isNull())
backupPlanId_ = value["BackupPlanId"].asString();
}
int ReleaseBackupPlanResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ReleaseBackupPlanResult::getBackupPlanId()const
{
return backupPlanId_;
}
std::string ReleaseBackupPlanResult::getErrMessage()const
{
return errMessage_;
}
bool ReleaseBackupPlanResult::getSuccess()const
{
return success_;
}
std::string ReleaseBackupPlanResult::getErrCode()const
{
return errCode_;
}

View File

@@ -23,6 +23,8 @@ set(dms-enterprise_public_header
set(dms-enterprise_public_header_model
include/alibabacloud/dms-enterprise/model/ApproveOrderRequest.h
include/alibabacloud/dms-enterprise/model/ApproveOrderResult.h
include/alibabacloud/dms-enterprise/model/CheckFinishMissionRequest.h
include/alibabacloud/dms-enterprise/model/CheckFinishMissionResult.h
include/alibabacloud/dms-enterprise/model/CloseOrderRequest.h
include/alibabacloud/dms-enterprise/model/CloseOrderResult.h
include/alibabacloud/dms-enterprise/model/CreateOrderRequest.h
@@ -41,6 +43,8 @@ set(dms-enterprise_public_header_model
include/alibabacloud/dms-enterprise/model/ExecuteDataCorrectResult.h
include/alibabacloud/dms-enterprise/model/ExecuteDataExportRequest.h
include/alibabacloud/dms-enterprise/model/ExecuteDataExportResult.h
include/alibabacloud/dms-enterprise/model/ExecuteScriptRequest.h
include/alibabacloud/dms-enterprise/model/ExecuteScriptResult.h
include/alibabacloud/dms-enterprise/model/GetApprovalDetailRequest.h
include/alibabacloud/dms-enterprise/model/GetApprovalDetailResult.h
include/alibabacloud/dms-enterprise/model/GetDataCorrectBackupFilesRequest.h
@@ -122,6 +126,8 @@ set(dms-enterprise_src
src/Dms-enterpriseClient.cc
src/model/ApproveOrderRequest.cc
src/model/ApproveOrderResult.cc
src/model/CheckFinishMissionRequest.cc
src/model/CheckFinishMissionResult.cc
src/model/CloseOrderRequest.cc
src/model/CloseOrderResult.cc
src/model/CreateOrderRequest.cc
@@ -140,6 +146,8 @@ set(dms-enterprise_src
src/model/ExecuteDataCorrectResult.cc
src/model/ExecuteDataExportRequest.cc
src/model/ExecuteDataExportResult.cc
src/model/ExecuteScriptRequest.cc
src/model/ExecuteScriptResult.cc
src/model/GetApprovalDetailRequest.cc
src/model/GetApprovalDetailResult.cc
src/model/GetDataCorrectBackupFilesRequest.cc

View File

@@ -24,6 +24,8 @@
#include "Dms_enterpriseExport.h"
#include "model/ApproveOrderRequest.h"
#include "model/ApproveOrderResult.h"
#include "model/CheckFinishMissionRequest.h"
#include "model/CheckFinishMissionResult.h"
#include "model/CloseOrderRequest.h"
#include "model/CloseOrderResult.h"
#include "model/CreateOrderRequest.h"
@@ -42,6 +44,8 @@
#include "model/ExecuteDataCorrectResult.h"
#include "model/ExecuteDataExportRequest.h"
#include "model/ExecuteDataExportResult.h"
#include "model/ExecuteScriptRequest.h"
#include "model/ExecuteScriptResult.h"
#include "model/GetApprovalDetailRequest.h"
#include "model/GetApprovalDetailResult.h"
#include "model/GetDataCorrectBackupFilesRequest.h"
@@ -130,6 +134,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ApproveOrderResult> ApproveOrderOutcome;
typedef std::future<ApproveOrderOutcome> ApproveOrderOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ApproveOrderRequest&, const ApproveOrderOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ApproveOrderAsyncHandler;
typedef Outcome<Error, Model::CheckFinishMissionResult> CheckFinishMissionOutcome;
typedef std::future<CheckFinishMissionOutcome> CheckFinishMissionOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::CheckFinishMissionRequest&, const CheckFinishMissionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckFinishMissionAsyncHandler;
typedef Outcome<Error, Model::CloseOrderResult> CloseOrderOutcome;
typedef std::future<CloseOrderOutcome> CloseOrderOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::CloseOrderRequest&, const CloseOrderOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CloseOrderAsyncHandler;
@@ -157,6 +164,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ExecuteDataExportResult> ExecuteDataExportOutcome;
typedef std::future<ExecuteDataExportOutcome> ExecuteDataExportOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ExecuteDataExportRequest&, const ExecuteDataExportOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteDataExportAsyncHandler;
typedef Outcome<Error, Model::ExecuteScriptResult> ExecuteScriptOutcome;
typedef std::future<ExecuteScriptOutcome> ExecuteScriptOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ExecuteScriptRequest&, const ExecuteScriptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteScriptAsyncHandler;
typedef Outcome<Error, Model::GetApprovalDetailResult> GetApprovalDetailOutcome;
typedef std::future<GetApprovalDetailOutcome> GetApprovalDetailOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetApprovalDetailRequest&, const GetApprovalDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetApprovalDetailAsyncHandler;
@@ -279,6 +289,9 @@ namespace AlibabaCloud
ApproveOrderOutcome approveOrder(const Model::ApproveOrderRequest &request)const;
void approveOrderAsync(const Model::ApproveOrderRequest& request, const ApproveOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ApproveOrderOutcomeCallable approveOrderCallable(const Model::ApproveOrderRequest& request) const;
CheckFinishMissionOutcome checkFinishMission(const Model::CheckFinishMissionRequest &request)const;
void checkFinishMissionAsync(const Model::CheckFinishMissionRequest& request, const CheckFinishMissionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CheckFinishMissionOutcomeCallable checkFinishMissionCallable(const Model::CheckFinishMissionRequest& request) const;
CloseOrderOutcome closeOrder(const Model::CloseOrderRequest &request)const;
void closeOrderAsync(const Model::CloseOrderRequest& request, const CloseOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CloseOrderOutcomeCallable closeOrderCallable(const Model::CloseOrderRequest& request) const;
@@ -306,6 +319,9 @@ namespace AlibabaCloud
ExecuteDataExportOutcome executeDataExport(const Model::ExecuteDataExportRequest &request)const;
void executeDataExportAsync(const Model::ExecuteDataExportRequest& request, const ExecuteDataExportAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ExecuteDataExportOutcomeCallable executeDataExportCallable(const Model::ExecuteDataExportRequest& request) const;
ExecuteScriptOutcome executeScript(const Model::ExecuteScriptRequest &request)const;
void executeScriptAsync(const Model::ExecuteScriptRequest& request, const ExecuteScriptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ExecuteScriptOutcomeCallable executeScriptCallable(const Model::ExecuteScriptRequest& request) const;
GetApprovalDetailOutcome getApprovalDetail(const Model::GetApprovalDetailRequest &request)const;
void getApprovalDetailAsync(const Model::GetApprovalDetailRequest& request, const GetApprovalDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetApprovalDetailOutcomeCallable getApprovalDetailCallable(const Model::GetApprovalDetailRequest& request) const;

View File

@@ -14,38 +14,35 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTSAMPLEVALUEREQUEST_H_
#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTSAMPLEVALUEREQUEST_H_
#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONREQUEST_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/industry-brain/Industry_brainExport.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Industry_brain
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetPointSampleValueRequest : public RpcServiceRequest
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT CheckFinishMissionRequest : public RpcServiceRequest
{
public:
GetPointSampleValueRequest();
~GetPointSampleValueRequest();
CheckFinishMissionRequest();
~CheckFinishMissionRequest();
std::string getTimeType()const;
void setTimeType(const std::string& timeType);
std::string getTemplateId()const;
void setTemplateId(const std::string& templateId);
std::string getMissionType()const;
void setMissionType(const std::string& missionType);
private:
std::string timeType_;
std::string templateId_;
std::string missionType_;
};
}
}
}
#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTSAMPLEVALUEREQUEST_H_
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONREQUEST_H_

View File

@@ -14,42 +14,44 @@
* limitations under the License.
*/
#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTSAMPLEVALUERESULT_H_
#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTSAMPLEVALUERESULT_H_
#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONRESULT_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/industry-brain/Industry_brainExport.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Industry_brain
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetPointSampleValueResult : public ServiceResult
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT CheckFinishMissionResult : public ServiceResult
{
public:
GetPointSampleValueResult();
explicit GetPointSampleValueResult(const std::string &payload);
~GetPointSampleValueResult();
std::string getMessage()const;
std::string getData()const;
std::string getCode()const;
CheckFinishMissionResult();
explicit CheckFinishMissionResult(const std::string &payload);
~CheckFinishMissionResult();
bool getHasFinish()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string data_;
std::string code_;
bool hasFinish_;
std::string errorCode_;
std::string errorMessage_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETPOINTSAMPLEVALUERESULT_H_
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_CHECKFINISHMISSIONRESULT_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_EXECUTESCRIPTREQUEST_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_EXECUTESCRIPTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ExecuteScriptRequest : public RpcServiceRequest
{
public:
ExecuteScriptRequest();
~ExecuteScriptRequest();
int getDbId()const;
void setDbId(int dbId);
bool getLogic()const;
void setLogic(bool logic);
std::string getScript()const;
void setScript(const std::string& script);
long getTid()const;
void setTid(long tid);
private:
int dbId_;
bool logic_;
std::string script_;
long tid_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_EXECUTESCRIPTREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_EXECUTESCRIPTRESULT_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_EXECUTESCRIPTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ExecuteScriptResult : public ServiceResult
{
public:
struct Result
{
std::vector<std::string> columnNames;
std::string message;
long rowCount;
bool success;
std::vector<std::string> rows;
};
ExecuteScriptResult();
explicit ExecuteScriptResult(const std::string &payload);
~ExecuteScriptResult();
std::vector<Result> getResults()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::vector<Result> results_;
std::string errorCode_;
std::string errorMessage_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_EXECUTESCRIPTRESULT_H_

View File

@@ -87,6 +87,42 @@ Dms_enterpriseClient::ApproveOrderOutcomeCallable Dms_enterpriseClient::approveO
return task->get_future();
}
Dms_enterpriseClient::CheckFinishMissionOutcome Dms_enterpriseClient::checkFinishMission(const CheckFinishMissionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CheckFinishMissionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CheckFinishMissionOutcome(CheckFinishMissionResult(outcome.result()));
else
return CheckFinishMissionOutcome(outcome.error());
}
void Dms_enterpriseClient::checkFinishMissionAsync(const CheckFinishMissionRequest& request, const CheckFinishMissionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, checkFinishMission(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::CheckFinishMissionOutcomeCallable Dms_enterpriseClient::checkFinishMissionCallable(const CheckFinishMissionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CheckFinishMissionOutcome()>>(
[this, request]()
{
return this->checkFinishMission(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::CloseOrderOutcome Dms_enterpriseClient::closeOrder(const CloseOrderRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -411,6 +447,42 @@ Dms_enterpriseClient::ExecuteDataExportOutcomeCallable Dms_enterpriseClient::exe
return task->get_future();
}
Dms_enterpriseClient::ExecuteScriptOutcome Dms_enterpriseClient::executeScript(const ExecuteScriptRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ExecuteScriptOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ExecuteScriptOutcome(ExecuteScriptResult(outcome.result()));
else
return ExecuteScriptOutcome(outcome.error());
}
void Dms_enterpriseClient::executeScriptAsync(const ExecuteScriptRequest& request, const ExecuteScriptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, executeScript(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ExecuteScriptOutcomeCallable Dms_enterpriseClient::executeScriptCallable(const ExecuteScriptRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ExecuteScriptOutcome()>>(
[this, request]()
{
return this->executeScript(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::GetApprovalDetailOutcome Dms_enterpriseClient::getApprovalDetail(const GetApprovalDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,40 @@
/*
* 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/dms-enterprise/model/CheckFinishMissionRequest.h>
using AlibabaCloud::Dms_enterprise::Model::CheckFinishMissionRequest;
CheckFinishMissionRequest::CheckFinishMissionRequest() :
RpcServiceRequest("dms-enterprise", "2018-11-01", "CheckFinishMission")
{
setMethod(HttpRequest::Method::Get);
}
CheckFinishMissionRequest::~CheckFinishMissionRequest()
{}
std::string CheckFinishMissionRequest::getMissionType()const
{
return missionType_;
}
void CheckFinishMissionRequest::setMissionType(const std::string& missionType)
{
missionType_ = missionType;
setParameter("MissionType", missionType);
}

View File

@@ -0,0 +1,72 @@
/*
* 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/dms-enterprise/model/CheckFinishMissionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
CheckFinishMissionResult::CheckFinishMissionResult() :
ServiceResult()
{}
CheckFinishMissionResult::CheckFinishMissionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CheckFinishMissionResult::~CheckFinishMissionResult()
{}
void CheckFinishMissionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["HasFinish"].isNull())
hasFinish_ = value["HasFinish"].asString() == "true";
}
bool CheckFinishMissionResult::getHasFinish()const
{
return hasFinish_;
}
std::string CheckFinishMissionResult::getErrorCode()const
{
return errorCode_;
}
std::string CheckFinishMissionResult::getErrorMessage()const
{
return errorMessage_;
}
bool CheckFinishMissionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/dms-enterprise/model/ExecuteScriptRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ExecuteScriptRequest;
ExecuteScriptRequest::ExecuteScriptRequest() :
RpcServiceRequest("dms-enterprise", "2018-11-01", "ExecuteScript")
{
setMethod(HttpRequest::Method::Post);
}
ExecuteScriptRequest::~ExecuteScriptRequest()
{}
int ExecuteScriptRequest::getDbId()const
{
return dbId_;
}
void ExecuteScriptRequest::setDbId(int dbId)
{
dbId_ = dbId;
setParameter("DbId", std::to_string(dbId));
}
bool ExecuteScriptRequest::getLogic()const
{
return logic_;
}
void ExecuteScriptRequest::setLogic(bool logic)
{
logic_ = logic;
setParameter("Logic", logic ? "true" : "false");
}
std::string ExecuteScriptRequest::getScript()const
{
return script_;
}
void ExecuteScriptRequest::setScript(const std::string& script)
{
script_ = script;
setParameter("Script", script);
}
long ExecuteScriptRequest::getTid()const
{
return tid_;
}
void ExecuteScriptRequest::setTid(long tid)
{
tid_ = tid;
setParameter("Tid", std::to_string(tid));
}

View File

@@ -0,0 +1,88 @@
/*
* 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/dms-enterprise/model/ExecuteScriptResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ExecuteScriptResult::ExecuteScriptResult() :
ServiceResult()
{}
ExecuteScriptResult::ExecuteScriptResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ExecuteScriptResult::~ExecuteScriptResult()
{}
void ExecuteScriptResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultsNode = value["Results"]["Result"];
for (auto valueResultsResult : allResultsNode)
{
Result resultsObject;
if(!valueResultsResult["RowCount"].isNull())
resultsObject.rowCount = std::stol(valueResultsResult["RowCount"].asString());
if(!valueResultsResult["Success"].isNull())
resultsObject.success = valueResultsResult["Success"].asString() == "true";
if(!valueResultsResult["Message"].isNull())
resultsObject.message = valueResultsResult["Message"].asString();
auto allColumnNames = value["ColumnNames"]["ColumnNames"];
for (auto value : allColumnNames)
resultsObject.columnNames.push_back(value.asString());
auto allRows = value["Rows"]["Rows"];
for (auto value : allRows)
resultsObject.rows.push_back(value.asString());
results_.push_back(resultsObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
}
std::vector<ExecuteScriptResult::Result> ExecuteScriptResult::getResults()const
{
return results_;
}
std::string ExecuteScriptResult::getErrorCode()const
{
return errorCode_;
}
std::string ExecuteScriptResult::getErrorMessage()const
{
return errorMessage_;
}
bool ExecuteScriptResult::getSuccess()const
{
return success_;
}

View File

@@ -25,10 +25,6 @@ set(industry-brain_public_header_model
include/alibabacloud/industry-brain/model/AsyncResponsePostResult.h
include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultRequest.h
include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultResult.h
include/alibabacloud/industry-brain/model/GetPointReckoningValueRequest.h
include/alibabacloud/industry-brain/model/GetPointReckoningValueResult.h
include/alibabacloud/industry-brain/model/GetPointSampleValueRequest.h
include/alibabacloud/industry-brain/model/GetPointSampleValueResult.h
include/alibabacloud/industry-brain/model/GetServiceResultAsyncRequest.h
include/alibabacloud/industry-brain/model/GetServiceResultAsyncResult.h
include/alibabacloud/industry-brain/model/InvokeServiceRequest.h
@@ -42,10 +38,6 @@ set(industry-brain_src
src/model/AsyncResponsePostResult.cc
src/model/GetAlgorithmHistoryResultRequest.cc
src/model/GetAlgorithmHistoryResultResult.cc
src/model/GetPointReckoningValueRequest.cc
src/model/GetPointReckoningValueResult.cc
src/model/GetPointSampleValueRequest.cc
src/model/GetPointSampleValueResult.cc
src/model/GetServiceResultAsyncRequest.cc
src/model/GetServiceResultAsyncResult.cc
src/model/InvokeServiceRequest.cc

View File

@@ -26,10 +26,6 @@
#include "model/AsyncResponsePostResult.h"
#include "model/GetAlgorithmHistoryResultRequest.h"
#include "model/GetAlgorithmHistoryResultResult.h"
#include "model/GetPointReckoningValueRequest.h"
#include "model/GetPointReckoningValueResult.h"
#include "model/GetPointSampleValueRequest.h"
#include "model/GetPointSampleValueResult.h"
#include "model/GetServiceResultAsyncRequest.h"
#include "model/GetServiceResultAsyncResult.h"
#include "model/InvokeServiceRequest.h"
@@ -51,12 +47,6 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetAlgorithmHistoryResultResult> GetAlgorithmHistoryResultOutcome;
typedef std::future<GetAlgorithmHistoryResultOutcome> GetAlgorithmHistoryResultOutcomeCallable;
typedef std::function<void(const Industry_brainClient*, const Model::GetAlgorithmHistoryResultRequest&, const GetAlgorithmHistoryResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAlgorithmHistoryResultAsyncHandler;
typedef Outcome<Error, Model::GetPointReckoningValueResult> GetPointReckoningValueOutcome;
typedef std::future<GetPointReckoningValueOutcome> GetPointReckoningValueOutcomeCallable;
typedef std::function<void(const Industry_brainClient*, const Model::GetPointReckoningValueRequest&, const GetPointReckoningValueOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPointReckoningValueAsyncHandler;
typedef Outcome<Error, Model::GetPointSampleValueResult> GetPointSampleValueOutcome;
typedef std::future<GetPointSampleValueOutcome> GetPointSampleValueOutcomeCallable;
typedef std::function<void(const Industry_brainClient*, const Model::GetPointSampleValueRequest&, const GetPointSampleValueOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPointSampleValueAsyncHandler;
typedef Outcome<Error, Model::GetServiceResultAsyncResult> GetServiceResultAsyncOutcome;
typedef std::future<GetServiceResultAsyncOutcome> GetServiceResultAsyncOutcomeCallable;
typedef std::function<void(const Industry_brainClient*, const Model::GetServiceResultAsyncRequest&, const GetServiceResultAsyncOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetServiceResultAsyncAsyncHandler;
@@ -77,12 +67,6 @@ namespace AlibabaCloud
GetAlgorithmHistoryResultOutcome getAlgorithmHistoryResult(const Model::GetAlgorithmHistoryResultRequest &request)const;
void getAlgorithmHistoryResultAsync(const Model::GetAlgorithmHistoryResultRequest& request, const GetAlgorithmHistoryResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAlgorithmHistoryResultOutcomeCallable getAlgorithmHistoryResultCallable(const Model::GetAlgorithmHistoryResultRequest& request) const;
GetPointReckoningValueOutcome getPointReckoningValue(const Model::GetPointReckoningValueRequest &request)const;
void getPointReckoningValueAsync(const Model::GetPointReckoningValueRequest& request, const GetPointReckoningValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPointReckoningValueOutcomeCallable getPointReckoningValueCallable(const Model::GetPointReckoningValueRequest& request) const;
GetPointSampleValueOutcome getPointSampleValue(const Model::GetPointSampleValueRequest &request)const;
void getPointSampleValueAsync(const Model::GetPointSampleValueRequest& request, const GetPointSampleValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPointSampleValueOutcomeCallable getPointSampleValueCallable(const Model::GetPointSampleValueRequest& request) const;
GetServiceResultAsyncOutcome getServiceResultAsync(const Model::GetServiceResultAsyncRequest &request)const;
void getServiceResultAsyncAsync(const Model::GetServiceResultAsyncRequest& request, const GetServiceResultAsyncAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetServiceResultAsyncOutcomeCallable getServiceResultAsyncCallable(const Model::GetServiceResultAsyncRequest& request) const;

View File

@@ -37,8 +37,6 @@ namespace AlibabaCloud
bool getIsShowInput()const;
void setIsShowInput(bool isShowInput);
std::string getContext()const;
void setContext(const std::string& context);
std::string getServiceId()const;
void setServiceId(const std::string& serviceId);
std::string getParams()const;
@@ -48,7 +46,6 @@ namespace AlibabaCloud
private:
bool isShowInput_;
std::string context_;
std::string serviceId_;
std::string params_;
std::string requestData_;

View File

@@ -37,6 +37,7 @@ namespace AlibabaCloud
InvokeServiceResult();
explicit InvokeServiceResult(const std::string &payload);
~InvokeServiceResult();
std::string getContext()const;
std::string getMessage()const;
std::string getData()const;
std::string getCode()const;
@@ -44,6 +45,7 @@ namespace AlibabaCloud
protected:
void parse(const std::string &payload);
private:
std::string context_;
std::string message_;
std::string data_;
std::string code_;

View File

@@ -123,78 +123,6 @@ Industry_brainClient::GetAlgorithmHistoryResultOutcomeCallable Industry_brainCli
return task->get_future();
}
Industry_brainClient::GetPointReckoningValueOutcome Industry_brainClient::getPointReckoningValue(const GetPointReckoningValueRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetPointReckoningValueOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetPointReckoningValueOutcome(GetPointReckoningValueResult(outcome.result()));
else
return GetPointReckoningValueOutcome(outcome.error());
}
void Industry_brainClient::getPointReckoningValueAsync(const GetPointReckoningValueRequest& request, const GetPointReckoningValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getPointReckoningValue(request), context);
};
asyncExecute(new Runnable(fn));
}
Industry_brainClient::GetPointReckoningValueOutcomeCallable Industry_brainClient::getPointReckoningValueCallable(const GetPointReckoningValueRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetPointReckoningValueOutcome()>>(
[this, request]()
{
return this->getPointReckoningValue(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Industry_brainClient::GetPointSampleValueOutcome Industry_brainClient::getPointSampleValue(const GetPointSampleValueRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetPointSampleValueOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetPointSampleValueOutcome(GetPointSampleValueResult(outcome.result()));
else
return GetPointSampleValueOutcome(outcome.error());
}
void Industry_brainClient::getPointSampleValueAsync(const GetPointSampleValueRequest& request, const GetPointSampleValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getPointSampleValue(request), context);
};
asyncExecute(new Runnable(fn));
}
Industry_brainClient::GetPointSampleValueOutcomeCallable Industry_brainClient::getPointSampleValueCallable(const GetPointSampleValueRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetPointSampleValueOutcome()>>(
[this, request]()
{
return this->getPointSampleValue(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Industry_brainClient::GetServiceResultAsyncOutcome Industry_brainClient::getServiceResultAsync(const GetServiceResultAsyncRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Industry_brain::Model::AsyncResponsePostRequest;
AsyncResponsePostRequest::AsyncResponsePostRequest() :
RpcServiceRequest("industry-brain", "2019-06-30", "AsyncResponsePost")
RpcServiceRequest("industry-brain", "2019-06-29", "AsyncResponsePost")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Industry_brain::Model::GetAlgorithmHistoryResultRequest;
GetAlgorithmHistoryResultRequest::GetAlgorithmHistoryResultRequest() :
RpcServiceRequest("industry-brain", "2019-06-30", "GetAlgorithmHistoryResult")
RpcServiceRequest("industry-brain", "2019-06-29", "GetAlgorithmHistoryResult")
{
setMethod(HttpRequest::Method::Get);
}

View File

@@ -1,51 +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/industry-brain/model/GetPointReckoningValueRequest.h>
using AlibabaCloud::Industry_brain::Model::GetPointReckoningValueRequest;
GetPointReckoningValueRequest::GetPointReckoningValueRequest() :
RpcServiceRequest("industry-brain", "2019-06-30", "GetPointReckoningValue")
{
setMethod(HttpRequest::Method::Post);
}
GetPointReckoningValueRequest::~GetPointReckoningValueRequest()
{}
std::string GetPointReckoningValueRequest::getTimeType()const
{
return timeType_;
}
void GetPointReckoningValueRequest::setTimeType(const std::string& timeType)
{
timeType_ = timeType;
setParameter("TimeType", timeType);
}
std::string GetPointReckoningValueRequest::getTemplateId()const
{
return templateId_;
}
void GetPointReckoningValueRequest::setTemplateId(const std::string& templateId)
{
templateId_ = templateId;
setParameter("TemplateId", templateId);
}

View File

@@ -1,65 +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/industry-brain/model/GetPointReckoningValueResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Industry_brain;
using namespace AlibabaCloud::Industry_brain::Model;
GetPointReckoningValueResult::GetPointReckoningValueResult() :
ServiceResult()
{}
GetPointReckoningValueResult::GetPointReckoningValueResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetPointReckoningValueResult::~GetPointReckoningValueResult()
{}
void GetPointReckoningValueResult::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();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetPointReckoningValueResult::getMessage()const
{
return message_;
}
std::string GetPointReckoningValueResult::getData()const
{
return data_;
}
std::string GetPointReckoningValueResult::getCode()const
{
return code_;
}

View File

@@ -1,51 +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/industry-brain/model/GetPointSampleValueRequest.h>
using AlibabaCloud::Industry_brain::Model::GetPointSampleValueRequest;
GetPointSampleValueRequest::GetPointSampleValueRequest() :
RpcServiceRequest("industry-brain", "2019-06-30", "GetPointSampleValue")
{
setMethod(HttpRequest::Method::Post);
}
GetPointSampleValueRequest::~GetPointSampleValueRequest()
{}
std::string GetPointSampleValueRequest::getTimeType()const
{
return timeType_;
}
void GetPointSampleValueRequest::setTimeType(const std::string& timeType)
{
timeType_ = timeType;
setParameter("TimeType", timeType);
}
std::string GetPointSampleValueRequest::getTemplateId()const
{
return templateId_;
}
void GetPointSampleValueRequest::setTemplateId(const std::string& templateId)
{
templateId_ = templateId;
setParameter("TemplateId", templateId);
}

View File

@@ -1,65 +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/industry-brain/model/GetPointSampleValueResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Industry_brain;
using namespace AlibabaCloud::Industry_brain::Model;
GetPointSampleValueResult::GetPointSampleValueResult() :
ServiceResult()
{}
GetPointSampleValueResult::GetPointSampleValueResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetPointSampleValueResult::~GetPointSampleValueResult()
{}
void GetPointSampleValueResult::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();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetPointSampleValueResult::getMessage()const
{
return message_;
}
std::string GetPointSampleValueResult::getData()const
{
return data_;
}
std::string GetPointSampleValueResult::getCode()const
{
return code_;
}

View File

@@ -19,9 +19,9 @@
using AlibabaCloud::Industry_brain::Model::GetServiceResultAsyncRequest;
GetServiceResultAsyncRequest::GetServiceResultAsyncRequest() :
RpcServiceRequest("industry-brain", "2019-06-30", "GetServiceResultAsync")
RpcServiceRequest("industry-brain", "2019-06-29", "GetServiceResultAsync")
{
setMethod(HttpRequest::Method::Get);
setMethod(HttpRequest::Method::Post);
}
GetServiceResultAsyncRequest::~GetServiceResultAsyncRequest()

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Industry_brain::Model::InvokeServiceAsyncRequest;
InvokeServiceAsyncRequest::InvokeServiceAsyncRequest() :
RpcServiceRequest("industry-brain", "2019-06-30", "InvokeServiceAsync")
RpcServiceRequest("industry-brain", "2019-06-29", "InvokeServiceAsync")
{
setMethod(HttpRequest::Method::Post);
}
@@ -38,17 +38,6 @@ void InvokeServiceAsyncRequest::setIsShowInput(bool isShowInput)
setParameter("IsShowInput", isShowInput ? "true" : "false");
}
std::string InvokeServiceAsyncRequest::getContext()const
{
return context_;
}
void InvokeServiceAsyncRequest::setContext(const std::string& context)
{
context_ = context;
setParameter("Context", context);
}
std::string InvokeServiceAsyncRequest::getServiceId()const
{
return serviceId_;

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Industry_brain::Model::InvokeServiceRequest;
InvokeServiceRequest::InvokeServiceRequest() :
RpcServiceRequest("industry-brain", "2019-06-30", "InvokeService")
RpcServiceRequest("industry-brain", "2019-06-29", "InvokeService")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -45,9 +45,16 @@ void InvokeServiceResult::parse(const std::string &payload)
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Context"].isNull())
context_ = value["Context"].asString();
}
std::string InvokeServiceResult::getContext()const
{
return context_;
}
std::string InvokeServiceResult::getMessage()const
{
return message_;

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
@@ -52,6 +54,7 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
std::string clientToken_;
std::string accessKeyId_;
std::string securityToken_;
std::string resourceOwnerAccount_;

View File

@@ -65,6 +65,8 @@ namespace AlibabaCloud
void setPageSize(int pageSize);
std::string getInstanceType()const;
void setInstanceType(const std::string& instanceType);
std::string getEditionType()const;
void setEditionType(const std::string& editionType);
std::vector<Tag> getTag()const;
void setTag(const std::vector<Tag>& tag);
std::string getInstanceStatus()const;
@@ -105,6 +107,7 @@ namespace AlibabaCloud
std::string securityToken_;
int pageSize_;
std::string instanceType_;
std::string editionType_;
std::vector<Tag> tag_;
std::string instanceStatus_;
std::string resourceOwnerAccount_;

View File

@@ -45,7 +45,7 @@ namespace AlibabaCloud
std::string config;
long port;
std::string destroyTime;
std::string hasRenewChangeOrder;
bool hasRenewChangeOrder;
std::string connectionDomain;
long capacity;
long qPS;

View File

@@ -41,6 +41,8 @@ namespace AlibabaCloud
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
@@ -54,6 +56,7 @@ namespace AlibabaCloud
long resourceOwnerId_;
std::string accessKeyId_;
std::string securityToken_;
std::string regionId_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;

View File

@@ -38,6 +38,17 @@ void CreateGlobalDistributeCacheRequest::setResourceOwnerId(long resourceOwnerId
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string CreateGlobalDistributeCacheRequest::getClientToken()const
{
return clientToken_;
}
void CreateGlobalDistributeCacheRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateGlobalDistributeCacheRequest::getAccessKeyId()const
{
return accessKeyId_;

View File

@@ -159,6 +159,17 @@ void DescribeInstancesRequest::setInstanceType(const std::string& instanceType)
setParameter("InstanceType", instanceType);
}
std::string DescribeInstancesRequest::getEditionType()const
{
return editionType_;
}
void DescribeInstancesRequest::setEditionType(const std::string& editionType)
{
editionType_ = editionType;
setParameter("EditionType", editionType);
}
std::vector<DescribeInstancesRequest::Tag> DescribeInstancesRequest::getTag()const
{
return tag_;

View File

@@ -90,7 +90,7 @@ void DescribeInstancesResult::parse(const std::string &payload)
if(!valueInstancesKVStoreInstance["EndTime"].isNull())
instancesObject.endTime = valueInstancesKVStoreInstance["EndTime"].asString();
if(!valueInstancesKVStoreInstance["HasRenewChangeOrder"].isNull())
instancesObject.hasRenewChangeOrder = valueInstancesKVStoreInstance["HasRenewChangeOrder"].asString();
instancesObject.hasRenewChangeOrder = valueInstancesKVStoreInstance["HasRenewChangeOrder"].asString() == "true";
if(!valueInstancesKVStoreInstance["IsRds"].isNull())
instancesObject.isRds = valueInstancesKVStoreInstance["IsRds"].asString() == "true";
if(!valueInstancesKVStoreInstance["InstanceType"].isNull())

View File

@@ -60,6 +60,17 @@ void DescribeZonesRequest::setSecurityToken(const std::string& securityToken)
setParameter("SecurityToken", securityToken);
}
std::string DescribeZonesRequest::getRegionId()const
{
return regionId_;
}
void DescribeZonesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string DescribeZonesRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;

View File

@@ -15,4 +15,5 @@ TEST(test_RpcServiceRequest, basic) {
EXPECT_TRUE(rpc.actionName() == action);
EXPECT_TRUE(rpc.product() == product);
EXPECT_TRUE(rpc.version() == version);
EXPECT_EQ(string("testAction"), rpc.getHeader(string("x-acs-action")));
}

View File

@@ -40,6 +40,7 @@ namespace {
TestServiceRequest sr1("ECS", "1.0");
TestServiceRequest sr2(sr1);
EXPECT_EQ(string("1.0"), sr1.getHeader(string("x-acs-version")));
sr1.addParameter("k1", "v1");
sr2.addParameter("k2", "v2");

View File

@@ -149,6 +149,8 @@ set(vcs_public_header_model
include/alibabacloud/vcs/model/SearchBodyResult.h
include/alibabacloud/vcs/model/SearchFaceRequest.h
include/alibabacloud/vcs/model/SearchFaceResult.h
include/alibabacloud/vcs/model/SearchObjectRequest.h
include/alibabacloud/vcs/model/SearchObjectResult.h
include/alibabacloud/vcs/model/StopMonitorRequest.h
include/alibabacloud/vcs/model/StopMonitorResult.h
include/alibabacloud/vcs/model/SyncDeviceTimeRequest.h
@@ -308,6 +310,8 @@ set(vcs_src
src/model/SearchBodyResult.cc
src/model/SearchFaceRequest.cc
src/model/SearchFaceResult.cc
src/model/SearchObjectRequest.cc
src/model/SearchObjectResult.cc
src/model/StopMonitorRequest.cc
src/model/StopMonitorResult.cc
src/model/SyncDeviceTimeRequest.cc

View File

@@ -150,6 +150,8 @@
#include "model/SearchBodyResult.h"
#include "model/SearchFaceRequest.h"
#include "model/SearchFaceResult.h"
#include "model/SearchObjectRequest.h"
#include "model/SearchObjectResult.h"
#include "model/StopMonitorRequest.h"
#include "model/StopMonitorResult.h"
#include "model/SyncDeviceTimeRequest.h"
@@ -379,6 +381,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::SearchFaceResult> SearchFaceOutcome;
typedef std::future<SearchFaceOutcome> SearchFaceOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::SearchFaceRequest&, const SearchFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchFaceAsyncHandler;
typedef Outcome<Error, Model::SearchObjectResult> SearchObjectOutcome;
typedef std::future<SearchObjectOutcome> SearchObjectOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::SearchObjectRequest&, const SearchObjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchObjectAsyncHandler;
typedef Outcome<Error, Model::StopMonitorResult> StopMonitorOutcome;
typedef std::future<StopMonitorOutcome> StopMonitorOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::StopMonitorRequest&, const StopMonitorOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopMonitorAsyncHandler;
@@ -618,6 +623,9 @@ namespace AlibabaCloud
SearchFaceOutcome searchFace(const Model::SearchFaceRequest &request)const;
void searchFaceAsync(const Model::SearchFaceRequest& request, const SearchFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SearchFaceOutcomeCallable searchFaceCallable(const Model::SearchFaceRequest& request) const;
SearchObjectOutcome searchObject(const Model::SearchObjectRequest &request)const;
void searchObjectAsync(const Model::SearchObjectRequest& request, const SearchObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SearchObjectOutcomeCallable searchObjectCallable(const Model::SearchObjectRequest& request) const;
StopMonitorOutcome stopMonitor(const Model::StopMonitorRequest &request)const;
void stopMonitorAsync(const Model::StopMonitorRequest& request, const StopMonitorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StopMonitorOutcomeCallable stopMonitorCallable(const Model::StopMonitorRequest& request) const;

View File

@@ -37,23 +37,37 @@ namespace AlibabaCloud
struct RecordsItem
{
std::string mustacheStyle;
int genderCode;
int respiratorColor;
int ethicCode;
float rightBottomX;
int ageLowerLimit;
std::string faceStyle;
float rightBottomY;
std::vector<std::string> featureData;
float leftTopY;
std::string capColorReliability;
int capStyle;
std::string respiratorColorReliability;
int skinColor;
std::string ethicCodeReliability;
std::string genderCodeReliability;
int hairStyle;
std::string glassColorReliability;
int genderCode;
int respiratorColor;
std::string skinColorReliability;
int ethicCode;
std::string mustacheStyleReliability;
int ageLowerLimit;
std::string capStyleReliability;
std::string faceStyleReliability;
float leftTopY;
float leftTopX;
int hairColor;
int skinColor;
std::string glassStyleReliability;
int ageUpLimit;
int glassStyle;
std::string ageUpLimitReliability;
std::string hairStyleReliability;
std::string ageLowerLimitReliability;
std::string hairColorReliability;
int glassColor;
int hairStyle;
int capColor;
};
std::vector<RecordsItem> records;

View File

@@ -39,10 +39,13 @@ namespace AlibabaCloud
void setPageNumber(int pageNumber);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getCorpName()const;
void setCorpName(const std::string& corpName);
private:
int pageNumber_;
int pageSize_;
std::string corpName_;
};
}

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT SearchObjectRequest : public RpcServiceRequest
{
public:
SearchObjectRequest();
~SearchObjectRequest();
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
long getStartTime()const;
void setStartTime(long startTime);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getPicContent()const;
void setPicContent(const std::string& picContent);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getObjectType()const;
void setObjectType(const std::string& objectType);
std::string getAlgorithmType()const;
void setAlgorithmType(const std::string& algorithmType);
long getEndTime()const;
void setEndTime(long endTime);
std::map<std::string, std::string> getDeviceList()const;
void setDeviceList(const std::map<std::string, std::string>& deviceList);
std::string getPicUrl()const;
void setPicUrl(const std::string& picUrl);
std::string getImagePath()const;
void setImagePath(const std::string& imagePath);
std::string getConditions()const;
void setConditions(const std::string& conditions);
private:
std::string corpId_;
long startTime_;
int pageNumber_;
std::string picContent_;
int pageSize_;
std::string objectType_;
std::string algorithmType_;
long endTime_;
std::map<std::string, std::string> deviceList_;
std::string picUrl_;
std::string imagePath_;
std::string conditions_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTREQUEST_H_

View File

@@ -0,0 +1,82 @@
/*
* 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_VCS_MODEL_SEARCHOBJECTRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT SearchObjectResult : public ServiceResult
{
public:
struct DataItem
{
struct RecordsItem
{
std::string targetImageUrl;
std::string deviceID;
std::string sourceID;
std::string passTime;
std::string sourceImagePath;
std::string sourceImageUrl;
int leftTopY;
std::string compareResult;
int leftTopX;
float score;
std::string bodyShotTime;
int rightBtmY;
int rightBtmX;
long faceShotTime;
std::string targetImagePath;
std::string motorShotTime;
};
int totalCount;
int pageSize;
int totalPage;
int pageNumber;
std::vector<DataItem::RecordsItem> records;
};
SearchObjectResult();
explicit SearchObjectResult(const std::string &payload);
~SearchObjectResult();
std::string getMessage()const;
std::vector<DataItem> getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<DataItem> data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_SEARCHOBJECTRESULT_H_

View File

@@ -2355,6 +2355,42 @@ VcsClient::SearchFaceOutcomeCallable VcsClient::searchFaceCallable(const SearchF
return task->get_future();
}
VcsClient::SearchObjectOutcome VcsClient::searchObject(const SearchObjectRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SearchObjectOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SearchObjectOutcome(SearchObjectResult(outcome.result()));
else
return SearchObjectOutcome(outcome.error());
}
void VcsClient::searchObjectAsync(const SearchObjectRequest& request, const SearchObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, searchObject(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::SearchObjectOutcomeCallable VcsClient::searchObjectCallable(const SearchObjectRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SearchObjectOutcome()>>(
[this, request]()
{
return this->searchObject(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::StopMonitorOutcome VcsClient::stopMonitor(const StopMonitorRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -80,6 +80,34 @@ void GetFaceModelResultResult::parse(const std::string &payload)
recordsItemObject.glassColor = std::stoi(dataNodeRecordsRecordsItem["GlassColor"].asString());
if(!dataNodeRecordsRecordsItem["CapColor"].isNull())
recordsItemObject.capColor = std::stoi(dataNodeRecordsRecordsItem["CapColor"].asString());
if(!dataNodeRecordsRecordsItem["CapColorReliability"].isNull())
recordsItemObject.capColorReliability = dataNodeRecordsRecordsItem["CapColorReliability"].asString();
if(!dataNodeRecordsRecordsItem["RespiratorColorReliability"].isNull())
recordsItemObject.respiratorColorReliability = dataNodeRecordsRecordsItem["RespiratorColorReliability"].asString();
if(!dataNodeRecordsRecordsItem["EthicCodeReliability"].isNull())
recordsItemObject.ethicCodeReliability = dataNodeRecordsRecordsItem["EthicCodeReliability"].asString();
if(!dataNodeRecordsRecordsItem["GenderCodeReliability"].isNull())
recordsItemObject.genderCodeReliability = dataNodeRecordsRecordsItem["GenderCodeReliability"].asString();
if(!dataNodeRecordsRecordsItem["GlassColorReliability"].isNull())
recordsItemObject.glassColorReliability = dataNodeRecordsRecordsItem["GlassColorReliability"].asString();
if(!dataNodeRecordsRecordsItem["SkinColorReliability"].isNull())
recordsItemObject.skinColorReliability = dataNodeRecordsRecordsItem["SkinColorReliability"].asString();
if(!dataNodeRecordsRecordsItem["MustacheStyleReliability"].isNull())
recordsItemObject.mustacheStyleReliability = dataNodeRecordsRecordsItem["MustacheStyleReliability"].asString();
if(!dataNodeRecordsRecordsItem["CapStyleReliability"].isNull())
recordsItemObject.capStyleReliability = dataNodeRecordsRecordsItem["CapStyleReliability"].asString();
if(!dataNodeRecordsRecordsItem["FaceStyleReliability"].isNull())
recordsItemObject.faceStyleReliability = dataNodeRecordsRecordsItem["FaceStyleReliability"].asString();
if(!dataNodeRecordsRecordsItem["GlassStyleReliability"].isNull())
recordsItemObject.glassStyleReliability = dataNodeRecordsRecordsItem["GlassStyleReliability"].asString();
if(!dataNodeRecordsRecordsItem["AgeUpLimitReliability"].isNull())
recordsItemObject.ageUpLimitReliability = dataNodeRecordsRecordsItem["AgeUpLimitReliability"].asString();
if(!dataNodeRecordsRecordsItem["HairStyleReliability"].isNull())
recordsItemObject.hairStyleReliability = dataNodeRecordsRecordsItem["HairStyleReliability"].asString();
if(!dataNodeRecordsRecordsItem["AgeLowerLimitReliability"].isNull())
recordsItemObject.ageLowerLimitReliability = dataNodeRecordsRecordsItem["AgeLowerLimitReliability"].asString();
if(!dataNodeRecordsRecordsItem["HairColorReliability"].isNull())
recordsItemObject.hairColorReliability = dataNodeRecordsRecordsItem["HairColorReliability"].asString();
auto allFeatureData = value["FeatureData"]["FeatureData"];
for (auto value : allFeatureData)
recordsItemObject.featureData.push_back(value.asString());

View File

@@ -49,3 +49,14 @@ void ListCorpsRequest::setPageSize(int pageSize)
setBodyParameter("PageSize", std::to_string(pageSize));
}
std::string ListCorpsRequest::getCorpName()const
{
return corpName_;
}
void ListCorpsRequest::setCorpName(const std::string& corpName)
{
corpName_ = corpName;
setBodyParameter("CorpName", corpName);
}

View File

@@ -0,0 +1,161 @@
/*
* 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/vcs/model/SearchObjectRequest.h>
using AlibabaCloud::Vcs::Model::SearchObjectRequest;
SearchObjectRequest::SearchObjectRequest() :
RpcServiceRequest("vcs", "2020-05-15", "SearchObject")
{
setMethod(HttpRequest::Method::Post);
}
SearchObjectRequest::~SearchObjectRequest()
{}
std::string SearchObjectRequest::getCorpId()const
{
return corpId_;
}
void SearchObjectRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
long SearchObjectRequest::getStartTime()const
{
return startTime_;
}
void SearchObjectRequest::setStartTime(long startTime)
{
startTime_ = startTime;
setBodyParameter("StartTime", std::to_string(startTime));
}
int SearchObjectRequest::getPageNumber()const
{
return pageNumber_;
}
void SearchObjectRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setBodyParameter("PageNumber", std::to_string(pageNumber));
}
std::string SearchObjectRequest::getPicContent()const
{
return picContent_;
}
void SearchObjectRequest::setPicContent(const std::string& picContent)
{
picContent_ = picContent;
setBodyParameter("PicContent", picContent);
}
int SearchObjectRequest::getPageSize()const
{
return pageSize_;
}
void SearchObjectRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", std::to_string(pageSize));
}
std::string SearchObjectRequest::getObjectType()const
{
return objectType_;
}
void SearchObjectRequest::setObjectType(const std::string& objectType)
{
objectType_ = objectType;
setBodyParameter("ObjectType", objectType);
}
std::string SearchObjectRequest::getAlgorithmType()const
{
return algorithmType_;
}
void SearchObjectRequest::setAlgorithmType(const std::string& algorithmType)
{
algorithmType_ = algorithmType;
setBodyParameter("AlgorithmType", algorithmType);
}
long SearchObjectRequest::getEndTime()const
{
return endTime_;
}
void SearchObjectRequest::setEndTime(long endTime)
{
endTime_ = endTime;
setBodyParameter("EndTime", std::to_string(endTime));
}
std::map<std::string, std::string> SearchObjectRequest::getDeviceList()const
{
return deviceList_;
}
void SearchObjectRequest::setDeviceList(const std::map<std::string, std::string>& deviceList)
{
deviceList_ = deviceList;
setJsonParameters("DeviceList", deviceList);
}
std::string SearchObjectRequest::getPicUrl()const
{
return picUrl_;
}
void SearchObjectRequest::setPicUrl(const std::string& picUrl)
{
picUrl_ = picUrl;
setBodyParameter("PicUrl", picUrl);
}
std::string SearchObjectRequest::getImagePath()const
{
return imagePath_;
}
void SearchObjectRequest::setImagePath(const std::string& imagePath)
{
imagePath_ = imagePath;
setBodyParameter("ImagePath", imagePath);
}
std::string SearchObjectRequest::getConditions()const
{
return conditions_;
}
void SearchObjectRequest::setConditions(const std::string& conditions)
{
conditions_ = conditions;
setBodyParameter("Conditions", conditions);
}

View File

@@ -0,0 +1,115 @@
/*
* 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/vcs/model/SearchObjectResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
SearchObjectResult::SearchObjectResult() :
ServiceResult()
{}
SearchObjectResult::SearchObjectResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SearchObjectResult::~SearchObjectResult()
{}
void SearchObjectResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
DataItem dataObject;
if(!valueDataDataItem["PageNumber"].isNull())
dataObject.pageNumber = std::stoi(valueDataDataItem["PageNumber"].asString());
if(!valueDataDataItem["PageSize"].isNull())
dataObject.pageSize = std::stoi(valueDataDataItem["PageSize"].asString());
if(!valueDataDataItem["TotalCount"].isNull())
dataObject.totalCount = std::stoi(valueDataDataItem["TotalCount"].asString());
if(!valueDataDataItem["TotalPage"].isNull())
dataObject.totalPage = std::stoi(valueDataDataItem["TotalPage"].asString());
auto allRecordsNode = allDataNode["Records"]["RecordsItem"];
for (auto allDataNodeRecordsRecordsItem : allRecordsNode)
{
DataItem::RecordsItem recordsObject;
if(!allDataNodeRecordsRecordsItem["BodyShotTime"].isNull())
recordsObject.bodyShotTime = allDataNodeRecordsRecordsItem["BodyShotTime"].asString();
if(!allDataNodeRecordsRecordsItem["CompareResult"].isNull())
recordsObject.compareResult = allDataNodeRecordsRecordsItem["CompareResult"].asString();
if(!allDataNodeRecordsRecordsItem["DeviceID"].isNull())
recordsObject.deviceID = allDataNodeRecordsRecordsItem["DeviceID"].asString();
if(!allDataNodeRecordsRecordsItem["FaceShotTime"].isNull())
recordsObject.faceShotTime = std::stol(allDataNodeRecordsRecordsItem["FaceShotTime"].asString());
if(!allDataNodeRecordsRecordsItem["LeftTopX"].isNull())
recordsObject.leftTopX = std::stoi(allDataNodeRecordsRecordsItem["LeftTopX"].asString());
if(!allDataNodeRecordsRecordsItem["LeftTopY"].isNull())
recordsObject.leftTopY = std::stoi(allDataNodeRecordsRecordsItem["LeftTopY"].asString());
if(!allDataNodeRecordsRecordsItem["MotorShotTime"].isNull())
recordsObject.motorShotTime = allDataNodeRecordsRecordsItem["MotorShotTime"].asString();
if(!allDataNodeRecordsRecordsItem["PassTime"].isNull())
recordsObject.passTime = allDataNodeRecordsRecordsItem["PassTime"].asString();
if(!allDataNodeRecordsRecordsItem["RightBtmX"].isNull())
recordsObject.rightBtmX = std::stoi(allDataNodeRecordsRecordsItem["RightBtmX"].asString());
if(!allDataNodeRecordsRecordsItem["RightBtmY"].isNull())
recordsObject.rightBtmY = std::stoi(allDataNodeRecordsRecordsItem["RightBtmY"].asString());
if(!allDataNodeRecordsRecordsItem["Score"].isNull())
recordsObject.score = std::stof(allDataNodeRecordsRecordsItem["Score"].asString());
if(!allDataNodeRecordsRecordsItem["SourceID"].isNull())
recordsObject.sourceID = allDataNodeRecordsRecordsItem["SourceID"].asString();
if(!allDataNodeRecordsRecordsItem["SourceImagePath"].isNull())
recordsObject.sourceImagePath = allDataNodeRecordsRecordsItem["SourceImagePath"].asString();
if(!allDataNodeRecordsRecordsItem["SourceImageUrl"].isNull())
recordsObject.sourceImageUrl = allDataNodeRecordsRecordsItem["SourceImageUrl"].asString();
if(!allDataNodeRecordsRecordsItem["TargetImagePath"].isNull())
recordsObject.targetImagePath = allDataNodeRecordsRecordsItem["TargetImagePath"].asString();
if(!allDataNodeRecordsRecordsItem["TargetImageUrl"].isNull())
recordsObject.targetImageUrl = allDataNodeRecordsRecordsItem["TargetImageUrl"].asString();
dataObject.records.push_back(recordsObject);
}
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string SearchObjectResult::getMessage()const
{
return message_;
}
std::vector<SearchObjectResult::DataItem> SearchObjectResult::getData()const
{
return data_;
}
std::string SearchObjectResult::getCode()const
{
return code_;
}