Add ModifyWhiteIps.
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
2020-04-16 Version: 1.36.361
|
||||||
|
- Add ModifyWhiteIps.
|
||||||
|
|
||||||
2020-04-16 Version: 1.36.360
|
2020-04-16 Version: 1.36.360
|
||||||
- Add BatchOptimization param in Stop and Start Instances.
|
- Add BatchOptimization param in Stop and Start Instances.
|
||||||
- Add RemoveSymbols in GetInstanceConsoleOutput.
|
- Add RemoveSymbols in GetInstanceConsoleOutput.
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ set(elasticsearch_public_header_model
|
|||||||
include/alibabacloud/elasticsearch/model/ListSnapshotReposByInstanceIdResult.h
|
include/alibabacloud/elasticsearch/model/ListSnapshotReposByInstanceIdResult.h
|
||||||
include/alibabacloud/elasticsearch/model/ListTagResourcesRequest.h
|
include/alibabacloud/elasticsearch/model/ListTagResourcesRequest.h
|
||||||
include/alibabacloud/elasticsearch/model/ListTagResourcesResult.h
|
include/alibabacloud/elasticsearch/model/ListTagResourcesResult.h
|
||||||
|
include/alibabacloud/elasticsearch/model/ModifyWhiteIpsRequest.h
|
||||||
|
include/alibabacloud/elasticsearch/model/ModifyWhiteIpsResult.h
|
||||||
include/alibabacloud/elasticsearch/model/MoveResourceGroupRequest.h
|
include/alibabacloud/elasticsearch/model/MoveResourceGroupRequest.h
|
||||||
include/alibabacloud/elasticsearch/model/MoveResourceGroupResult.h
|
include/alibabacloud/elasticsearch/model/MoveResourceGroupResult.h
|
||||||
include/alibabacloud/elasticsearch/model/OpenHttpsRequest.h
|
include/alibabacloud/elasticsearch/model/OpenHttpsRequest.h
|
||||||
@@ -280,6 +282,8 @@ set(elasticsearch_src
|
|||||||
src/model/ListSnapshotReposByInstanceIdResult.cc
|
src/model/ListSnapshotReposByInstanceIdResult.cc
|
||||||
src/model/ListTagResourcesRequest.cc
|
src/model/ListTagResourcesRequest.cc
|
||||||
src/model/ListTagResourcesResult.cc
|
src/model/ListTagResourcesResult.cc
|
||||||
|
src/model/ModifyWhiteIpsRequest.cc
|
||||||
|
src/model/ModifyWhiteIpsResult.cc
|
||||||
src/model/MoveResourceGroupRequest.cc
|
src/model/MoveResourceGroupRequest.cc
|
||||||
src/model/MoveResourceGroupResult.cc
|
src/model/MoveResourceGroupResult.cc
|
||||||
src/model/OpenHttpsRequest.cc
|
src/model/OpenHttpsRequest.cc
|
||||||
|
|||||||
@@ -106,6 +106,8 @@
|
|||||||
#include "model/ListSnapshotReposByInstanceIdResult.h"
|
#include "model/ListSnapshotReposByInstanceIdResult.h"
|
||||||
#include "model/ListTagResourcesRequest.h"
|
#include "model/ListTagResourcesRequest.h"
|
||||||
#include "model/ListTagResourcesResult.h"
|
#include "model/ListTagResourcesResult.h"
|
||||||
|
#include "model/ModifyWhiteIpsRequest.h"
|
||||||
|
#include "model/ModifyWhiteIpsResult.h"
|
||||||
#include "model/MoveResourceGroupRequest.h"
|
#include "model/MoveResourceGroupRequest.h"
|
||||||
#include "model/MoveResourceGroupResult.h"
|
#include "model/MoveResourceGroupResult.h"
|
||||||
#include "model/OpenHttpsRequest.h"
|
#include "model/OpenHttpsRequest.h"
|
||||||
@@ -329,6 +331,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::ListTagResourcesResult> ListTagResourcesOutcome;
|
typedef Outcome<Error, Model::ListTagResourcesResult> ListTagResourcesOutcome;
|
||||||
typedef std::future<ListTagResourcesOutcome> ListTagResourcesOutcomeCallable;
|
typedef std::future<ListTagResourcesOutcome> ListTagResourcesOutcomeCallable;
|
||||||
typedef std::function<void(const ElasticsearchClient*, const Model::ListTagResourcesRequest&, const ListTagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagResourcesAsyncHandler;
|
typedef std::function<void(const ElasticsearchClient*, const Model::ListTagResourcesRequest&, const ListTagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagResourcesAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::ModifyWhiteIpsResult> ModifyWhiteIpsOutcome;
|
||||||
|
typedef std::future<ModifyWhiteIpsOutcome> ModifyWhiteIpsOutcomeCallable;
|
||||||
|
typedef std::function<void(const ElasticsearchClient*, const Model::ModifyWhiteIpsRequest&, const ModifyWhiteIpsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyWhiteIpsAsyncHandler;
|
||||||
typedef Outcome<Error, Model::MoveResourceGroupResult> MoveResourceGroupOutcome;
|
typedef Outcome<Error, Model::MoveResourceGroupResult> MoveResourceGroupOutcome;
|
||||||
typedef std::future<MoveResourceGroupOutcome> MoveResourceGroupOutcomeCallable;
|
typedef std::future<MoveResourceGroupOutcome> MoveResourceGroupOutcomeCallable;
|
||||||
typedef std::function<void(const ElasticsearchClient*, const Model::MoveResourceGroupRequest&, const MoveResourceGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoveResourceGroupAsyncHandler;
|
typedef std::function<void(const ElasticsearchClient*, const Model::MoveResourceGroupRequest&, const MoveResourceGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoveResourceGroupAsyncHandler;
|
||||||
@@ -592,6 +597,9 @@ namespace AlibabaCloud
|
|||||||
ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const;
|
ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const;
|
||||||
void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const;
|
ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const;
|
||||||
|
ModifyWhiteIpsOutcome modifyWhiteIps(const Model::ModifyWhiteIpsRequest &request)const;
|
||||||
|
void modifyWhiteIpsAsync(const Model::ModifyWhiteIpsRequest& request, const ModifyWhiteIpsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ModifyWhiteIpsOutcomeCallable modifyWhiteIpsCallable(const Model::ModifyWhiteIpsRequest& request) const;
|
||||||
MoveResourceGroupOutcome moveResourceGroup(const Model::MoveResourceGroupRequest &request)const;
|
MoveResourceGroupOutcome moveResourceGroup(const Model::MoveResourceGroupRequest &request)const;
|
||||||
void moveResourceGroupAsync(const Model::MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void moveResourceGroupAsync(const Model::MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
MoveResourceGroupOutcomeCallable moveResourceGroupCallable(const Model::MoveResourceGroupRequest& request) const;
|
MoveResourceGroupOutcomeCallable moveResourceGroupCallable(const Model::MoveResourceGroupRequest& request) const;
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ namespace AlibabaCloud
|
|||||||
};
|
};
|
||||||
MasterConfiguration masterConfiguration;
|
MasterConfiguration masterConfiguration;
|
||||||
std::string description;
|
std::string description;
|
||||||
|
std::string resourceGroupId;
|
||||||
bool dedicateMaster;
|
bool dedicateMaster;
|
||||||
std::vector<std::string> esIPBlacklist;
|
std::vector<std::string> esIPBlacklist;
|
||||||
std::vector<ZoneInfo> zoneInfos;
|
std::vector<ZoneInfo> zoneInfos;
|
||||||
|
|||||||
@@ -35,8 +35,11 @@ namespace AlibabaCloud
|
|||||||
GetRegionConfigurationRequest();
|
GetRegionConfigurationRequest();
|
||||||
~GetRegionConfigurationRequest();
|
~GetRegionConfigurationRequest();
|
||||||
|
|
||||||
|
std::string getZoneId()const;
|
||||||
|
void setZoneId(const std::string& zoneId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::string zoneId_;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ namespace AlibabaCloud
|
|||||||
MasterConfiguration masterConfiguration;
|
MasterConfiguration masterConfiguration;
|
||||||
std::string status;
|
std::string status;
|
||||||
std::string description;
|
std::string description;
|
||||||
|
std::string resourceGroupId;
|
||||||
std::string instanceId;
|
std::string instanceId;
|
||||||
bool dedicateMaster;
|
bool dedicateMaster;
|
||||||
std::string createdAt;
|
std::string createdAt;
|
||||||
|
|||||||
@@ -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_ELASTICSEARCH_MODEL_MODIFYWHITEIPSREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_ELASTICSEARCH_MODEL_MODIFYWHITEIPSREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||||
|
#include <alibabacloud/elasticsearch/ElasticsearchExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Elasticsearch
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ELASTICSEARCH_EXPORT ModifyWhiteIpsRequest : public RoaServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
ModifyWhiteIpsRequest();
|
||||||
|
~ModifyWhiteIpsRequest();
|
||||||
|
|
||||||
|
std::string getInstanceId()const;
|
||||||
|
void setInstanceId(const std::string& instanceId);
|
||||||
|
std::string getClientToken()const;
|
||||||
|
void setClientToken(const std::string& clientToken);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string instanceId_;
|
||||||
|
std::string clientToken_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_ELASTICSEARCH_MODEL_MODIFYWHITEIPSREQUEST_H_
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_ELASTICSEARCH_MODEL_MODIFYWHITEIPSRESULT_H_
|
||||||
|
#define ALIBABACLOUD_ELASTICSEARCH_MODEL_MODIFYWHITEIPSRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/elasticsearch/ElasticsearchExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Elasticsearch
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ELASTICSEARCH_EXPORT ModifyWhiteIpsResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
ModifyWhiteIpsResult();
|
||||||
|
explicit ModifyWhiteIpsResult(const std::string &payload);
|
||||||
|
~ModifyWhiteIpsResult();
|
||||||
|
bool getResult()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
bool result_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_ELASTICSEARCH_MODEL_MODIFYWHITEIPSRESULT_H_
|
||||||
@@ -1563,6 +1563,42 @@ ElasticsearchClient::ListTagResourcesOutcomeCallable ElasticsearchClient::listTa
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ElasticsearchClient::ModifyWhiteIpsOutcome ElasticsearchClient::modifyWhiteIps(const ModifyWhiteIpsRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ModifyWhiteIpsOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ModifyWhiteIpsOutcome(ModifyWhiteIpsResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ModifyWhiteIpsOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElasticsearchClient::modifyWhiteIpsAsync(const ModifyWhiteIpsRequest& request, const ModifyWhiteIpsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, modifyWhiteIps(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ElasticsearchClient::ModifyWhiteIpsOutcomeCallable ElasticsearchClient::modifyWhiteIpsCallable(const ModifyWhiteIpsRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ModifyWhiteIpsOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->modifyWhiteIps(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
ElasticsearchClient::MoveResourceGroupOutcome ElasticsearchClient::moveResourceGroup(const MoveResourceGroupRequest &request) const
|
ElasticsearchClient::MoveResourceGroupOutcome ElasticsearchClient::moveResourceGroup(const MoveResourceGroupRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ void DescribeInstanceResult::parse(const std::string &payload)
|
|||||||
result_.enableKibanaPublicNetwork = resultNode["enableKibanaPublicNetwork"].asString() == "true";
|
result_.enableKibanaPublicNetwork = resultNode["enableKibanaPublicNetwork"].asString() == "true";
|
||||||
if(!resultNode["haveKibana"].isNull())
|
if(!resultNode["haveKibana"].isNull())
|
||||||
result_.haveKibana = resultNode["haveKibana"].asString() == "true";
|
result_.haveKibana = resultNode["haveKibana"].asString() == "true";
|
||||||
|
if(!resultNode["resourceGroupId"].isNull())
|
||||||
|
result_.resourceGroupId = resultNode["resourceGroupId"].asString();
|
||||||
auto alldictListNode = resultNode["dictList"]["DictListItem"];
|
auto alldictListNode = resultNode["dictList"]["DictListItem"];
|
||||||
for (auto resultNodedictListDictListItem : alldictListNode)
|
for (auto resultNodedictListDictListItem : alldictListNode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,3 +28,14 @@ GetRegionConfigurationRequest::GetRegionConfigurationRequest() :
|
|||||||
GetRegionConfigurationRequest::~GetRegionConfigurationRequest()
|
GetRegionConfigurationRequest::~GetRegionConfigurationRequest()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
std::string GetRegionConfigurationRequest::getZoneId()const
|
||||||
|
{
|
||||||
|
return zoneId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetRegionConfigurationRequest::setZoneId(const std::string& zoneId)
|
||||||
|
{
|
||||||
|
zoneId_ = zoneId;
|
||||||
|
setParameter("ZoneId", zoneId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ void ListInstanceResult::parse(const std::string &payload)
|
|||||||
resultObject.advancedDedicateMaster = valueResultInstance["advancedDedicateMaster"].asString() == "true";
|
resultObject.advancedDedicateMaster = valueResultInstance["advancedDedicateMaster"].asString() == "true";
|
||||||
if(!valueResultInstance["dedicateMaster"].isNull())
|
if(!valueResultInstance["dedicateMaster"].isNull())
|
||||||
resultObject.dedicateMaster = valueResultInstance["dedicateMaster"].asString() == "true";
|
resultObject.dedicateMaster = valueResultInstance["dedicateMaster"].asString() == "true";
|
||||||
|
if(!valueResultInstance["resourceGroupId"].isNull())
|
||||||
|
resultObject.resourceGroupId = valueResultInstance["resourceGroupId"].asString();
|
||||||
auto alltagsNode = allResultNode["tags"]["Tag"];
|
auto alltagsNode = allResultNode["tags"]["Tag"];
|
||||||
for (auto allResultNodetagsTag : alltagsNode)
|
for (auto allResultNodetagsTag : alltagsNode)
|
||||||
{
|
{
|
||||||
|
|||||||
52
elasticsearch/src/model/ModifyWhiteIpsRequest.cc
Normal file
52
elasticsearch/src/model/ModifyWhiteIpsRequest.cc
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/elasticsearch/model/ModifyWhiteIpsRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Elasticsearch::Model::ModifyWhiteIpsRequest;
|
||||||
|
|
||||||
|
ModifyWhiteIpsRequest::ModifyWhiteIpsRequest() :
|
||||||
|
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||||
|
{
|
||||||
|
setResourcePath("/openapi/instances/[InstanceId]/actions/modify-white-ips");
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ModifyWhiteIpsRequest::~ModifyWhiteIpsRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string ModifyWhiteIpsRequest::getInstanceId()const
|
||||||
|
{
|
||||||
|
return instanceId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModifyWhiteIpsRequest::setInstanceId(const std::string& instanceId)
|
||||||
|
{
|
||||||
|
instanceId_ = instanceId;
|
||||||
|
setParameter("InstanceId", instanceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ModifyWhiteIpsRequest::getClientToken()const
|
||||||
|
{
|
||||||
|
return clientToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModifyWhiteIpsRequest::setClientToken(const std::string& clientToken)
|
||||||
|
{
|
||||||
|
clientToken_ = clientToken;
|
||||||
|
setParameter("ClientToken", clientToken);
|
||||||
|
}
|
||||||
|
|
||||||
51
elasticsearch/src/model/ModifyWhiteIpsResult.cc
Normal file
51
elasticsearch/src/model/ModifyWhiteIpsResult.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/elasticsearch/model/ModifyWhiteIpsResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Elasticsearch;
|
||||||
|
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||||
|
|
||||||
|
ModifyWhiteIpsResult::ModifyWhiteIpsResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ModifyWhiteIpsResult::ModifyWhiteIpsResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ModifyWhiteIpsResult::~ModifyWhiteIpsResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ModifyWhiteIpsResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
if(!value["Result"].isNull())
|
||||||
|
result_ = value["Result"].asString() == "true";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ModifyWhiteIpsResult::getResult()const
|
||||||
|
{
|
||||||
|
return result_;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user