Skip to content

Commit db5500f

Browse files
committed
Add DescribeAppKey interface.
1 parent 278c495 commit db5500f

File tree

11 files changed

+280
-1
lines changed

11 files changed

+280
-1
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2022-05-06 Version: 1.36.1122
2+
- Add DescribeAppKey interface.
3+
14
2022-05-05 Version: 1.36.1121
25
- Release RecognizeUkraineIdentityCard.
36

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.36.1121
1+
1.36.1122

rtc/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ set(rtc_public_header_model
3939
include/alibabacloud/rtc/model/DeleteMPULayoutResult.h
4040
include/alibabacloud/rtc/model/DeleteRecordTemplateRequest.h
4141
include/alibabacloud/rtc/model/DeleteRecordTemplateResult.h
42+
include/alibabacloud/rtc/model/DescribeAppKeyRequest.h
43+
include/alibabacloud/rtc/model/DescribeAppKeyResult.h
4244
include/alibabacloud/rtc/model/DescribeAppsRequest.h
4345
include/alibabacloud/rtc/model/DescribeAppsResult.h
4446
include/alibabacloud/rtc/model/DescribeAutoLiveStreamRuleRequest.h
@@ -104,6 +106,8 @@ set(rtc_src
104106
src/model/DeleteMPULayoutResult.cc
105107
src/model/DeleteRecordTemplateRequest.cc
106108
src/model/DeleteRecordTemplateResult.cc
109+
src/model/DescribeAppKeyRequest.cc
110+
src/model/DescribeAppKeyResult.cc
107111
src/model/DescribeAppsRequest.cc
108112
src/model/DescribeAppsResult.cc
109113
src/model/DescribeAutoLiveStreamRuleRequest.cc

rtc/include/alibabacloud/rtc/RtcClient.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#include "model/DeleteMPULayoutResult.h"
4141
#include "model/DeleteRecordTemplateRequest.h"
4242
#include "model/DeleteRecordTemplateResult.h"
43+
#include "model/DescribeAppKeyRequest.h"
44+
#include "model/DescribeAppKeyResult.h"
4345
#include "model/DescribeAppsRequest.h"
4446
#include "model/DescribeAppsResult.h"
4547
#include "model/DescribeAutoLiveStreamRuleRequest.h"
@@ -120,6 +122,9 @@ namespace AlibabaCloud
120122
typedef Outcome<Error, Model::DeleteRecordTemplateResult> DeleteRecordTemplateOutcome;
121123
typedef std::future<DeleteRecordTemplateOutcome> DeleteRecordTemplateOutcomeCallable;
122124
typedef std::function<void(const RtcClient*, const Model::DeleteRecordTemplateRequest&, const DeleteRecordTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteRecordTemplateAsyncHandler;
125+
typedef Outcome<Error, Model::DescribeAppKeyResult> DescribeAppKeyOutcome;
126+
typedef std::future<DescribeAppKeyOutcome> DescribeAppKeyOutcomeCallable;
127+
typedef std::function<void(const RtcClient*, const Model::DescribeAppKeyRequest&, const DescribeAppKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAppKeyAsyncHandler;
123128
typedef Outcome<Error, Model::DescribeAppsResult> DescribeAppsOutcome;
124129
typedef std::future<DescribeAppsOutcome> DescribeAppsOutcomeCallable;
125130
typedef std::function<void(const RtcClient*, const Model::DescribeAppsRequest&, const DescribeAppsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAppsAsyncHandler;
@@ -218,6 +223,9 @@ namespace AlibabaCloud
218223
DeleteRecordTemplateOutcome deleteRecordTemplate(const Model::DeleteRecordTemplateRequest &request)const;
219224
void deleteRecordTemplateAsync(const Model::DeleteRecordTemplateRequest& request, const DeleteRecordTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
220225
DeleteRecordTemplateOutcomeCallable deleteRecordTemplateCallable(const Model::DeleteRecordTemplateRequest& request) const;
226+
DescribeAppKeyOutcome describeAppKey(const Model::DescribeAppKeyRequest &request)const;
227+
void describeAppKeyAsync(const Model::DescribeAppKeyRequest& request, const DescribeAppKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
228+
DescribeAppKeyOutcomeCallable describeAppKeyCallable(const Model::DescribeAppKeyRequest& request) const;
221229
DescribeAppsOutcome describeApps(const Model::DescribeAppsRequest &request)const;
222230
void describeAppsAsync(const Model::DescribeAppsRequest& request, const DescribeAppsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
223231
DescribeAppsOutcomeCallable describeAppsCallable(const Model::DescribeAppsRequest& request) const;
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYREQUEST_H_
18+
#define ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYREQUEST_H_
19+
20+
#include <alibabacloud/rtc/RtcExport.h>
21+
#include <alibabacloud/core/RpcServiceRequest.h>
22+
#include <string>
23+
#include <vector>
24+
#include <map>
25+
26+
namespace AlibabaCloud {
27+
namespace Rtc {
28+
namespace Model {
29+
class ALIBABACLOUD_RTC_EXPORT DescribeAppKeyRequest : public RpcServiceRequest {
30+
public:
31+
DescribeAppKeyRequest();
32+
~DescribeAppKeyRequest();
33+
std::string getShowLog() const;
34+
void setShowLog(const std::string &showLog);
35+
std::string getQueryAppId() const;
36+
void setQueryAppId(const std::string &queryAppId);
37+
long getOwnerId() const;
38+
void setOwnerId(long ownerId);
39+
std::string getAppId() const;
40+
void setAppId(const std::string &appId);
41+
42+
private:
43+
std::string showLog_;
44+
std::string queryAppId_;
45+
long ownerId_;
46+
std::string appId_;
47+
};
48+
} // namespace Model
49+
} // namespace Rtc
50+
} // namespace AlibabaCloud
51+
#endif // !ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYREQUEST_H_
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYRESULT_H_
18+
#define ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYRESULT_H_
19+
20+
#include <string>
21+
#include <vector>
22+
#include <utility>
23+
#include <alibabacloud/core/ServiceResult.h>
24+
#include <alibabacloud/rtc/RtcExport.h>
25+
26+
namespace AlibabaCloud
27+
{
28+
namespace Rtc
29+
{
30+
namespace Model
31+
{
32+
class ALIBABACLOUD_RTC_EXPORT DescribeAppKeyResult : public ServiceResult
33+
{
34+
public:
35+
36+
37+
DescribeAppKeyResult();
38+
explicit DescribeAppKeyResult(const std::string &payload);
39+
~DescribeAppKeyResult();
40+
std::string getAppKey()const;
41+
std::string getBizId()const;
42+
43+
protected:
44+
void parse(const std::string &payload);
45+
private:
46+
std::string appKey_;
47+
std::string bizId_;
48+
49+
};
50+
}
51+
}
52+
}
53+
#endif // !ALIBABACLOUD_RTC_MODEL_DESCRIBEAPPKEYRESULT_H_

rtc/include/alibabacloud/rtc/model/DescribeAppsResult.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ namespace AlibabaCloud
3939
std::string appId;
4040
std::string createTime;
4141
std::vector<std::string> serviceAreas;
42+
std::string region;
4243
std::string appType;
4344
std::string appName;
4445
};

rtc/src/RtcClient.cc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,42 @@ RtcClient::DeleteRecordTemplateOutcomeCallable RtcClient::deleteRecordTemplateCa
375375
return task->get_future();
376376
}
377377

378+
RtcClient::DescribeAppKeyOutcome RtcClient::describeAppKey(const DescribeAppKeyRequest &request) const
379+
{
380+
auto endpointOutcome = endpointProvider_->getEndpoint();
381+
if (!endpointOutcome.isSuccess())
382+
return DescribeAppKeyOutcome(endpointOutcome.error());
383+
384+
auto outcome = makeRequest(endpointOutcome.result(), request);
385+
386+
if (outcome.isSuccess())
387+
return DescribeAppKeyOutcome(DescribeAppKeyResult(outcome.result()));
388+
else
389+
return DescribeAppKeyOutcome(outcome.error());
390+
}
391+
392+
void RtcClient::describeAppKeyAsync(const DescribeAppKeyRequest& request, const DescribeAppKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
393+
{
394+
auto fn = [this, request, handler, context]()
395+
{
396+
handler(this, request, describeAppKey(request), context);
397+
};
398+
399+
asyncExecute(new Runnable(fn));
400+
}
401+
402+
RtcClient::DescribeAppKeyOutcomeCallable RtcClient::describeAppKeyCallable(const DescribeAppKeyRequest &request) const
403+
{
404+
auto task = std::make_shared<std::packaged_task<DescribeAppKeyOutcome()>>(
405+
[this, request]()
406+
{
407+
return this->describeAppKey(request);
408+
});
409+
410+
asyncExecute(new Runnable([task]() { (*task)(); }));
411+
return task->get_future();
412+
}
413+
378414
RtcClient::DescribeAppsOutcome RtcClient::describeApps(const DescribeAppsRequest &request) const
379415
{
380416
auto endpointOutcome = endpointProvider_->getEndpoint();
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include <alibabacloud/rtc/model/DescribeAppKeyRequest.h>
18+
19+
using AlibabaCloud::Rtc::Model::DescribeAppKeyRequest;
20+
21+
DescribeAppKeyRequest::DescribeAppKeyRequest()
22+
: RpcServiceRequest("rtc", "2018-01-11", "DescribeAppKey") {
23+
setMethod(HttpRequest::Method::Post);
24+
}
25+
26+
DescribeAppKeyRequest::~DescribeAppKeyRequest() {}
27+
28+
std::string DescribeAppKeyRequest::getShowLog() const {
29+
return showLog_;
30+
}
31+
32+
void DescribeAppKeyRequest::setShowLog(const std::string &showLog) {
33+
showLog_ = showLog;
34+
setParameter(std::string("ShowLog"), showLog);
35+
}
36+
37+
std::string DescribeAppKeyRequest::getQueryAppId() const {
38+
return queryAppId_;
39+
}
40+
41+
void DescribeAppKeyRequest::setQueryAppId(const std::string &queryAppId) {
42+
queryAppId_ = queryAppId;
43+
setParameter(std::string("QueryAppId"), queryAppId);
44+
}
45+
46+
long DescribeAppKeyRequest::getOwnerId() const {
47+
return ownerId_;
48+
}
49+
50+
void DescribeAppKeyRequest::setOwnerId(long ownerId) {
51+
ownerId_ = ownerId;
52+
setParameter(std::string("OwnerId"), std::to_string(ownerId));
53+
}
54+
55+
std::string DescribeAppKeyRequest::getAppId() const {
56+
return appId_;
57+
}
58+
59+
void DescribeAppKeyRequest::setAppId(const std::string &appId) {
60+
appId_ = appId;
61+
setParameter(std::string("AppId"), appId);
62+
}
63+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include <alibabacloud/rtc/model/DescribeAppKeyResult.h>
18+
#include <json/json.h>
19+
20+
using namespace AlibabaCloud::Rtc;
21+
using namespace AlibabaCloud::Rtc::Model;
22+
23+
DescribeAppKeyResult::DescribeAppKeyResult() :
24+
ServiceResult()
25+
{}
26+
27+
DescribeAppKeyResult::DescribeAppKeyResult(const std::string &payload) :
28+
ServiceResult()
29+
{
30+
parse(payload);
31+
}
32+
33+
DescribeAppKeyResult::~DescribeAppKeyResult()
34+
{}
35+
36+
void DescribeAppKeyResult::parse(const std::string &payload)
37+
{
38+
Json::Reader reader;
39+
Json::Value value;
40+
reader.parse(payload, value);
41+
setRequestId(value["RequestId"].asString());
42+
if(!value["BizId"].isNull())
43+
bizId_ = value["BizId"].asString();
44+
if(!value["AppKey"].isNull())
45+
appKey_ = value["AppKey"].asString();
46+
47+
}
48+
49+
std::string DescribeAppKeyResult::getAppKey()const
50+
{
51+
return appKey_;
52+
}
53+
54+
std::string DescribeAppKeyResult::getBizId()const
55+
{
56+
return bizId_;
57+
}
58+

0 commit comments

Comments
 (0)