Add DescribeAppKey interface.

This commit is contained in:
sdk-team
2022-05-06 03:27:33 +00:00
parent 278c4950d0
commit db5500f960
11 changed files with 280 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2022-05-06 Version: 1.36.1122
- Add DescribeAppKey interface.
2022-05-05 Version: 1.36.1121
- Release RecognizeUkraineIdentityCard.

View File

@@ -1 +1 @@
1.36.1121
1.36.1122

View File

@@ -39,6 +39,8 @@ set(rtc_public_header_model
include/alibabacloud/rtc/model/DeleteMPULayoutResult.h
include/alibabacloud/rtc/model/DeleteRecordTemplateRequest.h
include/alibabacloud/rtc/model/DeleteRecordTemplateResult.h
include/alibabacloud/rtc/model/DescribeAppKeyRequest.h
include/alibabacloud/rtc/model/DescribeAppKeyResult.h
include/alibabacloud/rtc/model/DescribeAppsRequest.h
include/alibabacloud/rtc/model/DescribeAppsResult.h
include/alibabacloud/rtc/model/DescribeAutoLiveStreamRuleRequest.h
@@ -104,6 +106,8 @@ set(rtc_src
src/model/DeleteMPULayoutResult.cc
src/model/DeleteRecordTemplateRequest.cc
src/model/DeleteRecordTemplateResult.cc
src/model/DescribeAppKeyRequest.cc
src/model/DescribeAppKeyResult.cc
src/model/DescribeAppsRequest.cc
src/model/DescribeAppsResult.cc
src/model/DescribeAutoLiveStreamRuleRequest.cc

View File

@@ -40,6 +40,8 @@
#include "model/DeleteMPULayoutResult.h"
#include "model/DeleteRecordTemplateRequest.h"
#include "model/DeleteRecordTemplateResult.h"
#include "model/DescribeAppKeyRequest.h"
#include "model/DescribeAppKeyResult.h"
#include "model/DescribeAppsRequest.h"
#include "model/DescribeAppsResult.h"
#include "model/DescribeAutoLiveStreamRuleRequest.h"
@@ -120,6 +122,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DeleteRecordTemplateResult> DeleteRecordTemplateOutcome;
typedef std::future<DeleteRecordTemplateOutcome> DeleteRecordTemplateOutcomeCallable;
typedef std::function<void(const RtcClient*, const Model::DeleteRecordTemplateRequest&, const DeleteRecordTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteRecordTemplateAsyncHandler;
typedef Outcome<Error, Model::DescribeAppKeyResult> DescribeAppKeyOutcome;
typedef std::future<DescribeAppKeyOutcome> DescribeAppKeyOutcomeCallable;
typedef std::function<void(const RtcClient*, const Model::DescribeAppKeyRequest&, const DescribeAppKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAppKeyAsyncHandler;
typedef Outcome<Error, Model::DescribeAppsResult> DescribeAppsOutcome;
typedef std::future<DescribeAppsOutcome> DescribeAppsOutcomeCallable;
typedef std::function<void(const RtcClient*, const Model::DescribeAppsRequest&, const DescribeAppsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAppsAsyncHandler;
@@ -218,6 +223,9 @@ namespace AlibabaCloud
DeleteRecordTemplateOutcome deleteRecordTemplate(const Model::DeleteRecordTemplateRequest &request)const;
void deleteRecordTemplateAsync(const Model::DeleteRecordTemplateRequest& request, const DeleteRecordTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteRecordTemplateOutcomeCallable deleteRecordTemplateCallable(const Model::DeleteRecordTemplateRequest& request) const;
DescribeAppKeyOutcome describeAppKey(const Model::DescribeAppKeyRequest &request)const;
void describeAppKeyAsync(const Model::DescribeAppKeyRequest& request, const DescribeAppKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeAppKeyOutcomeCallable describeAppKeyCallable(const Model::DescribeAppKeyRequest& request) const;
DescribeAppsOutcome describeApps(const Model::DescribeAppsRequest &request)const;
void describeAppsAsync(const Model::DescribeAppsRequest& request, const DescribeAppsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeAppsOutcomeCallable describeAppsCallable(const Model::DescribeAppsRequest& request) const;

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYREQUEST_H_
#define ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYREQUEST_H_
#include <alibabacloud/rtc/RtcExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Rtc {
namespace Model {
class ALIBABACLOUD_RTC_EXPORT DescribeAppKeyRequest : public RpcServiceRequest {
public:
DescribeAppKeyRequest();
~DescribeAppKeyRequest();
std::string getShowLog() const;
void setShowLog(const std::string &showLog);
std::string getQueryAppId() const;
void setQueryAppId(const std::string &queryAppId);
long getOwnerId() const;
void setOwnerId(long ownerId);
std::string getAppId() const;
void setAppId(const std::string &appId);
private:
std::string showLog_;
std::string queryAppId_;
long ownerId_;
std::string appId_;
};
} // namespace Model
} // namespace Rtc
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYREQUEST_H_

View File

@@ -0,0 +1,53 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYRESULT_H_
#define ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/rtc/RtcExport.h>
namespace AlibabaCloud
{
namespace Rtc
{
namespace Model
{
class ALIBABACLOUD_RTC_EXPORT DescribeAppKeyResult : public ServiceResult
{
public:
DescribeAppKeyResult();
explicit DescribeAppKeyResult(const std::string &payload);
~DescribeAppKeyResult();
std::string getAppKey()const;
std::string getBizId()const;
protected:
void parse(const std::string &payload);
private:
std::string appKey_;
std::string bizId_;
};
}
}
}
#endif // !ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYRESULT_H_

View File

@@ -39,6 +39,7 @@ namespace AlibabaCloud
std::string appId;
std::string createTime;
std::vector<std::string> serviceAreas;
std::string region;
std::string appType;
std::string appName;
};

View File

@@ -375,6 +375,42 @@ RtcClient::DeleteRecordTemplateOutcomeCallable RtcClient::deleteRecordTemplateCa
return task->get_future();
}
RtcClient::DescribeAppKeyOutcome RtcClient::describeAppKey(const DescribeAppKeyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeAppKeyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeAppKeyOutcome(DescribeAppKeyResult(outcome.result()));
else
return DescribeAppKeyOutcome(outcome.error());
}
void RtcClient::describeAppKeyAsync(const DescribeAppKeyRequest& request, const DescribeAppKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeAppKey(request), context);
};
asyncExecute(new Runnable(fn));
}
RtcClient::DescribeAppKeyOutcomeCallable RtcClient::describeAppKeyCallable(const DescribeAppKeyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeAppKeyOutcome()>>(
[this, request]()
{
return this->describeAppKey(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RtcClient::DescribeAppsOutcome RtcClient::describeApps(const DescribeAppsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View 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);
}

View 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_;
}

View File

@@ -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());