Add DescribeAppKey interface.
This commit is contained in:
63
rtc/src/model/DescribeAppKeyRequest.cc
Normal file
63
rtc/src/model/DescribeAppKeyRequest.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/rtc/model/DescribeAppKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Rtc::Model::DescribeAppKeyRequest;
|
||||
|
||||
DescribeAppKeyRequest::DescribeAppKeyRequest()
|
||||
: RpcServiceRequest("rtc", "2018-01-11", "DescribeAppKey") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeAppKeyRequest::~DescribeAppKeyRequest() {}
|
||||
|
||||
std::string DescribeAppKeyRequest::getShowLog() const {
|
||||
return showLog_;
|
||||
}
|
||||
|
||||
void DescribeAppKeyRequest::setShowLog(const std::string &showLog) {
|
||||
showLog_ = showLog;
|
||||
setParameter(std::string("ShowLog"), showLog);
|
||||
}
|
||||
|
||||
std::string DescribeAppKeyRequest::getQueryAppId() const {
|
||||
return queryAppId_;
|
||||
}
|
||||
|
||||
void DescribeAppKeyRequest::setQueryAppId(const std::string &queryAppId) {
|
||||
queryAppId_ = queryAppId;
|
||||
setParameter(std::string("QueryAppId"), queryAppId);
|
||||
}
|
||||
|
||||
long DescribeAppKeyRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeAppKeyRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeAppKeyRequest::getAppId() const {
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void DescribeAppKeyRequest::setAppId(const std::string &appId) {
|
||||
appId_ = appId;
|
||||
setParameter(std::string("AppId"), appId);
|
||||
}
|
||||
|
||||
58
rtc/src/model/DescribeAppKeyResult.cc
Normal file
58
rtc/src/model/DescribeAppKeyResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/rtc/model/DescribeAppKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Rtc;
|
||||
using namespace AlibabaCloud::Rtc::Model;
|
||||
|
||||
DescribeAppKeyResult::DescribeAppKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAppKeyResult::DescribeAppKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAppKeyResult::~DescribeAppKeyResult()
|
||||
{}
|
||||
|
||||
void DescribeAppKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["BizId"].isNull())
|
||||
bizId_ = value["BizId"].asString();
|
||||
if(!value["AppKey"].isNull())
|
||||
appKey_ = value["AppKey"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeAppKeyResult::getAppKey()const
|
||||
{
|
||||
return appKey_;
|
||||
}
|
||||
|
||||
std::string DescribeAppKeyResult::getBizId()const
|
||||
{
|
||||
return bizId_;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ void DescribeAppsResult::parse(const std::string &payload)
|
||||
appListObject.billType = valueAppListApp["BillType"].asString();
|
||||
if(!valueAppListApp["AppType"].isNull())
|
||||
appListObject.appType = valueAppListApp["AppType"].asString();
|
||||
if(!valueAppListApp["Region"].isNull())
|
||||
appListObject.region = valueAppListApp["Region"].asString();
|
||||
auto allServiceAreas = value["ServiceAreas"]["ServiceArea"];
|
||||
for (auto value : allServiceAreas)
|
||||
appListObject.serviceAreas.push_back(value.asString());
|
||||
|
||||
Reference in New Issue
Block a user