Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f2fb5a595 | ||
|
|
590e1bdfaf | ||
|
|
bde21ef594 |
@@ -1,3 +1,12 @@
|
||||
2020-05-09 Version: 1.36.400
|
||||
- VideoSearch deploy SDK.
|
||||
|
||||
2020-05-08 Version: 1.36.399
|
||||
- Support sg for region.
|
||||
|
||||
2020-05-06 Version: 1.36.398
|
||||
- Describe describeAvailableResource.
|
||||
|
||||
2020-04-30 Version: 1.36.397
|
||||
- Add prometheus ListDashboards api.
|
||||
|
||||
|
||||
@@ -65,6 +65,12 @@ set(hbase_public_header_model
|
||||
include/alibabacloud/hbase/model/DescribeRecoverableTimeRangeResult.h
|
||||
include/alibabacloud/hbase/model/DescribeRegionsRequest.h
|
||||
include/alibabacloud/hbase/model/DescribeRegionsResult.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreFullDetailsRequest.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreFullDetailsResult.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreIncrDetailRequest.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreIncrDetailResult.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreSchemaDetailsRequest.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreSchemaDetailsResult.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreSummaryRequest.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreSummaryResult.h
|
||||
include/alibabacloud/hbase/model/DescribeRestoreTablesRequest.h
|
||||
@@ -158,6 +164,12 @@ set(hbase_src
|
||||
src/model/DescribeRecoverableTimeRangeResult.cc
|
||||
src/model/DescribeRegionsRequest.cc
|
||||
src/model/DescribeRegionsResult.cc
|
||||
src/model/DescribeRestoreFullDetailsRequest.cc
|
||||
src/model/DescribeRestoreFullDetailsResult.cc
|
||||
src/model/DescribeRestoreIncrDetailRequest.cc
|
||||
src/model/DescribeRestoreIncrDetailResult.cc
|
||||
src/model/DescribeRestoreSchemaDetailsRequest.cc
|
||||
src/model/DescribeRestoreSchemaDetailsResult.cc
|
||||
src/model/DescribeRestoreSummaryRequest.cc
|
||||
src/model/DescribeRestoreSummaryResult.cc
|
||||
src/model/DescribeRestoreTablesRequest.cc
|
||||
|
||||
@@ -66,6 +66,12 @@
|
||||
#include "model/DescribeRecoverableTimeRangeResult.h"
|
||||
#include "model/DescribeRegionsRequest.h"
|
||||
#include "model/DescribeRegionsResult.h"
|
||||
#include "model/DescribeRestoreFullDetailsRequest.h"
|
||||
#include "model/DescribeRestoreFullDetailsResult.h"
|
||||
#include "model/DescribeRestoreIncrDetailRequest.h"
|
||||
#include "model/DescribeRestoreIncrDetailResult.h"
|
||||
#include "model/DescribeRestoreSchemaDetailsRequest.h"
|
||||
#include "model/DescribeRestoreSchemaDetailsResult.h"
|
||||
#include "model/DescribeRestoreSummaryRequest.h"
|
||||
#include "model/DescribeRestoreSummaryResult.h"
|
||||
#include "model/DescribeRestoreTablesRequest.h"
|
||||
@@ -187,6 +193,15 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeRegionsResult> DescribeRegionsOutcome;
|
||||
typedef std::future<DescribeRegionsOutcome> DescribeRegionsOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DescribeRegionsRequest&, const DescribeRegionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRegionsAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeRestoreFullDetailsResult> DescribeRestoreFullDetailsOutcome;
|
||||
typedef std::future<DescribeRestoreFullDetailsOutcome> DescribeRestoreFullDetailsOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DescribeRestoreFullDetailsRequest&, const DescribeRestoreFullDetailsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRestoreFullDetailsAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeRestoreIncrDetailResult> DescribeRestoreIncrDetailOutcome;
|
||||
typedef std::future<DescribeRestoreIncrDetailOutcome> DescribeRestoreIncrDetailOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DescribeRestoreIncrDetailRequest&, const DescribeRestoreIncrDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRestoreIncrDetailAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeRestoreSchemaDetailsResult> DescribeRestoreSchemaDetailsOutcome;
|
||||
typedef std::future<DescribeRestoreSchemaDetailsOutcome> DescribeRestoreSchemaDetailsOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DescribeRestoreSchemaDetailsRequest&, const DescribeRestoreSchemaDetailsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRestoreSchemaDetailsAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeRestoreSummaryResult> DescribeRestoreSummaryOutcome;
|
||||
typedef std::future<DescribeRestoreSummaryOutcome> DescribeRestoreSummaryOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DescribeRestoreSummaryRequest&, const DescribeRestoreSummaryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRestoreSummaryAsyncHandler;
|
||||
@@ -327,6 +342,15 @@ namespace AlibabaCloud
|
||||
DescribeRegionsOutcome describeRegions(const Model::DescribeRegionsRequest &request)const;
|
||||
void describeRegionsAsync(const Model::DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeRegionsOutcomeCallable describeRegionsCallable(const Model::DescribeRegionsRequest& request) const;
|
||||
DescribeRestoreFullDetailsOutcome describeRestoreFullDetails(const Model::DescribeRestoreFullDetailsRequest &request)const;
|
||||
void describeRestoreFullDetailsAsync(const Model::DescribeRestoreFullDetailsRequest& request, const DescribeRestoreFullDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeRestoreFullDetailsOutcomeCallable describeRestoreFullDetailsCallable(const Model::DescribeRestoreFullDetailsRequest& request) const;
|
||||
DescribeRestoreIncrDetailOutcome describeRestoreIncrDetail(const Model::DescribeRestoreIncrDetailRequest &request)const;
|
||||
void describeRestoreIncrDetailAsync(const Model::DescribeRestoreIncrDetailRequest& request, const DescribeRestoreIncrDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeRestoreIncrDetailOutcomeCallable describeRestoreIncrDetailCallable(const Model::DescribeRestoreIncrDetailRequest& request) const;
|
||||
DescribeRestoreSchemaDetailsOutcome describeRestoreSchemaDetails(const Model::DescribeRestoreSchemaDetailsRequest &request)const;
|
||||
void describeRestoreSchemaDetailsAsync(const Model::DescribeRestoreSchemaDetailsRequest& request, const DescribeRestoreSchemaDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeRestoreSchemaDetailsOutcomeCallable describeRestoreSchemaDetailsCallable(const Model::DescribeRestoreSchemaDetailsRequest& request) const;
|
||||
DescribeRestoreSummaryOutcome describeRestoreSummary(const Model::DescribeRestoreSummaryRequest &request)const;
|
||||
void describeRestoreSummaryAsync(const Model::DescribeRestoreSummaryRequest& request, const DescribeRestoreSummaryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeRestoreSummaryOutcomeCallable describeRestoreSummaryCallable(const Model::DescribeRestoreSummaryRequest& request) const;
|
||||
|
||||
@@ -37,9 +37,15 @@ namespace AlibabaCloud
|
||||
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
|
||||
private:
|
||||
std::string clusterId_;
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -54,9 +54,11 @@ namespace AlibabaCloud
|
||||
std::string recordId;
|
||||
};
|
||||
std::string hasMore;
|
||||
int pageSize;
|
||||
int pageNumber;
|
||||
std::string nextFullBackupDate;
|
||||
int total;
|
||||
std::vector<Record> records;
|
||||
std::string recordSize;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -35,14 +35,20 @@ namespace AlibabaCloud
|
||||
DescribeBackupTablesRequest();
|
||||
~DescribeBackupTablesRequest();
|
||||
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getBackupRecordId()const;
|
||||
void setBackupRecordId(const std::string& backupRecordId);
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
|
||||
private:
|
||||
std::string clusterId_;
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
std::string backupRecordId_;
|
||||
std::string clusterId_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,16 +32,35 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeBackupTablesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct BackupRecord
|
||||
{
|
||||
std::string speed;
|
||||
std::string table;
|
||||
std::string endTime;
|
||||
std::string message;
|
||||
std::string state;
|
||||
std::string dataSize;
|
||||
std::string startTime;
|
||||
std::string process;
|
||||
};
|
||||
|
||||
|
||||
DescribeBackupTablesResult();
|
||||
explicit DescribeBackupTablesResult(const std::string &payload);
|
||||
~DescribeBackupTablesResult();
|
||||
std::vector<BackupRecord> getBackupRecords()const;
|
||||
int getPageSize()const;
|
||||
int getPageNumber()const;
|
||||
long getTotal()const;
|
||||
std::vector<std::string> getTables()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<BackupRecord> backupRecords_;
|
||||
int pageSize_;
|
||||
int pageNumber_;
|
||||
long total_;
|
||||
std::vector<std::string> tables_;
|
||||
|
||||
};
|
||||
|
||||
@@ -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_HBASE_MODEL_DESCRIBERESTOREFULLDETAILSREQUEST_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREFULLDETAILSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeRestoreFullDetailsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeRestoreFullDetailsRequest();
|
||||
~DescribeRestoreFullDetailsRequest();
|
||||
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
std::string getRestoreRecordId()const;
|
||||
void setRestoreRecordId(const std::string& restoreRecordId);
|
||||
|
||||
private:
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
std::string clusterId_;
|
||||
std::string restoreRecordId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREFULLDETAILSREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREFULLDETAILSRESULT_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREFULLDETAILSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeRestoreFullDetailsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct RestoreFull
|
||||
{
|
||||
struct RestoreFullDetail
|
||||
{
|
||||
std::string speed;
|
||||
std::string table;
|
||||
std::string endTime;
|
||||
std::string message;
|
||||
std::string state;
|
||||
std::string dataSize;
|
||||
std::string startTime;
|
||||
std::string process;
|
||||
};
|
||||
std::vector<RestoreFullDetail> restoreFullDetails;
|
||||
std::string speed;
|
||||
int pageSize;
|
||||
int pageNumber;
|
||||
std::string dataSize;
|
||||
long total;
|
||||
int succeed;
|
||||
int fail;
|
||||
};
|
||||
|
||||
|
||||
DescribeRestoreFullDetailsResult();
|
||||
explicit DescribeRestoreFullDetailsResult(const std::string &payload);
|
||||
~DescribeRestoreFullDetailsResult();
|
||||
RestoreFull getRestoreFull()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
RestoreFull restoreFull_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREFULLDETAILSRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREINCRDETAILREQUEST_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREINCRDETAILREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeRestoreIncrDetailRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeRestoreIncrDetailRequest();
|
||||
~DescribeRestoreIncrDetailRequest();
|
||||
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
std::string getRestoreRecordId()const;
|
||||
void setRestoreRecordId(const std::string& restoreRecordId);
|
||||
|
||||
private:
|
||||
std::string clusterId_;
|
||||
std::string restoreRecordId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREINCRDETAILREQUEST_H_
|
||||
@@ -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_HBASE_MODEL_DESCRIBERESTOREINCRDETAILRESULT_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREINCRDETAILRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeRestoreIncrDetailResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct RestoreIncrDetail
|
||||
{
|
||||
std::string endTime;
|
||||
std::string restoreDelay;
|
||||
std::string restoreStartTs;
|
||||
std::string state;
|
||||
std::string startTime;
|
||||
std::string restoredTs;
|
||||
std::string process;
|
||||
};
|
||||
|
||||
|
||||
DescribeRestoreIncrDetailResult();
|
||||
explicit DescribeRestoreIncrDetailResult(const std::string &payload);
|
||||
~DescribeRestoreIncrDetailResult();
|
||||
RestoreIncrDetail getRestoreIncrDetail()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
RestoreIncrDetail restoreIncrDetail_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTOREINCRDETAILRESULT_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTORESCHEMADETAILSREQUEST_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTORESCHEMADETAILSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeRestoreSchemaDetailsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeRestoreSchemaDetailsRequest();
|
||||
~DescribeRestoreSchemaDetailsRequest();
|
||||
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
std::string getRestoreRecordId()const;
|
||||
void setRestoreRecordId(const std::string& restoreRecordId);
|
||||
|
||||
private:
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
std::string clusterId_;
|
||||
std::string restoreRecordId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTORESCHEMADETAILSREQUEST_H_
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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_HBASE_MODEL_DESCRIBERESTORESCHEMADETAILSRESULT_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTORESCHEMADETAILSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeRestoreSchemaDetailsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct RestoreSchema
|
||||
{
|
||||
struct RestoreSchemaDetail
|
||||
{
|
||||
std::string table;
|
||||
std::string endTime;
|
||||
std::string message;
|
||||
std::string state;
|
||||
std::string startTime;
|
||||
};
|
||||
int pageSize;
|
||||
int pageNumber;
|
||||
long total;
|
||||
std::vector<RestoreSchemaDetail> restoreSchemaDetails;
|
||||
int succeed;
|
||||
int fail;
|
||||
};
|
||||
|
||||
|
||||
DescribeRestoreSchemaDetailsResult();
|
||||
explicit DescribeRestoreSchemaDetailsResult(const std::string &payload);
|
||||
~DescribeRestoreSchemaDetailsResult();
|
||||
RestoreSchema getRestoreSchema()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
RestoreSchema restoreSchema_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBERESTORESCHEMADETAILSRESULT_H_
|
||||
@@ -37,9 +37,15 @@ namespace AlibabaCloud
|
||||
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
|
||||
private:
|
||||
std::string clusterId_;
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,14 +48,18 @@ namespace AlibabaCloud
|
||||
DescribeRestoreSummaryResult();
|
||||
explicit DescribeRestoreSummaryResult(const std::string &payload);
|
||||
~DescribeRestoreSummaryResult();
|
||||
int getRestoreRecordSize()const;
|
||||
int getPageSize()const;
|
||||
int getPageNumber()const;
|
||||
int getTotal()const;
|
||||
int getHasMoreRestoreRecord()const;
|
||||
std::vector<Rescord> getRescords()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int restoreRecordSize_;
|
||||
int pageSize_;
|
||||
int pageNumber_;
|
||||
int total_;
|
||||
int hasMoreRestoreRecord_;
|
||||
std::vector<Rescord> rescords_;
|
||||
|
||||
|
||||
@@ -32,17 +32,83 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeRestoreTablesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct RestoreSummary
|
||||
{
|
||||
std::string endTime;
|
||||
std::string targetCluster;
|
||||
std::string state;
|
||||
std::string startTime;
|
||||
std::string restoreToDate;
|
||||
std::string recordId;
|
||||
};
|
||||
struct RestoreSchema
|
||||
{
|
||||
struct RestoreSchemaDetail
|
||||
{
|
||||
std::string table;
|
||||
std::string endTime;
|
||||
std::string message;
|
||||
std::string state;
|
||||
std::string startTime;
|
||||
};
|
||||
int pageSize;
|
||||
int pageNumber;
|
||||
long total;
|
||||
std::vector<RestoreSchemaDetail> restoreSchemaDetails;
|
||||
int succeed;
|
||||
int fail;
|
||||
};
|
||||
struct RestoreFull
|
||||
{
|
||||
struct RestoreFullDetail
|
||||
{
|
||||
std::string speed;
|
||||
std::string table;
|
||||
std::string endTime;
|
||||
std::string message;
|
||||
std::string state;
|
||||
std::string dataSize;
|
||||
std::string startTime;
|
||||
std::string process;
|
||||
};
|
||||
std::vector<RestoreFullDetail> restoreFullDetails;
|
||||
std::string speed;
|
||||
int pageSize;
|
||||
int pageNumber;
|
||||
std::string dataSize;
|
||||
long total;
|
||||
int succeed;
|
||||
int fail;
|
||||
};
|
||||
struct RestoreIncrDetail
|
||||
{
|
||||
std::string endTime;
|
||||
std::string restoreDelay;
|
||||
std::string restoreStartTs;
|
||||
std::string state;
|
||||
std::string startTime;
|
||||
std::string restoredTs;
|
||||
std::string process;
|
||||
};
|
||||
|
||||
|
||||
DescribeRestoreTablesResult();
|
||||
explicit DescribeRestoreTablesResult(const std::string &payload);
|
||||
~DescribeRestoreTablesResult();
|
||||
RestoreSchema getRestoreSchema()const;
|
||||
RestoreFull getRestoreFull()const;
|
||||
RestoreSummary getRestoreSummary()const;
|
||||
std::vector<std::string> getTables()const;
|
||||
RestoreIncrDetail getRestoreIncrDetail()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
RestoreSchema restoreSchema_;
|
||||
RestoreFull restoreFull_;
|
||||
RestoreSummary restoreSummary_;
|
||||
std::vector<std::string> tables_;
|
||||
RestoreIncrDetail restoreIncrDetail_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -843,6 +843,114 @@ HBaseClient::DescribeRegionsOutcomeCallable HBaseClient::describeRegionsCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::DescribeRestoreFullDetailsOutcome HBaseClient::describeRestoreFullDetails(const DescribeRestoreFullDetailsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeRestoreFullDetailsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeRestoreFullDetailsOutcome(DescribeRestoreFullDetailsResult(outcome.result()));
|
||||
else
|
||||
return DescribeRestoreFullDetailsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HBaseClient::describeRestoreFullDetailsAsync(const DescribeRestoreFullDetailsRequest& request, const DescribeRestoreFullDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeRestoreFullDetails(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HBaseClient::DescribeRestoreFullDetailsOutcomeCallable HBaseClient::describeRestoreFullDetailsCallable(const DescribeRestoreFullDetailsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeRestoreFullDetailsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeRestoreFullDetails(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::DescribeRestoreIncrDetailOutcome HBaseClient::describeRestoreIncrDetail(const DescribeRestoreIncrDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeRestoreIncrDetailOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeRestoreIncrDetailOutcome(DescribeRestoreIncrDetailResult(outcome.result()));
|
||||
else
|
||||
return DescribeRestoreIncrDetailOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HBaseClient::describeRestoreIncrDetailAsync(const DescribeRestoreIncrDetailRequest& request, const DescribeRestoreIncrDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeRestoreIncrDetail(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HBaseClient::DescribeRestoreIncrDetailOutcomeCallable HBaseClient::describeRestoreIncrDetailCallable(const DescribeRestoreIncrDetailRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeRestoreIncrDetailOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeRestoreIncrDetail(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::DescribeRestoreSchemaDetailsOutcome HBaseClient::describeRestoreSchemaDetails(const DescribeRestoreSchemaDetailsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeRestoreSchemaDetailsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeRestoreSchemaDetailsOutcome(DescribeRestoreSchemaDetailsResult(outcome.result()));
|
||||
else
|
||||
return DescribeRestoreSchemaDetailsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HBaseClient::describeRestoreSchemaDetailsAsync(const DescribeRestoreSchemaDetailsRequest& request, const DescribeRestoreSchemaDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeRestoreSchemaDetails(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HBaseClient::DescribeRestoreSchemaDetailsOutcomeCallable HBaseClient::describeRestoreSchemaDetailsCallable(const DescribeRestoreSchemaDetailsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeRestoreSchemaDetailsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeRestoreSchemaDetails(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::DescribeRestoreSummaryOutcome HBaseClient::describeRestoreSummary(const DescribeRestoreSummaryRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -38,3 +38,25 @@ void DescribeBackupSummaryRequest::setClusterId(const std::string& clusterId)
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
int DescribeBackupSummaryRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeBackupSummaryRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeBackupSummaryRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeBackupSummaryRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
|
||||
@@ -55,10 +55,14 @@ void DescribeBackupSummaryResult::parse(const std::string &payload)
|
||||
auto fullNode = value["Full"];
|
||||
if(!fullNode["HasMore"].isNull())
|
||||
full_.hasMore = fullNode["HasMore"].asString();
|
||||
if(!fullNode["RecordSize"].isNull())
|
||||
full_.recordSize = fullNode["RecordSize"].asString();
|
||||
if(!fullNode["NextFullBackupDate"].isNull())
|
||||
full_.nextFullBackupDate = fullNode["NextFullBackupDate"].asString();
|
||||
if(!fullNode["PageNumber"].isNull())
|
||||
full_.pageNumber = std::stoi(fullNode["PageNumber"].asString());
|
||||
if(!fullNode["PageSize"].isNull())
|
||||
full_.pageSize = std::stoi(fullNode["PageSize"].asString());
|
||||
if(!fullNode["Total"].isNull())
|
||||
full_.total = std::stoi(fullNode["Total"].asString());
|
||||
auto allRecordsNode = fullNode["Records"]["Record"];
|
||||
for (auto fullNodeRecordsRecord : allRecordsNode)
|
||||
{
|
||||
|
||||
@@ -27,15 +27,26 @@ DescribeBackupTablesRequest::DescribeBackupTablesRequest() :
|
||||
DescribeBackupTablesRequest::~DescribeBackupTablesRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeBackupTablesRequest::getClusterId()const
|
||||
int DescribeBackupTablesRequest::getPageNumber()const
|
||||
{
|
||||
return clusterId_;
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeBackupTablesRequest::setClusterId(const std::string& clusterId)
|
||||
void DescribeBackupTablesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeBackupTablesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeBackupTablesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeBackupTablesRequest::getBackupRecordId()const
|
||||
@@ -49,3 +60,14 @@ void DescribeBackupTablesRequest::setBackupRecordId(const std::string& backupRec
|
||||
setParameter("BackupRecordId", backupRecordId);
|
||||
}
|
||||
|
||||
std::string DescribeBackupTablesRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeBackupTablesRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,12 +39,60 @@ void DescribeBackupTablesResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allBackupRecordsNode = value["BackupRecords"]["BackupRecord"];
|
||||
for (auto valueBackupRecordsBackupRecord : allBackupRecordsNode)
|
||||
{
|
||||
BackupRecord backupRecordsObject;
|
||||
if(!valueBackupRecordsBackupRecord["Table"].isNull())
|
||||
backupRecordsObject.table = valueBackupRecordsBackupRecord["Table"].asString();
|
||||
if(!valueBackupRecordsBackupRecord["State"].isNull())
|
||||
backupRecordsObject.state = valueBackupRecordsBackupRecord["State"].asString();
|
||||
if(!valueBackupRecordsBackupRecord["StartTime"].isNull())
|
||||
backupRecordsObject.startTime = valueBackupRecordsBackupRecord["StartTime"].asString();
|
||||
if(!valueBackupRecordsBackupRecord["EndTime"].isNull())
|
||||
backupRecordsObject.endTime = valueBackupRecordsBackupRecord["EndTime"].asString();
|
||||
if(!valueBackupRecordsBackupRecord["Process"].isNull())
|
||||
backupRecordsObject.process = valueBackupRecordsBackupRecord["Process"].asString();
|
||||
if(!valueBackupRecordsBackupRecord["DataSize"].isNull())
|
||||
backupRecordsObject.dataSize = valueBackupRecordsBackupRecord["DataSize"].asString();
|
||||
if(!valueBackupRecordsBackupRecord["Speed"].isNull())
|
||||
backupRecordsObject.speed = valueBackupRecordsBackupRecord["Speed"].asString();
|
||||
if(!valueBackupRecordsBackupRecord["Message"].isNull())
|
||||
backupRecordsObject.message = valueBackupRecordsBackupRecord["Message"].asString();
|
||||
backupRecords_.push_back(backupRecordsObject);
|
||||
}
|
||||
auto allTables = value["Tables"]["Table"];
|
||||
for (const auto &item : allTables)
|
||||
tables_.push_back(item.asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeBackupTablesResult::BackupRecord> DescribeBackupTablesResult::getBackupRecords()const
|
||||
{
|
||||
return backupRecords_;
|
||||
}
|
||||
|
||||
int DescribeBackupTablesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeBackupTablesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
long DescribeBackupTablesResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeBackupTablesResult::getTables()const
|
||||
{
|
||||
return tables_;
|
||||
|
||||
73
hbase/src/model/DescribeRestoreFullDetailsRequest.cc
Normal file
73
hbase/src/model/DescribeRestoreFullDetailsRequest.cc
Normal 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/hbase/model/DescribeRestoreFullDetailsRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::DescribeRestoreFullDetailsRequest;
|
||||
|
||||
DescribeRestoreFullDetailsRequest::DescribeRestoreFullDetailsRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "DescribeRestoreFullDetails")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeRestoreFullDetailsRequest::~DescribeRestoreFullDetailsRequest()
|
||||
{}
|
||||
|
||||
int DescribeRestoreFullDetailsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeRestoreFullDetailsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeRestoreFullDetailsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeRestoreFullDetailsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeRestoreFullDetailsRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeRestoreFullDetailsRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string DescribeRestoreFullDetailsRequest::getRestoreRecordId()const
|
||||
{
|
||||
return restoreRecordId_;
|
||||
}
|
||||
|
||||
void DescribeRestoreFullDetailsRequest::setRestoreRecordId(const std::string& restoreRecordId)
|
||||
{
|
||||
restoreRecordId_ = restoreRecordId;
|
||||
setParameter("RestoreRecordId", restoreRecordId);
|
||||
}
|
||||
|
||||
86
hbase/src/model/DescribeRestoreFullDetailsResult.cc
Normal file
86
hbase/src/model/DescribeRestoreFullDetailsResult.cc
Normal 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/hbase/model/DescribeRestoreFullDetailsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
|
||||
DescribeRestoreFullDetailsResult::DescribeRestoreFullDetailsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeRestoreFullDetailsResult::DescribeRestoreFullDetailsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeRestoreFullDetailsResult::~DescribeRestoreFullDetailsResult()
|
||||
{}
|
||||
|
||||
void DescribeRestoreFullDetailsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto restoreFullNode = value["RestoreFull"];
|
||||
if(!restoreFullNode["Succeed"].isNull())
|
||||
restoreFull_.succeed = std::stoi(restoreFullNode["Succeed"].asString());
|
||||
if(!restoreFullNode["Fail"].isNull())
|
||||
restoreFull_.fail = std::stoi(restoreFullNode["Fail"].asString());
|
||||
if(!restoreFullNode["DataSize"].isNull())
|
||||
restoreFull_.dataSize = restoreFullNode["DataSize"].asString();
|
||||
if(!restoreFullNode["Speed"].isNull())
|
||||
restoreFull_.speed = restoreFullNode["Speed"].asString();
|
||||
if(!restoreFullNode["Total"].isNull())
|
||||
restoreFull_.total = std::stol(restoreFullNode["Total"].asString());
|
||||
if(!restoreFullNode["PageNumber"].isNull())
|
||||
restoreFull_.pageNumber = std::stoi(restoreFullNode["PageNumber"].asString());
|
||||
if(!restoreFullNode["PageSize"].isNull())
|
||||
restoreFull_.pageSize = std::stoi(restoreFullNode["PageSize"].asString());
|
||||
auto allRestoreFullDetailsNode = restoreFullNode["RestoreFullDetails"]["RestoreFullDetail"];
|
||||
for (auto restoreFullNodeRestoreFullDetailsRestoreFullDetail : allRestoreFullDetailsNode)
|
||||
{
|
||||
RestoreFull::RestoreFullDetail restoreFullDetailObject;
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Table"].isNull())
|
||||
restoreFullDetailObject.table = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Table"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["State"].isNull())
|
||||
restoreFullDetailObject.state = restoreFullNodeRestoreFullDetailsRestoreFullDetail["State"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["StartTime"].isNull())
|
||||
restoreFullDetailObject.startTime = restoreFullNodeRestoreFullDetailsRestoreFullDetail["StartTime"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["EndTime"].isNull())
|
||||
restoreFullDetailObject.endTime = restoreFullNodeRestoreFullDetailsRestoreFullDetail["EndTime"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Process"].isNull())
|
||||
restoreFullDetailObject.process = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Process"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["DataSize"].isNull())
|
||||
restoreFullDetailObject.dataSize = restoreFullNodeRestoreFullDetailsRestoreFullDetail["DataSize"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Speed"].isNull())
|
||||
restoreFullDetailObject.speed = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Speed"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Message"].isNull())
|
||||
restoreFullDetailObject.message = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Message"].asString();
|
||||
restoreFull_.restoreFullDetails.push_back(restoreFullDetailObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DescribeRestoreFullDetailsResult::RestoreFull DescribeRestoreFullDetailsResult::getRestoreFull()const
|
||||
{
|
||||
return restoreFull_;
|
||||
}
|
||||
|
||||
51
hbase/src/model/DescribeRestoreIncrDetailRequest.cc
Normal file
51
hbase/src/model/DescribeRestoreIncrDetailRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/hbase/model/DescribeRestoreIncrDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::DescribeRestoreIncrDetailRequest;
|
||||
|
||||
DescribeRestoreIncrDetailRequest::DescribeRestoreIncrDetailRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "DescribeRestoreIncrDetail")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeRestoreIncrDetailRequest::~DescribeRestoreIncrDetailRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeRestoreIncrDetailRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeRestoreIncrDetailRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string DescribeRestoreIncrDetailRequest::getRestoreRecordId()const
|
||||
{
|
||||
return restoreRecordId_;
|
||||
}
|
||||
|
||||
void DescribeRestoreIncrDetailRequest::setRestoreRecordId(const std::string& restoreRecordId)
|
||||
{
|
||||
restoreRecordId_ = restoreRecordId;
|
||||
setParameter("RestoreRecordId", restoreRecordId);
|
||||
}
|
||||
|
||||
64
hbase/src/model/DescribeRestoreIncrDetailResult.cc
Normal file
64
hbase/src/model/DescribeRestoreIncrDetailResult.cc
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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/hbase/model/DescribeRestoreIncrDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
|
||||
DescribeRestoreIncrDetailResult::DescribeRestoreIncrDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeRestoreIncrDetailResult::DescribeRestoreIncrDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeRestoreIncrDetailResult::~DescribeRestoreIncrDetailResult()
|
||||
{}
|
||||
|
||||
void DescribeRestoreIncrDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto restoreIncrDetailNode = value["RestoreIncrDetail"];
|
||||
if(!restoreIncrDetailNode["State"].isNull())
|
||||
restoreIncrDetail_.state = restoreIncrDetailNode["State"].asString();
|
||||
if(!restoreIncrDetailNode["StartTime"].isNull())
|
||||
restoreIncrDetail_.startTime = restoreIncrDetailNode["StartTime"].asString();
|
||||
if(!restoreIncrDetailNode["EndTime"].isNull())
|
||||
restoreIncrDetail_.endTime = restoreIncrDetailNode["EndTime"].asString();
|
||||
if(!restoreIncrDetailNode["RestoreStartTs"].isNull())
|
||||
restoreIncrDetail_.restoreStartTs = restoreIncrDetailNode["RestoreStartTs"].asString();
|
||||
if(!restoreIncrDetailNode["RestoredTs"].isNull())
|
||||
restoreIncrDetail_.restoredTs = restoreIncrDetailNode["RestoredTs"].asString();
|
||||
if(!restoreIncrDetailNode["RestoreDelay"].isNull())
|
||||
restoreIncrDetail_.restoreDelay = restoreIncrDetailNode["RestoreDelay"].asString();
|
||||
if(!restoreIncrDetailNode["Process"].isNull())
|
||||
restoreIncrDetail_.process = restoreIncrDetailNode["Process"].asString();
|
||||
|
||||
}
|
||||
|
||||
DescribeRestoreIncrDetailResult::RestoreIncrDetail DescribeRestoreIncrDetailResult::getRestoreIncrDetail()const
|
||||
{
|
||||
return restoreIncrDetail_;
|
||||
}
|
||||
|
||||
73
hbase/src/model/DescribeRestoreSchemaDetailsRequest.cc
Normal file
73
hbase/src/model/DescribeRestoreSchemaDetailsRequest.cc
Normal 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/hbase/model/DescribeRestoreSchemaDetailsRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::DescribeRestoreSchemaDetailsRequest;
|
||||
|
||||
DescribeRestoreSchemaDetailsRequest::DescribeRestoreSchemaDetailsRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "DescribeRestoreSchemaDetails")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeRestoreSchemaDetailsRequest::~DescribeRestoreSchemaDetailsRequest()
|
||||
{}
|
||||
|
||||
int DescribeRestoreSchemaDetailsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeRestoreSchemaDetailsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeRestoreSchemaDetailsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeRestoreSchemaDetailsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeRestoreSchemaDetailsRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeRestoreSchemaDetailsRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string DescribeRestoreSchemaDetailsRequest::getRestoreRecordId()const
|
||||
{
|
||||
return restoreRecordId_;
|
||||
}
|
||||
|
||||
void DescribeRestoreSchemaDetailsRequest::setRestoreRecordId(const std::string& restoreRecordId)
|
||||
{
|
||||
restoreRecordId_ = restoreRecordId;
|
||||
setParameter("RestoreRecordId", restoreRecordId);
|
||||
}
|
||||
|
||||
76
hbase/src/model/DescribeRestoreSchemaDetailsResult.cc
Normal file
76
hbase/src/model/DescribeRestoreSchemaDetailsResult.cc
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 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/hbase/model/DescribeRestoreSchemaDetailsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
|
||||
DescribeRestoreSchemaDetailsResult::DescribeRestoreSchemaDetailsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeRestoreSchemaDetailsResult::DescribeRestoreSchemaDetailsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeRestoreSchemaDetailsResult::~DescribeRestoreSchemaDetailsResult()
|
||||
{}
|
||||
|
||||
void DescribeRestoreSchemaDetailsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto restoreSchemaNode = value["RestoreSchema"];
|
||||
if(!restoreSchemaNode["Succeed"].isNull())
|
||||
restoreSchema_.succeed = std::stoi(restoreSchemaNode["Succeed"].asString());
|
||||
if(!restoreSchemaNode["Fail"].isNull())
|
||||
restoreSchema_.fail = std::stoi(restoreSchemaNode["Fail"].asString());
|
||||
if(!restoreSchemaNode["Total"].isNull())
|
||||
restoreSchema_.total = std::stol(restoreSchemaNode["Total"].asString());
|
||||
if(!restoreSchemaNode["PageNumber"].isNull())
|
||||
restoreSchema_.pageNumber = std::stoi(restoreSchemaNode["PageNumber"].asString());
|
||||
if(!restoreSchemaNode["PageSize"].isNull())
|
||||
restoreSchema_.pageSize = std::stoi(restoreSchemaNode["PageSize"].asString());
|
||||
auto allRestoreSchemaDetailsNode = restoreSchemaNode["RestoreSchemaDetails"]["RestoreSchemaDetail"];
|
||||
for (auto restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail : allRestoreSchemaDetailsNode)
|
||||
{
|
||||
RestoreSchema::RestoreSchemaDetail restoreSchemaDetailObject;
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Table"].isNull())
|
||||
restoreSchemaDetailObject.table = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Table"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["StartTime"].isNull())
|
||||
restoreSchemaDetailObject.startTime = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["StartTime"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["EndTime"].isNull())
|
||||
restoreSchemaDetailObject.endTime = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["EndTime"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["State"].isNull())
|
||||
restoreSchemaDetailObject.state = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["State"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Message"].isNull())
|
||||
restoreSchemaDetailObject.message = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Message"].asString();
|
||||
restoreSchema_.restoreSchemaDetails.push_back(restoreSchemaDetailObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DescribeRestoreSchemaDetailsResult::RestoreSchema DescribeRestoreSchemaDetailsResult::getRestoreSchema()const
|
||||
{
|
||||
return restoreSchema_;
|
||||
}
|
||||
|
||||
@@ -38,3 +38,25 @@ void DescribeRestoreSummaryRequest::setClusterId(const std::string& clusterId)
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
int DescribeRestoreSummaryRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeRestoreSummaryRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeRestoreSummaryRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeRestoreSummaryRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
|
||||
@@ -61,16 +61,30 @@ void DescribeRestoreSummaryResult::parse(const std::string &payload)
|
||||
rescordsObject.logProcess = valueRescordsRescord["LogProcess"].asString();
|
||||
rescords_.push_back(rescordsObject);
|
||||
}
|
||||
if(!value["RestoreRecordSize"].isNull())
|
||||
restoreRecordSize_ = std::stoi(value["RestoreRecordSize"].asString());
|
||||
if(!value["HasMoreRestoreRecord"].isNull())
|
||||
hasMoreRestoreRecord_ = std::stoi(value["HasMoreRestoreRecord"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeRestoreSummaryResult::getRestoreRecordSize()const
|
||||
int DescribeRestoreSummaryResult::getPageSize()const
|
||||
{
|
||||
return restoreRecordSize_;
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeRestoreSummaryResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int DescribeRestoreSummaryResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
int DescribeRestoreSummaryResult::getHasMoreRestoreRecord()const
|
||||
|
||||
@@ -39,14 +39,126 @@ void DescribeRestoreTablesResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto restoreSummaryNode = value["RestoreSummary"];
|
||||
if(!restoreSummaryNode["RecordId"].isNull())
|
||||
restoreSummary_.recordId = restoreSummaryNode["RecordId"].asString();
|
||||
if(!restoreSummaryNode["StartTime"].isNull())
|
||||
restoreSummary_.startTime = restoreSummaryNode["StartTime"].asString();
|
||||
if(!restoreSummaryNode["EndTime"].isNull())
|
||||
restoreSummary_.endTime = restoreSummaryNode["EndTime"].asString();
|
||||
if(!restoreSummaryNode["State"].isNull())
|
||||
restoreSummary_.state = restoreSummaryNode["State"].asString();
|
||||
if(!restoreSummaryNode["TargetCluster"].isNull())
|
||||
restoreSummary_.targetCluster = restoreSummaryNode["TargetCluster"].asString();
|
||||
if(!restoreSummaryNode["RestoreToDate"].isNull())
|
||||
restoreSummary_.restoreToDate = restoreSummaryNode["RestoreToDate"].asString();
|
||||
auto restoreSchemaNode = value["RestoreSchema"];
|
||||
if(!restoreSchemaNode["Succeed"].isNull())
|
||||
restoreSchema_.succeed = std::stoi(restoreSchemaNode["Succeed"].asString());
|
||||
if(!restoreSchemaNode["Fail"].isNull())
|
||||
restoreSchema_.fail = std::stoi(restoreSchemaNode["Fail"].asString());
|
||||
if(!restoreSchemaNode["Total"].isNull())
|
||||
restoreSchema_.total = std::stol(restoreSchemaNode["Total"].asString());
|
||||
if(!restoreSchemaNode["PageNumber"].isNull())
|
||||
restoreSchema_.pageNumber = std::stoi(restoreSchemaNode["PageNumber"].asString());
|
||||
if(!restoreSchemaNode["PageSize"].isNull())
|
||||
restoreSchema_.pageSize = std::stoi(restoreSchemaNode["PageSize"].asString());
|
||||
auto allRestoreSchemaDetailsNode = restoreSchemaNode["RestoreSchemaDetails"]["RestoreSchemaDetail"];
|
||||
for (auto restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail : allRestoreSchemaDetailsNode)
|
||||
{
|
||||
RestoreSchema::RestoreSchemaDetail restoreSchemaDetailObject;
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Table"].isNull())
|
||||
restoreSchemaDetailObject.table = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Table"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["StartTime"].isNull())
|
||||
restoreSchemaDetailObject.startTime = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["StartTime"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["EndTime"].isNull())
|
||||
restoreSchemaDetailObject.endTime = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["EndTime"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["State"].isNull())
|
||||
restoreSchemaDetailObject.state = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["State"].asString();
|
||||
if(!restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Message"].isNull())
|
||||
restoreSchemaDetailObject.message = restoreSchemaNodeRestoreSchemaDetailsRestoreSchemaDetail["Message"].asString();
|
||||
restoreSchema_.restoreSchemaDetails.push_back(restoreSchemaDetailObject);
|
||||
}
|
||||
auto restoreFullNode = value["RestoreFull"];
|
||||
if(!restoreFullNode["Succeed"].isNull())
|
||||
restoreFull_.succeed = std::stoi(restoreFullNode["Succeed"].asString());
|
||||
if(!restoreFullNode["Fail"].isNull())
|
||||
restoreFull_.fail = std::stoi(restoreFullNode["Fail"].asString());
|
||||
if(!restoreFullNode["DataSize"].isNull())
|
||||
restoreFull_.dataSize = restoreFullNode["DataSize"].asString();
|
||||
if(!restoreFullNode["Speed"].isNull())
|
||||
restoreFull_.speed = restoreFullNode["Speed"].asString();
|
||||
if(!restoreFullNode["Total"].isNull())
|
||||
restoreFull_.total = std::stol(restoreFullNode["Total"].asString());
|
||||
if(!restoreFullNode["PageNumber"].isNull())
|
||||
restoreFull_.pageNumber = std::stoi(restoreFullNode["PageNumber"].asString());
|
||||
if(!restoreFullNode["PageSize"].isNull())
|
||||
restoreFull_.pageSize = std::stoi(restoreFullNode["PageSize"].asString());
|
||||
auto allRestoreFullDetailsNode = restoreFullNode["RestoreFullDetails"]["RestoreFullDetail"];
|
||||
for (auto restoreFullNodeRestoreFullDetailsRestoreFullDetail : allRestoreFullDetailsNode)
|
||||
{
|
||||
RestoreFull::RestoreFullDetail restoreFullDetailObject;
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Table"].isNull())
|
||||
restoreFullDetailObject.table = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Table"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["State"].isNull())
|
||||
restoreFullDetailObject.state = restoreFullNodeRestoreFullDetailsRestoreFullDetail["State"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["StartTime"].isNull())
|
||||
restoreFullDetailObject.startTime = restoreFullNodeRestoreFullDetailsRestoreFullDetail["StartTime"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["EndTime"].isNull())
|
||||
restoreFullDetailObject.endTime = restoreFullNodeRestoreFullDetailsRestoreFullDetail["EndTime"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Process"].isNull())
|
||||
restoreFullDetailObject.process = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Process"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["DataSize"].isNull())
|
||||
restoreFullDetailObject.dataSize = restoreFullNodeRestoreFullDetailsRestoreFullDetail["DataSize"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Speed"].isNull())
|
||||
restoreFullDetailObject.speed = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Speed"].asString();
|
||||
if(!restoreFullNodeRestoreFullDetailsRestoreFullDetail["Message"].isNull())
|
||||
restoreFullDetailObject.message = restoreFullNodeRestoreFullDetailsRestoreFullDetail["Message"].asString();
|
||||
restoreFull_.restoreFullDetails.push_back(restoreFullDetailObject);
|
||||
}
|
||||
auto restoreIncrDetailNode = value["RestoreIncrDetail"];
|
||||
if(!restoreIncrDetailNode["State"].isNull())
|
||||
restoreIncrDetail_.state = restoreIncrDetailNode["State"].asString();
|
||||
if(!restoreIncrDetailNode["StartTime"].isNull())
|
||||
restoreIncrDetail_.startTime = restoreIncrDetailNode["StartTime"].asString();
|
||||
if(!restoreIncrDetailNode["EndTime"].isNull())
|
||||
restoreIncrDetail_.endTime = restoreIncrDetailNode["EndTime"].asString();
|
||||
if(!restoreIncrDetailNode["RestoreStartTs"].isNull())
|
||||
restoreIncrDetail_.restoreStartTs = restoreIncrDetailNode["RestoreStartTs"].asString();
|
||||
if(!restoreIncrDetailNode["RestoredTs"].isNull())
|
||||
restoreIncrDetail_.restoredTs = restoreIncrDetailNode["RestoredTs"].asString();
|
||||
if(!restoreIncrDetailNode["RestoreDelay"].isNull())
|
||||
restoreIncrDetail_.restoreDelay = restoreIncrDetailNode["RestoreDelay"].asString();
|
||||
if(!restoreIncrDetailNode["Process"].isNull())
|
||||
restoreIncrDetail_.process = restoreIncrDetailNode["Process"].asString();
|
||||
auto allTables = value["Tables"]["Table"];
|
||||
for (const auto &item : allTables)
|
||||
tables_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeRestoreTablesResult::RestoreSchema DescribeRestoreTablesResult::getRestoreSchema()const
|
||||
{
|
||||
return restoreSchema_;
|
||||
}
|
||||
|
||||
DescribeRestoreTablesResult::RestoreFull DescribeRestoreTablesResult::getRestoreFull()const
|
||||
{
|
||||
return restoreFull_;
|
||||
}
|
||||
|
||||
DescribeRestoreTablesResult::RestoreSummary DescribeRestoreTablesResult::getRestoreSummary()const
|
||||
{
|
||||
return restoreSummary_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeRestoreTablesResult::getTables()const
|
||||
{
|
||||
return tables_;
|
||||
}
|
||||
|
||||
DescribeRestoreTablesResult::RestoreIncrDetail DescribeRestoreTablesResult::getRestoreIncrDetail()const
|
||||
{
|
||||
return restoreIncrDetail_;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,16 @@ set(saf_public_header
|
||||
|
||||
set(saf_public_header_model
|
||||
include/alibabacloud/saf/model/ExecuteRequestRequest.h
|
||||
include/alibabacloud/saf/model/ExecuteRequestResult.h )
|
||||
include/alibabacloud/saf/model/ExecuteRequestResult.h
|
||||
include/alibabacloud/saf/model/ExecuteRequestSGRequest.h
|
||||
include/alibabacloud/saf/model/ExecuteRequestSGResult.h )
|
||||
|
||||
set(saf_src
|
||||
src/SafClient.cc
|
||||
src/model/ExecuteRequestRequest.cc
|
||||
src/model/ExecuteRequestResult.cc )
|
||||
src/model/ExecuteRequestResult.cc
|
||||
src/model/ExecuteRequestSGRequest.cc
|
||||
src/model/ExecuteRequestSGResult.cc )
|
||||
|
||||
add_library(saf ${LIB_TYPE}
|
||||
${saf_public_header}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "SafExport.h"
|
||||
#include "model/ExecuteRequestRequest.h"
|
||||
#include "model/ExecuteRequestResult.h"
|
||||
#include "model/ExecuteRequestSGRequest.h"
|
||||
#include "model/ExecuteRequestSGResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
@@ -36,6 +38,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ExecuteRequestResult> ExecuteRequestOutcome;
|
||||
typedef std::future<ExecuteRequestOutcome> ExecuteRequestOutcomeCallable;
|
||||
typedef std::function<void(const SafClient*, const Model::ExecuteRequestRequest&, const ExecuteRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::ExecuteRequestSGResult> ExecuteRequestSGOutcome;
|
||||
typedef std::future<ExecuteRequestSGOutcome> ExecuteRequestSGOutcomeCallable;
|
||||
typedef std::function<void(const SafClient*, const Model::ExecuteRequestSGRequest&, const ExecuteRequestSGOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteRequestSGAsyncHandler;
|
||||
|
||||
SafClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
SafClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
@@ -44,6 +49,9 @@ namespace AlibabaCloud
|
||||
ExecuteRequestOutcome executeRequest(const Model::ExecuteRequestRequest &request)const;
|
||||
void executeRequestAsync(const Model::ExecuteRequestRequest& request, const ExecuteRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExecuteRequestOutcomeCallable executeRequestCallable(const Model::ExecuteRequestRequest& request) const;
|
||||
ExecuteRequestSGOutcome executeRequestSG(const Model::ExecuteRequestSGRequest &request)const;
|
||||
void executeRequestSGAsync(const Model::ExecuteRequestSGRequest& request, const ExecuteRequestSGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExecuteRequestSGOutcomeCallable executeRequestSGCallable(const Model::ExecuteRequestSGRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
|
||||
@@ -32,26 +32,20 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_SAF_EXPORT ExecuteRequestResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string score;
|
||||
std::string extend;
|
||||
std::string tags;
|
||||
};
|
||||
|
||||
|
||||
ExecuteRequestResult();
|
||||
explicit ExecuteRequestResult(const std::string &payload);
|
||||
~ExecuteRequestResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getData()const;
|
||||
int getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string data_;
|
||||
int code_;
|
||||
|
||||
};
|
||||
|
||||
51
saf/include/alibabacloud/saf/model/ExecuteRequestSGRequest.h
Normal file
51
saf/include/alibabacloud/saf/model/ExecuteRequestSGRequest.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_SAF_MODEL_EXECUTEREQUESTSGREQUEST_H_
|
||||
#define ALIBABACLOUD_SAF_MODEL_EXECUTEREQUESTSGREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/saf/SafExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Saf
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAF_EXPORT ExecuteRequestSGRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ExecuteRequestSGRequest();
|
||||
~ExecuteRequestSGRequest();
|
||||
|
||||
std::string getServiceParameters()const;
|
||||
void setServiceParameters(const std::string& serviceParameters);
|
||||
std::string getService()const;
|
||||
void setService(const std::string& service);
|
||||
|
||||
private:
|
||||
std::string serviceParameters_;
|
||||
std::string service_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAF_MODEL_EXECUTEREQUESTSGREQUEST_H_
|
||||
55
saf/include/alibabacloud/saf/model/ExecuteRequestSGResult.h
Normal file
55
saf/include/alibabacloud/saf/model/ExecuteRequestSGResult.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_SAF_MODEL_EXECUTEREQUESTSGRESULT_H_
|
||||
#define ALIBABACLOUD_SAF_MODEL_EXECUTEREQUESTSGRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/saf/SafExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Saf
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAF_EXPORT ExecuteRequestSGResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ExecuteRequestSGResult();
|
||||
explicit ExecuteRequestSGResult(const std::string &payload);
|
||||
~ExecuteRequestSGResult();
|
||||
std::string getMessage()const;
|
||||
std::string getData()const;
|
||||
int getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string data_;
|
||||
int code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAF_MODEL_EXECUTEREQUESTSGRESULT_H_
|
||||
@@ -87,3 +87,39 @@ SafClient::ExecuteRequestOutcomeCallable SafClient::executeRequestCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SafClient::ExecuteRequestSGOutcome SafClient::executeRequestSG(const ExecuteRequestSGRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ExecuteRequestSGOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ExecuteRequestSGOutcome(ExecuteRequestSGResult(outcome.result()));
|
||||
else
|
||||
return ExecuteRequestSGOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SafClient::executeRequestSGAsync(const ExecuteRequestSGRequest& request, const ExecuteRequestSGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, executeRequestSG(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SafClient::ExecuteRequestSGOutcomeCallable SafClient::executeRequestSGCallable(const ExecuteRequestSGRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ExecuteRequestSGOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->executeRequestSG(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
using AlibabaCloud::Saf::Model::ExecuteRequestRequest;
|
||||
|
||||
ExecuteRequestRequest::ExecuteRequestRequest() :
|
||||
RpcServiceRequest("saf", "2018-09-19", "ExecuteRequest")
|
||||
RpcServiceRequest("saf", "2019-05-21", "ExecuteRequest")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
@@ -39,17 +39,12 @@ void ExecuteRequestResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Tags"].isNull())
|
||||
data_.tags = dataNode["Tags"].asString();
|
||||
if(!dataNode["Score"].isNull())
|
||||
data_.score = dataNode["Score"].asString();
|
||||
if(!dataNode["Extend"].isNull())
|
||||
data_.extend = dataNode["Extend"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +53,7 @@ std::string ExecuteRequestResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
ExecuteRequestResult::Data ExecuteRequestResult::getData()const
|
||||
std::string ExecuteRequestResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
51
saf/src/model/ExecuteRequestSGRequest.cc
Normal file
51
saf/src/model/ExecuteRequestSGRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/saf/model/ExecuteRequestSGRequest.h>
|
||||
|
||||
using AlibabaCloud::Saf::Model::ExecuteRequestSGRequest;
|
||||
|
||||
ExecuteRequestSGRequest::ExecuteRequestSGRequest() :
|
||||
RpcServiceRequest("saf", "2019-05-21", "ExecuteRequestSG")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ExecuteRequestSGRequest::~ExecuteRequestSGRequest()
|
||||
{}
|
||||
|
||||
std::string ExecuteRequestSGRequest::getServiceParameters()const
|
||||
{
|
||||
return serviceParameters_;
|
||||
}
|
||||
|
||||
void ExecuteRequestSGRequest::setServiceParameters(const std::string& serviceParameters)
|
||||
{
|
||||
serviceParameters_ = serviceParameters;
|
||||
setParameter("ServiceParameters", serviceParameters);
|
||||
}
|
||||
|
||||
std::string ExecuteRequestSGRequest::getService()const
|
||||
{
|
||||
return service_;
|
||||
}
|
||||
|
||||
void ExecuteRequestSGRequest::setService(const std::string& service)
|
||||
{
|
||||
service_ = service;
|
||||
setParameter("Service", service);
|
||||
}
|
||||
|
||||
65
saf/src/model/ExecuteRequestSGResult.cc
Normal file
65
saf/src/model/ExecuteRequestSGResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/saf/model/ExecuteRequestSGResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Saf;
|
||||
using namespace AlibabaCloud::Saf::Model;
|
||||
|
||||
ExecuteRequestSGResult::ExecuteRequestSGResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ExecuteRequestSGResult::ExecuteRequestSGResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ExecuteRequestSGResult::~ExecuteRequestSGResult()
|
||||
{}
|
||||
|
||||
void ExecuteRequestSGResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ExecuteRequestSGResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string ExecuteRequestSGResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int ExecuteRequestSGResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
98
videosearch/CMakeLists.txt
Normal file
98
videosearch/CMakeLists.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
set(videosearch_public_header
|
||||
include/alibabacloud/videosearch/VideosearchClient.h
|
||||
include/alibabacloud/videosearch/VideosearchExport.h )
|
||||
|
||||
set(videosearch_public_header_model
|
||||
include/alibabacloud/videosearch/model/AddDeletionVideoTaskRequest.h
|
||||
include/alibabacloud/videosearch/model/AddDeletionVideoTaskResult.h
|
||||
include/alibabacloud/videosearch/model/AddSearchVideoTaskRequest.h
|
||||
include/alibabacloud/videosearch/model/AddSearchVideoTaskResult.h
|
||||
include/alibabacloud/videosearch/model/AddStorageVideoTaskRequest.h
|
||||
include/alibabacloud/videosearch/model/AddStorageVideoTaskResult.h
|
||||
include/alibabacloud/videosearch/model/GetTaskStatusRequest.h
|
||||
include/alibabacloud/videosearch/model/GetTaskStatusResult.h )
|
||||
|
||||
set(videosearch_src
|
||||
src/VideosearchClient.cc
|
||||
src/model/AddDeletionVideoTaskRequest.cc
|
||||
src/model/AddDeletionVideoTaskResult.cc
|
||||
src/model/AddSearchVideoTaskRequest.cc
|
||||
src/model/AddSearchVideoTaskResult.cc
|
||||
src/model/AddStorageVideoTaskRequest.cc
|
||||
src/model/AddStorageVideoTaskResult.cc
|
||||
src/model/GetTaskStatusRequest.cc
|
||||
src/model/GetTaskStatusResult.cc )
|
||||
|
||||
add_library(videosearch ${LIB_TYPE}
|
||||
${videosearch_public_header}
|
||||
${videosearch_public_header_model}
|
||||
${videosearch_src})
|
||||
|
||||
set_target_properties(videosearch
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}videosearch
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(videosearch
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_VIDEOSEARCH_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(videosearch
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(videosearch
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(videosearch
|
||||
jsoncpp)
|
||||
target_include_directories(videosearch
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(videosearch
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(videosearch
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(videosearch
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(videosearch
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${videosearch_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/videosearch)
|
||||
install(FILES ${videosearch_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/videosearch/model)
|
||||
install(TARGETS videosearch
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "VideosearchExport.h"
|
||||
#include "model/AddDeletionVideoTaskRequest.h"
|
||||
#include "model/AddDeletionVideoTaskResult.h"
|
||||
#include "model/AddSearchVideoTaskRequest.h"
|
||||
#include "model/AddSearchVideoTaskResult.h"
|
||||
#include "model/AddStorageVideoTaskRequest.h"
|
||||
#include "model/AddStorageVideoTaskResult.h"
|
||||
#include "model/GetTaskStatusRequest.h"
|
||||
#include "model/GetTaskStatusResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT VideosearchClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::AddDeletionVideoTaskResult> AddDeletionVideoTaskOutcome;
|
||||
typedef std::future<AddDeletionVideoTaskOutcome> AddDeletionVideoTaskOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::AddDeletionVideoTaskRequest&, const AddDeletionVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddDeletionVideoTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::AddSearchVideoTaskResult> AddSearchVideoTaskOutcome;
|
||||
typedef std::future<AddSearchVideoTaskOutcome> AddSearchVideoTaskOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::AddSearchVideoTaskRequest&, const AddSearchVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddSearchVideoTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::AddStorageVideoTaskResult> AddStorageVideoTaskOutcome;
|
||||
typedef std::future<AddStorageVideoTaskOutcome> AddStorageVideoTaskOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::AddStorageVideoTaskRequest&, const AddStorageVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddStorageVideoTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetTaskStatusResult> GetTaskStatusOutcome;
|
||||
typedef std::future<GetTaskStatusOutcome> GetTaskStatusOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::GetTaskStatusRequest&, const GetTaskStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTaskStatusAsyncHandler;
|
||||
|
||||
VideosearchClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
VideosearchClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
VideosearchClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~VideosearchClient();
|
||||
AddDeletionVideoTaskOutcome addDeletionVideoTask(const Model::AddDeletionVideoTaskRequest &request)const;
|
||||
void addDeletionVideoTaskAsync(const Model::AddDeletionVideoTaskRequest& request, const AddDeletionVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddDeletionVideoTaskOutcomeCallable addDeletionVideoTaskCallable(const Model::AddDeletionVideoTaskRequest& request) const;
|
||||
AddSearchVideoTaskOutcome addSearchVideoTask(const Model::AddSearchVideoTaskRequest &request)const;
|
||||
void addSearchVideoTaskAsync(const Model::AddSearchVideoTaskRequest& request, const AddSearchVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddSearchVideoTaskOutcomeCallable addSearchVideoTaskCallable(const Model::AddSearchVideoTaskRequest& request) const;
|
||||
AddStorageVideoTaskOutcome addStorageVideoTask(const Model::AddStorageVideoTaskRequest &request)const;
|
||||
void addStorageVideoTaskAsync(const Model::AddStorageVideoTaskRequest& request, const AddStorageVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddStorageVideoTaskOutcomeCallable addStorageVideoTaskCallable(const Model::AddStorageVideoTaskRequest& request) const;
|
||||
GetTaskStatusOutcome getTaskStatus(const Model::GetTaskStatusRequest &request)const;
|
||||
void getTaskStatusAsync(const Model::GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetTaskStatusOutcomeCallable getTaskStatusCallable(const Model::GetTaskStatusRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_VIDEOSEARCHEXPORT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_VIDEOSEARCH_LIBRARY)
|
||||
# define ALIBABACLOUD_VIDEOSEARCH_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_VIDEOSEARCH_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_VIDEOSEARCH_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHEXPORT_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddDeletionVideoTaskRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddDeletionVideoTaskRequest();
|
||||
~AddDeletionVideoTaskRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
std::string getVideoId()const;
|
||||
void setVideoId(const std::string& videoId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
std::string videoId_;
|
||||
std::string instanceId_;
|
||||
std::string regionId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddDeletionVideoTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AddDeletionVideoTaskResult();
|
||||
explicit AddDeletionVideoTaskResult(const std::string &payload);
|
||||
~AddDeletionVideoTaskResult();
|
||||
bool getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
bool data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKRESULT_H_
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddSearchVideoTaskRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddSearchVideoTaskRequest();
|
||||
~AddSearchVideoTaskRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
int getStorageType()const;
|
||||
void setStorageType(int storageType);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getVideoTags()const;
|
||||
void setVideoTags(const std::string& videoTags);
|
||||
int getReturnVideoNumber()const;
|
||||
void setReturnVideoNumber(int returnVideoNumber);
|
||||
std::string getVideoId()const;
|
||||
void setVideoId(const std::string& videoId);
|
||||
float getReplaceStorageThreshold()const;
|
||||
void setReplaceStorageThreshold(float replaceStorageThreshold);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getVideoUrl()const;
|
||||
void setVideoUrl(const std::string& videoUrl);
|
||||
std::string getQueryTags()const;
|
||||
void setQueryTags(const std::string& queryTags);
|
||||
std::string getCallbackUrl()const;
|
||||
void setCallbackUrl(const std::string& callbackUrl);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
int storageType_;
|
||||
std::string regionId_;
|
||||
std::string videoTags_;
|
||||
int returnVideoNumber_;
|
||||
std::string videoId_;
|
||||
float replaceStorageThreshold_;
|
||||
std::string instanceId_;
|
||||
std::string videoUrl_;
|
||||
std::string queryTags_;
|
||||
std::string callbackUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddSearchVideoTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
AddSearchVideoTaskResult();
|
||||
explicit AddSearchVideoTaskResult(const std::string &payload);
|
||||
~AddSearchVideoTaskResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKRESULT_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddStorageVideoTaskRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddStorageVideoTaskRequest();
|
||||
~AddStorageVideoTaskRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getVideoTags()const;
|
||||
void setVideoTags(const std::string& videoTags);
|
||||
std::string getVideoId()const;
|
||||
void setVideoId(const std::string& videoId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getVideoUrl()const;
|
||||
void setVideoUrl(const std::string& videoUrl);
|
||||
std::string getCallbackUrl()const;
|
||||
void setCallbackUrl(const std::string& callbackUrl);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
std::string regionId_;
|
||||
std::string videoTags_;
|
||||
std::string videoId_;
|
||||
std::string instanceId_;
|
||||
std::string videoUrl_;
|
||||
std::string callbackUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddStorageVideoTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
AddStorageVideoTaskResult();
|
||||
explicit AddStorageVideoTaskResult(const std::string &payload);
|
||||
~AddStorageVideoTaskResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKRESULT_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT GetTaskStatusRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetTaskStatusRequest();
|
||||
~GetTaskStatusRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getTaskId()const;
|
||||
void setTaskId(const std::string& taskId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
std::string instanceId_;
|
||||
std::string regionId_;
|
||||
std::string taskId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT GetTaskStatusResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GetTaskStatusResult();
|
||||
explicit GetTaskStatusResult(const std::string &payload);
|
||||
~GetTaskStatusResult();
|
||||
int getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSRESULT_H_
|
||||
197
videosearch/src/VideosearchClient.cc
Normal file
197
videosearch/src/VideosearchClient.cc
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
* 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/videosearch/VideosearchClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "videosearch";
|
||||
}
|
||||
|
||||
VideosearchClient::VideosearchClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
VideosearchClient::VideosearchClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
VideosearchClient::VideosearchClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
VideosearchClient::~VideosearchClient()
|
||||
{}
|
||||
|
||||
VideosearchClient::AddDeletionVideoTaskOutcome VideosearchClient::addDeletionVideoTask(const AddDeletionVideoTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddDeletionVideoTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddDeletionVideoTaskOutcome(AddDeletionVideoTaskResult(outcome.result()));
|
||||
else
|
||||
return AddDeletionVideoTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::addDeletionVideoTaskAsync(const AddDeletionVideoTaskRequest& request, const AddDeletionVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addDeletionVideoTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::AddDeletionVideoTaskOutcomeCallable VideosearchClient::addDeletionVideoTaskCallable(const AddDeletionVideoTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddDeletionVideoTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addDeletionVideoTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideosearchClient::AddSearchVideoTaskOutcome VideosearchClient::addSearchVideoTask(const AddSearchVideoTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddSearchVideoTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddSearchVideoTaskOutcome(AddSearchVideoTaskResult(outcome.result()));
|
||||
else
|
||||
return AddSearchVideoTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::addSearchVideoTaskAsync(const AddSearchVideoTaskRequest& request, const AddSearchVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addSearchVideoTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::AddSearchVideoTaskOutcomeCallable VideosearchClient::addSearchVideoTaskCallable(const AddSearchVideoTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddSearchVideoTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addSearchVideoTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideosearchClient::AddStorageVideoTaskOutcome VideosearchClient::addStorageVideoTask(const AddStorageVideoTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddStorageVideoTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddStorageVideoTaskOutcome(AddStorageVideoTaskResult(outcome.result()));
|
||||
else
|
||||
return AddStorageVideoTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::addStorageVideoTaskAsync(const AddStorageVideoTaskRequest& request, const AddStorageVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addStorageVideoTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::AddStorageVideoTaskOutcomeCallable VideosearchClient::addStorageVideoTaskCallable(const AddStorageVideoTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddStorageVideoTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addStorageVideoTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideosearchClient::GetTaskStatusOutcome VideosearchClient::getTaskStatus(const GetTaskStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetTaskStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetTaskStatusOutcome(GetTaskStatusResult(outcome.result()));
|
||||
else
|
||||
return GetTaskStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::getTaskStatusAsync(const GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getTaskStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::GetTaskStatusOutcomeCallable VideosearchClient::getTaskStatusCallable(const GetTaskStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetTaskStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getTaskStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
73
videosearch/src/model/AddDeletionVideoTaskRequest.cc
Normal file
73
videosearch/src/model/AddDeletionVideoTaskRequest.cc
Normal 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/videosearch/model/AddDeletionVideoTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::AddDeletionVideoTaskRequest;
|
||||
|
||||
AddDeletionVideoTaskRequest::AddDeletionVideoTaskRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "AddDeletionVideoTask")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddDeletionVideoTaskRequest::~AddDeletionVideoTaskRequest()
|
||||
{}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getVideoId()const
|
||||
{
|
||||
return videoId_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setVideoId(const std::string& videoId)
|
||||
{
|
||||
videoId_ = videoId;
|
||||
setBodyParameter("VideoId", videoId);
|
||||
}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
51
videosearch/src/model/AddDeletionVideoTaskResult.cc
Normal file
51
videosearch/src/model/AddDeletionVideoTaskResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videosearch/model/AddDeletionVideoTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
AddDeletionVideoTaskResult::AddDeletionVideoTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddDeletionVideoTaskResult::AddDeletionVideoTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddDeletionVideoTaskResult::~AddDeletionVideoTaskResult()
|
||||
{}
|
||||
|
||||
void AddDeletionVideoTaskResult::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() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool AddDeletionVideoTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
150
videosearch/src/model/AddSearchVideoTaskRequest.cc
Normal file
150
videosearch/src/model/AddSearchVideoTaskRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videosearch/model/AddSearchVideoTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::AddSearchVideoTaskRequest;
|
||||
|
||||
AddSearchVideoTaskRequest::AddSearchVideoTaskRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "AddSearchVideoTask")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddSearchVideoTaskRequest::~AddSearchVideoTaskRequest()
|
||||
{}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
int AddSearchVideoTaskRequest::getStorageType()const
|
||||
{
|
||||
return storageType_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setStorageType(int storageType)
|
||||
{
|
||||
storageType_ = storageType;
|
||||
setBodyParameter("StorageType", std::to_string(storageType));
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getVideoTags()const
|
||||
{
|
||||
return videoTags_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setVideoTags(const std::string& videoTags)
|
||||
{
|
||||
videoTags_ = videoTags;
|
||||
setBodyParameter("VideoTags", videoTags);
|
||||
}
|
||||
|
||||
int AddSearchVideoTaskRequest::getReturnVideoNumber()const
|
||||
{
|
||||
return returnVideoNumber_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setReturnVideoNumber(int returnVideoNumber)
|
||||
{
|
||||
returnVideoNumber_ = returnVideoNumber;
|
||||
setBodyParameter("ReturnVideoNumber", std::to_string(returnVideoNumber));
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getVideoId()const
|
||||
{
|
||||
return videoId_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setVideoId(const std::string& videoId)
|
||||
{
|
||||
videoId_ = videoId;
|
||||
setBodyParameter("VideoId", videoId);
|
||||
}
|
||||
|
||||
float AddSearchVideoTaskRequest::getReplaceStorageThreshold()const
|
||||
{
|
||||
return replaceStorageThreshold_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setReplaceStorageThreshold(float replaceStorageThreshold)
|
||||
{
|
||||
replaceStorageThreshold_ = replaceStorageThreshold;
|
||||
setBodyParameter("ReplaceStorageThreshold", std::to_string(replaceStorageThreshold));
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getVideoUrl()const
|
||||
{
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setVideoUrl(const std::string& videoUrl)
|
||||
{
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter("VideoUrl", videoUrl);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getQueryTags()const
|
||||
{
|
||||
return queryTags_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setQueryTags(const std::string& queryTags)
|
||||
{
|
||||
queryTags_ = queryTags;
|
||||
setBodyParameter("QueryTags", queryTags);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getCallbackUrl()const
|
||||
{
|
||||
return callbackUrl_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setCallbackUrl(const std::string& callbackUrl)
|
||||
{
|
||||
callbackUrl_ = callbackUrl;
|
||||
setBodyParameter("CallbackUrl", callbackUrl);
|
||||
}
|
||||
|
||||
52
videosearch/src/model/AddSearchVideoTaskResult.cc
Normal file
52
videosearch/src/model/AddSearchVideoTaskResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/videosearch/model/AddSearchVideoTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
AddSearchVideoTaskResult::AddSearchVideoTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddSearchVideoTaskResult::AddSearchVideoTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddSearchVideoTaskResult::~AddSearchVideoTaskResult()
|
||||
{}
|
||||
|
||||
void AddSearchVideoTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["TaskId"].isNull())
|
||||
data_.taskId = dataNode["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
AddSearchVideoTaskResult::Data AddSearchVideoTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
106
videosearch/src/model/AddStorageVideoTaskRequest.cc
Normal file
106
videosearch/src/model/AddStorageVideoTaskRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/videosearch/model/AddStorageVideoTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::AddStorageVideoTaskRequest;
|
||||
|
||||
AddStorageVideoTaskRequest::AddStorageVideoTaskRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "AddStorageVideoTask")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddStorageVideoTaskRequest::~AddStorageVideoTaskRequest()
|
||||
{}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getVideoTags()const
|
||||
{
|
||||
return videoTags_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setVideoTags(const std::string& videoTags)
|
||||
{
|
||||
videoTags_ = videoTags;
|
||||
setBodyParameter("VideoTags", videoTags);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getVideoId()const
|
||||
{
|
||||
return videoId_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setVideoId(const std::string& videoId)
|
||||
{
|
||||
videoId_ = videoId;
|
||||
setBodyParameter("VideoId", videoId);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getVideoUrl()const
|
||||
{
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setVideoUrl(const std::string& videoUrl)
|
||||
{
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter("VideoUrl", videoUrl);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getCallbackUrl()const
|
||||
{
|
||||
return callbackUrl_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setCallbackUrl(const std::string& callbackUrl)
|
||||
{
|
||||
callbackUrl_ = callbackUrl;
|
||||
setBodyParameter("CallbackUrl", callbackUrl);
|
||||
}
|
||||
|
||||
52
videosearch/src/model/AddStorageVideoTaskResult.cc
Normal file
52
videosearch/src/model/AddStorageVideoTaskResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/videosearch/model/AddStorageVideoTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
AddStorageVideoTaskResult::AddStorageVideoTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddStorageVideoTaskResult::AddStorageVideoTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddStorageVideoTaskResult::~AddStorageVideoTaskResult()
|
||||
{}
|
||||
|
||||
void AddStorageVideoTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["TaskId"].isNull())
|
||||
data_.taskId = dataNode["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
AddStorageVideoTaskResult::Data AddStorageVideoTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
73
videosearch/src/model/GetTaskStatusRequest.cc
Normal file
73
videosearch/src/model/GetTaskStatusRequest.cc
Normal 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/videosearch/model/GetTaskStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::GetTaskStatusRequest;
|
||||
|
||||
GetTaskStatusRequest::GetTaskStatusRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "GetTaskStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetTaskStatusRequest::~GetTaskStatusRequest()
|
||||
{}
|
||||
|
||||
std::string GetTaskStatusRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string GetTaskStatusRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string GetTaskStatusRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string GetTaskStatusRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setBodyParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
51
videosearch/src/model/GetTaskStatusResult.cc
Normal file
51
videosearch/src/model/GetTaskStatusResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videosearch/model/GetTaskStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
GetTaskStatusResult::GetTaskStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetTaskStatusResult::GetTaskStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetTaskStatusResult::~GetTaskStatusResult()
|
||||
{}
|
||||
|
||||
void GetTaskStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = std::stoi(value["Data"].asString());
|
||||
|
||||
}
|
||||
|
||||
int GetTaskStatusResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user