Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae65dcf4c3 | ||
|
|
1c5ad6a48c | ||
|
|
1a13b03f29 | ||
|
|
c1e07be47e | ||
|
|
8fdb5cc851 | ||
|
|
20774ebe3a | ||
|
|
485d712ddd |
19
CHANGELOG
19
CHANGELOG
@@ -1,3 +1,22 @@
|
||||
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.
|
||||
|
||||
2020-04-09 Version: 1.36.348
|
||||
- Add prometheus api AddGrafana and AddIntegration.
|
||||
|
||||
2020-04-09 Version: 1.36.347
|
||||
- Generated 2018-03-13 for `retailcloud`.
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,6 +21,10 @@ set(arms_public_header
|
||||
include/alibabacloud/arms/ARMSExport.h )
|
||||
|
||||
set(arms_public_header_model
|
||||
include/alibabacloud/arms/model/AddGrafanaRequest.h
|
||||
include/alibabacloud/arms/model/AddGrafanaResult.h
|
||||
include/alibabacloud/arms/model/AddIntegrationRequest.h
|
||||
include/alibabacloud/arms/model/AddIntegrationResult.h
|
||||
include/alibabacloud/arms/model/CreateAlertContactRequest.h
|
||||
include/alibabacloud/arms/model/CreateAlertContactResult.h
|
||||
include/alibabacloud/arms/model/CreateAlertContactGroupRequest.h
|
||||
@@ -90,6 +94,10 @@ set(arms_public_header_model
|
||||
|
||||
set(arms_src
|
||||
src/ARMSClient.cc
|
||||
src/model/AddGrafanaRequest.cc
|
||||
src/model/AddGrafanaResult.cc
|
||||
src/model/AddIntegrationRequest.cc
|
||||
src/model/AddIntegrationResult.cc
|
||||
src/model/CreateAlertContactRequest.cc
|
||||
src/model/CreateAlertContactResult.cc
|
||||
src/model/CreateAlertContactGroupRequest.cc
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "ARMSExport.h"
|
||||
#include "model/AddGrafanaRequest.h"
|
||||
#include "model/AddGrafanaResult.h"
|
||||
#include "model/AddIntegrationRequest.h"
|
||||
#include "model/AddIntegrationResult.h"
|
||||
#include "model/CreateAlertContactRequest.h"
|
||||
#include "model/CreateAlertContactResult.h"
|
||||
#include "model/CreateAlertContactGroupRequest.h"
|
||||
@@ -97,6 +101,12 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_ARMS_EXPORT ARMSClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::AddGrafanaResult> AddGrafanaOutcome;
|
||||
typedef std::future<AddGrafanaOutcome> AddGrafanaOutcomeCallable;
|
||||
typedef std::function<void(const ARMSClient*, const Model::AddGrafanaRequest&, const AddGrafanaOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddGrafanaAsyncHandler;
|
||||
typedef Outcome<Error, Model::AddIntegrationResult> AddIntegrationOutcome;
|
||||
typedef std::future<AddIntegrationOutcome> AddIntegrationOutcomeCallable;
|
||||
typedef std::function<void(const ARMSClient*, const Model::AddIntegrationRequest&, const AddIntegrationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddIntegrationAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateAlertContactResult> CreateAlertContactOutcome;
|
||||
typedef std::future<CreateAlertContactOutcome> CreateAlertContactOutcomeCallable;
|
||||
typedef std::function<void(const ARMSClient*, const Model::CreateAlertContactRequest&, const CreateAlertContactOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAlertContactAsyncHandler;
|
||||
@@ -201,6 +211,12 @@ namespace AlibabaCloud
|
||||
ARMSClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
ARMSClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~ARMSClient();
|
||||
AddGrafanaOutcome addGrafana(const Model::AddGrafanaRequest &request)const;
|
||||
void addGrafanaAsync(const Model::AddGrafanaRequest& request, const AddGrafanaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddGrafanaOutcomeCallable addGrafanaCallable(const Model::AddGrafanaRequest& request) const;
|
||||
AddIntegrationOutcome addIntegration(const Model::AddIntegrationRequest &request)const;
|
||||
void addIntegrationAsync(const Model::AddIntegrationRequest& request, const AddIntegrationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddIntegrationOutcomeCallable addIntegrationCallable(const Model::AddIntegrationRequest& request) const;
|
||||
CreateAlertContactOutcome createAlertContact(const Model::CreateAlertContactRequest &request)const;
|
||||
void createAlertContactAsync(const Model::CreateAlertContactRequest& request, const CreateAlertContactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateAlertContactOutcomeCallable createAlertContactCallable(const Model::CreateAlertContactRequest& request) const;
|
||||
|
||||
54
arms/include/alibabacloud/arms/model/AddGrafanaRequest.h
Normal file
54
arms/include/alibabacloud/arms/model/AddGrafanaRequest.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ARMS_MODEL_ADDGRAFANAREQUEST_H_
|
||||
#define ALIBABACLOUD_ARMS_MODEL_ADDGRAFANAREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/arms/ARMSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace ARMS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ARMS_EXPORT AddGrafanaRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddGrafanaRequest();
|
||||
~AddGrafanaRequest();
|
||||
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getIntegration()const;
|
||||
void setIntegration(const std::string& integration);
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
|
||||
private:
|
||||
std::string regionId_;
|
||||
std::string integration_;
|
||||
std::string clusterId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ARMS_MODEL_ADDGRAFANAREQUEST_H_
|
||||
51
arms/include/alibabacloud/arms/model/AddGrafanaResult.h
Normal file
51
arms/include/alibabacloud/arms/model/AddGrafanaResult.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ARMS_MODEL_ADDGRAFANARESULT_H_
|
||||
#define ALIBABACLOUD_ARMS_MODEL_ADDGRAFANARESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/arms/ARMSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace ARMS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ARMS_EXPORT AddGrafanaResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AddGrafanaResult();
|
||||
explicit AddGrafanaResult(const std::string &payload);
|
||||
~AddGrafanaResult();
|
||||
std::string getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ARMS_MODEL_ADDGRAFANARESULT_H_
|
||||
54
arms/include/alibabacloud/arms/model/AddIntegrationRequest.h
Normal file
54
arms/include/alibabacloud/arms/model/AddIntegrationRequest.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ARMS_MODEL_ADDINTEGRATIONREQUEST_H_
|
||||
#define ALIBABACLOUD_ARMS_MODEL_ADDINTEGRATIONREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/arms/ARMSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace ARMS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ARMS_EXPORT AddIntegrationRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddIntegrationRequest();
|
||||
~AddIntegrationRequest();
|
||||
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getIntegration()const;
|
||||
void setIntegration(const std::string& integration);
|
||||
std::string getClusterId()const;
|
||||
void setClusterId(const std::string& clusterId);
|
||||
|
||||
private:
|
||||
std::string regionId_;
|
||||
std::string integration_;
|
||||
std::string clusterId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ARMS_MODEL_ADDINTEGRATIONREQUEST_H_
|
||||
51
arms/include/alibabacloud/arms/model/AddIntegrationResult.h
Normal file
51
arms/include/alibabacloud/arms/model/AddIntegrationResult.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ARMS_MODEL_ADDINTEGRATIONRESULT_H_
|
||||
#define ALIBABACLOUD_ARMS_MODEL_ADDINTEGRATIONRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/arms/ARMSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace ARMS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ARMS_EXPORT AddIntegrationResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AddIntegrationResult();
|
||||
explicit AddIntegrationResult(const std::string &payload);
|
||||
~AddIntegrationResult();
|
||||
std::string getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ARMS_MODEL_ADDINTEGRATIONRESULT_H_
|
||||
@@ -34,14 +34,14 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct PageBean
|
||||
{
|
||||
struct AlertRule
|
||||
struct AlertRuleEntity
|
||||
{
|
||||
struct AlarmContext
|
||||
{
|
||||
std::string alarmContentTemplate;
|
||||
std::string alarmContentSubTitle;
|
||||
};
|
||||
struct AlertRule1
|
||||
struct AlertRule
|
||||
{
|
||||
struct Rule
|
||||
{
|
||||
@@ -89,16 +89,16 @@ namespace AlibabaCloud
|
||||
std::string contactGroupIdList;
|
||||
Notice notice;
|
||||
std::string userId;
|
||||
AlertRule1 alertRule1;
|
||||
std::string alertTitle;
|
||||
long updateTime;
|
||||
std::string alertLevel;
|
||||
long id;
|
||||
std::string regionId;
|
||||
AlertRule alertRule;
|
||||
};
|
||||
int totalCount;
|
||||
int pageSize;
|
||||
std::vector<AlertRule> alertRules;
|
||||
std::vector<AlertRuleEntity> alertRules;
|
||||
int pageNumber;
|
||||
};
|
||||
|
||||
|
||||
@@ -51,6 +51,78 @@ ARMSClient::ARMSClient(const std::string & accessKeyId, const std::string & acce
|
||||
ARMSClient::~ARMSClient()
|
||||
{}
|
||||
|
||||
ARMSClient::AddGrafanaOutcome ARMSClient::addGrafana(const AddGrafanaRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddGrafanaOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddGrafanaOutcome(AddGrafanaResult(outcome.result()));
|
||||
else
|
||||
return AddGrafanaOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::addGrafanaAsync(const AddGrafanaRequest& request, const AddGrafanaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addGrafana(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::AddGrafanaOutcomeCallable ARMSClient::addGrafanaCallable(const AddGrafanaRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddGrafanaOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addGrafana(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::AddIntegrationOutcome ARMSClient::addIntegration(const AddIntegrationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddIntegrationOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddIntegrationOutcome(AddIntegrationResult(outcome.result()));
|
||||
else
|
||||
return AddIntegrationOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::addIntegrationAsync(const AddIntegrationRequest& request, const AddIntegrationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addIntegration(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::AddIntegrationOutcomeCallable ARMSClient::addIntegrationCallable(const AddIntegrationRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddIntegrationOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addIntegration(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::CreateAlertContactOutcome ARMSClient::createAlertContact(const CreateAlertContactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
62
arms/src/model/AddGrafanaRequest.cc
Normal file
62
arms/src/model/AddGrafanaRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/AddGrafanaRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::AddGrafanaRequest;
|
||||
|
||||
AddGrafanaRequest::AddGrafanaRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "AddGrafana")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddGrafanaRequest::~AddGrafanaRequest()
|
||||
{}
|
||||
|
||||
std::string AddGrafanaRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddGrafanaRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AddGrafanaRequest::getIntegration()const
|
||||
{
|
||||
return integration_;
|
||||
}
|
||||
|
||||
void AddGrafanaRequest::setIntegration(const std::string& integration)
|
||||
{
|
||||
integration_ = integration;
|
||||
setParameter("Integration", integration);
|
||||
}
|
||||
|
||||
std::string AddGrafanaRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void AddGrafanaRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
51
arms/src/model/AddGrafanaResult.cc
Normal file
51
arms/src/model/AddGrafanaResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/AddGrafanaResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
AddGrafanaResult::AddGrafanaResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddGrafanaResult::AddGrafanaResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddGrafanaResult::~AddGrafanaResult()
|
||||
{}
|
||||
|
||||
void AddGrafanaResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AddGrafanaResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
62
arms/src/model/AddIntegrationRequest.cc
Normal file
62
arms/src/model/AddIntegrationRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/AddIntegrationRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::AddIntegrationRequest;
|
||||
|
||||
AddIntegrationRequest::AddIntegrationRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "AddIntegration")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddIntegrationRequest::~AddIntegrationRequest()
|
||||
{}
|
||||
|
||||
std::string AddIntegrationRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddIntegrationRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AddIntegrationRequest::getIntegration()const
|
||||
{
|
||||
return integration_;
|
||||
}
|
||||
|
||||
void AddIntegrationRequest::setIntegration(const std::string& integration)
|
||||
{
|
||||
integration_ = integration;
|
||||
setParameter("Integration", integration);
|
||||
}
|
||||
|
||||
std::string AddIntegrationRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void AddIntegrationRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
51
arms/src/model/AddIntegrationResult.cc
Normal file
51
arms/src/model/AddIntegrationResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/AddIntegrationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
AddIntegrationResult::AddIntegrationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddIntegrationResult::AddIntegrationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddIntegrationResult::~AddIntegrationResult()
|
||||
{}
|
||||
|
||||
void AddIntegrationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AddIntegrationResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -46,98 +46,98 @@ void SearchAlertRulesResult::parse(const std::string &payload)
|
||||
pageBean_.pageNumber = std::stoi(pageBeanNode["PageNumber"].asString());
|
||||
if(!pageBeanNode["PageSize"].isNull())
|
||||
pageBean_.pageSize = std::stoi(pageBeanNode["PageSize"].asString());
|
||||
auto allAlertRulesNode = pageBeanNode["AlertRules"]["AlertRule"];
|
||||
for (auto pageBeanNodeAlertRulesAlertRule : allAlertRulesNode)
|
||||
auto allAlertRulesNode = pageBeanNode["AlertRules"]["AlertRuleEntity"];
|
||||
for (auto pageBeanNodeAlertRulesAlertRuleEntity : allAlertRulesNode)
|
||||
{
|
||||
PageBean::AlertRule alertRuleObject;
|
||||
if(!pageBeanNodeAlertRulesAlertRule["AlertTitle"].isNull())
|
||||
alertRuleObject.alertTitle = pageBeanNodeAlertRulesAlertRule["AlertTitle"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRule["AlertLevel"].isNull())
|
||||
alertRuleObject.alertLevel = pageBeanNodeAlertRulesAlertRule["AlertLevel"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRule["AlertType"].isNull())
|
||||
alertRuleObject.alertType = std::stoi(pageBeanNodeAlertRulesAlertRule["AlertType"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRule["AlertVersion"].isNull())
|
||||
alertRuleObject.alertVersion = std::stoi(pageBeanNodeAlertRulesAlertRule["AlertVersion"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRule["Config"].isNull())
|
||||
alertRuleObject.config = pageBeanNodeAlertRulesAlertRule["Config"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRule["ContactGroupIdList"].isNull())
|
||||
alertRuleObject.contactGroupIdList = pageBeanNodeAlertRulesAlertRule["ContactGroupIdList"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRule["CreateTime"].isNull())
|
||||
alertRuleObject.createTime = std::stol(pageBeanNodeAlertRulesAlertRule["CreateTime"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRule["Id"].isNull())
|
||||
alertRuleObject.id = std::stol(pageBeanNodeAlertRulesAlertRule["Id"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRule["RegionId"].isNull())
|
||||
alertRuleObject.regionId = pageBeanNodeAlertRulesAlertRule["RegionId"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRule["Status"].isNull())
|
||||
alertRuleObject.status = pageBeanNodeAlertRulesAlertRule["Status"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRule["TaskId"].isNull())
|
||||
alertRuleObject.taskId = std::stol(pageBeanNodeAlertRulesAlertRule["TaskId"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRule["TaskStatus"].isNull())
|
||||
alertRuleObject.taskStatus = pageBeanNodeAlertRulesAlertRule["TaskStatus"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRule["UpdateTime"].isNull())
|
||||
alertRuleObject.updateTime = std::stol(pageBeanNodeAlertRulesAlertRule["UpdateTime"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRule["UserId"].isNull())
|
||||
alertRuleObject.userId = pageBeanNodeAlertRulesAlertRule["UserId"].asString();
|
||||
PageBean::AlertRuleEntity alertRuleEntityObject;
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["AlertTitle"].isNull())
|
||||
alertRuleEntityObject.alertTitle = pageBeanNodeAlertRulesAlertRuleEntity["AlertTitle"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["AlertLevel"].isNull())
|
||||
alertRuleEntityObject.alertLevel = pageBeanNodeAlertRulesAlertRuleEntity["AlertLevel"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["AlertType"].isNull())
|
||||
alertRuleEntityObject.alertType = std::stoi(pageBeanNodeAlertRulesAlertRuleEntity["AlertType"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["AlertVersion"].isNull())
|
||||
alertRuleEntityObject.alertVersion = std::stoi(pageBeanNodeAlertRulesAlertRuleEntity["AlertVersion"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["Config"].isNull())
|
||||
alertRuleEntityObject.config = pageBeanNodeAlertRulesAlertRuleEntity["Config"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIdList"].isNull())
|
||||
alertRuleEntityObject.contactGroupIdList = pageBeanNodeAlertRulesAlertRuleEntity["ContactGroupIdList"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["CreateTime"].isNull())
|
||||
alertRuleEntityObject.createTime = std::stol(pageBeanNodeAlertRulesAlertRuleEntity["CreateTime"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["Id"].isNull())
|
||||
alertRuleEntityObject.id = std::stol(pageBeanNodeAlertRulesAlertRuleEntity["Id"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["RegionId"].isNull())
|
||||
alertRuleEntityObject.regionId = pageBeanNodeAlertRulesAlertRuleEntity["RegionId"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["Status"].isNull())
|
||||
alertRuleEntityObject.status = pageBeanNodeAlertRulesAlertRuleEntity["Status"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["TaskId"].isNull())
|
||||
alertRuleEntityObject.taskId = std::stol(pageBeanNodeAlertRulesAlertRuleEntity["TaskId"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["TaskStatus"].isNull())
|
||||
alertRuleEntityObject.taskStatus = pageBeanNodeAlertRulesAlertRuleEntity["TaskStatus"].asString();
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["UpdateTime"].isNull())
|
||||
alertRuleEntityObject.updateTime = std::stol(pageBeanNodeAlertRulesAlertRuleEntity["UpdateTime"].asString());
|
||||
if(!pageBeanNodeAlertRulesAlertRuleEntity["UserId"].isNull())
|
||||
alertRuleEntityObject.userId = pageBeanNodeAlertRulesAlertRuleEntity["UserId"].asString();
|
||||
auto alarmContextNode = value["AlarmContext"];
|
||||
if(!alarmContextNode["AlarmContentTemplate"].isNull())
|
||||
alertRuleObject.alarmContext.alarmContentTemplate = alarmContextNode["AlarmContentTemplate"].asString();
|
||||
alertRuleEntityObject.alarmContext.alarmContentTemplate = alarmContextNode["AlarmContentTemplate"].asString();
|
||||
if(!alarmContextNode["AlarmContentSubTitle"].isNull())
|
||||
alertRuleObject.alarmContext.alarmContentSubTitle = alarmContextNode["AlarmContentSubTitle"].asString();
|
||||
auto alertRule1Node = value["AlertRule"];
|
||||
if(!alertRule1Node["Operator"].isNull())
|
||||
alertRuleObject.alertRule1._operator = alertRule1Node["Operator"].asString();
|
||||
auto allRulesNode = alertRule1Node["Rules"]["Rule"];
|
||||
for (auto alertRule1NodeRulesRule : allRulesNode)
|
||||
alertRuleEntityObject.alarmContext.alarmContentSubTitle = alarmContextNode["AlarmContentSubTitle"].asString();
|
||||
auto alertRuleNode = value["AlertRule"];
|
||||
if(!alertRuleNode["Operator"].isNull())
|
||||
alertRuleEntityObject.alertRule._operator = alertRuleNode["Operator"].asString();
|
||||
auto allRulesNode = alertRuleNode["Rules"]["Rule"];
|
||||
for (auto alertRuleNodeRulesRule : allRulesNode)
|
||||
{
|
||||
PageBean::AlertRule::AlertRule1::Rule ruleObject;
|
||||
if(!alertRule1NodeRulesRule["Aggregates"].isNull())
|
||||
ruleObject.aggregates = alertRule1NodeRulesRule["Aggregates"].asString();
|
||||
if(!alertRule1NodeRulesRule["Alias"].isNull())
|
||||
ruleObject.alias = alertRule1NodeRulesRule["Alias"].asString();
|
||||
if(!alertRule1NodeRulesRule["Measure"].isNull())
|
||||
ruleObject.measure = alertRule1NodeRulesRule["Measure"].asString();
|
||||
if(!alertRule1NodeRulesRule["NValue"].isNull())
|
||||
ruleObject.nValue = std::stoi(alertRule1NodeRulesRule["NValue"].asString());
|
||||
if(!alertRule1NodeRulesRule["Operator"].isNull())
|
||||
ruleObject._operator = alertRule1NodeRulesRule["Operator"].asString();
|
||||
if(!alertRule1NodeRulesRule["Value"].isNull())
|
||||
ruleObject.value = std::stof(alertRule1NodeRulesRule["Value"].asString());
|
||||
alertRuleObject.alertRule1.rules.push_back(ruleObject);
|
||||
PageBean::AlertRuleEntity::AlertRule::Rule ruleObject;
|
||||
if(!alertRuleNodeRulesRule["Aggregates"].isNull())
|
||||
ruleObject.aggregates = alertRuleNodeRulesRule["Aggregates"].asString();
|
||||
if(!alertRuleNodeRulesRule["Alias"].isNull())
|
||||
ruleObject.alias = alertRuleNodeRulesRule["Alias"].asString();
|
||||
if(!alertRuleNodeRulesRule["Measure"].isNull())
|
||||
ruleObject.measure = alertRuleNodeRulesRule["Measure"].asString();
|
||||
if(!alertRuleNodeRulesRule["NValue"].isNull())
|
||||
ruleObject.nValue = std::stoi(alertRuleNodeRulesRule["NValue"].asString());
|
||||
if(!alertRuleNodeRulesRule["Operator"].isNull())
|
||||
ruleObject._operator = alertRuleNodeRulesRule["Operator"].asString();
|
||||
if(!alertRuleNodeRulesRule["Value"].isNull())
|
||||
ruleObject.value = std::stof(alertRuleNodeRulesRule["Value"].asString());
|
||||
alertRuleEntityObject.alertRule.rules.push_back(ruleObject);
|
||||
}
|
||||
auto metricParamNode = value["MetricParam"];
|
||||
if(!metricParamNode["AppGroupId"].isNull())
|
||||
alertRuleObject.metricParam.appGroupId = metricParamNode["AppGroupId"].asString();
|
||||
alertRuleEntityObject.metricParam.appGroupId = metricParamNode["AppGroupId"].asString();
|
||||
if(!metricParamNode["AppId"].isNull())
|
||||
alertRuleObject.metricParam.appId = metricParamNode["AppId"].asString();
|
||||
alertRuleEntityObject.metricParam.appId = metricParamNode["AppId"].asString();
|
||||
if(!metricParamNode["Pid"].isNull())
|
||||
alertRuleObject.metricParam.pid = metricParamNode["Pid"].asString();
|
||||
alertRuleEntityObject.metricParam.pid = metricParamNode["Pid"].asString();
|
||||
if(!metricParamNode["Type"].isNull())
|
||||
alertRuleObject.metricParam.type = metricParamNode["Type"].asString();
|
||||
alertRuleEntityObject.metricParam.type = metricParamNode["Type"].asString();
|
||||
auto allDimensionsNode = metricParamNode["Dimensions"]["Dimension"];
|
||||
for (auto metricParamNodeDimensionsDimension : allDimensionsNode)
|
||||
{
|
||||
PageBean::AlertRule::MetricParam::Dimension dimensionObject;
|
||||
PageBean::AlertRuleEntity::MetricParam::Dimension dimensionObject;
|
||||
if(!metricParamNodeDimensionsDimension["Key"].isNull())
|
||||
dimensionObject.key = metricParamNodeDimensionsDimension["Key"].asString();
|
||||
if(!metricParamNodeDimensionsDimension["Type"].isNull())
|
||||
dimensionObject.type = metricParamNodeDimensionsDimension["Type"].asString();
|
||||
if(!metricParamNodeDimensionsDimension["Value"].isNull())
|
||||
dimensionObject.value = metricParamNodeDimensionsDimension["Value"].asString();
|
||||
alertRuleObject.metricParam.dimensions.push_back(dimensionObject);
|
||||
alertRuleEntityObject.metricParam.dimensions.push_back(dimensionObject);
|
||||
}
|
||||
auto noticeNode = value["Notice"];
|
||||
if(!noticeNode["EndTime"].isNull())
|
||||
alertRuleObject.notice.endTime = std::stol(noticeNode["EndTime"].asString());
|
||||
alertRuleEntityObject.notice.endTime = std::stol(noticeNode["EndTime"].asString());
|
||||
if(!noticeNode["NoticeEndTime"].isNull())
|
||||
alertRuleObject.notice.noticeEndTime = std::stol(noticeNode["NoticeEndTime"].asString());
|
||||
alertRuleEntityObject.notice.noticeEndTime = std::stol(noticeNode["NoticeEndTime"].asString());
|
||||
if(!noticeNode["NoticeStartTime"].isNull())
|
||||
alertRuleObject.notice.noticeStartTime = std::stol(noticeNode["NoticeStartTime"].asString());
|
||||
alertRuleEntityObject.notice.noticeStartTime = std::stol(noticeNode["NoticeStartTime"].asString());
|
||||
if(!noticeNode["StartTime"].isNull())
|
||||
alertRuleObject.notice.startTime = std::stol(noticeNode["StartTime"].asString());
|
||||
alertRuleEntityObject.notice.startTime = std::stol(noticeNode["StartTime"].asString());
|
||||
auto allAlertWays = value["AlertWays"]["AlertWay"];
|
||||
for (auto value : allAlertWays)
|
||||
alertRuleObject.alertWays.push_back(value.asString());
|
||||
pageBean_.alertRules.push_back(alertRuleObject);
|
||||
alertRuleEntityObject.alertWays.push_back(value.asString());
|
||||
pageBean_.alertRules.push_back(alertRuleEntityObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
};
|
||||
|
||||
@@ -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_
|
||||
@@ -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_
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
95
dypnsapi/src/model/VerifyPhoneWithTokenRequest.cc
Normal file
95
dypnsapi/src/model/VerifyPhoneWithTokenRequest.cc
Normal 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);
|
||||
}
|
||||
|
||||
68
dypnsapi/src/model/VerifyPhoneWithTokenResult.cc
Normal file
68
dypnsapi/src/model/VerifyPhoneWithTokenResult.cc
Normal 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_;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ set(geoip_public_header_model
|
||||
include/alibabacloud/geoip/model/DescribeGeoipInstanceStatisticsResult.h
|
||||
include/alibabacloud/geoip/model/DescribeGeoipInstancesRequest.h
|
||||
include/alibabacloud/geoip/model/DescribeGeoipInstancesResult.h
|
||||
include/alibabacloud/geoip/model/DescribeIpv4LocationRequest.h
|
||||
include/alibabacloud/geoip/model/DescribeIpv4LocationResult.h
|
||||
include/alibabacloud/geoip/model/DescribeIpv6LocationRequest.h
|
||||
include/alibabacloud/geoip/model/DescribeIpv6LocationResult.h )
|
||||
|
||||
@@ -38,6 +40,8 @@ set(geoip_src
|
||||
src/model/DescribeGeoipInstanceStatisticsResult.cc
|
||||
src/model/DescribeGeoipInstancesRequest.cc
|
||||
src/model/DescribeGeoipInstancesResult.cc
|
||||
src/model/DescribeIpv4LocationRequest.cc
|
||||
src/model/DescribeIpv4LocationResult.cc
|
||||
src/model/DescribeIpv6LocationRequest.cc
|
||||
src/model/DescribeIpv6LocationResult.cc )
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "model/DescribeGeoipInstanceStatisticsResult.h"
|
||||
#include "model/DescribeGeoipInstancesRequest.h"
|
||||
#include "model/DescribeGeoipInstancesResult.h"
|
||||
#include "model/DescribeIpv4LocationRequest.h"
|
||||
#include "model/DescribeIpv4LocationResult.h"
|
||||
#include "model/DescribeIpv6LocationRequest.h"
|
||||
#include "model/DescribeIpv6LocationResult.h"
|
||||
|
||||
@@ -48,6 +50,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeGeoipInstancesResult> DescribeGeoipInstancesOutcome;
|
||||
typedef std::future<DescribeGeoipInstancesOutcome> DescribeGeoipInstancesOutcomeCallable;
|
||||
typedef std::function<void(const GeoipClient*, const Model::DescribeGeoipInstancesRequest&, const DescribeGeoipInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeGeoipInstancesAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeIpv4LocationResult> DescribeIpv4LocationOutcome;
|
||||
typedef std::future<DescribeIpv4LocationOutcome> DescribeIpv4LocationOutcomeCallable;
|
||||
typedef std::function<void(const GeoipClient*, const Model::DescribeIpv4LocationRequest&, const DescribeIpv4LocationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeIpv4LocationAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeIpv6LocationResult> DescribeIpv6LocationOutcome;
|
||||
typedef std::future<DescribeIpv6LocationOutcome> DescribeIpv6LocationOutcomeCallable;
|
||||
typedef std::function<void(const GeoipClient*, const Model::DescribeIpv6LocationRequest&, const DescribeIpv6LocationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeIpv6LocationAsyncHandler;
|
||||
@@ -65,6 +70,9 @@ namespace AlibabaCloud
|
||||
DescribeGeoipInstancesOutcome describeGeoipInstances(const Model::DescribeGeoipInstancesRequest &request)const;
|
||||
void describeGeoipInstancesAsync(const Model::DescribeGeoipInstancesRequest& request, const DescribeGeoipInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeGeoipInstancesOutcomeCallable describeGeoipInstancesCallable(const Model::DescribeGeoipInstancesRequest& request) const;
|
||||
DescribeIpv4LocationOutcome describeIpv4Location(const Model::DescribeIpv4LocationRequest &request)const;
|
||||
void describeIpv4LocationAsync(const Model::DescribeIpv4LocationRequest& request, const DescribeIpv4LocationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeIpv4LocationOutcomeCallable describeIpv4LocationCallable(const Model::DescribeIpv4LocationRequest& request) const;
|
||||
DescribeIpv6LocationOutcome describeIpv6Location(const Model::DescribeIpv6LocationRequest &request)const;
|
||||
void describeIpv6LocationAsync(const Model::DescribeIpv6LocationRequest& request, const DescribeIpv6LocationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeIpv6LocationOutcomeCallable describeIpv6LocationCallable(const Model::DescribeIpv6LocationRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_GEOIP_MODEL_DESCRIBEIPV4LOCATIONREQUEST_H_
|
||||
#define ALIBABACLOUD_GEOIP_MODEL_DESCRIBEIPV4LOCATIONREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/geoip/GeoipExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Geoip
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GEOIP_EXPORT DescribeIpv4LocationRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeIpv4LocationRequest();
|
||||
~DescribeIpv4LocationRequest();
|
||||
|
||||
std::string getIp()const;
|
||||
void setIp(const std::string& ip);
|
||||
std::string getUserClientIp()const;
|
||||
void setUserClientIp(const std::string& userClientIp);
|
||||
std::string getLang()const;
|
||||
void setLang(const std::string& lang);
|
||||
|
||||
private:
|
||||
std::string ip_;
|
||||
std::string userClientIp_;
|
||||
std::string lang_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GEOIP_MODEL_DESCRIBEIPV4LOCATIONREQUEST_H_
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_GEOIP_MODEL_DESCRIBEIPV4LOCATIONRESULT_H_
|
||||
#define ALIBABACLOUD_GEOIP_MODEL_DESCRIBEIPV4LOCATIONRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/geoip/GeoipExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Geoip
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GEOIP_EXPORT DescribeIpv4LocationResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
DescribeIpv4LocationResult();
|
||||
explicit DescribeIpv4LocationResult(const std::string &payload);
|
||||
~DescribeIpv4LocationResult();
|
||||
std::string getIp()const;
|
||||
std::string getIsp()const;
|
||||
std::string getCountry()const;
|
||||
std::string getCity()const;
|
||||
std::string getCounty()const;
|
||||
std::string getProvince()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string ip_;
|
||||
std::string isp_;
|
||||
std::string country_;
|
||||
std::string city_;
|
||||
std::string county_;
|
||||
std::string province_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GEOIP_MODEL_DESCRIBEIPV4LOCATIONRESULT_H_
|
||||
@@ -159,6 +159,42 @@ GeoipClient::DescribeGeoipInstancesOutcomeCallable GeoipClient::describeGeoipIns
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GeoipClient::DescribeIpv4LocationOutcome GeoipClient::describeIpv4Location(const DescribeIpv4LocationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeIpv4LocationOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeIpv4LocationOutcome(DescribeIpv4LocationResult(outcome.result()));
|
||||
else
|
||||
return DescribeIpv4LocationOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GeoipClient::describeIpv4LocationAsync(const DescribeIpv4LocationRequest& request, const DescribeIpv4LocationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeIpv4Location(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GeoipClient::DescribeIpv4LocationOutcomeCallable GeoipClient::describeIpv4LocationCallable(const DescribeIpv4LocationRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeIpv4LocationOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeIpv4Location(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GeoipClient::DescribeIpv6LocationOutcome GeoipClient::describeIpv6Location(const DescribeIpv6LocationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
62
geoip/src/model/DescribeIpv4LocationRequest.cc
Normal file
62
geoip/src/model/DescribeIpv4LocationRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/geoip/model/DescribeIpv4LocationRequest.h>
|
||||
|
||||
using AlibabaCloud::Geoip::Model::DescribeIpv4LocationRequest;
|
||||
|
||||
DescribeIpv4LocationRequest::DescribeIpv4LocationRequest() :
|
||||
RpcServiceRequest("geoip", "2020-01-01", "DescribeIpv4Location")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeIpv4LocationRequest::~DescribeIpv4LocationRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeIpv4LocationRequest::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void DescribeIpv4LocationRequest::setIp(const std::string& ip)
|
||||
{
|
||||
ip_ = ip;
|
||||
setParameter("Ip", ip);
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationRequest::getUserClientIp()const
|
||||
{
|
||||
return userClientIp_;
|
||||
}
|
||||
|
||||
void DescribeIpv4LocationRequest::setUserClientIp(const std::string& userClientIp)
|
||||
{
|
||||
userClientIp_ = userClientIp;
|
||||
setParameter("UserClientIp", userClientIp);
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void DescribeIpv4LocationRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
86
geoip/src/model/DescribeIpv4LocationResult.cc
Normal file
86
geoip/src/model/DescribeIpv4LocationResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/geoip/model/DescribeIpv4LocationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Geoip;
|
||||
using namespace AlibabaCloud::Geoip::Model;
|
||||
|
||||
DescribeIpv4LocationResult::DescribeIpv4LocationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeIpv4LocationResult::DescribeIpv4LocationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeIpv4LocationResult::~DescribeIpv4LocationResult()
|
||||
{}
|
||||
|
||||
void DescribeIpv4LocationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Ip"].isNull())
|
||||
ip_ = value["Ip"].asString();
|
||||
if(!value["Country"].isNull())
|
||||
country_ = value["Country"].asString();
|
||||
if(!value["Province"].isNull())
|
||||
province_ = value["Province"].asString();
|
||||
if(!value["City"].isNull())
|
||||
city_ = value["City"].asString();
|
||||
if(!value["County"].isNull())
|
||||
county_ = value["County"].asString();
|
||||
if(!value["Isp"].isNull())
|
||||
isp_ = value["Isp"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationResult::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationResult::getIsp()const
|
||||
{
|
||||
return isp_;
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationResult::getCountry()const
|
||||
{
|
||||
return country_;
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationResult::getCity()const
|
||||
{
|
||||
return city_;
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationResult::getCounty()const
|
||||
{
|
||||
return county_;
|
||||
}
|
||||
|
||||
std::string DescribeIpv4LocationResult::getProvince()const
|
||||
{
|
||||
return province_;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
78
imm/include/alibabacloud/imm/model/GetOfficeEditURLRequest.h
Normal file
78
imm/include/alibabacloud/imm/model/GetOfficeEditURLRequest.h
Normal 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_
|
||||
59
imm/include/alibabacloud/imm/model/GetOfficeEditURLResult.h
Normal file
59
imm/include/alibabacloud/imm/model/GetOfficeEditURLResult.h
Normal 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_
|
||||
@@ -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_;
|
||||
|
||||
};
|
||||
|
||||
@@ -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_
|
||||
@@ -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_
|
||||
@@ -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();
|
||||
|
||||
150
imm/src/model/GetOfficeEditURLRequest.cc
Normal file
150
imm/src/model/GetOfficeEditURLRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/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);
|
||||
}
|
||||
|
||||
79
imm/src/model/GetOfficeEditURLResult.cc
Normal file
79
imm/src/model/GetOfficeEditURLResult.cc
Normal 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_;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
73
imm/src/model/RefreshOfficeEditTokenRequest.cc
Normal file
73
imm/src/model/RefreshOfficeEditTokenRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/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);
|
||||
}
|
||||
|
||||
72
imm/src/model/RefreshOfficeEditTokenResult.cc
Normal file
72
imm/src/model/RefreshOfficeEditTokenResult.cc
Normal 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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user