Compare commits

..

7 Commits

Author SHA1 Message Date
sdk-team
18dc3cd7d9 Support ListSensitiveColumns, ListSensitiveColumnsDetail API. 2020-04-14 21:52:24 +08:00
sdk-team
2dbb76d303 Supported CreateSegmentBodyJob. 2020-04-14 15:04:45 +08:00
sdk-team
ae65dcf4c3 Fix ListTaskExecutions SDK error. 2020-04-13 12:05:53 +08:00
sdk-team
1c5ad6a48c Generated 2017-05-25 for Dypnsapi. 2020-04-10 17:08:22 +08:00
sdk-team
1a13b03f29 Support GetOfficeEditURL. 2020-04-10 16:49:00 +08:00
wb-hx510875
c1e07be47e improve build 2020-04-10 15:58:45 +08:00
sdk-team
8fdb5cc851 Generated 2019-01-01 for Cassandra. 2020-04-10 15:09:26 +08:00
58 changed files with 2812 additions and 29 deletions

View File

@@ -1,3 +1,25 @@
2020-04-14 Version: 1.36.355
- Support ListSensitiveColumns, ListSensitiveColumnsDetail API.
- ListUsers API return user execute query count information.
- Fix ListWorkFlowTemplates to return create user information.
- UpdateUser API support to update user max execute query count.
2020-04-14 Version: 1.36.354
- Supported CreateSegmentBodyJob.
2020-04-13 Version: 1.36.353
- Fix ListTaskExecutions SDK error.
2020-04-10 Version: 1.36.352
- Generated 2017-05-25 for `Dypnsapi`.
2020-04-10 Version: 1.36.351
- Support GetOfficeEditURL.
- Support RefreshOfficeEditToken.
2020-04-10 Version: 1.36.350
- Generated 2019-01-01 for `Cassandra`.
2020-04-10 Version: 1.36.349
- Support DescribeIpv4Location.

View File

@@ -9,12 +9,14 @@ project(alibabacloud-sdk VERSION ${version})
message(STATUS "Project version: ${PROJECT_VERSION}")
set(TARGET_OUTPUT_NAME_PREFIX "alibabacloud-sdk-" CACHE STRING "The target's output name prefix")
set(BUILD_PRODUCT "" CACHE STRING "Build by lower name of product")
option(BUILD_SHARED_LIBS "Enable shared library" ON)
option(BUILD_UNIT_TESTS "Enable unit tests" OFF)
option(BUILD_FUNCTION_TESTS "Enable function test" OFF)
option(BUILD_PRODUCT "Build by lower name of product" OFF)
set(LIB_TYPE STATIC)
if(BUILD_SHARED_LIBS)
set(LIB_TYPE SHARED)
add_definitions(-DALIBABACLOUD_SHARED)
@@ -57,9 +59,10 @@ if(BUILD_FUNCTION_TESTS)
add_subdirectory(test/function_test/vpc)
endif()
if(NOT BUILD_PRODUCT)
message(WARNING "INVALID FOLDER 'BUILD_PRODUCT'=${BUILD_PRODUCT}")
if(BUILD_PRODUCT STREQUAL "")
message(WARNING "Please set the value of 'BUILD_PRODUCT'")
else()
add_subdirectory(core)
add_subdirectory(${BUILD_PRODUCT})
message(STATUS "'BUILD_PRODUCT'=${BUILD_PRODUCT}")
endif()

View File

@@ -103,6 +103,7 @@ sudo sh easyinstall.sh ecs
* 选择 `Browse Source` 为 `源代码目录(aliyun-openapi-cpp-sdk)`
* 选择 `Browse build` 为 `构建目录(sdk_build)`
* 点击 `configure`
* 使用小写的产品名称,设置 `BUILD_PRODUCT` 参数的值
* 点击 `generate`, 构建 VS 解决方案。
4. 编译安装 C++ SDK

View File

@@ -109,6 +109,8 @@ git clone https://github.com/aliyun/aliyun-openapi-cpp-sdk.git
- `Configure`
- use the lower name of product to set the value of `BUILD_PRODUCT`
- `Generate`
4. Build and Install C++ SDK

View File

@@ -1 +1 @@
1.36.349
1.36.355

View File

