Supported All Console APIs.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -39,25 +39,11 @@ void AddSnapshotRepoResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Result"].isNull())
|
||||
result_ = value["Result"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string AddSnapshotRepoResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string AddSnapshotRepoResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool AddSnapshotRepoResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
|
||||
63
elasticsearch/src/model/CloseDiagnosisRequest.cc
Normal file
63
elasticsearch/src/model/CloseDiagnosisRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/CloseDiagnosisRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::CloseDiagnosisRequest;
|
||||
|
||||
CloseDiagnosisRequest::CloseDiagnosisRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/actions/close-diagnosis");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CloseDiagnosisRequest::~CloseDiagnosisRequest()
|
||||
{}
|
||||
|
||||
std::string CloseDiagnosisRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void CloseDiagnosisRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string CloseDiagnosisRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CloseDiagnosisRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string CloseDiagnosisRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void CloseDiagnosisRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/CloseDiagnosisResult.cc
Normal file
51
elasticsearch/src/model/CloseDiagnosisResult.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/CloseDiagnosisResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
CloseDiagnosisResult::CloseDiagnosisResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CloseDiagnosisResult::CloseDiagnosisResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CloseDiagnosisResult::~CloseDiagnosisResult()
|
||||
{}
|
||||
|
||||
void CloseDiagnosisResult::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 CloseDiagnosisResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/CreateDataTasksRequest.cc
Normal file
52
elasticsearch/src/model/CreateDataTasksRequest.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/CreateDataTasksRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::CreateDataTasksRequest;
|
||||
|
||||
CreateDataTasksRequest::CreateDataTasksRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/data-task");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateDataTasksRequest::~CreateDataTasksRequest()
|
||||
{}
|
||||
|
||||
std::string CreateDataTasksRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void CreateDataTasksRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string CreateDataTasksRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateDataTasksRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
97
elasticsearch/src/model/CreateDataTasksResult.cc
Normal file
97
elasticsearch/src/model/CreateDataTasksResult.cc
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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/CreateDataTasksResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
CreateDataTasksResult::CreateDataTasksResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateDataTasksResult::CreateDataTasksResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateDataTasksResult::~CreateDataTasksResult()
|
||||
{}
|
||||
|
||||
void CreateDataTasksResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
auto sourceClusterNode = value["sourceCluster"];
|
||||
if(!sourceClusterNode["dataSourceType"].isNull())
|
||||
resultObject.sourceCluster.dataSourceType = sourceClusterNode["dataSourceType"].asString();
|
||||
if(!sourceClusterNode["vpcInstancePort"].isNull())
|
||||
resultObject.sourceCluster.vpcInstancePort = std::stoi(sourceClusterNode["vpcInstancePort"].asString());
|
||||
if(!sourceClusterNode["vpcId"].isNull())
|
||||
resultObject.sourceCluster.vpcId = sourceClusterNode["vpcId"].asString();
|
||||
if(!sourceClusterNode["vpcInstanceId"].isNull())
|
||||
resultObject.sourceCluster.vpcInstanceId = sourceClusterNode["vpcInstanceId"].asString();
|
||||
if(!sourceClusterNode["index"].isNull())
|
||||
resultObject.sourceCluster.index = sourceClusterNode["index"].asString();
|
||||
if(!sourceClusterNode["type"].isNull())
|
||||
resultObject.sourceCluster.type = sourceClusterNode["type"].asString();
|
||||
if(!sourceClusterNode["endpoint"].isNull())
|
||||
resultObject.sourceCluster.endpoint = sourceClusterNode["endpoint"].asString();
|
||||
if(!sourceClusterNode["username"].isNull())
|
||||
resultObject.sourceCluster.username = sourceClusterNode["username"].asString();
|
||||
if(!sourceClusterNode["password"].isNull())
|
||||
resultObject.sourceCluster.password = sourceClusterNode["password"].asString();
|
||||
auto sinkClusterNode = value["sinkCluster"];
|
||||
if(!sinkClusterNode["dataSourceType"].isNull())
|
||||
resultObject.sinkCluster.dataSourceType = sinkClusterNode["dataSourceType"].asString();
|
||||
if(!sinkClusterNode["index"].isNull())
|
||||
resultObject.sinkCluster.index = sinkClusterNode["index"].asString();
|
||||
if(!sinkClusterNode["type"].isNull())
|
||||
resultObject.sinkCluster.type = sinkClusterNode["type"].asString();
|
||||
if(!sinkClusterNode["settings"].isNull())
|
||||
resultObject.sinkCluster.settings = sinkClusterNode["settings"].asString();
|
||||
if(!sinkClusterNode["mapping"].isNull())
|
||||
resultObject.sinkCluster.mapping = sinkClusterNode["mapping"].asString();
|
||||
if(!sinkClusterNode["routing"].isNull())
|
||||
resultObject.sinkCluster.routing = sinkClusterNode["routing"].asString();
|
||||
if(!sinkClusterNode["vpcId"].isNull())
|
||||
resultObject.sinkCluster.vpcId = sinkClusterNode["vpcId"].asString();
|
||||
if(!sinkClusterNode["vpcInstanceId"].isNull())
|
||||
resultObject.sinkCluster.vpcInstanceId = sinkClusterNode["vpcInstanceId"].asString();
|
||||
if(!sinkClusterNode["vpcInstancePort"].isNull())
|
||||
resultObject.sinkCluster.vpcInstancePort = sinkClusterNode["vpcInstancePort"].asString();
|
||||
if(!sinkClusterNode["username"].isNull())
|
||||
resultObject.sinkCluster.username = sinkClusterNode["username"].asString();
|
||||
if(!sinkClusterNode["password"].isNull())
|
||||
resultObject.sinkCluster.password = sinkClusterNode["password"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<CreateDataTasksResult::ResultItem> CreateDataTasksResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/CreatePipelinesRequest.cc
Normal file
63
elasticsearch/src/model/CreatePipelinesRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/CreatePipelinesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::CreatePipelinesRequest;
|
||||
|
||||
CreatePipelinesRequest::CreatePipelinesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/pipelines");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreatePipelinesRequest::~CreatePipelinesRequest()
|
||||
{}
|
||||
|
||||
std::string CreatePipelinesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void CreatePipelinesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string CreatePipelinesRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreatePipelinesRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
bool CreatePipelinesRequest::getTrigger()const
|
||||
{
|
||||
return trigger_;
|
||||
}
|
||||
|
||||
void CreatePipelinesRequest::setTrigger(bool trigger)
|
||||
{
|
||||
trigger_ = trigger;
|
||||
setParameter("Trigger", trigger ? "true" : "false");
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/CreatePipelinesResult.cc
Normal file
51
elasticsearch/src/model/CreatePipelinesResult.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/CreatePipelinesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
CreatePipelinesResult::CreatePipelinesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreatePipelinesResult::CreatePipelinesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreatePipelinesResult::~CreatePipelinesResult()
|
||||
{}
|
||||
|
||||
void CreatePipelinesResult::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 CreatePipelinesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/CreateSnapshotRequest.cc
Normal file
52
elasticsearch/src/model/CreateSnapshotRequest.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/CreateSnapshotRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::CreateSnapshotRequest;
|
||||
|
||||
CreateSnapshotRequest::CreateSnapshotRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/snapshots");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateSnapshotRequest::~CreateSnapshotRequest()
|
||||
{}
|
||||
|
||||
std::string CreateSnapshotRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void CreateSnapshotRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string CreateSnapshotRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateSnapshotRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/CreateSnapshotResult.cc
Normal file
51
elasticsearch/src/model/CreateSnapshotResult.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/CreateSnapshotResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
CreateSnapshotResult::CreateSnapshotResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateSnapshotResult::CreateSnapshotResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateSnapshotResult::~CreateSnapshotResult()
|
||||
{}
|
||||
|
||||
void CreateSnapshotResult::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 CreateSnapshotResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/DeleteCollectorRequest.cc
Normal file
52
elasticsearch/src/model/DeleteCollectorRequest.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/DeleteCollectorRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DeleteCollectorRequest;
|
||||
|
||||
DeleteCollectorRequest::DeleteCollectorRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]");
|
||||
setMethod(HttpRequest::Method::Delete);
|
||||
}
|
||||
|
||||
DeleteCollectorRequest::~DeleteCollectorRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteCollectorRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteCollectorRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteCollectorRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void DeleteCollectorRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/DeleteCollectorResult.cc
Normal file
51
elasticsearch/src/model/DeleteCollectorResult.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/DeleteCollectorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DeleteCollectorResult::DeleteCollectorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteCollectorResult::DeleteCollectorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteCollectorResult::~DeleteCollectorResult()
|
||||
{}
|
||||
|
||||
void DeleteCollectorResult::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 DeleteCollectorResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/DeleteDataTaskRequest.cc
Normal file
63
elasticsearch/src/model/DeleteDataTaskRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/DeleteDataTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DeleteDataTaskRequest;
|
||||
|
||||
DeleteDataTaskRequest::DeleteDataTaskRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/data-task");
|
||||
setMethod(HttpRequest::Method::Delete);
|
||||
}
|
||||
|
||||
DeleteDataTaskRequest::~DeleteDataTaskRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDataTaskRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DeleteDataTaskRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DeleteDataTaskRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteDataTaskRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteDataTaskRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void DeleteDataTaskRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/DeleteDataTaskResult.cc
Normal file
51
elasticsearch/src/model/DeleteDataTaskResult.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/DeleteDataTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DeleteDataTaskResult::DeleteDataTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDataTaskResult::DeleteDataTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDataTaskResult::~DeleteDataTaskResult()
|
||||
{}
|
||||
|
||||
void DeleteDataTaskResult::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 DeleteDataTaskResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/DeletePipelinesRequest.cc
Normal file
63
elasticsearch/src/model/DeletePipelinesRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/DeletePipelinesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DeletePipelinesRequest;
|
||||
|
||||
DeletePipelinesRequest::DeletePipelinesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/pipelines");
|
||||
setMethod(HttpRequest::Method::Delete);
|
||||
}
|
||||
|
||||
DeletePipelinesRequest::~DeletePipelinesRequest()
|
||||
{}
|
||||
|
||||
std::string DeletePipelinesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DeletePipelinesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DeletePipelinesRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeletePipelinesRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string DeletePipelinesRequest::getPipelineIds()const
|
||||
{
|
||||
return pipelineIds_;
|
||||
}
|
||||
|
||||
void DeletePipelinesRequest::setPipelineIds(const std::string& pipelineIds)
|
||||
{
|
||||
pipelineIds_ = pipelineIds;
|
||||
setParameter("PipelineIds", pipelineIds);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/DeletePipelinesResult.cc
Normal file
51
elasticsearch/src/model/DeletePipelinesResult.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/DeletePipelinesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DeletePipelinesResult::DeletePipelinesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeletePipelinesResult::DeletePipelinesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeletePipelinesResult::~DeletePipelinesResult()
|
||||
{}
|
||||
|
||||
void DeletePipelinesResult::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 DeletePipelinesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
41
elasticsearch/src/model/DescribeCollectorRequest.cc
Normal file
41
elasticsearch/src/model/DescribeCollectorRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/DescribeCollectorRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DescribeCollectorRequest;
|
||||
|
||||
DescribeCollectorRequest::DescribeCollectorRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeCollectorRequest::~DescribeCollectorRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeCollectorRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void DescribeCollectorRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
118
elasticsearch/src/model/DescribeCollectorResult.cc
Normal file
118
elasticsearch/src/model/DescribeCollectorResult.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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/DescribeCollectorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DescribeCollectorResult::DescribeCollectorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeCollectorResult::DescribeCollectorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeCollectorResult::~DescribeCollectorResult()
|
||||
{}
|
||||
|
||||
void DescribeCollectorResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["gmtCreatedTime"].isNull())
|
||||
result_.gmtCreatedTime = resultNode["gmtCreatedTime"].asString();
|
||||
if(!resultNode["gmtUpdateTime"].isNull())
|
||||
result_.gmtUpdateTime = resultNode["gmtUpdateTime"].asString();
|
||||
if(!resultNode["name"].isNull())
|
||||
result_.name = resultNode["name"].asString();
|
||||
if(!resultNode["resId"].isNull())
|
||||
result_.resId = resultNode["resId"].asString();
|
||||
if(!resultNode["resVersion"].isNull())
|
||||
result_.resVersion = resultNode["resVersion"].asString();
|
||||
if(!resultNode["vpcId"].isNull())
|
||||
result_.vpcId = resultNode["vpcId"].asString();
|
||||
if(!resultNode["resType"].isNull())
|
||||
result_.resType = resultNode["resType"].asString();
|
||||
if(!resultNode["ownerId"].isNull())
|
||||
result_.ownerId = resultNode["ownerId"].asString();
|
||||
if(!resultNode["status"].isNull())
|
||||
result_.status = resultNode["status"].asString();
|
||||
if(!resultNode["dryRun"].isNull())
|
||||
result_.dryRun = resultNode["dryRun"].asString() == "true";
|
||||
auto allconfigsNode = resultNode["configs"]["configsItem"];
|
||||
for (auto resultNodeconfigsconfigsItem : allconfigsNode)
|
||||
{
|
||||
Result::ConfigsItem configsItemObject;
|
||||
if(!resultNodeconfigsconfigsItem["fileName"].isNull())
|
||||
configsItemObject.fileName = resultNodeconfigsconfigsItem["fileName"].asString();
|
||||
if(!resultNodeconfigsconfigsItem["content"].isNull())
|
||||
configsItemObject.content = resultNodeconfigsconfigsItem["content"].asString();
|
||||
result_.configs.push_back(configsItemObject);
|
||||
}
|
||||
auto allextendConfigsNode = resultNode["extendConfigs"]["extendConfigsItem"];
|
||||
for (auto resultNodeextendConfigsextendConfigsItem : allextendConfigsNode)
|
||||
{
|
||||
Result::ExtendConfigsItem extendConfigsItemObject;
|
||||
if(!resultNodeextendConfigsextendConfigsItem["configType"].isNull())
|
||||
extendConfigsItemObject.configType = resultNodeextendConfigsextendConfigsItem["configType"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["instanceId"].isNull())
|
||||
extendConfigsItemObject.instanceId = resultNodeextendConfigsextendConfigsItem["instanceId"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["instanceType"].isNull())
|
||||
extendConfigsItemObject.instanceType = resultNodeextendConfigsextendConfigsItem["instanceType"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["protocol"].isNull())
|
||||
extendConfigsItemObject.protocol = resultNodeextendConfigsextendConfigsItem["protocol"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["userName"].isNull())
|
||||
extendConfigsItemObject.userName = resultNodeextendConfigsextendConfigsItem["userName"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["enableMonitoring"].isNull())
|
||||
extendConfigsItemObject.enableMonitoring = resultNodeextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
|
||||
if(!resultNodeextendConfigsextendConfigsItem["type"].isNull())
|
||||
extendConfigsItemObject.type = resultNodeextendConfigsextendConfigsItem["type"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["groupId"].isNull())
|
||||
extendConfigsItemObject.groupId = resultNodeextendConfigsextendConfigsItem["groupId"].asString();
|
||||
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
|
||||
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
|
||||
{
|
||||
Result::ExtendConfigsItem::MachinesItem machinesObject;
|
||||
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
|
||||
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
|
||||
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
|
||||
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
|
||||
extendConfigsItemObject.machines.push_back(machinesObject);
|
||||
}
|
||||
auto allHosts = value["hosts"]["hosts"];
|
||||
for (auto value : allHosts)
|
||||
extendConfigsItemObject.hosts.push_back(value.asString());
|
||||
result_.extendConfigs.push_back(extendConfigsItemObject);
|
||||
}
|
||||
auto allCollectorPaths = resultNode["collectorPaths"]["collectorPaths"];
|
||||
for (auto value : allCollectorPaths)
|
||||
result_.collectorPaths.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeCollectorResult::Result DescribeCollectorResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/DescribeDiagnoseReportRequest.cc
Normal file
63
elasticsearch/src/model/DescribeDiagnoseReportRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/DescribeDiagnoseReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DescribeDiagnoseReportRequest;
|
||||
|
||||
DescribeDiagnoseReportRequest::DescribeDiagnoseReportRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/reports/[ReportId]");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeDiagnoseReportRequest::~DescribeDiagnoseReportRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeDiagnoseReportRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DescribeDiagnoseReportRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DescribeDiagnoseReportRequest::getReportId()const
|
||||
{
|
||||
return reportId_;
|
||||
}
|
||||
|
||||
void DescribeDiagnoseReportRequest::setReportId(const std::string& reportId)
|
||||
{
|
||||
reportId_ = reportId;
|
||||
setParameter("ReportId", reportId);
|
||||
}
|
||||
|
||||
std::string DescribeDiagnoseReportRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void DescribeDiagnoseReportRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
83
elasticsearch/src/model/DescribeDiagnoseReportResult.cc
Normal file
83
elasticsearch/src/model/DescribeDiagnoseReportResult.cc
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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/DescribeDiagnoseReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DescribeDiagnoseReportResult::DescribeDiagnoseReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDiagnoseReportResult::DescribeDiagnoseReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDiagnoseReportResult::~DescribeDiagnoseReportResult()
|
||||
{}
|
||||
|
||||
void DescribeDiagnoseReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["reportId"].isNull())
|
||||
result_.reportId = resultNode["reportId"].asString();
|
||||
if(!resultNode["instanceId"].isNull())
|
||||
result_.instanceId = resultNode["instanceId"].asString();
|
||||
if(!resultNode["state"].isNull())
|
||||
result_.state = resultNode["state"].asString();
|
||||
if(!resultNode["createTime"].isNull())
|
||||
result_.createTime = std::stol(resultNode["createTime"].asString());
|
||||
if(!resultNode["health"].isNull())
|
||||
result_.health = resultNode["health"].asString();
|
||||
if(!resultNode["trigger"].isNull())
|
||||
result_.trigger = resultNode["trigger"].asString();
|
||||
auto alldiagnoseItemsNode = resultNode["diagnoseItems"]["diagnoseItemsItem"];
|
||||
for (auto resultNodediagnoseItemsdiagnoseItemsItem : alldiagnoseItemsNode)
|
||||
{
|
||||
Result::DiagnoseItemsItem diagnoseItemsItemObject;
|
||||
if(!resultNodediagnoseItemsdiagnoseItemsItem["item"].isNull())
|
||||
diagnoseItemsItemObject.item = resultNodediagnoseItemsdiagnoseItemsItem["item"].asString();
|
||||
if(!resultNodediagnoseItemsdiagnoseItemsItem["health"].isNull())
|
||||
diagnoseItemsItemObject.health = resultNodediagnoseItemsdiagnoseItemsItem["health"].asString();
|
||||
auto detailNode = value["detail"];
|
||||
if(!detailNode["name"].isNull())
|
||||
diagnoseItemsItemObject.detail.name = detailNode["name"].asString();
|
||||
if(!detailNode["desc"].isNull())
|
||||
diagnoseItemsItemObject.detail.desc = detailNode["desc"].asString();
|
||||
if(!detailNode["type"].isNull())
|
||||
diagnoseItemsItemObject.detail.type = detailNode["type"].asString();
|
||||
if(!detailNode["suggest"].isNull())
|
||||
diagnoseItemsItemObject.detail.suggest = detailNode["suggest"].asString();
|
||||
if(!detailNode["result"].isNull())
|
||||
diagnoseItemsItemObject.detail.result = detailNode["result"].asString();
|
||||
result_.diagnoseItems.push_back(diagnoseItemsItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DescribeDiagnoseReportResult::Result DescribeDiagnoseReportResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/DescribeDiagnosisSettingsRequest.cc
Normal file
52
elasticsearch/src/model/DescribeDiagnosisSettingsRequest.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/DescribeDiagnosisSettingsRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DescribeDiagnosisSettingsRequest;
|
||||
|
||||
DescribeDiagnosisSettingsRequest::DescribeDiagnosisSettingsRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/settings");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeDiagnosisSettingsRequest::~DescribeDiagnosisSettingsRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeDiagnosisSettingsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DescribeDiagnosisSettingsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DescribeDiagnosisSettingsRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void DescribeDiagnosisSettingsRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
54
elasticsearch/src/model/DescribeDiagnosisSettingsResult.cc
Normal file
54
elasticsearch/src/model/DescribeDiagnosisSettingsResult.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/DescribeDiagnosisSettingsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DescribeDiagnosisSettingsResult::DescribeDiagnosisSettingsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDiagnosisSettingsResult::DescribeDiagnosisSettingsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDiagnosisSettingsResult::~DescribeDiagnosisSettingsResult()
|
||||
{}
|
||||
|
||||
void DescribeDiagnosisSettingsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["scene"].isNull())
|
||||
result_.scene = resultNode["scene"].asString();
|
||||
if(!resultNode["updateTime"].isNull())
|
||||
result_.updateTime = std::stol(resultNode["updateTime"].asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeDiagnosisSettingsResult::Result DescribeDiagnosisSettingsResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ using AlibabaCloud::Elasticsearch::Model::DescribePipelineManagementConfigReques
|
||||
DescribePipelineManagementConfigRequest::DescribePipelineManagementConfigRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]//pipeline-management-config");
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/pipeline-management-config");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ void DescribePipelineManagementConfigResult::parse(const std::string &payload)
|
||||
result_.endpoints = resultNode["endpoints"].asString();
|
||||
if(!resultNode["userName"].isNull())
|
||||
result_.userName = resultNode["userName"].asString();
|
||||
if(!resultNode["esInstanceId"].isNull())
|
||||
result_.esInstanceId = resultNode["esInstanceId"].asString();
|
||||
auto allPipelineIds = resultNode["pipelineIds"]["pipelineid"];
|
||||
for (auto value : allPipelineIds)
|
||||
result_.pipelineIds.push_back(value.asString());
|
||||
|
||||
52
elasticsearch/src/model/DescribePipelineRequest.cc
Normal file
52
elasticsearch/src/model/DescribePipelineRequest.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/DescribePipelineRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DescribePipelineRequest;
|
||||
|
||||
DescribePipelineRequest::DescribePipelineRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/pipelines/[PipelineId]");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribePipelineRequest::~DescribePipelineRequest()
|
||||
{}
|
||||
|
||||
std::string DescribePipelineRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DescribePipelineRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DescribePipelineRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void DescribePipelineRequest::setPipelineId(const std::string& pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setParameter("PipelineId", pipelineId);
|
||||
}
|
||||
|
||||
74
elasticsearch/src/model/DescribePipelineResult.cc
Normal file
74
elasticsearch/src/model/DescribePipelineResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/DescribePipelineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DescribePipelineResult::DescribePipelineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribePipelineResult::DescribePipelineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribePipelineResult::~DescribePipelineResult()
|
||||
{}
|
||||
|
||||
void DescribePipelineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["pipelineId"].isNull())
|
||||
result_.pipelineId = resultNode["pipelineId"].asString();
|
||||
if(!resultNode["config"].isNull())
|
||||
result_.config = resultNode["config"].asString();
|
||||
if(!resultNode["pipelineStatus"].isNull())
|
||||
result_.pipelineStatus = resultNode["pipelineStatus"].asString();
|
||||
if(!resultNode["gmtCreatedTime"].isNull())
|
||||
result_.gmtCreatedTime = resultNode["gmtCreatedTime"].asString();
|
||||
if(!resultNode["gmtUpdateTime"].isNull())
|
||||
result_.gmtUpdateTime = resultNode["gmtUpdateTime"].asString();
|
||||
if(!resultNode["workers"].isNull())
|
||||
result_.workers = std::stoi(resultNode["workers"].asString());
|
||||
if(!resultNode["batchSize"].isNull())
|
||||
result_.batchSize = std::stoi(resultNode["batchSize"].asString());
|
||||
if(!resultNode["batchDelay"].isNull())
|
||||
result_.batchDelay = std::stoi(resultNode["batchDelay"].asString());
|
||||
if(!resultNode["description"].isNull())
|
||||
result_.description = resultNode["description"].asString();
|
||||
if(!resultNode["queueType"].isNull())
|
||||
result_.queueType = resultNode["queueType"].asString();
|
||||
if(!resultNode["queueMaxBytes"].isNull())
|
||||
result_.queueMaxBytes = std::stoi(resultNode["queueMaxBytes"].asString());
|
||||
if(!resultNode["queueCheckPointWrites"].isNull())
|
||||
result_.queueCheckPointWrites = std::stoi(resultNode["queueCheckPointWrites"].asString());
|
||||
|
||||
}
|
||||
|
||||
DescribePipelineResult::Result DescribePipelineResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
41
elasticsearch/src/model/DescribeTemplatesRequest.cc
Normal file
41
elasticsearch/src/model/DescribeTemplatesRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/DescribeTemplatesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DescribeTemplatesRequest;
|
||||
|
||||
DescribeTemplatesRequest::DescribeTemplatesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/templates");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeTemplatesRequest::~DescribeTemplatesRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeTemplatesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DescribeTemplatesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
59
elasticsearch/src/model/DescribeTemplatesResult.cc
Normal file
59
elasticsearch/src/model/DescribeTemplatesResult.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/DescribeTemplatesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DescribeTemplatesResult::DescribeTemplatesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeTemplatesResult::DescribeTemplatesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeTemplatesResult::~DescribeTemplatesResult()
|
||||
{}
|
||||
|
||||
void DescribeTemplatesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["content"].isNull())
|
||||
resultObject.content = valueResultResultItem["content"].asString();
|
||||
if(!valueResultResultItem["templateName"].isNull())
|
||||
resultObject.templateName = valueResultResultItem["templateName"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeTemplatesResult::ResultItem> DescribeTemplatesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
41
elasticsearch/src/model/DescribeXpackMonitorConfigRequest.cc
Normal file
41
elasticsearch/src/model/DescribeXpackMonitorConfigRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/DescribeXpackMonitorConfigRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DescribeXpackMonitorConfigRequest;
|
||||
|
||||
DescribeXpackMonitorConfigRequest::DescribeXpackMonitorConfigRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/xpack-monitor-config");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeXpackMonitorConfigRequest::~DescribeXpackMonitorConfigRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeXpackMonitorConfigRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DescribeXpackMonitorConfigRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
62
elasticsearch/src/model/DescribeXpackMonitorConfigResult.cc
Normal file
62
elasticsearch/src/model/DescribeXpackMonitorConfigResult.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/elasticsearch/model/DescribeXpackMonitorConfigResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DescribeXpackMonitorConfigResult::DescribeXpackMonitorConfigResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeXpackMonitorConfigResult::DescribeXpackMonitorConfigResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeXpackMonitorConfigResult::~DescribeXpackMonitorConfigResult()
|
||||
{}
|
||||
|
||||
void DescribeXpackMonitorConfigResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["esInstanceId"].isNull())
|
||||
result_.esInstanceId = resultNode["esInstanceId"].asString();
|
||||
if(!resultNode["userName"].isNull())
|
||||
result_.userName = resultNode["userName"].asString();
|
||||
if(!resultNode["enable"].isNull())
|
||||
result_.enable = resultNode["enable"].asString() == "true";
|
||||
auto allEndpoints = resultNode["endpoints"]["endpoints"];
|
||||
for (auto value : allEndpoints)
|
||||
result_.endpoints.push_back(value.asString());
|
||||
auto allPipelineIds = resultNode["pipelineIds"]["pipelineIds"];
|
||||
for (auto value : allPipelineIds)
|
||||
result_.pipelineIds.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeXpackMonitorConfigResult::Result DescribeXpackMonitorConfigResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/DiagnoseInstanceRequest.cc
Normal file
63
elasticsearch/src/model/DiagnoseInstanceRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/DiagnoseInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::DiagnoseInstanceRequest;
|
||||
|
||||
DiagnoseInstanceRequest::DiagnoseInstanceRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/actions/diagnose");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DiagnoseInstanceRequest::~DiagnoseInstanceRequest()
|
||||
{}
|
||||
|
||||
std::string DiagnoseInstanceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DiagnoseInstanceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DiagnoseInstanceRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DiagnoseInstanceRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string DiagnoseInstanceRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void DiagnoseInstanceRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
79
elasticsearch/src/model/DiagnoseInstanceResult.cc
Normal file
79
elasticsearch/src/model/DiagnoseInstanceResult.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/elasticsearch/model/DiagnoseInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
DiagnoseInstanceResult::DiagnoseInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DiagnoseInstanceResult::DiagnoseInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DiagnoseInstanceResult::~DiagnoseInstanceResult()
|
||||
{}
|
||||
|
||||
void DiagnoseInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["reportId"].isNull())
|
||||
result_.reportId = resultNode["reportId"].asString();
|
||||
if(!resultNode["instanceId"].isNull())
|
||||
result_.instanceId = resultNode["instanceId"].asString();
|
||||
if(!resultNode["state"].isNull())
|
||||
result_.state = resultNode["state"].asString();
|
||||
if(!resultNode["createTime"].isNull())
|
||||
result_.createTime = std::stol(resultNode["createTime"].asString());
|
||||
auto alldiagnoseItemsNode = resultNode["diagnoseItems"]["diagnoseItemsItem"];
|
||||
for (auto resultNodediagnoseItemsdiagnoseItemsItem : alldiagnoseItemsNode)
|
||||
{
|
||||
Result::DiagnoseItemsItem diagnoseItemsItemObject;
|
||||
if(!resultNodediagnoseItemsdiagnoseItemsItem["item"].isNull())
|
||||
diagnoseItemsItemObject.item = resultNodediagnoseItemsdiagnoseItemsItem["item"].asString();
|
||||
if(!resultNodediagnoseItemsdiagnoseItemsItem["health"].isNull())
|
||||
diagnoseItemsItemObject.health = resultNodediagnoseItemsdiagnoseItemsItem["health"].asString();
|
||||
auto detailNode = value["detail"];
|
||||
if(!detailNode["name"].isNull())
|
||||
diagnoseItemsItemObject.detail.name = detailNode["name"].asString();
|
||||
if(!detailNode["desc"].isNull())
|
||||
diagnoseItemsItemObject.detail.desc = detailNode["desc"].asString();
|
||||
if(!detailNode["type"].isNull())
|
||||
diagnoseItemsItemObject.detail.type = detailNode["type"].asString();
|
||||
if(!detailNode["suggest"].isNull())
|
||||
diagnoseItemsItemObject.detail.suggest = detailNode["suggest"].asString();
|
||||
if(!detailNode["result"].isNull())
|
||||
diagnoseItemsItemObject.detail.result = detailNode["result"].asString();
|
||||
result_.diagnoseItems.push_back(diagnoseItemsItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DiagnoseInstanceResult::Result DiagnoseInstanceResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -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/EstimatedLogstashRestartTimeRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::EstimatedLogstashRestartTimeRequest;
|
||||
|
||||
EstimatedLogstashRestartTimeRequest::EstimatedLogstashRestartTimeRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/estimated-time/restart-time");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EstimatedLogstashRestartTimeRequest::~EstimatedLogstashRestartTimeRequest()
|
||||
{}
|
||||
|
||||
std::string EstimatedLogstashRestartTimeRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void EstimatedLogstashRestartTimeRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
bool EstimatedLogstashRestartTimeRequest::getForce()const
|
||||
{
|
||||
return force_;
|
||||
}
|
||||
|
||||
void EstimatedLogstashRestartTimeRequest::setForce(bool force)
|
||||
{
|
||||
force_ = force;
|
||||
setParameter("Force", force ? "true" : "false");
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/EstimatedLogstashRestartTimeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
EstimatedLogstashRestartTimeResult::EstimatedLogstashRestartTimeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EstimatedLogstashRestartTimeResult::EstimatedLogstashRestartTimeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EstimatedLogstashRestartTimeResult::~EstimatedLogstashRestartTimeResult()
|
||||
{}
|
||||
|
||||
void EstimatedLogstashRestartTimeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["value"].isNull())
|
||||
result_.value = std::stol(resultNode["value"].asString());
|
||||
if(!resultNode["unit"].isNull())
|
||||
result_.unit = resultNode["unit"].asString();
|
||||
|
||||
}
|
||||
|
||||
EstimatedLogstashRestartTimeResult::Result EstimatedLogstashRestartTimeResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/EstimatedRestartTimeRequest.cc
Normal file
52
elasticsearch/src/model/EstimatedRestartTimeRequest.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/EstimatedRestartTimeRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::EstimatedRestartTimeRequest;
|
||||
|
||||
EstimatedRestartTimeRequest::EstimatedRestartTimeRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/estimated-time/restart-time");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EstimatedRestartTimeRequest::~EstimatedRestartTimeRequest()
|
||||
{}
|
||||
|
||||
std::string EstimatedRestartTimeRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void EstimatedRestartTimeRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
bool EstimatedRestartTimeRequest::getForce()const
|
||||
{
|
||||
return force_;
|
||||
}
|
||||
|
||||
void EstimatedRestartTimeRequest::setForce(bool force)
|
||||
{
|
||||
force_ = force;
|
||||
setParameter("Force", force ? "true" : "false");
|
||||
}
|
||||
|
||||
54
elasticsearch/src/model/EstimatedRestartTimeResult.cc
Normal file
54
elasticsearch/src/model/EstimatedRestartTimeResult.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/EstimatedRestartTimeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
EstimatedRestartTimeResult::EstimatedRestartTimeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EstimatedRestartTimeResult::EstimatedRestartTimeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EstimatedRestartTimeResult::~EstimatedRestartTimeResult()
|
||||
{}
|
||||
|
||||
void EstimatedRestartTimeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["value"].isNull())
|
||||
result_.value = std::stol(resultNode["value"].asString());
|
||||
if(!resultNode["unit"].isNull())
|
||||
result_.unit = resultNode["unit"].asString();
|
||||
|
||||
}
|
||||
|
||||
EstimatedRestartTimeResult::Result EstimatedRestartTimeResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
30
elasticsearch/src/model/GetClusterDataInformationRequest.cc
Normal file
30
elasticsearch/src/model/GetClusterDataInformationRequest.cc
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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/GetClusterDataInformationRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::GetClusterDataInformationRequest;
|
||||
|
||||
GetClusterDataInformationRequest::GetClusterDataInformationRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/cluster/data-information");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetClusterDataInformationRequest::~GetClusterDataInformationRequest()
|
||||
{}
|
||||
|
||||
66
elasticsearch/src/model/GetClusterDataInformationResult.cc
Normal file
66
elasticsearch/src/model/GetClusterDataInformationResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/GetClusterDataInformationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
GetClusterDataInformationResult::GetClusterDataInformationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetClusterDataInformationResult::GetClusterDataInformationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetClusterDataInformationResult::~GetClusterDataInformationResult()
|
||||
{}
|
||||
|
||||
void GetClusterDataInformationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["connectable"].isNull())
|
||||
result_.connectable = resultNode["connectable"].asString() == "true";
|
||||
auto metaInfoNode = resultNode["metaInfo"];
|
||||
if(!metaInfoNode["settings"].isNull())
|
||||
result_.metaInfo.settings = metaInfoNode["settings"].asString();
|
||||
if(!metaInfoNode["mapping"].isNull())
|
||||
result_.metaInfo.mapping = metaInfoNode["mapping"].asString();
|
||||
auto allIndices = metaInfoNode["indices"]["indices"];
|
||||
for (auto value : allIndices)
|
||||
result_.metaInfo.indices.push_back(value.asString());
|
||||
auto allFields = metaInfoNode["fields"]["fields"];
|
||||
for (auto value : allFields)
|
||||
result_.metaInfo.fields.push_back(value.asString());
|
||||
auto allTypeName = metaInfoNode["typeName"]["typeName"];
|
||||
for (auto value : allTypeName)
|
||||
result_.metaInfo.typeName.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
GetClusterDataInformationResult::Result GetClusterDataInformationResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -40,28 +40,28 @@ void GetElastictaskResult::parse(const std::string &payload)
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
auto elasticExpansionTaskNode = resultNode["ElasticExpansionTask"];
|
||||
if(!elasticExpansionTaskNode["TriggerType"].isNull())
|
||||
result_.elasticExpansionTask.triggerType = elasticExpansionTaskNode["TriggerType"].asString();
|
||||
if(!elasticExpansionTaskNode["CronExpression"].isNull())
|
||||
result_.elasticExpansionTask.cronExpression = elasticExpansionTaskNode["CronExpression"].asString();
|
||||
if(!elasticExpansionTaskNode["ElasticNodeCount"].isNull())
|
||||
result_.elasticExpansionTask.elasticNodeCount = std::stoi(elasticExpansionTaskNode["ElasticNodeCount"].asString());
|
||||
if(!elasticExpansionTaskNode["ReplicaCount"].isNull())
|
||||
result_.elasticExpansionTask.replicaCount = std::stoi(elasticExpansionTaskNode["ReplicaCount"].asString());
|
||||
auto allTargetIndices = elasticExpansionTaskNode["TargetIndices"]["TargetIndices"];
|
||||
auto elasticExpansionTaskNode = resultNode["elasticExpansionTask"];
|
||||
if(!elasticExpansionTaskNode["triggerType"].isNull())
|
||||
result_.elasticExpansionTask.triggerType = elasticExpansionTaskNode["triggerType"].asString();
|
||||
if(!elasticExpansionTaskNode["cronExpression"].isNull())
|
||||
result_.elasticExpansionTask.cronExpression = elasticExpansionTaskNode["cronExpression"].asString();
|
||||
if(!elasticExpansionTaskNode["elasticNodeCount"].isNull())
|
||||
result_.elasticExpansionTask.elasticNodeCount = std::stoi(elasticExpansionTaskNode["elasticNodeCount"].asString());
|
||||
if(!elasticExpansionTaskNode["replicaCount"].isNull())
|
||||
result_.elasticExpansionTask.replicaCount = std::stoi(elasticExpansionTaskNode["replicaCount"].asString());
|
||||
auto allTargetIndices = elasticExpansionTaskNode["targetIndices"]["TargetIndices"];
|
||||
for (auto value : allTargetIndices)
|
||||
result_.elasticExpansionTask.targetIndices.push_back(value.asString());
|
||||
auto elasticShrinkTaskNode = resultNode["ElasticShrinkTask"];
|
||||
if(!elasticShrinkTaskNode["TriggerType"].isNull())
|
||||
result_.elasticShrinkTask.triggerType = elasticShrinkTaskNode["TriggerType"].asString();
|
||||
if(!elasticShrinkTaskNode["CronExpression"].isNull())
|
||||
result_.elasticShrinkTask.cronExpression = elasticShrinkTaskNode["CronExpression"].asString();
|
||||
if(!elasticShrinkTaskNode["ElasticNodeCount"].isNull())
|
||||
result_.elasticShrinkTask.elasticNodeCount = std::stoi(elasticShrinkTaskNode["ElasticNodeCount"].asString());
|
||||
if(!elasticShrinkTaskNode["ReplicaCount"].isNull())
|
||||
result_.elasticShrinkTask.replicaCount = std::stoi(elasticShrinkTaskNode["ReplicaCount"].asString());
|
||||
auto allTargetIndices1 = elasticShrinkTaskNode["TargetIndices"]["TargetIndices"];
|
||||
auto elasticShrinkTaskNode = resultNode["elasticShrinkTask"];
|
||||
if(!elasticShrinkTaskNode["triggerType"].isNull())
|
||||
result_.elasticShrinkTask.triggerType = elasticShrinkTaskNode["triggerType"].asString();
|
||||
if(!elasticShrinkTaskNode["cronExpression"].isNull())
|
||||
result_.elasticShrinkTask.cronExpression = elasticShrinkTaskNode["cronExpression"].asString();
|
||||
if(!elasticShrinkTaskNode["elasticNodeCount"].isNull())
|
||||
result_.elasticShrinkTask.elasticNodeCount = std::stoi(elasticShrinkTaskNode["elasticNodeCount"].asString());
|
||||
if(!elasticShrinkTaskNode["replicaCount"].isNull())
|
||||
result_.elasticShrinkTask.replicaCount = std::stoi(elasticShrinkTaskNode["replicaCount"].asString());
|
||||
auto allTargetIndices1 = elasticShrinkTaskNode["targetIndices"]["TargetIndices"];
|
||||
for (auto value : allTargetIndices1)
|
||||
result_.elasticShrinkTask.targetIndices1.push_back(value.asString());
|
||||
|
||||
|
||||
@@ -53,12 +53,14 @@ void ListAllNodeResult::parse(const std::string &payload)
|
||||
resultObject.nodeType = valueResultResultItem["nodeType"].asString();
|
||||
if(!valueResultResultItem["cpuPercent"].isNull())
|
||||
resultObject.cpuPercent = valueResultResultItem["cpuPercent"].asString();
|
||||
if(!valueResultResultItem["loadFiveM"].isNull())
|
||||
resultObject.loadFiveM = valueResultResultItem["loadFiveM"].asString();
|
||||
if(!valueResultResultItem["loadOneM"].isNull())
|
||||
resultObject.loadOneM = valueResultResultItem["loadOneM"].asString();
|
||||
if(!valueResultResultItem["heapPercent"].isNull())
|
||||
resultObject.heapPercent = valueResultResultItem["heapPercent"].asString();
|
||||
if(!valueResultResultItem["health"].isNull())
|
||||
resultObject.health = valueResultResultItem["health"].asString();
|
||||
if(!valueResultResultItem["diskUsedPercent"].isNull())
|
||||
resultObject.diskUsedPercent = valueResultResultItem["diskUsedPercent"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,6 @@ void ListAlternativeSnapshotReposResult::parse(const std::string &payload)
|
||||
Repo resultObject;
|
||||
if(!valueResultrepo["instanceId"].isNull())
|
||||
resultObject.instanceId = valueResultrepo["instanceId"].asString();
|
||||
if(!valueResultrepo["snapWarehouse"].isNull())
|
||||
resultObject.snapWarehouse = valueResultrepo["snapWarehouse"].asString();
|
||||
if(!valueResultrepo["repoPath"].isNull())
|
||||
resultObject.repoPath = valueResultrepo["repoPath"].asString();
|
||||
result_.push_back(resultObject);
|
||||
|
||||
41
elasticsearch/src/model/ListAvailableEsInstanceIdsRequest.cc
Normal file
41
elasticsearch/src/model/ListAvailableEsInstanceIdsRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/ListAvailableEsInstanceIdsRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListAvailableEsInstanceIdsRequest;
|
||||
|
||||
ListAvailableEsInstanceIdsRequest::ListAvailableEsInstanceIdsRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/available-elasticsearch-for-centralized-management");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListAvailableEsInstanceIdsRequest::~ListAvailableEsInstanceIdsRequest()
|
||||
{}
|
||||
|
||||
std::string ListAvailableEsInstanceIdsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListAvailableEsInstanceIdsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/ListAvailableEsInstanceIdsResult.cc
Normal file
63
elasticsearch/src/model/ListAvailableEsInstanceIdsResult.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListAvailableEsInstanceIdsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListAvailableEsInstanceIdsResult::ListAvailableEsInstanceIdsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListAvailableEsInstanceIdsResult::ListAvailableEsInstanceIdsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListAvailableEsInstanceIdsResult::~ListAvailableEsInstanceIdsResult()
|
||||
{}
|
||||
|
||||
void ListAvailableEsInstanceIdsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["esInstanceId"].isNull())
|
||||
resultObject.esInstanceId = valueResultResultItem["esInstanceId"].asString();
|
||||
if(!valueResultResultItem["endpoint"].isNull())
|
||||
resultObject.endpoint = valueResultResultItem["endpoint"].asString();
|
||||
if(!valueResultResultItem["description"].isNull())
|
||||
resultObject.description = valueResultResultItem["description"].asString();
|
||||
if(!valueResultResultItem["kibanaEndpoint"].isNull())
|
||||
resultObject.kibanaEndpoint = valueResultResultItem["kibanaEndpoint"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListAvailableEsInstanceIdsResult::ResultItem> ListAvailableEsInstanceIdsResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
85
elasticsearch/src/model/ListCollectorsRequest.cc
Normal file
85
elasticsearch/src/model/ListCollectorsRequest.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/ListCollectorsRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListCollectorsRequest;
|
||||
|
||||
ListCollectorsRequest::ListCollectorsRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListCollectorsRequest::~ListCollectorsRequest()
|
||||
{}
|
||||
|
||||
std::string ListCollectorsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListCollectorsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int ListCollectorsRequest::getSize()const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
void ListCollectorsRequest::setSize(int size)
|
||||
{
|
||||
size_ = size;
|
||||
setParameter("Size", std::to_string(size));
|
||||
}
|
||||
|
||||
std::string ListCollectorsRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void ListCollectorsRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
int ListCollectorsRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListCollectorsRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string ListCollectorsRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void ListCollectorsRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
131
elasticsearch/src/model/ListCollectorsResult.cc
Normal file
131
elasticsearch/src/model/ListCollectorsResult.cc
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* 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/ListCollectorsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListCollectorsResult::ListCollectorsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListCollectorsResult::ListCollectorsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListCollectorsResult::~ListCollectorsResult()
|
||||
{}
|
||||
|
||||
void ListCollectorsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["gmtCreatedTime"].isNull())
|
||||
resultObject.gmtCreatedTime = valueResultResultItem["gmtCreatedTime"].asString();
|
||||
if(!valueResultResultItem["gmtUpdateTime"].isNull())
|
||||
resultObject.gmtUpdateTime = valueResultResultItem["gmtUpdateTime"].asString();
|
||||
if(!valueResultResultItem["name"].isNull())
|
||||
resultObject.name = valueResultResultItem["name"].asString();
|
||||
if(!valueResultResultItem["resId"].isNull())
|
||||
resultObject.resId = valueResultResultItem["resId"].asString();
|
||||
if(!valueResultResultItem["resVersion"].isNull())
|
||||
resultObject.resVersion = valueResultResultItem["resVersion"].asString();
|
||||
if(!valueResultResultItem["vpcId"].isNull())
|
||||
resultObject.vpcId = valueResultResultItem["vpcId"].asString();
|
||||
if(!valueResultResultItem["resType"].isNull())
|
||||
resultObject.resType = valueResultResultItem["resType"].asString();
|
||||
if(!valueResultResultItem["ownerId"].isNull())
|
||||
resultObject.ownerId = valueResultResultItem["ownerId"].asString();
|
||||
if(!valueResultResultItem["status"].isNull())
|
||||
resultObject.status = valueResultResultItem["status"].asString();
|
||||
if(!valueResultResultItem["dryRun"].isNull())
|
||||
resultObject.dryRun = valueResultResultItem["dryRun"].asString() == "true";
|
||||
auto allconfigsNode = allResultNode["configs"]["configsItem"];
|
||||
for (auto allResultNodeconfigsconfigsItem : allconfigsNode)
|
||||
{
|
||||
ResultItem::ConfigsItem configsObject;
|
||||
if(!allResultNodeconfigsconfigsItem["fileName"].isNull())
|
||||
configsObject.fileName = allResultNodeconfigsconfigsItem["fileName"].asString();
|
||||
if(!allResultNodeconfigsconfigsItem["content"].isNull())
|
||||
configsObject.content = allResultNodeconfigsconfigsItem["content"].asString();
|
||||
resultObject.configs.push_back(configsObject);
|
||||
}
|
||||
auto allextendConfigsNode = allResultNode["extendConfigs"]["extendConfigsItem"];
|
||||
for (auto allResultNodeextendConfigsextendConfigsItem : allextendConfigsNode)
|
||||
{
|
||||
ResultItem::ExtendConfigsItem extendConfigsObject;
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["configType"].isNull())
|
||||
extendConfigsObject.configType = allResultNodeextendConfigsextendConfigsItem["configType"].asString();
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["instanceId"].isNull())
|
||||
extendConfigsObject.instanceId = allResultNodeextendConfigsextendConfigsItem["instanceId"].asString();
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["instanceType"].isNull())
|
||||
extendConfigsObject.instanceType = allResultNodeextendConfigsextendConfigsItem["instanceType"].asString();
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["protocol"].isNull())
|
||||
extendConfigsObject.protocol = allResultNodeextendConfigsextendConfigsItem["protocol"].asString();
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["userName"].isNull())
|
||||
extendConfigsObject.userName = allResultNodeextendConfigsextendConfigsItem["userName"].asString();
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["enableMonitoring"].isNull())
|
||||
extendConfigsObject.enableMonitoring = allResultNodeextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["type"].isNull())
|
||||
extendConfigsObject.type = allResultNodeextendConfigsextendConfigsItem["type"].asString();
|
||||
if(!allResultNodeextendConfigsextendConfigsItem["groupId"].isNull())
|
||||
extendConfigsObject.groupId = allResultNodeextendConfigsextendConfigsItem["groupId"].asString();
|
||||
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
|
||||
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
|
||||
{
|
||||
ResultItem::ExtendConfigsItem::MachinesItem machinesObject;
|
||||
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
|
||||
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
|
||||
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
|
||||
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
|
||||
extendConfigsObject.machines.push_back(machinesObject);
|
||||
}
|
||||
auto allHosts = value["hosts"]["hosts"];
|
||||
for (auto value : allHosts)
|
||||
extendConfigsObject.hosts.push_back(value.asString());
|
||||
resultObject.extendConfigs.push_back(extendConfigsObject);
|
||||
}
|
||||
auto allCollectorPaths = value["collectorPaths"]["collectorPaths"];
|
||||
for (auto value : allCollectorPaths)
|
||||
resultObject.collectorPaths.push_back(value.asString());
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
auto headersNode = value["Headers"];
|
||||
if(!headersNode["X-Total-Count"].isNull())
|
||||
headers_.xTotalCount = std::stoi(headersNode["X-Total-Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
ListCollectorsResult::Headers ListCollectorsResult::getHeaders()const
|
||||
{
|
||||
return headers_;
|
||||
}
|
||||
|
||||
std::vector<ListCollectorsResult::ResultItem> ListCollectorsResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -39,20 +39,20 @@ void ListConnectedClustersResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ConnectableClustersInfo"];
|
||||
for (auto valueResultConnectableClustersInfo : allResultNode)
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ConnectableClustersInfo resultObject;
|
||||
if(!valueResultConnectableClustersInfo["instances"].isNull())
|
||||
resultObject.instances = valueResultConnectableClustersInfo["instances"].asString();
|
||||
if(!valueResultConnectableClustersInfo["networkType"].isNull())
|
||||
resultObject.networkType = valueResultConnectableClustersInfo["networkType"].asString();
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["instances"].isNull())
|
||||
resultObject.instances = valueResultResultItem["instances"].asString();
|
||||
if(!valueResultResultItem["networkType"].isNull())
|
||||
resultObject.networkType = valueResultResultItem["networkType"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListConnectedClustersResult::ConnectableClustersInfo> ListConnectedClustersResult::getResult()const
|
||||
std::vector<ListConnectedClustersResult::ResultItem> ListConnectedClustersResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
41
elasticsearch/src/model/ListDataTasksRequest.cc
Normal file
41
elasticsearch/src/model/ListDataTasksRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/ListDataTasksRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListDataTasksRequest;
|
||||
|
||||
ListDataTasksRequest::ListDataTasksRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/data-task");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListDataTasksRequest::~ListDataTasksRequest()
|
||||
{}
|
||||
|
||||
std::string ListDataTasksRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListDataTasksRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
89
elasticsearch/src/model/ListDataTasksResult.cc
Normal file
89
elasticsearch/src/model/ListDataTasksResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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/ListDataTasksResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListDataTasksResult::ListDataTasksResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListDataTasksResult::ListDataTasksResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListDataTasksResult::~ListDataTasksResult()
|
||||
{}
|
||||
|
||||
void ListDataTasksResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["createTime"].isNull())
|
||||
resultObject.createTime = valueResultResultItem["createTime"].asString();
|
||||
if(!valueResultResultItem["status"].isNull())
|
||||
resultObject.status = valueResultResultItem["status"].asString();
|
||||
if(!valueResultResultItem["taskId"].isNull())
|
||||
resultObject.taskId = valueResultResultItem["taskId"].asString();
|
||||
auto sinkClusterNode = value["sinkCluster"];
|
||||
if(!sinkClusterNode["dataSourceType"].isNull())
|
||||
resultObject.sinkCluster.dataSourceType = sinkClusterNode["dataSourceType"].asString();
|
||||
if(!sinkClusterNode["endpoint"].isNull())
|
||||
resultObject.sinkCluster.endpoint = sinkClusterNode["endpoint"].asString();
|
||||
if(!sinkClusterNode["index"].isNull())
|
||||
resultObject.sinkCluster.index = sinkClusterNode["index"].asString();
|
||||
if(!sinkClusterNode["type"].isNull())
|
||||
resultObject.sinkCluster.type = sinkClusterNode["type"].asString();
|
||||
if(!sinkClusterNode["vpcId"].isNull())
|
||||
resultObject.sinkCluster.vpcId = sinkClusterNode["vpcId"].asString();
|
||||
if(!sinkClusterNode["vpcInstanceId"].isNull())
|
||||
resultObject.sinkCluster.vpcInstanceId = sinkClusterNode["vpcInstanceId"].asString();
|
||||
if(!sinkClusterNode["vpcInstancePort"].isNull())
|
||||
resultObject.sinkCluster.vpcInstancePort = sinkClusterNode["vpcInstancePort"].asString();
|
||||
auto sourceClusterNode = value["sourceCluster"];
|
||||
if(!sourceClusterNode["dataSourceType"].isNull())
|
||||
resultObject.sourceCluster.dataSourceType = sourceClusterNode["dataSourceType"].asString();
|
||||
if(!sourceClusterNode["index"].isNull())
|
||||
resultObject.sourceCluster.index = sourceClusterNode["index"].asString();
|
||||
if(!sourceClusterNode["mapping"].isNull())
|
||||
resultObject.sourceCluster.mapping = sourceClusterNode["mapping"].asString();
|
||||
if(!sourceClusterNode["routing"].isNull())
|
||||
resultObject.sourceCluster.routing = sourceClusterNode["routing"].asString();
|
||||
if(!sourceClusterNode["settings"].isNull())
|
||||
resultObject.sourceCluster.settings = sourceClusterNode["settings"].asString();
|
||||
if(!sourceClusterNode["type"].isNull())
|
||||
resultObject.sourceCluster.type = sourceClusterNode["type"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListDataTasksResult::ResultItem> ListDataTasksResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
107
elasticsearch/src/model/ListDiagnoseReportIdsRequest.cc
Normal file
107
elasticsearch/src/model/ListDiagnoseReportIdsRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/ListDiagnoseReportIdsRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListDiagnoseReportIdsRequest;
|
||||
|
||||
ListDiagnoseReportIdsRequest::ListDiagnoseReportIdsRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/report-ids");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListDiagnoseReportIdsRequest::~ListDiagnoseReportIdsRequest()
|
||||
{}
|
||||
|
||||
std::string ListDiagnoseReportIdsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportIdsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int ListDiagnoseReportIdsRequest::getSize()const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportIdsRequest::setSize(int size)
|
||||
{
|
||||
size_ = size;
|
||||
setParameter("Size", std::to_string(size));
|
||||
}
|
||||
|
||||
long ListDiagnoseReportIdsRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportIdsRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long ListDiagnoseReportIdsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportIdsRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
int ListDiagnoseReportIdsRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportIdsRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string ListDiagnoseReportIdsRequest::getTrigger()const
|
||||
{
|
||||
return trigger_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportIdsRequest::setTrigger(const std::string& trigger)
|
||||
{
|
||||
trigger_ = trigger;
|
||||
setParameter("Trigger", trigger);
|
||||
}
|
||||
|
||||
std::string ListDiagnoseReportIdsRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportIdsRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
60
elasticsearch/src/model/ListDiagnoseReportIdsResult.cc
Normal file
60
elasticsearch/src/model/ListDiagnoseReportIdsResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListDiagnoseReportIdsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListDiagnoseReportIdsResult::ListDiagnoseReportIdsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListDiagnoseReportIdsResult::ListDiagnoseReportIdsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListDiagnoseReportIdsResult::~ListDiagnoseReportIdsResult()
|
||||
{}
|
||||
|
||||
void ListDiagnoseReportIdsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto headersNode = value["Headers"];
|
||||
if(!headersNode["X-Total-Count"].isNull())
|
||||
headers_.xTotalCount = std::stoi(headersNode["X-Total-Count"].asString());
|
||||
auto allResult = value["Result"]["Result"];
|
||||
for (const auto &item : allResult)
|
||||
result_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
ListDiagnoseReportIdsResult::Headers ListDiagnoseReportIdsResult::getHeaders()const
|
||||
{
|
||||
return headers_;
|
||||
}
|
||||
|
||||
std::vector<std::string> ListDiagnoseReportIdsResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
118
elasticsearch/src/model/ListDiagnoseReportRequest.cc
Normal file
118
elasticsearch/src/model/ListDiagnoseReportRequest.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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/ListDiagnoseReportRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListDiagnoseReportRequest;
|
||||
|
||||
ListDiagnoseReportRequest::ListDiagnoseReportRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/reports");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListDiagnoseReportRequest::~ListDiagnoseReportRequest()
|
||||
{}
|
||||
|
||||
std::string ListDiagnoseReportRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int ListDiagnoseReportRequest::getSize()const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setSize(int size)
|
||||
{
|
||||
size_ = size;
|
||||
setParameter("Size", std::to_string(size));
|
||||
}
|
||||
|
||||
long ListDiagnoseReportRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long ListDiagnoseReportRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
int ListDiagnoseReportRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
bool ListDiagnoseReportRequest::getDetail()const
|
||||
{
|
||||
return detail_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setDetail(bool detail)
|
||||
{
|
||||
detail_ = detail;
|
||||
setParameter("Detail", detail ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListDiagnoseReportRequest::getTrigger()const
|
||||
{
|
||||
return trigger_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setTrigger(const std::string& trigger)
|
||||
{
|
||||
trigger_ = trigger;
|
||||
setParameter("Trigger", trigger);
|
||||
}
|
||||
|
||||
std::string ListDiagnoseReportRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void ListDiagnoseReportRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
96
elasticsearch/src/model/ListDiagnoseReportResult.cc
Normal file
96
elasticsearch/src/model/ListDiagnoseReportResult.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListDiagnoseReportResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListDiagnoseReportResult::ListDiagnoseReportResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListDiagnoseReportResult::ListDiagnoseReportResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListDiagnoseReportResult::~ListDiagnoseReportResult()
|
||||
{}
|
||||
|
||||
void ListDiagnoseReportResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["reportId"].isNull())
|
||||
resultObject.reportId = valueResultResultItem["reportId"].asString();
|
||||
if(!valueResultResultItem["instanceId"].isNull())
|
||||
resultObject.instanceId = valueResultResultItem["instanceId"].asString();
|
||||
if(!valueResultResultItem["state"].isNull())
|
||||
resultObject.state = valueResultResultItem["state"].asString();
|
||||
if(!valueResultResultItem["trigger"].isNull())
|
||||
resultObject.trigger = valueResultResultItem["trigger"].asString();
|
||||
if(!valueResultResultItem["health"].isNull())
|
||||
resultObject.health = valueResultResultItem["health"].asString();
|
||||
if(!valueResultResultItem["createTime"].isNull())
|
||||
resultObject.createTime = std::stol(valueResultResultItem["createTime"].asString());
|
||||
auto alldiagnoseItemsNode = allResultNode["diagnoseItems"]["diagnoseItemsItem"];
|
||||
for (auto allResultNodediagnoseItemsdiagnoseItemsItem : alldiagnoseItemsNode)
|
||||
{
|
||||
ResultItem::DiagnoseItemsItem diagnoseItemsObject;
|
||||
if(!allResultNodediagnoseItemsdiagnoseItemsItem["item"].isNull())
|
||||
diagnoseItemsObject.item = allResultNodediagnoseItemsdiagnoseItemsItem["item"].asString();
|
||||
if(!allResultNodediagnoseItemsdiagnoseItemsItem["health"].isNull())
|
||||
diagnoseItemsObject.health = allResultNodediagnoseItemsdiagnoseItemsItem["health"].asString();
|
||||
auto detailNode = value["detail"];
|
||||
if(!detailNode["name"].isNull())
|
||||
diagnoseItemsObject.detail.name = detailNode["name"].asString();
|
||||
if(!detailNode["desc"].isNull())
|
||||
diagnoseItemsObject.detail.desc = detailNode["desc"].asString();
|
||||
if(!detailNode["type"].isNull())
|
||||
diagnoseItemsObject.detail.type = detailNode["type"].asString();
|
||||
if(!detailNode["suggest"].isNull())
|
||||
diagnoseItemsObject.detail.suggest = detailNode["suggest"].asString();
|
||||
if(!detailNode["result"].isNull())
|
||||
diagnoseItemsObject.detail.result = detailNode["result"].asString();
|
||||
resultObject.diagnoseItems.push_back(diagnoseItemsObject);
|
||||
}
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
auto headersNode = value["Headers"];
|
||||
if(!headersNode["X-Total-Count"].isNull())
|
||||
headers_.xTotalCount = std::stoi(headersNode["X-Total-Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
ListDiagnoseReportResult::Headers ListDiagnoseReportResult::getHeaders()const
|
||||
{
|
||||
return headers_;
|
||||
}
|
||||
|
||||
std::vector<ListDiagnoseReportResult::ResultItem> ListDiagnoseReportResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
74
elasticsearch/src/model/ListDictInformationRequest.cc
Normal file
74
elasticsearch/src/model/ListDictInformationRequest.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/ListDictInformationRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListDictInformationRequest;
|
||||
|
||||
ListDictInformationRequest::ListDictInformationRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/dict/_info");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListDictInformationRequest::~ListDictInformationRequest()
|
||||
{}
|
||||
|
||||
std::string ListDictInformationRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListDictInformationRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListDictInformationRequest::getAnalyzerType()const
|
||||
{
|
||||
return analyzerType_;
|
||||
}
|
||||
|
||||
void ListDictInformationRequest::setAnalyzerType(const std::string& analyzerType)
|
||||
{
|
||||
analyzerType_ = analyzerType;
|
||||
setParameter("AnalyzerType", analyzerType);
|
||||
}
|
||||
|
||||
std::string ListDictInformationRequest::getBucketName()const
|
||||
{
|
||||
return bucketName_;
|
||||
}
|
||||
|
||||
void ListDictInformationRequest::setBucketName(const std::string& bucketName)
|
||||
{
|
||||
bucketName_ = bucketName;
|
||||
setParameter("BucketName", bucketName);
|
||||
}
|
||||
|
||||
std::string ListDictInformationRequest::getKey()const
|
||||
{
|
||||
return key_;
|
||||
}
|
||||
|
||||
void ListDictInformationRequest::setKey(const std::string& key)
|
||||
{
|
||||
key_ = key;
|
||||
setParameter("Key", key);
|
||||
}
|
||||
|
||||
61
elasticsearch/src/model/ListDictInformationResult.cc
Normal file
61
elasticsearch/src/model/ListDictInformationResult.cc
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListDictInformationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListDictInformationResult::ListDictInformationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListDictInformationResult::ListDictInformationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListDictInformationResult::~ListDictInformationResult()
|
||||
{}
|
||||
|
||||
void ListDictInformationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["fileSize"].isNull())
|
||||
result_.fileSize = std::stol(resultNode["fileSize"].asString());
|
||||
if(!resultNode["type"].isNull())
|
||||
result_.type = resultNode["type"].asString();
|
||||
auto ossObjectNode = resultNode["ossObject"];
|
||||
if(!ossObjectNode["bucketName"].isNull())
|
||||
result_.ossObject.bucketName = ossObjectNode["bucketName"].asString();
|
||||
if(!ossObjectNode["key"].isNull())
|
||||
result_.ossObject.key = ossObjectNode["key"].asString();
|
||||
if(!ossObjectNode["etag"].isNull())
|
||||
result_.ossObject.etag = ossObjectNode["etag"].asString();
|
||||
|
||||
}
|
||||
|
||||
ListDictInformationResult::Result ListDictInformationResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
96
elasticsearch/src/model/ListEcsInstancesRequest.cc
Normal file
96
elasticsearch/src/model/ListEcsInstancesRequest.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListEcsInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListEcsInstancesRequest;
|
||||
|
||||
ListEcsInstancesRequest::ListEcsInstancesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/ecs");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListEcsInstancesRequest::~ListEcsInstancesRequest()
|
||||
{}
|
||||
|
||||
std::string ListEcsInstancesRequest::getEcsInstanceName()const
|
||||
{
|
||||
return ecsInstanceName_;
|
||||
}
|
||||
|
||||
void ListEcsInstancesRequest::setEcsInstanceName(const std::string& ecsInstanceName)
|
||||
{
|
||||
ecsInstanceName_ = ecsInstanceName;
|
||||
setParameter("EcsInstanceName", ecsInstanceName);
|
||||
}
|
||||
|
||||
std::string ListEcsInstancesRequest::getEcsInstanceIds()const
|
||||
{
|
||||
return ecsInstanceIds_;
|
||||
}
|
||||
|
||||
void ListEcsInstancesRequest::setEcsInstanceIds(const std::string& ecsInstanceIds)
|
||||
{
|
||||
ecsInstanceIds_ = ecsInstanceIds;
|
||||
setParameter("EcsInstanceIds", ecsInstanceIds);
|
||||
}
|
||||
|
||||
int ListEcsInstancesRequest::getSize()const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
void ListEcsInstancesRequest::setSize(int size)
|
||||
{
|
||||
size_ = size;
|
||||
setParameter("Size", std::to_string(size));
|
||||
}
|
||||
|
||||
std::string ListEcsInstancesRequest::getVpcId()const
|
||||
{
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void ListEcsInstancesRequest::setVpcId(const std::string& vpcId)
|
||||
{
|
||||
vpcId_ = vpcId;
|
||||
setParameter("VpcId", vpcId);
|
||||
}
|
||||
|
||||
int ListEcsInstancesRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListEcsInstancesRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string ListEcsInstancesRequest::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
void ListEcsInstancesRequest::setTags(const std::string& tags)
|
||||
{
|
||||
tags_ = tags;
|
||||
setParameter("Tags", tags);
|
||||
}
|
||||
|
||||
159
elasticsearch/src/model/ListEcsInstancesResult.cc
Normal file
159
elasticsearch/src/model/ListEcsInstancesResult.cc
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* 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/ListEcsInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListEcsInstancesResult::ListEcsInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListEcsInstancesResult::ListEcsInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListEcsInstancesResult::~ListEcsInstancesResult()
|
||||
{}
|
||||
|
||||
void ListEcsInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["ecsInstanceId"].isNull())
|
||||
resultObject.ecsInstanceId = valueResultResultItem["ecsInstanceId"].asString();
|
||||
if(!valueResultResultItem["ecsInstanceName"].isNull())
|
||||
resultObject.ecsInstanceName = valueResultResultItem["ecsInstanceName"].asString();
|
||||
if(!valueResultResultItem["status"].isNull())
|
||||
resultObject.status = valueResultResultItem["status"].asString();
|
||||
if(!valueResultResultItem["tags"].isNull())
|
||||
resultObject.tags = valueResultResultItem["tags"].asString();
|
||||
if(!valueResultResultItem["osType"].isNull())
|
||||
resultObject.osType = valueResultResultItem["osType"].asString();
|
||||
if(!valueResultResultItem["cloudAssistantStatus"].isNull())
|
||||
resultObject.cloudAssistantStatus = valueResultResultItem["cloudAssistantStatus"].asString();
|
||||
auto allipAddressNode = allResultNode["ipAddress"]["ipAddressItem"];
|
||||
for (auto allResultNodeipAddressipAddressItem : allipAddressNode)
|
||||
{
|
||||
ResultItem::IpAddressItem ipAddressObject;
|
||||
if(!allResultNodeipAddressipAddressItem["host"].isNull())
|
||||
ipAddressObject.host = allResultNodeipAddressipAddressItem["host"].asString();
|
||||
if(!allResultNodeipAddressipAddressItem["ipType"].isNull())
|
||||
ipAddressObject.ipType = allResultNodeipAddressipAddressItem["ipType"].asString();
|
||||
resultObject.ipAddress.push_back(ipAddressObject);
|
||||
}
|
||||
auto allcollectorsNode = allResultNode["collectors"]["collectorsItem"];
|
||||
for (auto allResultNodecollectorscollectorsItem : allcollectorsNode)
|
||||
{
|
||||
ResultItem::CollectorsItem collectorsObject;
|
||||
if(!allResultNodecollectorscollectorsItem["gmtCreatedTime"].isNull())
|
||||
collectorsObject.gmtCreatedTime = allResultNodecollectorscollectorsItem["gmtCreatedTime"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["gmtUpdateTime"].isNull())
|
||||
collectorsObject.gmtUpdateTime = allResultNodecollectorscollectorsItem["gmtUpdateTime"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["name"].isNull())
|
||||
collectorsObject.name = allResultNodecollectorscollectorsItem["name"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["resId"].isNull())
|
||||
collectorsObject.resId = allResultNodecollectorscollectorsItem["resId"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["resVersion"].isNull())
|
||||
collectorsObject.resVersion = allResultNodecollectorscollectorsItem["resVersion"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["vpcId"].isNull())
|
||||
collectorsObject.vpcId = allResultNodecollectorscollectorsItem["vpcId"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["resType"].isNull())
|
||||
collectorsObject.resType = allResultNodecollectorscollectorsItem["resType"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["ownerId"].isNull())
|
||||
collectorsObject.ownerId = allResultNodecollectorscollectorsItem["ownerId"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["status"].isNull())
|
||||
collectorsObject.status = allResultNodecollectorscollectorsItem["status"].asString();
|
||||
if(!allResultNodecollectorscollectorsItem["dryRun"].isNull())
|
||||
collectorsObject.dryRun = allResultNodecollectorscollectorsItem["dryRun"].asString() == "true";
|
||||
auto allconfigsNode = allcollectorsNode["configs"]["configsItem"];
|
||||
for (auto allcollectorsNodeconfigsconfigsItem : allconfigsNode)
|
||||
{
|
||||
ResultItem::CollectorsItem::ConfigsItem configsObject;
|
||||
if(!allcollectorsNodeconfigsconfigsItem["fileName"].isNull())
|
||||
configsObject.fileName = allcollectorsNodeconfigsconfigsItem["fileName"].asString();
|
||||
if(!allcollectorsNodeconfigsconfigsItem["content"].isNull())
|
||||
configsObject.content = allcollectorsNodeconfigsconfigsItem["content"].asString();
|
||||
collectorsObject.configs.push_back(configsObject);
|
||||
}
|
||||
auto allextendConfigsNode = allcollectorsNode["extendConfigs"]["extendConfigsItem"];
|
||||
for (auto allcollectorsNodeextendConfigsextendConfigsItem : allextendConfigsNode)
|
||||
{
|
||||
ResultItem::CollectorsItem::ExtendConfigsItem extendConfigsObject;
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["configType"].isNull())
|
||||
extendConfigsObject.configType = allcollectorsNodeextendConfigsextendConfigsItem["configType"].asString();
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["instanceId"].isNull())
|
||||
extendConfigsObject.instanceId = allcollectorsNodeextendConfigsextendConfigsItem["instanceId"].asString();
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["instanceType"].isNull())
|
||||
extendConfigsObject.instanceType = allcollectorsNodeextendConfigsextendConfigsItem["instanceType"].asString();
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["protocol"].isNull())
|
||||
extendConfigsObject.protocol = allcollectorsNodeextendConfigsextendConfigsItem["protocol"].asString();
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["userName"].isNull())
|
||||
extendConfigsObject.userName = allcollectorsNodeextendConfigsextendConfigsItem["userName"].asString();
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["enableMonitoring"].isNull())
|
||||
extendConfigsObject.enableMonitoring = allcollectorsNodeextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["type"].isNull())
|
||||
extendConfigsObject.type = allcollectorsNodeextendConfigsextendConfigsItem["type"].asString();
|
||||
if(!allcollectorsNodeextendConfigsextendConfigsItem["groupId"].isNull())
|
||||
extendConfigsObject.groupId = allcollectorsNodeextendConfigsextendConfigsItem["groupId"].asString();
|
||||
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
|
||||
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
|
||||
{
|
||||
ResultItem::CollectorsItem::ExtendConfigsItem::MachinesItem machinesObject;
|
||||
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
|
||||
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
|
||||
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
|
||||
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
|
||||
extendConfigsObject.machines.push_back(machinesObject);
|
||||
}
|
||||
auto allHosts = value["hosts"]["hosts"];
|
||||
for (auto value : allHosts)
|
||||
extendConfigsObject.hosts.push_back(value.asString());
|
||||
collectorsObject.extendConfigs.push_back(extendConfigsObject);
|
||||
}
|
||||
auto allCollectorPaths = value["collectorPaths"]["collectorPaths"];
|
||||
for (auto value : allCollectorPaths)
|
||||
collectorsObject.collectorPaths.push_back(value.asString());
|
||||
resultObject.collectors.push_back(collectorsObject);
|
||||
}
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
auto headersNode = value["Headers"];
|
||||
if(!headersNode["X-Total-Count"].isNull())
|
||||
headers_.xTotalCount = std::stoi(headersNode["X-Total-Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
ListEcsInstancesResult::Headers ListEcsInstancesResult::getHeaders()const
|
||||
{
|
||||
return headers_;
|
||||
}
|
||||
|
||||
std::vector<ListEcsInstancesResult::ResultItem> ListEcsInstancesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
41
elasticsearch/src/model/ListExtendfilesRequest.cc
Normal file
41
elasticsearch/src/model/ListExtendfilesRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/ListExtendfilesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListExtendfilesRequest;
|
||||
|
||||
ListExtendfilesRequest::ListExtendfilesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/extendfiles");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListExtendfilesRequest::~ListExtendfilesRequest()
|
||||
{}
|
||||
|
||||
std::string ListExtendfilesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListExtendfilesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/ListExtendfilesResult.cc
Normal file
63
elasticsearch/src/model/ListExtendfilesResult.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListExtendfilesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListExtendfilesResult::ListExtendfilesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListExtendfilesResult::ListExtendfilesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListExtendfilesResult::~ListExtendfilesResult()
|
||||
{}
|
||||
|
||||
void ListExtendfilesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["name"].isNull())
|
||||
resultObject.name = valueResultResultItem["name"].asString();
|
||||
if(!valueResultResultItem["fileSize"].isNull())
|
||||
resultObject.fileSize = std::stol(valueResultResultItem["fileSize"].asString());
|
||||
if(!valueResultResultItem["sourceType"].isNull())
|
||||
resultObject.sourceType = valueResultResultItem["sourceType"].asString();
|
||||
if(!valueResultResultItem["filePath"].isNull())
|
||||
resultObject.filePath = valueResultResultItem["filePath"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListExtendfilesResult::ResultItem> ListExtendfilesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/ListInstanceIndicesRequest.cc
Normal file
52
elasticsearch/src/model/ListInstanceIndicesRequest.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/ListInstanceIndicesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListInstanceIndicesRequest;
|
||||
|
||||
ListInstanceIndicesRequest::ListInstanceIndicesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/indices");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListInstanceIndicesRequest::~ListInstanceIndicesRequest()
|
||||
{}
|
||||
|
||||
std::string ListInstanceIndicesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListInstanceIndicesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListInstanceIndicesRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void ListInstanceIndicesRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/ListInstanceIndicesResult.cc
Normal file
52
elasticsearch/src/model/ListInstanceIndicesResult.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/ListInstanceIndicesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListInstanceIndicesResult::ListInstanceIndicesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListInstanceIndicesResult::ListInstanceIndicesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListInstanceIndicesResult::~ListInstanceIndicesResult()
|
||||
{}
|
||||
|
||||
void ListInstanceIndicesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResult = value["Result"]["Result"];
|
||||
for (const auto &item : allResult)
|
||||
result_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> ListInstanceIndicesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -61,15 +61,15 @@ void ListLogstashPluginsRequest::setName(const std::string& name)
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string ListLogstashPluginsRequest::getPage()const
|
||||
int ListLogstashPluginsRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListLogstashPluginsRequest::setPage(const std::string& page)
|
||||
void ListLogstashPluginsRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", page);
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string ListLogstashPluginsRequest::getSource()const
|
||||
|
||||
@@ -51,6 +51,8 @@ void ListLogstashPluginsResult::parse(const std::string &payload)
|
||||
resultObject.source = valueResultResultItem["source"].asString();
|
||||
if(!valueResultResultItem["description"].isNull())
|
||||
resultObject.description = valueResultResultItem["description"].asString();
|
||||
if(!valueResultResultItem["specificationUrl"].isNull())
|
||||
resultObject.specificationUrl = valueResultResultItem["specificationUrl"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
|
||||
96
elasticsearch/src/model/ListNodesRequest.cc
Normal file
96
elasticsearch/src/model/ListNodesRequest.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListNodesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListNodesRequest;
|
||||
|
||||
ListNodesRequest::ListNodesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]/nodes");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListNodesRequest::~ListNodesRequest()
|
||||
{}
|
||||
|
||||
std::string ListNodesRequest::getEcsInstanceName()const
|
||||
{
|
||||
return ecsInstanceName_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setEcsInstanceName(const std::string& ecsInstanceName)
|
||||
{
|
||||
ecsInstanceName_ = ecsInstanceName;
|
||||
setParameter("EcsInstanceName", ecsInstanceName);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getEcsInstanceIds()const
|
||||
{
|
||||
return ecsInstanceIds_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setEcsInstanceIds(const std::string& ecsInstanceIds)
|
||||
{
|
||||
ecsInstanceIds_ = ecsInstanceIds;
|
||||
setParameter("EcsInstanceIds", ecsInstanceIds);
|
||||
}
|
||||
|
||||
int ListNodesRequest::getSize()const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setSize(int size)
|
||||
{
|
||||
size_ = size;
|
||||
setParameter("Size", std::to_string(size));
|
||||
}
|
||||
|
||||
int ListNodesRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setTags(const std::string& tags)
|
||||
{
|
||||
tags_ = tags;
|
||||
setParameter("Tags", tags);
|
||||
}
|
||||
|
||||
95
elasticsearch/src/model/ListNodesResult.cc
Normal file
95
elasticsearch/src/model/ListNodesResult.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/elasticsearch/model/ListNodesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListNodesResult::ListNodesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListNodesResult::ListNodesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListNodesResult::~ListNodesResult()
|
||||
{}
|
||||
|
||||
void ListNodesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["ecsInstanceId"].isNull())
|
||||
resultObject.ecsInstanceId = valueResultResultItem["ecsInstanceId"].asString();
|
||||
if(!valueResultResultItem["ecsInstanceName"].isNull())
|
||||
resultObject.ecsInstanceName = valueResultResultItem["ecsInstanceName"].asString();
|
||||
if(!valueResultResultItem["status"].isNull())
|
||||
resultObject.status = valueResultResultItem["status"].asString();
|
||||
if(!valueResultResultItem["osType"].isNull())
|
||||
resultObject.osType = valueResultResultItem["osType"].asString();
|
||||
if(!valueResultResultItem["cloudAssistantStatus"].isNull())
|
||||
resultObject.cloudAssistantStatus = valueResultResultItem["cloudAssistantStatus"].asString();
|
||||
if(!valueResultResultItem["agentStatus"].isNull())
|
||||
resultObject.agentStatus = valueResultResultItem["agentStatus"].asString();
|
||||
auto alltagsNode = allResultNode["tags"]["tagsItem"];
|
||||
for (auto allResultNodetagstagsItem : alltagsNode)
|
||||
{
|
||||
ResultItem::TagsItem tagsObject;
|
||||
if(!allResultNodetagstagsItem["tagKey"].isNull())
|
||||
tagsObject.tagKey = allResultNodetagstagsItem["tagKey"].asString();
|
||||
if(!allResultNodetagstagsItem["tagValue"].isNull())
|
||||
tagsObject.tagValue = allResultNodetagstagsItem["tagValue"].asString();
|
||||
resultObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allipAddressNode = allResultNode["ipAddress"]["ipAddressItem"];
|
||||
for (auto allResultNodeipAddressipAddressItem : allipAddressNode)
|
||||
{
|
||||
ResultItem::IpAddressItem ipAddressObject;
|
||||
if(!allResultNodeipAddressipAddressItem["host"].isNull())
|
||||
ipAddressObject.host = allResultNodeipAddressipAddressItem["host"].asString();
|
||||
if(!allResultNodeipAddressipAddressItem["ipType"].isNull())
|
||||
ipAddressObject.ipType = allResultNodeipAddressipAddressItem["ipType"].asString();
|
||||
resultObject.ipAddress.push_back(ipAddressObject);
|
||||
}
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
auto headersNode = value["Headers"];
|
||||
if(!headersNode["X-Total-Count"].isNull())
|
||||
headers_.xTotalCount = std::stoi(headersNode["X-Total-Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
ListNodesResult::Headers ListNodesResult::getHeaders()const
|
||||
{
|
||||
return headers_;
|
||||
}
|
||||
|
||||
std::vector<ListNodesResult::ResultItem> ListNodesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
41
elasticsearch/src/model/ListPipelineIdsRequest.cc
Normal file
41
elasticsearch/src/model/ListPipelineIdsRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/ListPipelineIdsRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListPipelineIdsRequest;
|
||||
|
||||
ListPipelineIdsRequest::ListPipelineIdsRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/pipeline-ids");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListPipelineIdsRequest::~ListPipelineIdsRequest()
|
||||
{}
|
||||
|
||||
std::string ListPipelineIdsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListPipelineIdsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/ListPipelineIdsResult.cc
Normal file
63
elasticsearch/src/model/ListPipelineIdsResult.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListPipelineIdsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListPipelineIdsResult::ListPipelineIdsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListPipelineIdsResult::ListPipelineIdsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListPipelineIdsResult::~ListPipelineIdsResult()
|
||||
{}
|
||||
|
||||
void ListPipelineIdsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["pipelineId"].isNull())
|
||||
resultObject.pipelineId = valueResultResultItem["pipelineId"].asString();
|
||||
if(!valueResultResultItem["available"].isNull())
|
||||
resultObject.available = valueResultResultItem["available"].asString() == "true";
|
||||
if(!valueResultResultItem["code"].isNull())
|
||||
resultObject.code = valueResultResultItem["code"].asString();
|
||||
if(!valueResultResultItem["message"].isNull())
|
||||
resultObject.message = valueResultResultItem["message"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListPipelineIdsResult::ResultItem> ListPipelineIdsResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
74
elasticsearch/src/model/ListPipelineRequest.cc
Normal file
74
elasticsearch/src/model/ListPipelineRequest.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/ListPipelineRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListPipelineRequest;
|
||||
|
||||
ListPipelineRequest::ListPipelineRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/pipelines");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListPipelineRequest::~ListPipelineRequest()
|
||||
{}
|
||||
|
||||
std::string ListPipelineRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListPipelineRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int ListPipelineRequest::getSize()const
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
||||
void ListPipelineRequest::setSize(int size)
|
||||
{
|
||||
size_ = size;
|
||||
setParameter("Size", std::to_string(size));
|
||||
}
|
||||
|
||||
int ListPipelineRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListPipelineRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string ListPipelineRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void ListPipelineRequest::setPipelineId(const std::string& pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setParameter("PipelineId", pipelineId);
|
||||
}
|
||||
|
||||
71
elasticsearch/src/model/ListPipelineResult.cc
Normal file
71
elasticsearch/src/model/ListPipelineResult.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ListPipelineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListPipelineResult::ListPipelineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListPipelineResult::ListPipelineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListPipelineResult::~ListPipelineResult()
|
||||
{}
|
||||
|
||||
void ListPipelineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["pipelineId"].isNull())
|
||||
resultObject.pipelineId = valueResultResultItem["pipelineId"].asString();
|
||||
if(!valueResultResultItem["pipelineStatus"].isNull())
|
||||
resultObject.pipelineStatus = valueResultResultItem["pipelineStatus"].asString();
|
||||
if(!valueResultResultItem["gmtCreatedTime"].isNull())
|
||||
resultObject.gmtCreatedTime = valueResultResultItem["gmtCreatedTime"].asString();
|
||||
if(!valueResultResultItem["gmtUpdateTime"].isNull())
|
||||
resultObject.gmtUpdateTime = valueResultResultItem["gmtUpdateTime"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
auto headersNode = value["Headers"];
|
||||
if(!headersNode["X-Total-Count"].isNull())
|
||||
headers_.xTotalCount = std::stoi(headersNode["X-Total-Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
ListPipelineResult::Headers ListPipelineResult::getHeaders()const
|
||||
{
|
||||
return headers_;
|
||||
}
|
||||
|
||||
std::vector<ListPipelineResult::ResultItem> ListPipelineResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ void ListPluginsResult::parse(const std::string &payload)
|
||||
resultObject.source = valueResultResultItem["source"].asString();
|
||||
if(!valueResultResultItem["description"].isNull())
|
||||
resultObject.description = valueResultResultItem["description"].asString();
|
||||
if(!valueResultResultItem["specificationUrl"].isNull())
|
||||
resultObject.specificationUrl = valueResultResultItem["specificationUrl"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
auto headersNode = value["Headers"];
|
||||
|
||||
52
elasticsearch/src/model/ListTagsRequest.cc
Normal file
52
elasticsearch/src/model/ListTagsRequest.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/ListTagsRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ListTagsRequest;
|
||||
|
||||
ListTagsRequest::ListTagsRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/tags/all-tags");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListTagsRequest::~ListTagsRequest()
|
||||
{}
|
||||
|
||||
int ListTagsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListTagsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListTagsRequest::getResourceType()const
|
||||
{
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void ListTagsRequest::setResourceType(const std::string& resourceType)
|
||||
{
|
||||
resourceType_ = resourceType;
|
||||
setParameter("ResourceType", resourceType);
|
||||
}
|
||||
|
||||
59
elasticsearch/src/model/ListTagsResult.cc
Normal file
59
elasticsearch/src/model/ListTagsResult.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/ListTagsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ListTagsResult::ListTagsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListTagsResult::ListTagsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListTagsResult::~ListTagsResult()
|
||||
{}
|
||||
|
||||
void ListTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["ResultItem"];
|
||||
for (auto valueResultResultItem : allResultNode)
|
||||
{
|
||||
ResultItem resultObject;
|
||||
if(!valueResultResultItem["TagKey"].isNull())
|
||||
resultObject.tagKey = valueResultResultItem["TagKey"].asString();
|
||||
if(!valueResultResultItem["TagValue"].isNull())
|
||||
resultObject.tagValue = valueResultResultItem["TagValue"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListTagsResult::ResultItem> ListTagsResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/MigrateToOtherZoneRequest.cc
Normal file
52
elasticsearch/src/model/MigrateToOtherZoneRequest.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/MigrateToOtherZoneRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::MigrateToOtherZoneRequest;
|
||||
|
||||
MigrateToOtherZoneRequest::MigrateToOtherZoneRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/actions/migrate-zones");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
MigrateToOtherZoneRequest::~MigrateToOtherZoneRequest()
|
||||
{}
|
||||
|
||||
std::string MigrateToOtherZoneRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void MigrateToOtherZoneRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
bool MigrateToOtherZoneRequest::getDryRun()const
|
||||
{
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void MigrateToOtherZoneRequest::setDryRun(bool dryRun)
|
||||
{
|
||||
dryRun_ = dryRun;
|
||||
setParameter("DryRun", dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/MigrateToOtherZoneResult.cc
Normal file
51
elasticsearch/src/model/MigrateToOtherZoneResult.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/MigrateToOtherZoneResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
MigrateToOtherZoneResult::MigrateToOtherZoneResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
MigrateToOtherZoneResult::MigrateToOtherZoneResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
MigrateToOtherZoneResult::~MigrateToOtherZoneResult()
|
||||
{}
|
||||
|
||||
void MigrateToOtherZoneResult::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 MigrateToOtherZoneResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/ModifyDeployMachineRequest.cc
Normal file
52
elasticsearch/src/model/ModifyDeployMachineRequest.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/ModifyDeployMachineRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ModifyDeployMachineRequest;
|
||||
|
||||
ModifyDeployMachineRequest::ModifyDeployMachineRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]/actions/modify-deploy-machines");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyDeployMachineRequest::~ModifyDeployMachineRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyDeployMachineRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ModifyDeployMachineRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string ModifyDeployMachineRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void ModifyDeployMachineRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/ModifyDeployMachineResult.cc
Normal file
51
elasticsearch/src/model/ModifyDeployMachineResult.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/ModifyDeployMachineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ModifyDeployMachineResult::ModifyDeployMachineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyDeployMachineResult::ModifyDeployMachineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyDeployMachineResult::~ModifyDeployMachineResult()
|
||||
{}
|
||||
|
||||
void ModifyDeployMachineResult::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 ModifyDeployMachineResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -40,28 +40,28 @@ void ModifyElastictaskResult::parse(const std::string &payload)
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
auto elasticExpansionTaskNode = resultNode["ElasticExpansionTask"];
|
||||
if(!elasticExpansionTaskNode["TriggerType"].isNull())
|
||||
result_.elasticExpansionTask.triggerType = elasticExpansionTaskNode["TriggerType"].asString();
|
||||
if(!elasticExpansionTaskNode["CronExpression"].isNull())
|
||||
result_.elasticExpansionTask.cronExpression = elasticExpansionTaskNode["CronExpression"].asString();
|
||||
if(!elasticExpansionTaskNode["ElasticNodeCount"].isNull())
|
||||
result_.elasticExpansionTask.elasticNodeCount = std::stoi(elasticExpansionTaskNode["ElasticNodeCount"].asString());
|
||||
if(!elasticExpansionTaskNode["ReplicaCount"].isNull())
|
||||
result_.elasticExpansionTask.replicaCount = std::stoi(elasticExpansionTaskNode["ReplicaCount"].asString());
|
||||
auto allTargetIndices = elasticExpansionTaskNode["TargetIndices"]["TargetIndices"];
|
||||
auto elasticExpansionTaskNode = resultNode["elasticExpansionTask"];
|
||||
if(!elasticExpansionTaskNode["triggerType"].isNull())
|
||||
result_.elasticExpansionTask.triggerType = elasticExpansionTaskNode["triggerType"].asString();
|
||||
if(!elasticExpansionTaskNode["cronExpression"].isNull())
|
||||
result_.elasticExpansionTask.cronExpression = elasticExpansionTaskNode["cronExpression"].asString();
|
||||
if(!elasticExpansionTaskNode["elasticNodeCount"].isNull())
|
||||
result_.elasticExpansionTask.elasticNodeCount = std::stoi(elasticExpansionTaskNode["elasticNodeCount"].asString());
|
||||
if(!elasticExpansionTaskNode["replicaCount"].isNull())
|
||||
result_.elasticExpansionTask.replicaCount = std::stoi(elasticExpansionTaskNode["replicaCount"].asString());
|
||||
auto allTargetIndices = elasticExpansionTaskNode["targetIndices"]["TargetIndices"];
|
||||
for (auto value : allTargetIndices)
|
||||
result_.elasticExpansionTask.targetIndices.push_back(value.asString());
|
||||
auto elasticShrinkTaskNode = resultNode["ElasticShrinkTask"];
|
||||
if(!elasticShrinkTaskNode["TriggerType"].isNull())
|
||||
result_.elasticShrinkTask.triggerType = elasticShrinkTaskNode["TriggerType"].asString();
|
||||
if(!elasticShrinkTaskNode["CronExpression"].isNull())
|
||||
result_.elasticShrinkTask.cronExpression = elasticShrinkTaskNode["CronExpression"].asString();
|
||||
if(!elasticShrinkTaskNode["ElasticNodeCount"].isNull())
|
||||
result_.elasticShrinkTask.elasticNodeCount = std::stoi(elasticShrinkTaskNode["ElasticNodeCount"].asString());
|
||||
if(!elasticShrinkTaskNode["ReplicaCount"].isNull())
|
||||
result_.elasticShrinkTask.replicaCount = std::stoi(elasticShrinkTaskNode["ReplicaCount"].asString());
|
||||
auto allTargetIndices1 = elasticShrinkTaskNode["TargetIndices"]["TargetIndices"];
|
||||
auto elasticShrinkTaskNode = resultNode["elasticShrinkTask"];
|
||||
if(!elasticShrinkTaskNode["triggerType"].isNull())
|
||||
result_.elasticShrinkTask.triggerType = elasticShrinkTaskNode["triggerType"].asString();
|
||||
if(!elasticShrinkTaskNode["cronExpression"].isNull())
|
||||
result_.elasticShrinkTask.cronExpression = elasticShrinkTaskNode["cronExpression"].asString();
|
||||
if(!elasticShrinkTaskNode["elasticNodeCount"].isNull())
|
||||
result_.elasticShrinkTask.elasticNodeCount = std::stoi(elasticShrinkTaskNode["elasticNodeCount"].asString());
|
||||
if(!elasticShrinkTaskNode["replicaCount"].isNull())
|
||||
result_.elasticShrinkTask.replicaCount = std::stoi(elasticShrinkTaskNode["replicaCount"].asString());
|
||||
auto allTargetIndices1 = elasticShrinkTaskNode["targetIndices"]["TargetIndices"];
|
||||
for (auto value : allTargetIndices1)
|
||||
result_.elasticShrinkTask.targetIndices1.push_back(value.asString());
|
||||
|
||||
|
||||
52
elasticsearch/src/model/ModifyInstanceMaintainTimeRequest.cc
Normal file
52
elasticsearch/src/model/ModifyInstanceMaintainTimeRequest.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/ModifyInstanceMaintainTimeRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ModifyInstanceMaintainTimeRequest;
|
||||
|
||||
ModifyInstanceMaintainTimeRequest::ModifyInstanceMaintainTimeRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/instances/[InstanceId]/actions/modify-maintaintime");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyInstanceMaintainTimeRequest::~ModifyInstanceMaintainTimeRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyInstanceMaintainTimeRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ModifyInstanceMaintainTimeRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceMaintainTimeRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ModifyInstanceMaintainTimeRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/ModifyInstanceMaintainTimeResult.cc
Normal file
51
elasticsearch/src/model/ModifyInstanceMaintainTimeResult.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/ModifyInstanceMaintainTimeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ModifyInstanceMaintainTimeResult::ModifyInstanceMaintainTimeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyInstanceMaintainTimeResult::ModifyInstanceMaintainTimeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyInstanceMaintainTimeResult::~ModifyInstanceMaintainTimeResult()
|
||||
{}
|
||||
|
||||
void ModifyInstanceMaintainTimeResult::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 ModifyInstanceMaintainTimeResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/OpenDiagnosisRequest.cc
Normal file
63
elasticsearch/src/model/OpenDiagnosisRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/OpenDiagnosisRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::OpenDiagnosisRequest;
|
||||
|
||||
OpenDiagnosisRequest::OpenDiagnosisRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/actions/open-diagnosis");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OpenDiagnosisRequest::~OpenDiagnosisRequest()
|
||||
{}
|
||||
|
||||
std::string OpenDiagnosisRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OpenDiagnosisRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OpenDiagnosisRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void OpenDiagnosisRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string OpenDiagnosisRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void OpenDiagnosisRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/OpenDiagnosisResult.cc
Normal file
51
elasticsearch/src/model/OpenDiagnosisResult.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/OpenDiagnosisResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
OpenDiagnosisResult::OpenDiagnosisResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OpenDiagnosisResult::OpenDiagnosisResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OpenDiagnosisResult::~OpenDiagnosisResult()
|
||||
{}
|
||||
|
||||
void OpenDiagnosisResult::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 OpenDiagnosisResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/ReinstallCollectorRequest.cc
Normal file
52
elasticsearch/src/model/ReinstallCollectorRequest.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/ReinstallCollectorRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::ReinstallCollectorRequest;
|
||||
|
||||
ReinstallCollectorRequest::ReinstallCollectorRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]/actions/reinstall");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReinstallCollectorRequest::~ReinstallCollectorRequest()
|
||||
{}
|
||||
|
||||
std::string ReinstallCollectorRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ReinstallCollectorRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string ReinstallCollectorRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void ReinstallCollectorRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/ReinstallCollectorResult.cc
Normal file
51
elasticsearch/src/model/ReinstallCollectorResult.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/ReinstallCollectorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
ReinstallCollectorResult::ReinstallCollectorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReinstallCollectorResult::ReinstallCollectorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReinstallCollectorResult::~ReinstallCollectorResult()
|
||||
{}
|
||||
|
||||
void ReinstallCollectorResult::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 ReinstallCollectorResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,100 @@ void RestartInstanceResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["createdAt"].isNull())
|
||||
result_.createdAt = resultNode["createdAt"].asString();
|
||||
if(!resultNode["description"].isNull())
|
||||
result_.description = resultNode["description"].asString();
|
||||
if(!resultNode["domain"].isNull())
|
||||
result_.domain = resultNode["domain"].asString();
|
||||
if(!resultNode["esVersion"].isNull())
|
||||
result_.esVersion = resultNode["esVersion"].asString();
|
||||
if(!resultNode["instanceId"].isNull())
|
||||
result_.instanceId = resultNode["instanceId"].asString();
|
||||
if(!resultNode["kibanaDomain"].isNull())
|
||||
result_.kibanaDomain = resultNode["kibanaDomain"].asString();
|
||||
if(!resultNode["kibanaPort"].isNull())
|
||||
result_.kibanaPort = std::stoi(resultNode["kibanaPort"].asString());
|
||||
if(!resultNode["nodeAmount"].isNull())
|
||||
result_.nodeAmount = std::stoi(resultNode["nodeAmount"].asString());
|
||||
if(!resultNode["paymentType"].isNull())
|
||||
result_.paymentType = resultNode["paymentType"].asString();
|
||||
if(!resultNode["publicDomain"].isNull())
|
||||
result_.publicDomain = resultNode["publicDomain"].asString();
|
||||
if(!resultNode["publicPort"].isNull())
|
||||
result_.publicPort = std::stoi(resultNode["publicPort"].asString());
|
||||
if(!resultNode["status"].isNull())
|
||||
result_.status = resultNode["status"].asString();
|
||||
if(!resultNode["updatedAt"].isNull())
|
||||
result_.updatedAt = resultNode["updatedAt"].asString();
|
||||
auto alldictListNode = resultNode["dictList"]["dictListItem"];
|
||||
for (auto resultNodedictListdictListItem : alldictListNode)
|
||||
{
|
||||
Result::DictListItem dictListItemObject;
|
||||
if(!resultNodedictListdictListItem["fileSize"].isNull())
|
||||
dictListItemObject.fileSize = std::stol(resultNodedictListdictListItem["fileSize"].asString());
|
||||
if(!resultNodedictListdictListItem["name"].isNull())
|
||||
dictListItemObject.name = resultNodedictListdictListItem["name"].asString();
|
||||
if(!resultNodedictListdictListItem["sourceType"].isNull())
|
||||
dictListItemObject.sourceType = resultNodedictListdictListItem["sourceType"].asString();
|
||||
if(!resultNodedictListdictListItem["type"].isNull())
|
||||
dictListItemObject.type = resultNodedictListdictListItem["type"].asString();
|
||||
result_.dictList.push_back(dictListItemObject);
|
||||
}
|
||||
auto allsynonymsDictsNode = resultNode["synonymsDicts"]["synonymsDictsItem"];
|
||||
for (auto resultNodesynonymsDictssynonymsDictsItem : allsynonymsDictsNode)
|
||||
{
|
||||
Result::SynonymsDictsItem synonymsDictsItemObject;
|
||||
if(!resultNodesynonymsDictssynonymsDictsItem["fileSize"].isNull())
|
||||
synonymsDictsItemObject.fileSize = std::stol(resultNodesynonymsDictssynonymsDictsItem["fileSize"].asString());
|
||||
if(!resultNodesynonymsDictssynonymsDictsItem["name"].isNull())
|
||||
synonymsDictsItemObject.name = resultNodesynonymsDictssynonymsDictsItem["name"].asString();
|
||||
if(!resultNodesynonymsDictssynonymsDictsItem["sourceType"].isNull())
|
||||
synonymsDictsItemObject.sourceType = resultNodesynonymsDictssynonymsDictsItem["sourceType"].asString();
|
||||
if(!resultNodesynonymsDictssynonymsDictsItem["type"].isNull())
|
||||
synonymsDictsItemObject.type = resultNodesynonymsDictssynonymsDictsItem["type"].asString();
|
||||
result_.synonymsDicts.push_back(synonymsDictsItemObject);
|
||||
}
|
||||
auto kibanaConfigurationNode = resultNode["kibanaConfiguration"];
|
||||
if(!kibanaConfigurationNode["amount"].isNull())
|
||||
result_.kibanaConfiguration.amount = std::stoi(kibanaConfigurationNode["amount"].asString());
|
||||
if(!kibanaConfigurationNode["disk"].isNull())
|
||||
result_.kibanaConfiguration.disk = std::stoi(kibanaConfigurationNode["disk"].asString());
|
||||
if(!kibanaConfigurationNode["diskType"].isNull())
|
||||
result_.kibanaConfiguration.diskType = kibanaConfigurationNode["diskType"].asString();
|
||||
if(!kibanaConfigurationNode["spec"].isNull())
|
||||
result_.kibanaConfiguration.spec = kibanaConfigurationNode["spec"].asString();
|
||||
auto masterConfigurationNode = resultNode["masterConfiguration"];
|
||||
if(!masterConfigurationNode["amount"].isNull())
|
||||
result_.masterConfiguration.amount = std::stoi(masterConfigurationNode["amount"].asString());
|
||||
if(!masterConfigurationNode["disk"].isNull())
|
||||
result_.masterConfiguration.disk = std::stoi(masterConfigurationNode["disk"].asString());
|
||||
if(!masterConfigurationNode["diskType"].isNull())
|
||||
result_.masterConfiguration.diskType = masterConfigurationNode["diskType"].asString();
|
||||
if(!masterConfigurationNode["spec"].isNull())
|
||||
result_.masterConfiguration.spec = masterConfigurationNode["spec"].asString();
|
||||
auto networkConfigNode = resultNode["networkConfig"];
|
||||
if(!networkConfigNode["type"].isNull())
|
||||
result_.networkConfig.type = networkConfigNode["type"].asString();
|
||||
if(!networkConfigNode["vpcId"].isNull())
|
||||
result_.networkConfig.vpcId = networkConfigNode["vpcId"].asString();
|
||||
if(!networkConfigNode["vsArea"].isNull())
|
||||
result_.networkConfig.vsArea = networkConfigNode["vsArea"].asString();
|
||||
if(!networkConfigNode["vswitchId"].isNull())
|
||||
result_.networkConfig.vswitchId = networkConfigNode["vswitchId"].asString();
|
||||
auto nodeSpecNode = resultNode["nodeSpec"];
|
||||
if(!nodeSpecNode["disk"].isNull())
|
||||
result_.nodeSpec.disk = std::stoi(nodeSpecNode["disk"].asString());
|
||||
if(!nodeSpecNode["diskType"].isNull())
|
||||
result_.nodeSpec.diskType = nodeSpecNode["diskType"].asString();
|
||||
if(!nodeSpecNode["spec"].isNull())
|
||||
result_.nodeSpec.spec = nodeSpecNode["spec"].asString();
|
||||
|
||||
}
|
||||
|
||||
RestartInstanceResult::Result RestartInstanceResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,25 +39,11 @@ void ResumeElasticsearchTaskResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Result"].isNull())
|
||||
result_ = value["Result"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string ResumeElasticsearchTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string ResumeElasticsearchTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ResumeElasticsearchTaskResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
|
||||
52
elasticsearch/src/model/RunPipelinesRequest.cc
Normal file
52
elasticsearch/src/model/RunPipelinesRequest.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/RunPipelinesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::RunPipelinesRequest;
|
||||
|
||||
RunPipelinesRequest::RunPipelinesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/pipelines/action/run");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RunPipelinesRequest::~RunPipelinesRequest()
|
||||
{}
|
||||
|
||||
std::string RunPipelinesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RunPipelinesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string RunPipelinesRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void RunPipelinesRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/RunPipelinesResult.cc
Normal file
51
elasticsearch/src/model/RunPipelinesResult.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/RunPipelinesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
RunPipelinesResult::RunPipelinesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RunPipelinesResult::RunPipelinesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RunPipelinesResult::~RunPipelinesResult()
|
||||
{}
|
||||
|
||||
void RunPipelinesResult::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 RunPipelinesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/StartCollectorRequest.cc
Normal file
52
elasticsearch/src/model/StartCollectorRequest.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/StartCollectorRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::StartCollectorRequest;
|
||||
|
||||
StartCollectorRequest::StartCollectorRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]/actions/start");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
StartCollectorRequest::~StartCollectorRequest()
|
||||
{}
|
||||
|
||||
std::string StartCollectorRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void StartCollectorRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string StartCollectorRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void StartCollectorRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/StartCollectorResult.cc
Normal file
51
elasticsearch/src/model/StartCollectorResult.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/StartCollectorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
StartCollectorResult::StartCollectorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
StartCollectorResult::StartCollectorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
StartCollectorResult::~StartCollectorResult()
|
||||
{}
|
||||
|
||||
void StartCollectorResult::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 StartCollectorResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/StopCollectorRequest.cc
Normal file
52
elasticsearch/src/model/StopCollectorRequest.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/StopCollectorRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::StopCollectorRequest;
|
||||
|
||||
StopCollectorRequest::StopCollectorRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]/actions/stop");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
StopCollectorRequest::~StopCollectorRequest()
|
||||
{}
|
||||
|
||||
std::string StopCollectorRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void StopCollectorRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string StopCollectorRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void StopCollectorRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/StopCollectorResult.cc
Normal file
51
elasticsearch/src/model/StopCollectorResult.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/StopCollectorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
StopCollectorResult::StopCollectorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
StopCollectorResult::StopCollectorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
StopCollectorResult::~StopCollectorResult()
|
||||
{}
|
||||
|
||||
void StopCollectorResult::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 StopCollectorResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/StopPipelinesRequest.cc
Normal file
52
elasticsearch/src/model/StopPipelinesRequest.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/StopPipelinesRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::StopPipelinesRequest;
|
||||
|
||||
StopPipelinesRequest::StopPipelinesRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/logstashes/[InstanceId]/pipelines/action/stop");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
StopPipelinesRequest::~StopPipelinesRequest()
|
||||
{}
|
||||
|
||||
std::string StopPipelinesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void StopPipelinesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string StopPipelinesRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void StopPipelinesRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/StopPipelinesResult.cc
Normal file
51
elasticsearch/src/model/StopPipelinesResult.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/StopPipelinesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
StopPipelinesResult::StopPipelinesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
StopPipelinesResult::StopPipelinesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
StopPipelinesResult::~StopPipelinesResult()
|
||||
{}
|
||||
|
||||
void StopPipelinesResult::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 StopPipelinesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@ void UntagResourcesResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Result"].isNull())
|
||||
result_ = value["Result"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool UntagResourcesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,13 +51,6 @@ void UpdateAliwsDictResult::parse(const std::string &payload)
|
||||
resultObject.type = valueResultDictList["type"].asString();
|
||||
if(!valueResultDictList["sourceType"].isNull())
|
||||
resultObject.sourceType = valueResultDictList["sourceType"].asString();
|
||||
auto ossObjectNode = value["ossObject"];
|
||||
if(!ossObjectNode["bucketName"].isNull())
|
||||
resultObject.ossObject.bucketName = ossObjectNode["bucketName"].asString();
|
||||
if(!ossObjectNode["key"].isNull())
|
||||
resultObject.ossObject.key = ossObjectNode["key"].asString();
|
||||
if(!ossObjectNode["etag"].isNull())
|
||||
resultObject.ossObject.etag = ossObjectNode["etag"].asString();
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
|
||||
|
||||
52
elasticsearch/src/model/UpdateCollectorNameRequest.cc
Normal file
52
elasticsearch/src/model/UpdateCollectorNameRequest.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/UpdateCollectorNameRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::UpdateCollectorNameRequest;
|
||||
|
||||
UpdateCollectorNameRequest::UpdateCollectorNameRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]/actions/rename");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateCollectorNameRequest::~UpdateCollectorNameRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateCollectorNameRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpdateCollectorNameRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string UpdateCollectorNameRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void UpdateCollectorNameRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
122
elasticsearch/src/model/UpdateCollectorNameResult.cc
Normal file
122
elasticsearch/src/model/UpdateCollectorNameResult.cc
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* 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/UpdateCollectorNameResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
UpdateCollectorNameResult::UpdateCollectorNameResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateCollectorNameResult::UpdateCollectorNameResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateCollectorNameResult::~UpdateCollectorNameResult()
|
||||
{}
|
||||
|
||||
void UpdateCollectorNameResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["gmtCreatedTime"].isNull())
|
||||
result_.gmtCreatedTime = resultNode["gmtCreatedTime"].asString();
|
||||
if(!resultNode["gmtUpdateTime"].isNull())
|
||||
result_.gmtUpdateTime = resultNode["gmtUpdateTime"].asString();
|
||||
if(!resultNode["name"].isNull())
|
||||
result_.name = resultNode["name"].asString();
|
||||
if(!resultNode["resId"].isNull())
|
||||
result_.resId = resultNode["resId"].asString();
|
||||
if(!resultNode["resVersion"].isNull())
|
||||
result_.resVersion = resultNode["resVersion"].asString();
|
||||
if(!resultNode["vpcId"].isNull())
|
||||
result_.vpcId = resultNode["vpcId"].asString();
|
||||
if(!resultNode["resType"].isNull())
|
||||
result_.resType = resultNode["resType"].asString();
|
||||
if(!resultNode["ownerId"].isNull())
|
||||
result_.ownerId = resultNode["ownerId"].asString();
|
||||
if(!resultNode["status"].isNull())
|
||||
result_.status = resultNode["status"].asString();
|
||||
if(!resultNode["dryRun"].isNull())
|
||||
result_.dryRun = resultNode["dryRun"].asString() == "true";
|
||||
auto allconfigsNode = resultNode["configs"]["configsItem"];
|
||||
for (auto resultNodeconfigsconfigsItem : allconfigsNode)
|
||||
{
|
||||
Result::ConfigsItem configsItemObject;
|
||||
if(!resultNodeconfigsconfigsItem["fileName"].isNull())
|
||||
configsItemObject.fileName = resultNodeconfigsconfigsItem["fileName"].asString();
|
||||
if(!resultNodeconfigsconfigsItem["content"].isNull())
|
||||
configsItemObject.content = resultNodeconfigsconfigsItem["content"].asString();
|
||||
result_.configs.push_back(configsItemObject);
|
||||
}
|
||||
auto allextendConfigsNode = resultNode["extendConfigs"]["extendConfigsItem"];
|
||||
for (auto resultNodeextendConfigsextendConfigsItem : allextendConfigsNode)
|
||||
{
|
||||
Result::ExtendConfigsItem extendConfigsItemObject;
|
||||
if(!resultNodeextendConfigsextendConfigsItem["configType"].isNull())
|
||||
extendConfigsItemObject.configType = resultNodeextendConfigsextendConfigsItem["configType"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["instanceId"].isNull())
|
||||
extendConfigsItemObject.instanceId = resultNodeextendConfigsextendConfigsItem["instanceId"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["instanceType"].isNull())
|
||||
extendConfigsItemObject.instanceType = resultNodeextendConfigsextendConfigsItem["instanceType"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["protocol"].isNull())
|
||||
extendConfigsItemObject.protocol = resultNodeextendConfigsextendConfigsItem["protocol"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["userName"].isNull())
|
||||
extendConfigsItemObject.userName = resultNodeextendConfigsextendConfigsItem["userName"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["enableMonitoring"].isNull())
|
||||
extendConfigsItemObject.enableMonitoring = resultNodeextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
|
||||
if(!resultNodeextendConfigsextendConfigsItem["type"].isNull())
|
||||
extendConfigsItemObject.type = resultNodeextendConfigsextendConfigsItem["type"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["groupId"].isNull())
|
||||
extendConfigsItemObject.groupId = resultNodeextendConfigsextendConfigsItem["groupId"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["host"].isNull())
|
||||
extendConfigsItemObject.host = resultNodeextendConfigsextendConfigsItem["host"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["kibanaHost"].isNull())
|
||||
extendConfigsItemObject.kibanaHost = resultNodeextendConfigsextendConfigsItem["kibanaHost"].asString();
|
||||
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
|
||||
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
|
||||
{
|
||||
Result::ExtendConfigsItem::MachinesItem machinesObject;
|
||||
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
|
||||
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
|
||||
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
|
||||
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
|
||||
extendConfigsItemObject.machines.push_back(machinesObject);
|
||||
}
|
||||
auto allHosts = value["hosts"]["hosts"];
|
||||
for (auto value : allHosts)
|
||||
extendConfigsItemObject.hosts.push_back(value.asString());
|
||||
result_.extendConfigs.push_back(extendConfigsItemObject);
|
||||
}
|
||||
auto allCollectorPaths = resultNode["collectorPaths"]["collectorPaths"];
|
||||
for (auto value : allCollectorPaths)
|
||||
result_.collectorPaths.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
UpdateCollectorNameResult::Result UpdateCollectorNameResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
52
elasticsearch/src/model/UpdateCollectorRequest.cc
Normal file
52
elasticsearch/src/model/UpdateCollectorRequest.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/UpdateCollectorRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::UpdateCollectorRequest;
|
||||
|
||||
UpdateCollectorRequest::UpdateCollectorRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/collectors/[ResId]");
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateCollectorRequest::~UpdateCollectorRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateCollectorRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpdateCollectorRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string UpdateCollectorRequest::getResId()const
|
||||
{
|
||||
return resId_;
|
||||
}
|
||||
|
||||
void UpdateCollectorRequest::setResId(const std::string& resId)
|
||||
{
|
||||
resId_ = resId;
|
||||
setParameter("ResId", resId);
|
||||
}
|
||||
|
||||
118
elasticsearch/src/model/UpdateCollectorResult.cc
Normal file
118
elasticsearch/src/model/UpdateCollectorResult.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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/UpdateCollectorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
UpdateCollectorResult::UpdateCollectorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateCollectorResult::UpdateCollectorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateCollectorResult::~UpdateCollectorResult()
|
||||
{}
|
||||
|
||||
void UpdateCollectorResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["gmtCreatedTime"].isNull())
|
||||
result_.gmtCreatedTime = resultNode["gmtCreatedTime"].asString();
|
||||
if(!resultNode["gmtUpdateTime"].isNull())
|
||||
result_.gmtUpdateTime = resultNode["gmtUpdateTime"].asString();
|
||||
if(!resultNode["name"].isNull())
|
||||
result_.name = resultNode["name"].asString();
|
||||
if(!resultNode["resId"].isNull())
|
||||
result_.resId = resultNode["resId"].asString();
|
||||
if(!resultNode["resVersion"].isNull())
|
||||
result_.resVersion = resultNode["resVersion"].asString();
|
||||
if(!resultNode["vpcId"].isNull())
|
||||
result_.vpcId = resultNode["vpcId"].asString();
|
||||
if(!resultNode["resType"].isNull())
|
||||
result_.resType = resultNode["resType"].asString();
|
||||
if(!resultNode["ownerId"].isNull())
|
||||
result_.ownerId = resultNode["ownerId"].asString();
|
||||
if(!resultNode["status"].isNull())
|
||||
result_.status = resultNode["status"].asString();
|
||||
if(!resultNode["dryRun"].isNull())
|
||||
result_.dryRun = resultNode["dryRun"].asString() == "true";
|
||||
auto allconfigsNode = resultNode["configs"]["configsItem"];
|
||||
for (auto resultNodeconfigsconfigsItem : allconfigsNode)
|
||||
{
|
||||
Result::ConfigsItem configsItemObject;
|
||||
if(!resultNodeconfigsconfigsItem["fileName"].isNull())
|
||||
configsItemObject.fileName = resultNodeconfigsconfigsItem["fileName"].asString();
|
||||
if(!resultNodeconfigsconfigsItem["content"].isNull())
|
||||
configsItemObject.content = resultNodeconfigsconfigsItem["content"].asString();
|
||||
result_.configs.push_back(configsItemObject);
|
||||
}
|
||||
auto allextendConfigsNode = resultNode["extendConfigs"]["extendConfigsItem"];
|
||||
for (auto resultNodeextendConfigsextendConfigsItem : allextendConfigsNode)
|
||||
{
|
||||
Result::ExtendConfigsItem extendConfigsItemObject;
|
||||
if(!resultNodeextendConfigsextendConfigsItem["configType"].isNull())
|
||||
extendConfigsItemObject.configType = resultNodeextendConfigsextendConfigsItem["configType"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["instanceId"].isNull())
|
||||
extendConfigsItemObject.instanceId = resultNodeextendConfigsextendConfigsItem["instanceId"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["instanceType"].isNull())
|
||||
extendConfigsItemObject.instanceType = resultNodeextendConfigsextendConfigsItem["instanceType"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["protocol"].isNull())
|
||||
extendConfigsItemObject.protocol = resultNodeextendConfigsextendConfigsItem["protocol"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["userName"].isNull())
|
||||
extendConfigsItemObject.userName = resultNodeextendConfigsextendConfigsItem["userName"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["enableMonitoring"].isNull())
|
||||
extendConfigsItemObject.enableMonitoring = resultNodeextendConfigsextendConfigsItem["enableMonitoring"].asString() == "true";
|
||||
if(!resultNodeextendConfigsextendConfigsItem["type"].isNull())
|
||||
extendConfigsItemObject.type = resultNodeextendConfigsextendConfigsItem["type"].asString();
|
||||
if(!resultNodeextendConfigsextendConfigsItem["groupId"].isNull())
|
||||
extendConfigsItemObject.groupId = resultNodeextendConfigsextendConfigsItem["groupId"].asString();
|
||||
auto allmachinesNode = allextendConfigsNode["machines"]["machinesItem"];
|
||||
for (auto allextendConfigsNodemachinesmachinesItem : allmachinesNode)
|
||||
{
|
||||
Result::ExtendConfigsItem::MachinesItem machinesObject;
|
||||
if(!allextendConfigsNodemachinesmachinesItem["instanceId"].isNull())
|
||||
machinesObject.instanceId = allextendConfigsNodemachinesmachinesItem["instanceId"].asString();
|
||||
if(!allextendConfigsNodemachinesmachinesItem["agentStatus"].isNull())
|
||||
machinesObject.agentStatus = allextendConfigsNodemachinesmachinesItem["agentStatus"].asString();
|
||||
extendConfigsItemObject.machines.push_back(machinesObject);
|
||||
}
|
||||
auto allHosts = value["hosts"]["hosts"];
|
||||
for (auto value : allHosts)
|
||||
extendConfigsItemObject.hosts.push_back(value.asString());
|
||||
result_.extendConfigs.push_back(extendConfigsItemObject);
|
||||
}
|
||||
auto allCollectorPaths = resultNode["collectorPaths"]["collectorPaths"];
|
||||
for (auto value : allCollectorPaths)
|
||||
result_.collectorPaths.push_back(value.asString());
|
||||
|
||||
}
|
||||
|
||||
UpdateCollectorResult::Result UpdateCollectorResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
63
elasticsearch/src/model/UpdateDiagnosisSettingsRequest.cc
Normal file
63
elasticsearch/src/model/UpdateDiagnosisSettingsRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/elasticsearch/model/UpdateDiagnosisSettingsRequest.h>
|
||||
|
||||
using AlibabaCloud::Elasticsearch::Model::UpdateDiagnosisSettingsRequest;
|
||||
|
||||
UpdateDiagnosisSettingsRequest::UpdateDiagnosisSettingsRequest() :
|
||||
RoaServiceRequest("elasticsearch", "2017-06-13")
|
||||
{
|
||||
setResourcePath("/openapi/diagnosis/instances/[InstanceId]/settings");
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateDiagnosisSettingsRequest::~UpdateDiagnosisSettingsRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateDiagnosisSettingsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void UpdateDiagnosisSettingsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string UpdateDiagnosisSettingsRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpdateDiagnosisSettingsRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string UpdateDiagnosisSettingsRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void UpdateDiagnosisSettingsRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
51
elasticsearch/src/model/UpdateDiagnosisSettingsResult.cc
Normal file
51
elasticsearch/src/model/UpdateDiagnosisSettingsResult.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/UpdateDiagnosisSettingsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Elasticsearch;
|
||||
using namespace AlibabaCloud::Elasticsearch::Model;
|
||||
|
||||
UpdateDiagnosisSettingsResult::UpdateDiagnosisSettingsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateDiagnosisSettingsResult::UpdateDiagnosisSettingsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateDiagnosisSettingsResult::~UpdateDiagnosisSettingsResult()
|
||||
{}
|
||||
|
||||
void UpdateDiagnosisSettingsResult::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 UpdateDiagnosisSettingsResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user