Edit ListTraceApp api.
This commit is contained in:
62
arms/src/model/ConfigAppRequest.cc
Normal file
62
arms/src/model/ConfigAppRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/ConfigAppRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::ConfigAppRequest;
|
||||
|
||||
ConfigAppRequest::ConfigAppRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "ConfigApp")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ConfigAppRequest::~ConfigAppRequest()
|
||||
{}
|
||||
|
||||
std::string ConfigAppRequest::getAppIds()const
|
||||
{
|
||||
return appIds_;
|
||||
}
|
||||
|
||||
void ConfigAppRequest::setAppIds(const std::string& appIds)
|
||||
{
|
||||
appIds_ = appIds;
|
||||
setParameter("AppIds", appIds);
|
||||
}
|
||||
|
||||
std::string ConfigAppRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ConfigAppRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
bool ConfigAppRequest::getEnable()const
|
||||
{
|
||||
return enable_;
|
||||
}
|
||||
|
||||
void ConfigAppRequest::setEnable(bool enable)
|
||||
{
|
||||
enable_ = enable;
|
||||
setParameter("Enable", enable ? "true" : "false");
|
||||
}
|
||||
|
||||
51
arms/src/model/ConfigAppResult.cc
Normal file
51
arms/src/model/ConfigAppResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/ConfigAppResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
ConfigAppResult::ConfigAppResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ConfigAppResult::ConfigAppResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ConfigAppResult::~ConfigAppResult()
|
||||
{}
|
||||
|
||||
void ConfigAppResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ConfigAppResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ void ListTraceAppsResult::parse(const std::string &payload)
|
||||
traceAppsObject.updateTime = std::stol(valueTraceAppsTraceApp["UpdateTime"].asString());
|
||||
if(!valueTraceAppsTraceApp["RegionId"].isNull())
|
||||
traceAppsObject.regionId = valueTraceAppsTraceApp["RegionId"].asString();
|
||||
if(!valueTraceAppsTraceApp["Show"].isNull())
|
||||
traceAppsObject.show = valueTraceAppsTraceApp["Show"].asString() == "true";
|
||||
traceApps_.push_back(traceAppsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -59,6 +59,8 @@ void SearchTraceAppByNameResult::parse(const std::string &payload)
|
||||
traceAppsObject.createTime = std::stol(valueTraceAppsTraceApp["CreateTime"].asString());
|
||||
if(!valueTraceAppsTraceApp["UpdateTime"].isNull())
|
||||
traceAppsObject.updateTime = std::stol(valueTraceAppsTraceApp["UpdateTime"].asString());
|
||||
if(!valueTraceAppsTraceApp["Show"].isNull())
|
||||
traceAppsObject.show = valueTraceAppsTraceApp["Show"].asString() == "true";
|
||||
traceApps_.push_back(traceAppsObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ void SearchTraceAppByPageResult::parse(const std::string &payload)
|
||||
traceAppObject.createTime = std::stol(pageBeanNodeTraceAppsTraceApp["CreateTime"].asString());
|
||||
if(!pageBeanNodeTraceAppsTraceApp["UpdateTime"].isNull())
|
||||
traceAppObject.updateTime = std::stol(pageBeanNodeTraceAppsTraceApp["UpdateTime"].asString());
|
||||
if(!pageBeanNodeTraceAppsTraceApp["Show"].isNull())
|
||||
traceAppObject.show = pageBeanNodeTraceAppsTraceApp["Show"].asString() == "true";
|
||||
pageBean_.traceApps.push_back(traceAppObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user