@@ -81,6 +81,10 @@ set(dms-enterprise_public_header_model
include/alibabacloud/dms-enterprise/model/ListLogicTablesResult.h
include/alibabacloud/dms-enterprise/model/ListOrdersRequest.h
include/alibabacloud/dms-enterprise/model/ListOrdersResult.h
include/alibabacloud/dms-enterprise/model/ListSensitiveColumnsRequest.h
include/alibabacloud/dms-enterprise/model/ListSensitiveColumnsResult.h
include/alibabacloud/dms-enterprise/model/ListSensitiveColumnsDetailRequest.h
include/alibabacloud/dms-enterprise/model/ListSensitiveColumnsDetailResult.h
include/alibabacloud/dms-enterprise/model/ListTablesRequest.h
include/alibabacloud/dms-enterprise/model/ListTablesResult.h
include/alibabacloud/dms-enterprise/model/ListUserPermissionsRequest.h
@@ -176,6 +180,10 @@ set(dms-enterprise_src
src/model/ListLogicTablesResult.cc
src/model/ListOrdersRequest.cc
src/model/ListOrdersResult.cc
src/model/ListSensitiveColumnsRequest.cc
src/model/ListSensitiveColumnsResult.cc
src/model/ListSensitiveColumnsDetailRequest.cc
src/model/ListSensitiveColumnsDetailResult.cc
src/model/ListTablesRequest.cc
src/model/ListTablesResult.cc
src/model/ListUserPermissionsRequest.cc

View File

@@ -82,6 +82,10 @@
#include "model/ListLogicTablesResult.h"
#include "model/ListOrdersRequest.h"
#include "model/ListOrdersResult.h"
#include "model/ListSensitiveColumnsRequest.h"
#include "model/ListSensitiveColumnsResult.h"
#include "model/ListSensitiveColumnsDetailRequest.h"
#include "model/ListSensitiveColumnsDetailResult.h"
#include "model/ListTablesRequest.h"
#include "model/ListTablesResult.h"
#include "model/ListUserPermissionsRequest.h"
@@ -213,6 +217,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListOrdersResult> ListOrdersOutcome;
typedef std::future<ListOrdersOutcome> ListOrdersOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ListOrdersRequest&, const ListOrdersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListOrdersAsyncHandler;
typedef Outcome<Error, Model::ListSensitiveColumnsResult> ListSensitiveColumnsOutcome;
typedef std::future<ListSensitiveColumnsOutcome> ListSensitiveColumnsOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ListSensitiveColumnsRequest&, const ListSensitiveColumnsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSensitiveColumnsAsyncHandler;
typedef Outcome<Error, Model::ListSensitiveColumnsDetailResult> ListSensitiveColumnsDetailOutcome;
typedef std::future<ListSensitiveColumnsDetailOutcome> ListSensitiveColumnsDetailOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ListSensitiveColumnsDetailRequest&, const ListSensitiveColumnsDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSensitiveColumnsDetailAsyncHandler;
typedef Outcome<Error, Model::ListTablesResult> ListTablesOutcome;
typedef std::future<ListTablesOutcome> ListTablesOutcomeCallable;
typedef std::function<void(const Dms_enterpriseClient*, const Model::ListTablesRequest&, const ListTablesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTablesAsyncHandler;
@@ -356,6 +366,12 @@ namespace AlibabaCloud
ListOrdersOutcome listOrders(const Model::ListOrdersRequest &request)const;
void listOrdersAsync(const Model::ListOrdersRequest& request, const ListOrdersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListOrdersOutcomeCallable listOrdersCallable(const Model::ListOrdersRequest& request) const;
ListSensitiveColumnsOutcome listSensitiveColumns(const Model::ListSensitiveColumnsRequest &request)const;
void listSensitiveColumnsAsync(const Model::ListSensitiveColumnsRequest& request, const ListSensitiveColumnsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSensitiveColumnsOutcomeCallable listSensitiveColumnsCallable(const Model::ListSensitiveColumnsRequest& request) const;
ListSensitiveColumnsDetailOutcome listSensitiveColumnsDetail(const Model::ListSensitiveColumnsDetailRequest &request)const;
void listSensitiveColumnsDetailAsync(const Model::ListSensitiveColumnsDetailRequest& request, const ListSensitiveColumnsDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSensitiveColumnsDetailOutcomeCallable listSensitiveColumnsDetailCallable(const Model::ListSensitiveColumnsDetailRequest& request) const;
ListTablesOutcome listTables(const Model::ListTablesRequest &request)const;
void listTablesAsync(const Model::ListTablesRequest& request, const ListTablesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListTablesOutcomeCallable listTablesCallable(const Model::ListTablesRequest& request) const;

View File

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

View File

@@ -0,0 +1,70 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSDETAILRESULT_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSDETAILRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListSensitiveColumnsDetailResult : public ServiceResult
{
public:
struct SensitiveColumnsDetail
{
std::string tableName;
std::string columnName;
std::string columnType;
std::string searchName;
std::string columnDescription;
long dbId;
bool logic;
std::string schemaName;
std::string envType;
std::string dbType;
};
ListSensitiveColumnsDetailResult();
explicit ListSensitiveColumnsDetailResult(const std::string &payload);
~ListSensitiveColumnsDetailResult();
std::vector<SensitiveColumnsDetail> getSensitiveColumnsDetailList()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::vector<SensitiveColumnsDetail> sensitiveColumnsDetailList_;
std::string errorCode_;
std::string errorMessage_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSDETAILRESULT_H_

View File

@@ -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_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSREQUEST_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListSensitiveColumnsRequest : public RpcServiceRequest
{
public:
ListSensitiveColumnsRequest();
~ListSensitiveColumnsRequest();
std::string getSchemaName()const;
void setSchemaName(const std::string& schemaName);
std::string getSecurityLevel()const;
void setSecurityLevel(const std::string& securityLevel);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getTableName()const;
void setTableName(const std::string& tableName);
std::string getColumnName()const;
void setColumnName(const std::string& columnName);
long getTid()const;
void setTid(long tid);
int getPageNumber()const;
void setPageNumber(int pageNumber);
private:
std::string schemaName_;
std::string securityLevel_;
int pageSize_;
std::string tableName_;
std::string columnName_;
long tid_;
int pageNumber_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSREQUEST_H_

View File

@@ -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_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSRESULT_H_
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
namespace AlibabaCloud
{
namespace Dms_enterprise
{
namespace Model
{
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT ListSensitiveColumnsResult : public ServiceResult
{
public:
struct SensitiveColumn
{
std::string tableName;
std::string columnName;
long columnCount;
std::string securityLevel;
std::string functionType;
std::string schemaName;
};
ListSensitiveColumnsResult();
explicit ListSensitiveColumnsResult(const std::string &payload);
~ListSensitiveColumnsResult();
long getTotalCount()const;
std::string getErrorCode()const;
std::string getErrorMessage()const;
std::vector<SensitiveColumn> getSensitiveColumnList()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
long totalCount_;
std::string errorCode_;
std::string errorMessage_;
std::vector<SensitiveColumn> sensitiveColumnList_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_LISTSENSITIVECOLUMNSRESULT_H_

View File

@@ -34,13 +34,18 @@ namespace AlibabaCloud
public:
struct User
{
long uid;
std::vector<std::string> roleIdList;
std::string userId;
std::string state;
std::vector<std::string> roleNameList;
std::string nickName;
std::string mobile;
long maxExecuteCount;
long uid;
std::string lastLoginTime;
long curResultCount;
std::vector<std::string> roleIdList;
long maxResultCount;
std::string userId;
std::string state;
long curExecuteCount;
long parentUid;
};

View File

@@ -41,11 +41,13 @@ namespace AlibabaCloud
int position;
std::string nodeType;
long nodeId;
long createUserId;
long templateId;
};
std::string comment;
std::string templateName;
std::string enabled;
long createUserId;
int isSystem;
std::vector<WorkFlowTemplate::WorkflowNode> workflowNodes;
long templateId;

View File

@@ -39,6 +39,10 @@ namespace AlibabaCloud
void setRoleNames(const std::string& roleNames);
long getUid()const;
void setUid(long uid);
long getMaxResultCount()const;
void setMaxResultCount(long maxResultCount);
long getMaxExecuteCount()const;
void setMaxExecuteCount(long maxExecuteCount);
std::string getUserNick()const;
void setUserNick(const std::string& userNick);
std::string getMobile()const;
@@ -49,6 +53,8 @@ namespace AlibabaCloud
private:
std::string roleNames_;
long uid_;
long maxResultCount_;
long maxExecuteCount_;
std::string userNick_;
std::string mobile_;
long tid_;

View File

@@ -31,21 +31,21 @@ Dms_enterpriseClient::Dms_enterpriseClient(const Credentials &credentials, const
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dmsenterprise");
}
Dms_enterpriseClient::Dms_enterpriseClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dmsenterprise");
}
Dms_enterpriseClient::Dms_enterpriseClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "dmsenterprise");
}
Dms_enterpriseClient::~Dms_enterpriseClient()
@@ -1131,6 +1131,78 @@ Dms_enterpriseClient::ListOrdersOutcomeCallable Dms_enterpriseClient::listOrders
return task->get_future();
}
Dms_enterpriseClient::ListSensitiveColumnsOutcome Dms_enterpriseClient::listSensitiveColumns(const ListSensitiveColumnsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSensitiveColumnsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSensitiveColumnsOutcome(ListSensitiveColumnsResult(outcome.result()));
else
return ListSensitiveColumnsOutcome(outcome.error());
}
void Dms_enterpriseClient::listSensitiveColumnsAsync(const ListSensitiveColumnsRequest& request, const ListSensitiveColumnsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSensitiveColumns(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ListSensitiveColumnsOutcomeCallable Dms_enterpriseClient::listSensitiveColumnsCallable(const ListSensitiveColumnsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSensitiveColumnsOutcome()>>(
[this, request]()
{
return this->listSensitiveColumns(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::ListSensitiveColumnsDetailOutcome Dms_enterpriseClient::listSensitiveColumnsDetail(const ListSensitiveColumnsDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSensitiveColumnsDetailOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSensitiveColumnsDetailOutcome(ListSensitiveColumnsDetailResult(outcome.result()));
else
return ListSensitiveColumnsDetailOutcome(outcome.error());
}
void Dms_enterpriseClient::listSensitiveColumnsDetailAsync(const ListSensitiveColumnsDetailRequest& request, const ListSensitiveColumnsDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSensitiveColumnsDetail(request), context);
};
asyncExecute(new Runnable(fn));
}
Dms_enterpriseClient::ListSensitiveColumnsDetailOutcomeCallable Dms_enterpriseClient::listSensitiveColumnsDetailCallable(const ListSensitiveColumnsDetailRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSensitiveColumnsDetailOutcome()>>(
[this, request]()
{
return this->listSensitiveColumnsDetail(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dms_enterpriseClient::ListTablesOutcome Dms_enterpriseClient::listTables(const ListTablesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/dms-enterprise/model/ListSensitiveColumnsDetailRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ListSensitiveColumnsDetailRequest;
ListSensitiveColumnsDetailRequest::ListSensitiveColumnsDetailRequest() :
RpcServiceRequest("dms-enterprise", "2018-11-01", "ListSensitiveColumnsDetail")
{
setMethod(HttpRequest::Method::Post);
}
ListSensitiveColumnsDetailRequest::~ListSensitiveColumnsDetailRequest()
{}
std::string ListSensitiveColumnsDetailRequest::getSchemaName()const
{
return schemaName_;
}
void ListSensitiveColumnsDetailRequest::setSchemaName(const std::string& schemaName)
{
schemaName_ = schemaName;
setParameter("SchemaName", schemaName);
}
std::string ListSensitiveColumnsDetailRequest::getTableName()const
{
return tableName_;
}
void ListSensitiveColumnsDetailRequest::setTableName(const std::string& tableName)
{
tableName_ = tableName;
setParameter("TableName", tableName);
}
std::string ListSensitiveColumnsDetailRequest::getColumnName()const
{
return columnName_;
}
void ListSensitiveColumnsDetailRequest::setColumnName(const std::string& columnName)
{
columnName_ = columnName;
setParameter("ColumnName", columnName);
}
long ListSensitiveColumnsDetailRequest::getTid()const
{
return tid_;
}
void ListSensitiveColumnsDetailRequest::setTid(long tid)
{
tid_ = tid;
setParameter("Tid", std::to_string(tid));
}

View File

@@ -0,0 +1,96 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/dms-enterprise/model/ListSensitiveColumnsDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ListSensitiveColumnsDetailResult::ListSensitiveColumnsDetailResult() :
ServiceResult()
{}
ListSensitiveColumnsDetailResult::ListSensitiveColumnsDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSensitiveColumnsDetailResult::~ListSensitiveColumnsDetailResult()
{}
void ListSensitiveColumnsDetailResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSensitiveColumnsDetailListNode = value["SensitiveColumnsDetailList"]["SensitiveColumnsDetail"];
for (auto valueSensitiveColumnsDetailListSensitiveColumnsDetail : allSensitiveColumnsDetailListNode)
{
SensitiveColumnsDetail sensitiveColumnsDetailListObject;
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["SchemaName"].isNull())
sensitiveColumnsDetailListObject.schemaName = valueSensitiveColumnsDetailListSensitiveColumnsDetail["SchemaName"].asString();
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["TableName"].isNull())
sensitiveColumnsDetailListObject.tableName = valueSensitiveColumnsDetailListSensitiveColumnsDetail["TableName"].asString();
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["ColumnName"].isNull())
sensitiveColumnsDetailListObject.columnName = valueSensitiveColumnsDetailListSensitiveColumnsDetail["ColumnName"].asString();
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["SearchName"].isNull())
sensitiveColumnsDetailListObject.searchName = valueSensitiveColumnsDetailListSensitiveColumnsDetail["SearchName"].asString();
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["DbId"].isNull())
sensitiveColumnsDetailListObject.dbId = std::stol(valueSensitiveColumnsDetailListSensitiveColumnsDetail["DbId"].asString());
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["EnvType"].isNull())
sensitiveColumnsDetailListObject.envType = valueSensitiveColumnsDetailListSensitiveColumnsDetail["EnvType"].asString();
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["DbType"].isNull())
sensitiveColumnsDetailListObject.dbType = valueSensitiveColumnsDetailListSensitiveColumnsDetail["DbType"].asString();
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["Logic"].isNull())
sensitiveColumnsDetailListObject.logic = valueSensitiveColumnsDetailListSensitiveColumnsDetail["Logic"].asString() == "true";
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["ColumnType"].isNull())
sensitiveColumnsDetailListObject.columnType = valueSensitiveColumnsDetailListSensitiveColumnsDetail["ColumnType"].asString();
if(!valueSensitiveColumnsDetailListSensitiveColumnsDetail["ColumnDescription"].isNull())
sensitiveColumnsDetailListObject.columnDescription = valueSensitiveColumnsDetailListSensitiveColumnsDetail["ColumnDescription"].asString();
sensitiveColumnsDetailList_.push_back(sensitiveColumnsDetailListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
}
std::vector<ListSensitiveColumnsDetailResult::SensitiveColumnsDetail> ListSensitiveColumnsDetailResult::getSensitiveColumnsDetailList()const
{
return sensitiveColumnsDetailList_;
}
std::string ListSensitiveColumnsDetailResult::getErrorCode()const
{
return errorCode_;
}
std::string ListSensitiveColumnsDetailResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListSensitiveColumnsDetailResult::getSuccess()const
{
return success_;
}

View 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/dms-enterprise/model/ListSensitiveColumnsRequest.h>
using AlibabaCloud::Dms_enterprise::Model::ListSensitiveColumnsRequest;
ListSensitiveColumnsRequest::ListSensitiveColumnsRequest() :
RpcServiceRequest("dms-enterprise", "2018-11-01", "ListSensitiveColumns")
{
setMethod(HttpRequest::Method::Post);
}
ListSensitiveColumnsRequest::~ListSensitiveColumnsRequest()
{}
std::string ListSensitiveColumnsRequest::getSchemaName()const
{
return schemaName_;
}
void ListSensitiveColumnsRequest::setSchemaName(const std::string& schemaName)
{
schemaName_ = schemaName;
setParameter("SchemaName", schemaName);
}
std::string ListSensitiveColumnsRequest::getSecurityLevel()const
{
return securityLevel_;
}
void ListSensitiveColumnsRequest::setSecurityLevel(const std::string& securityLevel)
{
securityLevel_ = securityLevel;
setParameter("SecurityLevel", securityLevel);
}
int ListSensitiveColumnsRequest::getPageSize()const
{
return pageSize_;
}
void ListSensitiveColumnsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListSensitiveColumnsRequest::getTableName()const
{
return tableName_;
}
void ListSensitiveColumnsRequest::setTableName(const std::string& tableName)
{
tableName_ = tableName;
setParameter("TableName", tableName);
}
std::string ListSensitiveColumnsRequest::getColumnName()const
{
return columnName_;
}
void ListSensitiveColumnsRequest::setColumnName(const std::string& columnName)
{
columnName_ = columnName;
setParameter("ColumnName", columnName);
}
long ListSensitiveColumnsRequest::getTid()const
{
return tid_;
}
void ListSensitiveColumnsRequest::setTid(long tid)
{
tid_ = tid;
setParameter("Tid", std::to_string(tid));
}
int ListSensitiveColumnsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListSensitiveColumnsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/dms-enterprise/model/ListSensitiveColumnsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dms_enterprise;
using namespace AlibabaCloud::Dms_enterprise::Model;
ListSensitiveColumnsResult::ListSensitiveColumnsResult() :
ServiceResult()
{}
ListSensitiveColumnsResult::ListSensitiveColumnsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSensitiveColumnsResult::~ListSensitiveColumnsResult()
{}
void ListSensitiveColumnsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSensitiveColumnListNode = value["SensitiveColumnList"]["SensitiveColumn"];
for (auto valueSensitiveColumnListSensitiveColumn : allSensitiveColumnListNode)
{
SensitiveColumn sensitiveColumnListObject;
if(!valueSensitiveColumnListSensitiveColumn["SchemaName"].isNull())
sensitiveColumnListObject.schemaName = valueSensitiveColumnListSensitiveColumn["SchemaName"].asString();
if(!valueSensitiveColumnListSensitiveColumn["TableName"].isNull())
sensitiveColumnListObject.tableName = valueSensitiveColumnListSensitiveColumn["TableName"].asString();
if(!valueSensitiveColumnListSensitiveColumn["ColumnName"].isNull())
sensitiveColumnListObject.columnName = valueSensitiveColumnListSensitiveColumn["ColumnName"].asString();
if(!valueSensitiveColumnListSensitiveColumn["SecurityLevel"].isNull())
sensitiveColumnListObject.securityLevel = valueSensitiveColumnListSensitiveColumn["SecurityLevel"].asString();
if(!valueSensitiveColumnListSensitiveColumn["ColumnCount"].isNull())
sensitiveColumnListObject.columnCount = std::stol(valueSensitiveColumnListSensitiveColumn["ColumnCount"].asString());
if(!valueSensitiveColumnListSensitiveColumn["FunctionType"].isNull())
sensitiveColumnListObject.functionType = valueSensitiveColumnListSensitiveColumn["FunctionType"].asString();
sensitiveColumnList_.push_back(sensitiveColumnListObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
}
long ListSensitiveColumnsResult::getTotalCount()const
{
return totalCount_;
}
std::string ListSensitiveColumnsResult::getErrorCode()const
{
return errorCode_;
}
std::string ListSensitiveColumnsResult::getErrorMessage()const
{
return errorMessage_;
}
std::vector<ListSensitiveColumnsResult::SensitiveColumn> ListSensitiveColumnsResult::getSensitiveColumnList()const
{
return sensitiveColumnList_;
}
bool ListSensitiveColumnsResult::getSuccess()const
{
return success_;
}

View File

@@ -55,6 +55,16 @@ void ListUsersResult::parse(const std::string &payload)
userListObject.parentUid = std::stol(valueUserListUser["ParentUid"].asString());
if(!valueUserListUser["State"].isNull())
userListObject.state = valueUserListUser["State"].asString();
if(!valueUserListUser["LastLoginTime"].isNull())
userListObject.lastLoginTime = valueUserListUser["LastLoginTime"].asString();
if(!valueUserListUser["CurExecuteCount"].isNull())
userListObject.curExecuteCount = std::stol(valueUserListUser["CurExecuteCount"].asString());
if(!valueUserListUser["CurResultCount"].isNull())
userListObject.curResultCount = std::stol(valueUserListUser["CurResultCount"].asString());
if(!valueUserListUser["MaxExecuteCount"].isNull())
userListObject.maxExecuteCount = std::stol(valueUserListUser["MaxExecuteCount"].asString());
if(!valueUserListUser["MaxResultCount"].isNull())
userListObject.maxResultCount = std::stol(valueUserListUser["MaxResultCount"].asString());
auto allRoleIdList = value["RoleIdList"]["RoleIds"];
for (auto value : allRoleIdList)
userListObject.roleIdList.push_back(value.asString());

View File

@@ -53,6 +53,8 @@ void ListWorkFlowTemplatesResult::parse(const std::string &payload)
workFlowTemplatesObject.isSystem = std::stoi(valueWorkFlowTemplatesWorkFlowTemplate["IsSystem"].asString());
if(!valueWorkFlowTemplatesWorkFlowTemplate["Enabled"].isNull())
workFlowTemplatesObject.enabled = valueWorkFlowTemplatesWorkFlowTemplate["Enabled"].asString();
if(!valueWorkFlowTemplatesWorkFlowTemplate["CreateUserId"].isNull())
workFlowTemplatesObject.createUserId = std::stol(valueWorkFlowTemplatesWorkFlowTemplate["CreateUserId"].asString());
auto allWorkflowNodesNode = allWorkFlowTemplatesNode["WorkflowNodes"]["WorkflowNode"];
for (auto allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode : allWorkflowNodesNode)
{
@@ -69,6 +71,8 @@ void ListWorkFlowTemplatesResult::parse(const std::string &payload)
workflowNodesObject.comment = allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["Comment"].asString();
if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["Position"].isNull())
workflowNodesObject.position = std::stoi(allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["Position"].asString());
if(!allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["CreateUserId"].isNull())
workflowNodesObject.createUserId = std::stol(allWorkFlowTemplatesNodeWorkflowNodesWorkflowNode["CreateUserId"].asString());
workFlowTemplatesObject.workflowNodes.push_back(workflowNodesObject);
}
workFlowTemplates_.push_back(workFlowTemplatesObject);

View File

@@ -49,6 +49,28 @@ void UpdateUserRequest::setUid(long uid)
setParameter("Uid", std::to_string(uid));
}
long UpdateUserRequest::getMaxResultCount()const
{
return maxResultCount_;
}
void UpdateUserRequest::setMaxResultCount(long maxResultCount)
{
maxResultCount_ = maxResultCount;
setParameter("MaxResultCount", std::to_string(maxResultCount));
}
long UpdateUserRequest::getMaxExecuteCount()const
{
return maxExecuteCount_;
}
void UpdateUserRequest::setMaxExecuteCount(long maxExecuteCount)
{
maxExecuteCount_ = maxExecuteCount;
setParameter("MaxExecuteCount", std::to_string(maxExecuteCount));
}
std::string UpdateUserRequest::getUserNick()const
{
return userNick_;

View File

@@ -32,7 +32,9 @@ set(dypnsapi_public_header_model
include/alibabacloud/dypnsapi/model/TwiceTelVerifyRequest.h
include/alibabacloud/dypnsapi/model/TwiceTelVerifyResult.h
include/alibabacloud/dypnsapi/model/VerifyMobileRequest.h
include/alibabacloud/dypnsapi/model/VerifyMobileResult.h )
include/alibabacloud/dypnsapi/model/VerifyMobileResult.h
include/alibabacloud/dypnsapi/model/VerifyPhoneWithTokenRequest.h
include/alibabacloud/dypnsapi/model/VerifyPhoneWithTokenResult.h )
set(dypnsapi_src
src/DypnsapiClient.cc
@@ -47,7 +49,9 @@ set(dypnsapi_src
src/model/TwiceTelVerifyRequest.cc
src/model/TwiceTelVerifyResult.cc
src/model/VerifyMobileRequest.cc
src/model/VerifyMobileResult.cc )
src/model/VerifyMobileResult.cc
src/model/VerifyPhoneWithTokenRequest.cc
src/model/VerifyPhoneWithTokenResult.cc )
add_library(dypnsapi ${LIB_TYPE}
${dypnsapi_public_header}

View File

@@ -34,6 +34,8 @@
#include "model/TwiceTelVerifyResult.h"
#include "model/VerifyMobileRequest.h"
#include "model/VerifyMobileResult.h"
#include "model/VerifyPhoneWithTokenRequest.h"
#include "model/VerifyPhoneWithTokenResult.h"
namespace AlibabaCloud
@@ -61,6 +63,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::VerifyMobileResult> VerifyMobileOutcome;
typedef std::future<VerifyMobileOutcome> VerifyMobileOutcomeCallable;
typedef std::function<void(const DypnsapiClient*, const Model::VerifyMobileRequest&, const VerifyMobileOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> VerifyMobileAsyncHandler;
typedef Outcome<Error, Model::VerifyPhoneWithTokenResult> VerifyPhoneWithTokenOutcome;
typedef std::future<VerifyPhoneWithTokenOutcome> VerifyPhoneWithTokenOutcomeCallable;
typedef std::function<void(const DypnsapiClient*, const Model::VerifyPhoneWithTokenRequest&, const VerifyPhoneWithTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> VerifyPhoneWithTokenAsyncHandler;
DypnsapiClient(const Credentials &credentials, const ClientConfiguration &configuration);
DypnsapiClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -84,6 +89,9 @@ namespace AlibabaCloud
VerifyMobileOutcome verifyMobile(const Model::VerifyMobileRequest &request)const;
void verifyMobileAsync(const Model::VerifyMobileRequest& request, const VerifyMobileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
VerifyMobileOutcomeCallable verifyMobileCallable(const Model::VerifyMobileRequest& request) const;
VerifyPhoneWithTokenOutcome verifyPhoneWithToken(const Model::VerifyPhoneWithTokenRequest &request)const;
void verifyPhoneWithTokenAsync(const Model::VerifyPhoneWithTokenRequest& request, const VerifyPhoneWithTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
VerifyPhoneWithTokenOutcomeCallable verifyPhoneWithTokenCallable(const Model::VerifyPhoneWithTokenRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -43,14 +43,14 @@ namespace AlibabaCloud
explicit TwiceTelVerifyResult(const std::string &payload);
~TwiceTelVerifyResult();
std::string getMessage()const;
TwiceTelVerifyResult getTwiceTelVerifyResult()const;
Result getTwiceTelVerifyResult()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
TwiceTelVerifyResult twiceTelVerifyResult_;
Result twiceTelVerifyResult_;
std::string code_;
};

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_DYPNSAPI_MODEL_VERIFYPHONEWITHTOKENREQUEST_H_
#define ALIBABACLOUD_DYPNSAPI_MODEL_VERIFYPHONEWITHTOKENREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/dypnsapi/DypnsapiExport.h>
namespace AlibabaCloud
{
namespace Dypnsapi
{
namespace Model
{
class ALIBABACLOUD_DYPNSAPI_EXPORT VerifyPhoneWithTokenRequest : public RpcServiceRequest
{
public:
VerifyPhoneWithTokenRequest();
~VerifyPhoneWithTokenRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getPhoneNumber()const;
void setPhoneNumber(const std::string& phoneNumber);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSpToken()const;
void setSpToken(const std::string& spToken);
private:
long resourceOwnerId_;
std::string resourceOwnerAccount_;
std::string phoneNumber_;
long ownerId_;
std::string accessKeyId_;
std::string spToken_;
};
}
}
}
#endif // !ALIBABACLOUD_DYPNSAPI_MODEL_VERIFYPHONEWITHTOKENREQUEST_H_

View File

@@ -0,0 +1,60 @@
/*
* 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_DYPNSAPI_MODEL_VERIFYPHONEWITHTOKENRESULT_H_
#define ALIBABACLOUD_DYPNSAPI_MODEL_VERIFYPHONEWITHTOKENRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dypnsapi/DypnsapiExport.h>
namespace AlibabaCloud
{
namespace Dypnsapi
{
namespace Model
{
class ALIBABACLOUD_DYPNSAPI_EXPORT VerifyPhoneWithTokenResult : public ServiceResult
{
public:
struct GateVerify
{
std::string verifyResult;
std::string verifyId;
};
VerifyPhoneWithTokenResult();
explicit VerifyPhoneWithTokenResult(const std::string &payload);
~VerifyPhoneWithTokenResult();
std::string getMessage()const;
GateVerify getGateVerify()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
GateVerify gateVerify_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_DYPNSAPI_MODEL_VERIFYPHONEWITHTOKENRESULT_H_

View File

@@ -31,21 +31,21 @@ DypnsapiClient::DypnsapiClient(const Credentials &credentials, const ClientConfi
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, "dypns");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
DypnsapiClient::DypnsapiClient(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, "dypns");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
DypnsapiClient::DypnsapiClient(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, "dypns");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
DypnsapiClient::~DypnsapiClient()
@@ -267,3 +267,39 @@ DypnsapiClient::VerifyMobileOutcomeCallable DypnsapiClient::verifyMobileCallable
return task->get_future();
}
DypnsapiClient::VerifyPhoneWithTokenOutcome DypnsapiClient::verifyPhoneWithToken(const VerifyPhoneWithTokenRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return VerifyPhoneWithTokenOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return VerifyPhoneWithTokenOutcome(VerifyPhoneWithTokenResult(outcome.result()));
else
return VerifyPhoneWithTokenOutcome(outcome.error());
}
void DypnsapiClient::verifyPhoneWithTokenAsync(const VerifyPhoneWithTokenRequest& request, const VerifyPhoneWithTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, verifyPhoneWithToken(request), context);
};
asyncExecute(new Runnable(fn));
}
DypnsapiClient::VerifyPhoneWithTokenOutcomeCallable DypnsapiClient::verifyPhoneWithTokenCallable(const VerifyPhoneWithTokenRequest &request) const
{
auto task = std::make_shared<std::packaged_task<VerifyPhoneWithTokenOutcome()>>(
[this, request]()
{
return this->verifyPhoneWithToken(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/dypnsapi/model/VerifyPhoneWithTokenRequest.h>
using AlibabaCloud::Dypnsapi::Model::VerifyPhoneWithTokenRequest;
VerifyPhoneWithTokenRequest::VerifyPhoneWithTokenRequest() :
RpcServiceRequest("dypnsapi", "2017-05-25", "VerifyPhoneWithToken")
{
setMethod(HttpRequest::Method::Post);
}
VerifyPhoneWithTokenRequest::~VerifyPhoneWithTokenRequest()
{}
long VerifyPhoneWithTokenRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void VerifyPhoneWithTokenRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string VerifyPhoneWithTokenRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void VerifyPhoneWithTokenRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string VerifyPhoneWithTokenRequest::getPhoneNumber()const
{
return phoneNumber_;
}
void VerifyPhoneWithTokenRequest::setPhoneNumber(const std::string& phoneNumber)
{
phoneNumber_ = phoneNumber;
setParameter("PhoneNumber", phoneNumber);
}
long VerifyPhoneWithTokenRequest::getOwnerId()const
{
return ownerId_;
}
void VerifyPhoneWithTokenRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string VerifyPhoneWithTokenRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void VerifyPhoneWithTokenRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string VerifyPhoneWithTokenRequest::getSpToken()const
{
return spToken_;
}
void VerifyPhoneWithTokenRequest::setSpToken(const std::string& spToken)
{
spToken_ = spToken;
setParameter("SpToken", spToken);
}

View File

@@ -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.
*/
#include <alibabacloud/dypnsapi/model/VerifyPhoneWithTokenResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dypnsapi;
using namespace AlibabaCloud::Dypnsapi::Model;
VerifyPhoneWithTokenResult::VerifyPhoneWithTokenResult() :
ServiceResult()
{}
VerifyPhoneWithTokenResult::VerifyPhoneWithTokenResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
VerifyPhoneWithTokenResult::~VerifyPhoneWithTokenResult()
{}
void VerifyPhoneWithTokenResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto gateVerifyNode = value["GateVerify"];
if(!gateVerifyNode["VerifyId"].isNull())
gateVerify_.verifyId = gateVerifyNode["VerifyId"].asString();
if(!gateVerifyNode["VerifyResult"].isNull())
gateVerify_.verifyResult = gateVerifyNode["VerifyResult"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string VerifyPhoneWithTokenResult::getMessage()const
{
return message_;
}
VerifyPhoneWithTokenResult::GateVerify VerifyPhoneWithTokenResult::getGateVerify()const
{
return gateVerify_;
}
std::string VerifyPhoneWithTokenResult::getCode()const
{
return code_;
}

View File

@@ -107,6 +107,8 @@ set(imm_public_header_model
include/alibabacloud/imm/model/GetMediaMetaResult.h
include/alibabacloud/imm/model/GetOfficeConversionTaskRequest.h
include/alibabacloud/imm/model/GetOfficeConversionTaskResult.h
include/alibabacloud/imm/model/GetOfficeEditURLRequest.h
include/alibabacloud/imm/model/GetOfficeEditURLResult.h
include/alibabacloud/imm/model/GetOfficePreviewURLRequest.h
include/alibabacloud/imm/model/GetOfficePreviewURLResult.h
include/alibabacloud/imm/model/GetProjectRequest.h
@@ -147,6 +149,8 @@ set(imm_public_header_model
include/alibabacloud/imm/model/ListVideosResult.h
include/alibabacloud/imm/model/PutProjectRequest.h
include/alibabacloud/imm/model/PutProjectResult.h
include/alibabacloud/imm/model/RefreshOfficeEditTokenRequest.h
include/alibabacloud/imm/model/RefreshOfficeEditTokenResult.h
include/alibabacloud/imm/model/RefreshOfficePreviewTokenRequest.h
include/alibabacloud/imm/model/RefreshOfficePreviewTokenResult.h
include/alibabacloud/imm/model/SearchDocIndexRequest.h
@@ -250,6 +254,8 @@ set(imm_src
src/model/GetMediaMetaResult.cc
src/model/GetOfficeConversionTaskRequest.cc
src/model/GetOfficeConversionTaskResult.cc
src/model/GetOfficeEditURLRequest.cc
src/model/GetOfficeEditURLResult.cc
src/model/GetOfficePreviewURLRequest.cc
src/model/GetOfficePreviewURLResult.cc
src/model/GetProjectRequest.cc
@@ -290,6 +296,8 @@ set(imm_src
src/model/ListVideosResult.cc
src/model/PutProjectRequest.cc
src/model/PutProjectResult.cc
src/model/RefreshOfficeEditTokenRequest.cc
src/model/RefreshOfficeEditTokenResult.cc
src/model/RefreshOfficePreviewTokenRequest.cc
src/model/RefreshOfficePreviewTokenResult.cc
src/model/SearchDocIndexRequest.cc

View File

@@ -108,6 +108,8 @@
#include "model/GetMediaMetaResult.h"
#include "model/GetOfficeConversionTaskRequest.h"
#include "model/GetOfficeConversionTaskResult.h"
#include "model/GetOfficeEditURLRequest.h"
#include "model/GetOfficeEditURLResult.h"
#include "model/GetOfficePreviewURLRequest.h"
#include "model/GetOfficePreviewURLResult.h"
#include "model/GetProjectRequest.h"
@@ -148,6 +150,8 @@
#include "model/ListVideosResult.h"
#include "model/PutProjectRequest.h"
#include "model/PutProjectResult.h"
#include "model/RefreshOfficeEditTokenRequest.h"
#include "model/RefreshOfficeEditTokenResult.h"
#include "model/RefreshOfficePreviewTokenRequest.h"
#include "model/RefreshOfficePreviewTokenResult.h"
#include "model/SearchDocIndexRequest.h"
@@ -300,6 +304,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetOfficeConversionTaskResult> GetOfficeConversionTaskOutcome;
typedef std::future<GetOfficeConversionTaskOutcome> GetOfficeConversionTaskOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::GetOfficeConversionTaskRequest&, const GetOfficeConversionTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOfficeConversionTaskAsyncHandler;
typedef Outcome<Error, Model::GetOfficeEditURLResult> GetOfficeEditURLOutcome;
typedef std::future<GetOfficeEditURLOutcome> GetOfficeEditURLOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::GetOfficeEditURLRequest&, const GetOfficeEditURLOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOfficeEditURLAsyncHandler;
typedef Outcome<Error, Model::GetOfficePreviewURLResult> GetOfficePreviewURLOutcome;
typedef std::future<GetOfficePreviewURLOutcome> GetOfficePreviewURLOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::GetOfficePreviewURLRequest&, const GetOfficePreviewURLOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOfficePreviewURLAsyncHandler;
@@ -360,6 +367,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::PutProjectResult> PutProjectOutcome;
typedef std::future<PutProjectOutcome> PutProjectOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::PutProjectRequest&, const PutProjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PutProjectAsyncHandler;
typedef Outcome<Error, Model::RefreshOfficeEditTokenResult> RefreshOfficeEditTokenOutcome;
typedef std::future<RefreshOfficeEditTokenOutcome> RefreshOfficeEditTokenOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::RefreshOfficeEditTokenRequest&, const RefreshOfficeEditTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RefreshOfficeEditTokenAsyncHandler;
typedef Outcome<Error, Model::RefreshOfficePreviewTokenResult> RefreshOfficePreviewTokenOutcome;
typedef std::future<RefreshOfficePreviewTokenOutcome> RefreshOfficePreviewTokenOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::RefreshOfficePreviewTokenRequest&, const RefreshOfficePreviewTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RefreshOfficePreviewTokenAsyncHandler;
@@ -515,6 +525,9 @@ namespace AlibabaCloud
GetOfficeConversionTaskOutcome getOfficeConversionTask(const Model::GetOfficeConversionTaskRequest &request)const;
void getOfficeConversionTaskAsync(const Model::GetOfficeConversionTaskRequest& request, const GetOfficeConversionTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetOfficeConversionTaskOutcomeCallable getOfficeConversionTaskCallable(const Model::GetOfficeConversionTaskRequest& request) const;
GetOfficeEditURLOutcome getOfficeEditURL(const Model::GetOfficeEditURLRequest &request)const;
void getOfficeEditURLAsync(const Model::GetOfficeEditURLRequest& request, const GetOfficeEditURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetOfficeEditURLOutcomeCallable getOfficeEditURLCallable(const Model::GetOfficeEditURLRequest& request) const;
GetOfficePreviewURLOutcome getOfficePreviewURL(const Model::GetOfficePreviewURLRequest &request)const;
void getOfficePreviewURLAsync(const Model::GetOfficePreviewURLRequest& request, const GetOfficePreviewURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetOfficePreviewURLOutcomeCallable getOfficePreviewURLCallable(const Model::GetOfficePreviewURLRequest& request) const;
@@ -575,6 +588,9 @@ namespace AlibabaCloud
PutProjectOutcome putProject(const Model::PutProjectRequest &request)const;
void putProjectAsync(const Model::PutProjectRequest& request, const PutProjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PutProjectOutcomeCallable putProjectCallable(const Model::PutProjectRequest& request) const;
RefreshOfficeEditTokenOutcome refreshOfficeEditToken(const Model::RefreshOfficeEditTokenRequest &request)const;
void refreshOfficeEditTokenAsync(const Model::RefreshOfficeEditTokenRequest& request, const RefreshOfficeEditTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RefreshOfficeEditTokenOutcomeCallable refreshOfficeEditTokenCallable(const Model::RefreshOfficeEditTokenRequest& request) const;
RefreshOfficePreviewTokenOutcome refreshOfficePreviewToken(const Model::RefreshOfficePreviewTokenRequest &request)const;
void refreshOfficePreviewTokenAsync(const Model::RefreshOfficePreviewTokenRequest& request, const RefreshOfficePreviewTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RefreshOfficePreviewTokenOutcomeCallable refreshOfficePreviewTokenCallable(const Model::RefreshOfficePreviewTokenRequest& request) const;

View File

@@ -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_IMM_MODEL_GETOFFICEEDITURLREQUEST_H_
#define ALIBABACLOUD_IMM_MODEL_GETOFFICEEDITURLREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT GetOfficeEditURLRequest : public RpcServiceRequest
{
public:
GetOfficeEditURLRequest();
~GetOfficeEditURLRequest();
std::string getSrcType()const;
void setSrcType(const std::string& srcType);
std::string getProject()const;
void setProject(const std::string& project);
std::string getUserID()const;
void setUserID(const std::string& userID);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getNotifyEndpoint()const;
void setNotifyEndpoint(const std::string& notifyEndpoint);
std::string getFileID()const;
void setFileID(const std::string& fileID);
std::string getNotifyTopicName()const;
void setNotifyTopicName(const std::string& notifyTopicName);
std::string getFileName()const;
void setFileName(const std::string& fileName);
std::string getSrcUri()const;
void setSrcUri(const std::string& srcUri);
std::string getTgtUri()const;
void setTgtUri(const std::string& tgtUri);
std::string getUserName()const;
void setUserName(const std::string& userName);
private:
std::string srcType_;
std::string project_;
std::string userID_;
std::string accessKeyId_;
std::string notifyEndpoint_;
std::string fileID_;
std::string notifyTopicName_;
std::string fileName_;
std::string srcUri_;
std::string tgtUri_;
std::string userName_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_GETOFFICEEDITURLREQUEST_H_

View File

@@ -0,0 +1,59 @@
/*
* 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_IMM_MODEL_GETOFFICEEDITURLRESULT_H_
#define ALIBABACLOUD_IMM_MODEL_GETOFFICEEDITURLRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT GetOfficeEditURLResult : public ServiceResult
{
public:
GetOfficeEditURLResult();
explicit GetOfficeEditURLResult(const std::string &payload);
~GetOfficeEditURLResult();
std::string getRefreshToken()const;
std::string getEditURL()const;
std::string getAccessToken()const;
std::string getRefreshTokenExpiredTime()const;
std::string getAccessTokenExpiredTime()const;
protected:
void parse(const std::string &payload);
private:
std::string refreshToken_;
std::string editURL_;
std::string accessToken_;
std::string refreshTokenExpiredTime_;
std::string accessTokenExpiredTime_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_GETOFFICEEDITURLRESULT_H_

View File

@@ -41,8 +41,8 @@ namespace AlibabaCloud
void setProject(const std::string& project);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
bool getUseHTTPS()const;
void setUseHTTPS(bool useHTTPS);
bool getUseOldURL()const;
void setUseOldURL(bool useOldURL);
std::string getSrcUri()const;
void setSrcUri(const std::string& srcUri);
@@ -50,7 +50,7 @@ namespace AlibabaCloud
std::string srcType_;
std::string project_;
std::string accessKeyId_;
bool useHTTPS_;
bool useOldURL_;
std::string srcUri_;
};

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEEDITTOKENREQUEST_H_
#define ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEEDITTOKENREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT RefreshOfficeEditTokenRequest : public RpcServiceRequest
{
public:
RefreshOfficeEditTokenRequest();
~RefreshOfficeEditTokenRequest();
std::string getProject()const;
void setProject(const std::string& project);
std::string getAccessToken()const;
void setAccessToken(const std::string& accessToken);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getRefreshToken()const;
void setRefreshToken(const std::string& refreshToken);
private:
std::string project_;
std::string accessToken_;
std::string accessKeyId_;
std::string refreshToken_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEEDITTOKENREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEEDITTOKENRESULT_H_
#define ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEEDITTOKENRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT RefreshOfficeEditTokenResult : public ServiceResult
{
public:
RefreshOfficeEditTokenResult();
explicit RefreshOfficeEditTokenResult(const std::string &payload);
~RefreshOfficeEditTokenResult();
std::string getRefreshToken()const;
std::string getAccessToken()const;
std::string getRefreshTokenExpiredTime()const;
std::string getAccessTokenExpiredTime()const;
protected:
void parse(const std::string &payload);
private:
std::string refreshToken_;
std::string accessToken_;
std::string refreshTokenExpiredTime_;
std::string accessTokenExpiredTime_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEEDITTOKENRESULT_H_

View File

@@ -1599,6 +1599,42 @@ ImmClient::GetOfficeConversionTaskOutcomeCallable ImmClient::getOfficeConversion
return task->get_future();
}
ImmClient::GetOfficeEditURLOutcome ImmClient::getOfficeEditURL(const GetOfficeEditURLRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetOfficeEditURLOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetOfficeEditURLOutcome(GetOfficeEditURLResult(outcome.result()));
else
return GetOfficeEditURLOutcome(outcome.error());
}
void ImmClient::getOfficeEditURLAsync(const GetOfficeEditURLRequest& request, const GetOfficeEditURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getOfficeEditURL(request), context);
};
asyncExecute(new Runnable(fn));
}
ImmClient::GetOfficeEditURLOutcomeCallable ImmClient::getOfficeEditURLCallable(const GetOfficeEditURLRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetOfficeEditURLOutcome()>>(
[this, request]()
{
return this->getOfficeEditURL(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImmClient::GetOfficePreviewURLOutcome ImmClient::getOfficePreviewURL(const GetOfficePreviewURLRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2319,6 +2355,42 @@ ImmClient::PutProjectOutcomeCallable ImmClient::putProjectCallable(const PutProj
return task->get_future();
}
ImmClient::RefreshOfficeEditTokenOutcome ImmClient::refreshOfficeEditToken(const RefreshOfficeEditTokenRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RefreshOfficeEditTokenOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RefreshOfficeEditTokenOutcome(RefreshOfficeEditTokenResult(outcome.result()));
else
return RefreshOfficeEditTokenOutcome(outcome.error());
}
void ImmClient::refreshOfficeEditTokenAsync(const RefreshOfficeEditTokenRequest& request, const RefreshOfficeEditTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, refreshOfficeEditToken(request), context);
};
asyncExecute(new Runnable(fn));
}
ImmClient::RefreshOfficeEditTokenOutcomeCallable ImmClient::refreshOfficeEditTokenCallable(const RefreshOfficeEditTokenRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RefreshOfficeEditTokenOutcome()>>(
[this, request]()
{
return this->refreshOfficeEditToken(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImmClient::RefreshOfficePreviewTokenOutcome ImmClient::refreshOfficePreviewToken(const RefreshOfficePreviewTokenRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,150 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imm/model/GetOfficeEditURLRequest.h>
using AlibabaCloud::Imm::Model::GetOfficeEditURLRequest;
GetOfficeEditURLRequest::GetOfficeEditURLRequest() :
RpcServiceRequest("imm", "2017-09-06", "GetOfficeEditURL")
{
setMethod(HttpRequest::Method::Post);
}
GetOfficeEditURLRequest::~GetOfficeEditURLRequest()
{}
std::string GetOfficeEditURLRequest::getSrcType()const
{
return srcType_;
}
void GetOfficeEditURLRequest::setSrcType(const std::string& srcType)
{
srcType_ = srcType;
setParameter("SrcType", srcType);
}
std::string GetOfficeEditURLRequest::getProject()const
{
return project_;
}
void GetOfficeEditURLRequest::setProject(const std::string& project)
{
project_ = project;
setParameter("Project", project);
}
std::string GetOfficeEditURLRequest::getUserID()const
{
return userID_;
}
void GetOfficeEditURLRequest::setUserID(const std::string& userID)
{
userID_ = userID;
setParameter("UserID", userID);
}
std::string GetOfficeEditURLRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetOfficeEditURLRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetOfficeEditURLRequest::getNotifyEndpoint()const
{
return notifyEndpoint_;
}
void GetOfficeEditURLRequest::setNotifyEndpoint(const std::string& notifyEndpoint)
{
notifyEndpoint_ = notifyEndpoint;
setParameter("NotifyEndpoint", notifyEndpoint);
}
std::string GetOfficeEditURLRequest::getFileID()const
{
return fileID_;
}
void GetOfficeEditURLRequest::setFileID(const std::string& fileID)
{
fileID_ = fileID;
setParameter("FileID", fileID);
}
std::string GetOfficeEditURLRequest::getNotifyTopicName()const
{
return notifyTopicName_;
}
void GetOfficeEditURLRequest::setNotifyTopicName(const std::string& notifyTopicName)
{
notifyTopicName_ = notifyTopicName;
setParameter("NotifyTopicName", notifyTopicName);
}
std::string GetOfficeEditURLRequest::getFileName()const
{
return fileName_;
}
void GetOfficeEditURLRequest::setFileName(const std::string& fileName)
{
fileName_ = fileName;
setParameter("FileName", fileName);
}
std::string GetOfficeEditURLRequest::getSrcUri()const
{
return srcUri_;
}
void GetOfficeEditURLRequest::setSrcUri(const std::string& srcUri)
{
srcUri_ = srcUri;
setParameter("SrcUri", srcUri);
}
std::string GetOfficeEditURLRequest::getTgtUri()const
{
return tgtUri_;
}
void GetOfficeEditURLRequest::setTgtUri(const std::string& tgtUri)
{
tgtUri_ = tgtUri;
setParameter("TgtUri", tgtUri);
}
std::string GetOfficeEditURLRequest::getUserName()const
{
return userName_;
}
void GetOfficeEditURLRequest::setUserName(const std::string& userName)
{
userName_ = userName;
setParameter("UserName", userName);
}

View File

@@ -0,0 +1,79 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imm/model/GetOfficeEditURLResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imm;
using namespace AlibabaCloud::Imm::Model;
GetOfficeEditURLResult::GetOfficeEditURLResult() :
ServiceResult()
{}
GetOfficeEditURLResult::GetOfficeEditURLResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetOfficeEditURLResult::~GetOfficeEditURLResult()
{}
void GetOfficeEditURLResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["EditURL"].isNull())
editURL_ = value["EditURL"].asString();
if(!value["AccessToken"].isNull())
accessToken_ = value["AccessToken"].asString();
if(!value["RefreshToken"].isNull())
refreshToken_ = value["RefreshToken"].asString();
if(!value["AccessTokenExpiredTime"].isNull())
accessTokenExpiredTime_ = value["AccessTokenExpiredTime"].asString();
if(!value["RefreshTokenExpiredTime"].isNull())
refreshTokenExpiredTime_ = value["RefreshTokenExpiredTime"].asString();
}
std::string GetOfficeEditURLResult::getRefreshToken()const
{
return refreshToken_;
}
std::string GetOfficeEditURLResult::getEditURL()const
{
return editURL_;
}
std::string GetOfficeEditURLResult::getAccessToken()const
{
return accessToken_;
}
std::string GetOfficeEditURLResult::getRefreshTokenExpiredTime()const
{
return refreshTokenExpiredTime_;
}
std::string GetOfficeEditURLResult::getAccessTokenExpiredTime()const
{
return accessTokenExpiredTime_;
}

View File

@@ -60,15 +60,15 @@ void GetOfficePreviewURLRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
bool GetOfficePreviewURLRequest::getUseHTTPS()const
bool GetOfficePreviewURLRequest::getUseOldURL()const
{
return useHTTPS_;
return useOldURL_;
}
void GetOfficePreviewURLRequest::setUseHTTPS(bool useHTTPS)
void GetOfficePreviewURLRequest::setUseOldURL(bool useOldURL)
{
useHTTPS_ = useHTTPS;
setParameter("UseHTTPS", useHTTPS ? "true" : "false");
useOldURL_ = useOldURL;
setParameter("UseOldURL", useOldURL ? "true" : "false");
}
std::string GetOfficePreviewURLRequest::getSrcUri()const

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imm/model/RefreshOfficeEditTokenRequest.h>
using AlibabaCloud::Imm::Model::RefreshOfficeEditTokenRequest;
RefreshOfficeEditTokenRequest::RefreshOfficeEditTokenRequest() :
RpcServiceRequest("imm", "2017-09-06", "RefreshOfficeEditToken")
{
setMethod(HttpRequest::Method::Post);
}
RefreshOfficeEditTokenRequest::~RefreshOfficeEditTokenRequest()
{}
std::string RefreshOfficeEditTokenRequest::getProject()const
{
return project_;
}
void RefreshOfficeEditTokenRequest::setProject(const std::string& project)
{
project_ = project;
setParameter("Project", project);
}
std::string RefreshOfficeEditTokenRequest::getAccessToken()const
{
return accessToken_;
}
void RefreshOfficeEditTokenRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
std::string RefreshOfficeEditTokenRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void RefreshOfficeEditTokenRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string RefreshOfficeEditTokenRequest::getRefreshToken()const
{
return refreshToken_;
}
void RefreshOfficeEditTokenRequest::setRefreshToken(const std::string& refreshToken)
{
refreshToken_ = refreshToken;
setParameter("RefreshToken", refreshToken);
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imm/model/RefreshOfficeEditTokenResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imm;
using namespace AlibabaCloud::Imm::Model;
RefreshOfficeEditTokenResult::RefreshOfficeEditTokenResult() :
ServiceResult()
{}
RefreshOfficeEditTokenResult::RefreshOfficeEditTokenResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RefreshOfficeEditTokenResult::~RefreshOfficeEditTokenResult()
{}
void RefreshOfficeEditTokenResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["AccessToken"].isNull())
accessToken_ = value["AccessToken"].asString();
if(!value["AccessTokenExpiredTime"].isNull())
accessTokenExpiredTime_ = value["AccessTokenExpiredTime"].asString();
if(!value["RefreshToken"].isNull())
refreshToken_ = value["RefreshToken"].asString();
if(!value["RefreshTokenExpiredTime"].isNull())
refreshTokenExpiredTime_ = value["RefreshTokenExpiredTime"].asString();
}
std::string RefreshOfficeEditTokenResult::getRefreshToken()const
{
return refreshToken_;
}
std::string RefreshOfficeEditTokenResult::getAccessToken()const
{
return accessToken_;
}
std::string RefreshOfficeEditTokenResult::getRefreshTokenExpiredTime()const
{
return refreshTokenExpiredTime_;
}
std::string RefreshOfficeEditTokenResult::getAccessTokenExpiredTime()const
{
return accessTokenExpiredTime_;
}

View File

@@ -23,10 +23,16 @@ set(ivpd_public_header
set(ivpd_public_header_model
include/alibabacloud/ivpd/model/ChangeImageSizeRequest.h
include/alibabacloud/ivpd/model/ChangeImageSizeResult.h
include/alibabacloud/ivpd/model/CreateSegmentBodyJobRequest.h
include/alibabacloud/ivpd/model/CreateSegmentBodyJobResult.h
include/alibabacloud/ivpd/model/DetectImageElementsRequest.h
include/alibabacloud/ivpd/model/DetectImageElementsResult.h
include/alibabacloud/ivpd/model/ExtendImageStyleRequest.h
include/alibabacloud/ivpd/model/ExtendImageStyleResult.h
include/alibabacloud/ivpd/model/GetJobResultRequest.h
include/alibabacloud/ivpd/model/GetJobResultResult.h
include/alibabacloud/ivpd/model/GetJobStatusRequest.h
include/alibabacloud/ivpd/model/GetJobStatusResult.h
include/alibabacloud/ivpd/model/MakeSuperResolutionImageRequest.h
include/alibabacloud/ivpd/model/MakeSuperResolutionImageResult.h
include/alibabacloud/ivpd/model/RecognizeImageColorRequest.h
@@ -44,10 +50,16 @@ set(ivpd_src
src/IvpdClient.cc
src/model/ChangeImageSizeRequest.cc
src/model/ChangeImageSizeResult.cc
src/model/CreateSegmentBodyJobRequest.cc
src/model/CreateSegmentBodyJobResult.cc
src/model/DetectImageElementsRequest.cc
src/model/DetectImageElementsResult.cc
src/model/ExtendImageStyleRequest.cc
src/model/ExtendImageStyleResult.cc
src/model/GetJobResultRequest.cc
src/model/GetJobResultResult.cc
src/model/GetJobStatusRequest.cc
src/model/GetJobStatusResult.cc
src/model/MakeSuperResolutionImageRequest.cc
src/model/MakeSuperResolutionImageResult.cc
src/model/RecognizeImageColorRequest.cc

View File

@@ -24,10 +24,16 @@
#include "IvpdExport.h"
#include "model/ChangeImageSizeRequest.h"
#include "model/ChangeImageSizeResult.h"
#include "model/CreateSegmentBodyJobRequest.h"
#include "model/CreateSegmentBodyJobResult.h"
#include "model/DetectImageElementsRequest.h"
#include "model/DetectImageElementsResult.h"
#include "model/ExtendImageStyleRequest.h"
#include "model/ExtendImageStyleResult.h"
#include "model/GetJobResultRequest.h"
#include "model/GetJobResultResult.h"
#include "model/GetJobStatusRequest.h"
#include "model/GetJobStatusResult.h"
#include "model/MakeSuperResolutionImageRequest.h"
#include "model/MakeSuperResolutionImageResult.h"
#include "model/RecognizeImageColorRequest.h"
@@ -52,12 +58,21 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ChangeImageSizeResult> ChangeImageSizeOutcome;
typedef std::future<ChangeImageSizeOutcome> ChangeImageSizeOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::ChangeImageSizeRequest&, const ChangeImageSizeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ChangeImageSizeAsyncHandler;
typedef Outcome<Error, Model::CreateSegmentBodyJobResult> CreateSegmentBodyJobOutcome;
typedef std::future<CreateSegmentBodyJobOutcome> CreateSegmentBodyJobOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::CreateSegmentBodyJobRequest&, const CreateSegmentBodyJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateSegmentBodyJobAsyncHandler;
typedef Outcome<Error, Model::DetectImageElementsResult> DetectImageElementsOutcome;
typedef std::future<DetectImageElementsOutcome> DetectImageElementsOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::DetectImageElementsRequest&, const DetectImageElementsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectImageElementsAsyncHandler;
typedef Outcome<Error, Model::ExtendImageStyleResult> ExtendImageStyleOutcome;
typedef std::future<ExtendImageStyleOutcome> ExtendImageStyleOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::ExtendImageStyleRequest&, const ExtendImageStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtendImageStyleAsyncHandler;
typedef Outcome<Error, Model::GetJobResultResult> GetJobResultOutcome;
typedef std::future<GetJobResultOutcome> GetJobResultOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::GetJobResultRequest&, const GetJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetJobResultAsyncHandler;
typedef Outcome<Error, Model::GetJobStatusResult> GetJobStatusOutcome;
typedef std::future<GetJobStatusOutcome> GetJobStatusOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::GetJobStatusRequest&, const GetJobStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetJobStatusAsyncHandler;
typedef Outcome<Error, Model::MakeSuperResolutionImageResult> MakeSuperResolutionImageOutcome;
typedef std::future<MakeSuperResolutionImageOutcome> MakeSuperResolutionImageOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::MakeSuperResolutionImageRequest&, const MakeSuperResolutionImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MakeSuperResolutionImageAsyncHandler;
@@ -84,12 +99,21 @@ namespace AlibabaCloud
ChangeImageSizeOutcome changeImageSize(const Model::ChangeImageSizeRequest &request)const;
void changeImageSizeAsync(const Model::ChangeImageSizeRequest& request, const ChangeImageSizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ChangeImageSizeOutcomeCallable changeImageSizeCallable(const Model::ChangeImageSizeRequest& request) const;
CreateSegmentBodyJobOutcome createSegmentBodyJob(const Model::CreateSegmentBodyJobRequest &request)const;
void createSegmentBodyJobAsync(const Model::CreateSegmentBodyJobRequest& request, const CreateSegmentBodyJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateSegmentBodyJobOutcomeCallable createSegmentBodyJobCallable(const Model::CreateSegmentBodyJobRequest& request) const;
DetectImageElementsOutcome detectImageElements(const Model::DetectImageElementsRequest &request)const;
void detectImageElementsAsync(const Model::DetectImageElementsRequest& request, const DetectImageElementsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectImageElementsOutcomeCallable detectImageElementsCallable(const Model::DetectImageElementsRequest& request) const;
ExtendImageStyleOutcome extendImageStyle(const Model::ExtendImageStyleRequest &request)const;
void extendImageStyleAsync(const Model::ExtendImageStyleRequest& request, const ExtendImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ExtendImageStyleOutcomeCallable extendImageStyleCallable(const Model::ExtendImageStyleRequest& request) const;
GetJobResultOutcome getJobResult(const Model::GetJobResultRequest &request)const;
void getJobResultAsync(const Model::GetJobResultRequest& request, const GetJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetJobResultOutcomeCallable getJobResultCallable(const Model::GetJobResultRequest& request) const;
GetJobStatusOutcome getJobStatus(const Model::GetJobStatusRequest &request)const;
void getJobStatusAsync(const Model::GetJobStatusRequest& request, const GetJobStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetJobStatusOutcomeCallable getJobStatusCallable(const Model::GetJobStatusRequest& request) const;
MakeSuperResolutionImageOutcome makeSuperResolutionImage(const Model::MakeSuperResolutionImageRequest &request)const;
void makeSuperResolutionImageAsync(const Model::MakeSuperResolutionImageRequest& request, const MakeSuperResolutionImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MakeSuperResolutionImageOutcomeCallable makeSuperResolutionImageCallable(const Model::MakeSuperResolutionImageRequest& request) const;

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IVPD_MODEL_CREATESEGMENTBODYJOBREQUEST_H_
#define ALIBABACLOUD_IVPD_MODEL_CREATESEGMENTBODYJOBREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT CreateSegmentBodyJobRequest : public RpcServiceRequest
{
public:
struct DataList
{
std::string dataId;
std::string imageUrl;
};
public:
CreateSegmentBodyJobRequest();
~CreateSegmentBodyJobRequest();
std::vector<DataList> getDataList()const;
void setDataList(const std::vector<DataList>& dataList);
bool getAsync()const;
void setAsync(bool async);
std::string getJobId()const;
void setJobId(const std::string& jobId);
int getTimeToLive()const;
void setTimeToLive(int timeToLive);
private:
std::vector<DataList> dataList_;
bool async_;
std::string jobId_;
int timeToLive_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_CREATESEGMENTBODYJOBREQUEST_H_

View File

@@ -0,0 +1,77 @@
/*
* 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_IVPD_MODEL_CREATESEGMENTBODYJOBRESULT_H_
#define ALIBABACLOUD_IVPD_MODEL_CREATESEGMENTBODYJOBRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT CreateSegmentBodyJobResult : public ServiceResult
{
public:
struct Data
{
struct Result
{
struct ResultData
{
std::string imageUrl;
};
ResultData resultData;
std::string dataId;
std::string message;
std::string code;
bool success;
};
std::string status;
int batchSize;
int progress;
std::vector<Result> resultList;
long totalUsedTime;
bool completed;
std::string jobId;
};
CreateSegmentBodyJobResult();
explicit CreateSegmentBodyJobResult(const std::string &payload);
~CreateSegmentBodyJobResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_CREATESEGMENTBODYJOBRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* 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_IVPD_MODEL_GETJOBRESULTREQUEST_H_
#define ALIBABACLOUD_IVPD_MODEL_GETJOBRESULTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT GetJobResultRequest : public RpcServiceRequest
{
public:
GetJobResultRequest();
~GetJobResultRequest();
std::string getJobId()const;
void setJobId(const std::string& jobId);
private:
std::string jobId_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_GETJOBRESULTREQUEST_H_

View File

@@ -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_IVPD_MODEL_GETJOBRESULTRESULT_H_
#define ALIBABACLOUD_IVPD_MODEL_GETJOBRESULTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT GetJobResultResult : public ServiceResult
{
public:
struct Data
{
std::string status;
std::string batchSize;
float progress;
std::vector<std::string> resultList;
std::string message;
long totalUsedTime;
bool completed;
bool finish;
};
GetJobResultResult();
explicit GetJobResultResult(const std::string &payload);
~GetJobResultResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_GETJOBRESULTRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* 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_IVPD_MODEL_GETJOBSTATUSREQUEST_H_
#define ALIBABACLOUD_IVPD_MODEL_GETJOBSTATUSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT GetJobStatusRequest : public RpcServiceRequest
{
public:
GetJobStatusRequest();
~GetJobStatusRequest();
std::string getJobId()const;
void setJobId(const std::string& jobId);
private:
std::string jobId_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_GETJOBSTATUSREQUEST_H_

View File

@@ -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_IVPD_MODEL_GETJOBSTATUSRESULT_H_
#define ALIBABACLOUD_IVPD_MODEL_GETJOBSTATUSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT GetJobStatusResult : public ServiceResult
{
public:
struct Data
{
std::string status;
std::string batchSize;
float progress;
int timeToLive;
std::string message;
long totalUsedTime;
bool completed;
bool finish;
};
GetJobStatusResult();
explicit GetJobStatusResult(const std::string &payload);
~GetJobStatusResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_GETJOBSTATUSRESULT_H_

View File

@@ -31,21 +31,21 @@ IvpdClient::IvpdClient(const Credentials &credentials, const ClientConfiguration
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, "ivpd");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IvpdClient::IvpdClient(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, "ivpd");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IvpdClient::IvpdClient(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, "ivpd");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IvpdClient::~IvpdClient()
@@ -87,6 +87,42 @@ IvpdClient::ChangeImageSizeOutcomeCallable IvpdClient::changeImageSizeCallable(c
return task->get_future();
}
IvpdClient::CreateSegmentBodyJobOutcome IvpdClient::createSegmentBodyJob(const CreateSegmentBodyJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateSegmentBodyJobOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateSegmentBodyJobOutcome(CreateSegmentBodyJobResult(outcome.result()));
else
return CreateSegmentBodyJobOutcome(outcome.error());
}
void IvpdClient::createSegmentBodyJobAsync(const CreateSegmentBodyJobRequest& request, const CreateSegmentBodyJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createSegmentBodyJob(request), context);
};
asyncExecute(new Runnable(fn));
}
IvpdClient::CreateSegmentBodyJobOutcomeCallable IvpdClient::createSegmentBodyJobCallable(const CreateSegmentBodyJobRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateSegmentBodyJobOutcome()>>(
[this, request]()
{
return this->createSegmentBodyJob(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IvpdClient::DetectImageElementsOutcome IvpdClient::detectImageElements(const DetectImageElementsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -159,6 +195,78 @@ IvpdClient::ExtendImageStyleOutcomeCallable IvpdClient::extendImageStyleCallable
return task->get_future();
}
IvpdClient::GetJobResultOutcome IvpdClient::getJobResult(const GetJobResultRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetJobResultOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetJobResultOutcome(GetJobResultResult(outcome.result()));
else
return GetJobResultOutcome(outcome.error());
}
void IvpdClient::getJobResultAsync(const GetJobResultRequest& request, const GetJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getJobResult(request), context);
};
asyncExecute(new Runnable(fn));
}
IvpdClient::GetJobResultOutcomeCallable IvpdClient::getJobResultCallable(const GetJobResultRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetJobResultOutcome()>>(
[this, request]()
{
return this->getJobResult(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IvpdClient::GetJobStatusOutcome IvpdClient::getJobStatus(const GetJobStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetJobStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetJobStatusOutcome(GetJobStatusResult(outcome.result()));
else
return GetJobStatusOutcome(outcome.error());
}
void IvpdClient::getJobStatusAsync(const GetJobStatusRequest& request, const GetJobStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getJobStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
IvpdClient::GetJobStatusOutcomeCallable IvpdClient::getJobStatusCallable(const GetJobStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetJobStatusOutcome()>>(
[this, request]()
{
return this->getJobStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IvpdClient::MakeSuperResolutionImageOutcome IvpdClient::makeSuperResolutionImage(const MakeSuperResolutionImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -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.
*/
#include <alibabacloud/ivpd/model/CreateSegmentBodyJobRequest.h>
using AlibabaCloud::Ivpd::Model::CreateSegmentBodyJobRequest;
CreateSegmentBodyJobRequest::CreateSegmentBodyJobRequest() :
RpcServiceRequest("ivpd", "2019-06-25", "CreateSegmentBodyJob")
{
setMethod(HttpRequest::Method::Post);
}
CreateSegmentBodyJobRequest::~CreateSegmentBodyJobRequest()
{}
std::vector<CreateSegmentBodyJobRequest::DataList> CreateSegmentBodyJobRequest::getDataList()const
{
return dataList_;
}
void CreateSegmentBodyJobRequest::setDataList(const std::vector<DataList>& dataList)
{
dataList_ = dataList;
for(int dep1 = 0; dep1!= dataList.size(); dep1++) {
auto dataListObj = dataList.at(dep1);
std::string dataListObjStr = "DataList." + std::to_string(dep1 + 1);
setParameter(dataListObjStr + ".DataId", dataListObj.dataId);
setParameter(dataListObjStr + ".ImageUrl", dataListObj.imageUrl);
}
}
bool CreateSegmentBodyJobRequest::getAsync()const
{
return async_;
}
void CreateSegmentBodyJobRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string CreateSegmentBodyJobRequest::getJobId()const
{
return jobId_;
}
void CreateSegmentBodyJobRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setBodyParameter("JobId", jobId);
}
int CreateSegmentBodyJobRequest::getTimeToLive()const
{
return timeToLive_;
}
void CreateSegmentBodyJobRequest::setTimeToLive(int timeToLive)
{
timeToLive_ = timeToLive;
setBodyParameter("TimeToLive", std::to_string(timeToLive));
}

View File

@@ -0,0 +1,93 @@
/*
* 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/ivpd/model/CreateSegmentBodyJobResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ivpd;
using namespace AlibabaCloud::Ivpd::Model;
CreateSegmentBodyJobResult::CreateSegmentBodyJobResult() :
ServiceResult()
{}
CreateSegmentBodyJobResult::CreateSegmentBodyJobResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateSegmentBodyJobResult::~CreateSegmentBodyJobResult()
{}
void CreateSegmentBodyJobResult::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["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["Completed"].isNull())
data_.completed = dataNode["Completed"].asString() == "true";
if(!dataNode["BatchSize"].isNull())
data_.batchSize = std::stoi(dataNode["BatchSize"].asString());
if(!dataNode["TotalUsedTime"].isNull())
data_.totalUsedTime = std::stol(dataNode["TotalUsedTime"].asString());
if(!dataNode["Progress"].isNull())
data_.progress = std::stoi(dataNode["Progress"].asString());
if(!dataNode["JobId"].isNull())
data_.jobId = dataNode["JobId"].asString();
auto allResultListNode = dataNode["ResultList"]["Result"];
for (auto dataNodeResultListResult : allResultListNode)
{
Data::Result resultObject;
if(!dataNodeResultListResult["DataId"].isNull())
resultObject.dataId = dataNodeResultListResult["DataId"].asString();
if(!dataNodeResultListResult["Success"].isNull())
resultObject.success = dataNodeResultListResult["Success"].asString() == "true";
if(!dataNodeResultListResult["Code"].isNull())
resultObject.code = dataNodeResultListResult["Code"].asString();
if(!dataNodeResultListResult["Message"].isNull())
resultObject.message = dataNodeResultListResult["Message"].asString();
auto resultDataNode = value["ResultData"];
if(!resultDataNode["ImageUrl"].isNull())
resultObject.resultData.imageUrl = resultDataNode["ImageUrl"].asString();
data_.resultList.push_back(resultObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string CreateSegmentBodyJobResult::getMessage()const
{
return message_;
}
CreateSegmentBodyJobResult::Data CreateSegmentBodyJobResult::getData()const
{
return data_;
}
std::string CreateSegmentBodyJobResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ivpd/model/GetJobResultRequest.h>
using AlibabaCloud::Ivpd::Model::GetJobResultRequest;
GetJobResultRequest::GetJobResultRequest() :
RpcServiceRequest("ivpd", "2019-06-25", "GetJobResult")
{
setMethod(HttpRequest::Method::Post);
}
GetJobResultRequest::~GetJobResultRequest()
{}
std::string GetJobResultRequest::getJobId()const
{
return jobId_;
}
void GetJobResultRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setBodyParameter("JobId", jobId);
}

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ivpd/model/GetJobResultResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ivpd;
using namespace AlibabaCloud::Ivpd::Model;
GetJobResultResult::GetJobResultResult() :
ServiceResult()
{}
GetJobResultResult::GetJobResultResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobResultResult::~GetJobResultResult()
{}
void GetJobResultResult::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["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["BatchSize"].isNull())
data_.batchSize = dataNode["BatchSize"].asString();
if(!dataNode["Finish"].isNull())
data_.finish = dataNode["Finish"].asString() == "true";
if(!dataNode["Progress"].isNull())
data_.progress = std::stof(dataNode["Progress"].asString());
if(!dataNode["Message"].isNull())
data_.message = dataNode["Message"].asString();
if(!dataNode["Completed"].isNull())
data_.completed = dataNode["Completed"].asString() == "true";
if(!dataNode["TotalUsedTime"].isNull())
data_.totalUsedTime = std::stol(dataNode["TotalUsedTime"].asString());
auto allResultList = dataNode["ResultList"]["Result"];
for (auto value : allResultList)
data_.resultList.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetJobResultResult::getMessage()const
{
return message_;
}
GetJobResultResult::Data GetJobResultResult::getData()const
{
return data_;
}
std::string GetJobResultResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ivpd/model/GetJobStatusRequest.h>
using AlibabaCloud::Ivpd::Model::GetJobStatusRequest;
GetJobStatusRequest::GetJobStatusRequest() :
RpcServiceRequest("ivpd", "2019-06-25", "GetJobStatus")
{
setMethod(HttpRequest::Method::Post);
}
GetJobStatusRequest::~GetJobStatusRequest()
{}
std::string GetJobStatusRequest::getJobId()const
{
return jobId_;
}
void GetJobStatusRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setBodyParameter("JobId", jobId);
}

View File

@@ -0,0 +1,80 @@
/*
* 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/ivpd/model/GetJobStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ivpd;
using namespace AlibabaCloud::Ivpd::Model;
GetJobStatusResult::GetJobStatusResult() :
ServiceResult()
{}
GetJobStatusResult::GetJobStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobStatusResult::~GetJobStatusResult()
{}
void GetJobStatusResult::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["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["BatchSize"].isNull())
data_.batchSize = dataNode["BatchSize"].asString();
if(!dataNode["Finish"].isNull())
data_.finish = dataNode["Finish"].asString() == "true";
if(!dataNode["Progress"].isNull())
data_.progress = std::stof(dataNode["Progress"].asString());
if(!dataNode["Message"].isNull())
data_.message = dataNode["Message"].asString();
if(!dataNode["Completed"].isNull())
data_.completed = dataNode["Completed"].asString() == "true";
if(!dataNode["TimeToLive"].isNull())
data_.timeToLive = std::stoi(dataNode["TimeToLive"].asString());
if(!dataNode["TotalUsedTime"].isNull())
data_.totalUsedTime = std::stol(dataNode["TotalUsedTime"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetJobStatusResult::getMessage()const
{
return message_;
}
GetJobStatusResult::Data GetJobStatusResult::getData()const
{
return data_;
}
std::string GetJobStatusResult::getCode()const
{
return code_;
}