Skip to content

Commit e089d8a

Browse files
committed
Supported GetProxyAccess API.
1 parent caa1af1 commit e089d8a

12 files changed

+313
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.36.1394
1+
1.36.1395

dms-enterprise/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ set(dms-enterprise_public_header_model
169169
include/alibabacloud/dms-enterprise/model/GetPhysicalDatabaseResult.h
170170
include/alibabacloud/dms-enterprise/model/GetProxyRequest.h
171171
include/alibabacloud/dms-enterprise/model/GetProxyResult.h
172+
include/alibabacloud/dms-enterprise/model/GetProxyAccessRequest.h
173+
include/alibabacloud/dms-enterprise/model/GetProxyAccessResult.h
172174
include/alibabacloud/dms-enterprise/model/GetRuleNumLimitOfSLARequest.h
173175
include/alibabacloud/dms-enterprise/model/GetRuleNumLimitOfSLAResult.h
174176
include/alibabacloud/dms-enterprise/model/GetSQLReviewCheckResultStatusRequest.h
@@ -536,6 +538,8 @@ set(dms-enterprise_src
536538
src/model/GetPhysicalDatabaseResult.cc
537539
src/model/GetProxyRequest.cc
538540
src/model/GetProxyResult.cc
541+
src/model/GetProxyAccessRequest.cc
542+
src/model/GetProxyAccessResult.cc
539543
src/model/GetRuleNumLimitOfSLARequest.cc
540544
src/model/GetRuleNumLimitOfSLAResult.cc
541545
src/model/GetSQLReviewCheckResultStatusRequest.cc

dms-enterprise/include/alibabacloud/dms-enterprise/Dms_enterpriseClient.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@
170170
#include "model/GetPhysicalDatabaseResult.h"
171171
#include "model/GetProxyRequest.h"
172172
#include "model/GetProxyResult.h"
173+
#include "model/GetProxyAccessRequest.h"
174+
#include "model/GetProxyAccessResult.h"
173175
#include "model/GetRuleNumLimitOfSLARequest.h"
174176
#include "model/GetRuleNumLimitOfSLAResult.h"
175177
#include "model/GetSQLReviewCheckResultStatusRequest.h"
@@ -617,6 +619,9 @@ namespace AlibabaCloud
617619
typedef Outcome<Error, Model::GetProxyResult> GetProxyOutcome;
618620
typedef std::future<GetProxyOutcome> GetProxyOutcomeCallable;
619621
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetProxyRequest&, const GetProxyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProxyAsyncHandler;
622+
typedef Outcome<Error, Model::GetProxyAccessResult> GetProxyAccessOutcome;
623+
typedef std::future<GetProxyAccessOutcome> GetProxyAccessOutcomeCallable;
624+
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetProxyAccessRequest&, const GetProxyAccessOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProxyAccessAsyncHandler;
620625
typedef Outcome<Error, Model::GetRuleNumLimitOfSLAResult> GetRuleNumLimitOfSLAOutcome;
621626
typedef std::future<GetRuleNumLimitOfSLAOutcome> GetRuleNumLimitOfSLAOutcomeCallable;
622627
typedef std::function<void(const Dms_enterpriseClient*, const Model::GetRuleNumLimitOfSLARequest&, const GetRuleNumLimitOfSLAOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetRuleNumLimitOfSLAAsyncHandler;
@@ -1168,6 +1173,9 @@ namespace AlibabaCloud
11681173
GetProxyOutcome getProxy(const Model::GetProxyRequest &request)const;
11691174
void getProxyAsync(const Model::GetProxyRequest& request, const GetProxyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
11701175
GetProxyOutcomeCallable getProxyCallable(const Model::GetProxyRequest& request) const;
1176+
GetProxyAccessOutcome getProxyAccess(const Model::GetProxyAccessRequest &request)const;
1177+
void getProxyAccessAsync(const Model::GetProxyAccessRequest& request, const GetProxyAccessAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
1178+
GetProxyAccessOutcomeCallable getProxyAccessCallable(const Model::GetProxyAccessRequest& request) const;
11711179
GetRuleNumLimitOfSLAOutcome getRuleNumLimitOfSLA(const Model::GetRuleNumLimitOfSLARequest &request)const;
11721180
void getRuleNumLimitOfSLAAsync(const Model::GetRuleNumLimitOfSLARequest& request, const GetRuleNumLimitOfSLAAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
11731181
GetRuleNumLimitOfSLAOutcomeCallable getRuleNumLimitOfSLACallable(const Model::GetRuleNumLimitOfSLARequest& request) const;

dms-enterprise/include/alibabacloud/dms-enterprise/model/AddTaskFlowEdgesResult.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ namespace AlibabaCloud
3737
AddTaskFlowEdgesResult();
3838
explicit AddTaskFlowEdgesResult(const std::string &payload);
3939
~AddTaskFlowEdgesResult();
40+
std::vector<std::string> getEdgeIds()const;
4041
std::string getErrorCode()const;
4142
std::string getErrorMessage()const;
4243
bool getSuccess()const;
4344

4445
protected:
4546
void parse(const std::string &payload);
4647
private:
48+
std::vector<std::string> edgeIds_;
4749
std::string errorCode_;
4850
std::string errorMessage_;
4951
bool success_;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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_DMS_ENTERPRISE_MODEL_GETPROXYACCESSREQUEST_H_
18+
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPROXYACCESSREQUEST_H_
19+
20+
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
21+
#include <alibabacloud/core/RpcServiceRequest.h>
22+
#include <string>
23+
#include <vector>
24+
#include <map>
25+
26+
namespace AlibabaCloud {
27+
namespace Dms_enterprise {
28+
namespace Model {
29+
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetProxyAccessRequest : public RpcServiceRequest {
30+
public:
31+
GetProxyAccessRequest();
32+
~GetProxyAccessRequest();
33+
long getProxyAccessId() const;
34+
void setProxyAccessId(long proxyAccessId);
35+
long getTid() const;
36+
void setTid(long tid);
37+
38+
private:
39+
long proxyAccessId_;
40+
long tid_;
41+
};
42+
} // namespace Model
43+
} // namespace Dms_enterprise
44+
} // namespace AlibabaCloud
45+
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPROXYACCESSREQUEST_H_
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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_DMS_ENTERPRISE_MODEL_GETPROXYACCESSRESULT_H_
18+
#define ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPROXYACCESSRESULT_H_
19+
20+
#include <string>
21+
#include <vector>
22+
#include <utility>
23+
#include <alibabacloud/core/ServiceResult.h>
24+
#include <alibabacloud/dms-enterprise/Dms_enterpriseExport.h>
25+
26+
namespace AlibabaCloud
27+
{
28+
namespace Dms_enterprise
29+
{
30+
namespace Model
31+
{
32+
class ALIBABACLOUD_DMS_ENTERPRISE_EXPORT GetProxyAccessResult : public ServiceResult
33+
{
34+
public:
35+
struct ProxyAccess
36+
{
37+
std::string gmtCreate;
38+
std::string userName;
39+
std::string accessId;
40+
long instanceId;
41+
long userId;
42+
std::string userUid;
43+
long proxyId;
44+
long proxyAccessId;
45+
std::string originInfo;
46+
std::string indepAccount;
47+
};
48+
49+
50+
GetProxyAccessResult();
51+
explicit GetProxyAccessResult(const std::string &payload);
52+
~GetProxyAccessResult();
53+
ProxyAccess getProxyAccess()const;
54+
std::string getErrorCode()const;
55+
std::string getErrorMessage()const;
56+
bool getSuccess()const;
57+
58+
protected:
59+
void parse(const std::string &payload);
60+
private:
61+
ProxyAccess proxyAccess_;
62+
std::string errorCode_;
63+
std::string errorMessage_;
64+
bool success_;
65+
66+
};
67+
}
68+
}
69+
}
70+
#endif // !ALIBABACLOUD_DMS_ENTERPRISE_MODEL_GETPROXYACCESSRESULT_H_

dms-enterprise/include/alibabacloud/dms-enterprise/model/ListTaskFlowCooperatorsResult.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ namespace AlibabaCloud
3636
{
3737
std::string loginName;
3838
std::string email;
39+
std::string userId;
3940
std::string realName;
4041
std::string nickName;
4142
};

dms-enterprise/src/Dms-enterpriseClient.cc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,6 +2715,42 @@ Dms_enterpriseClient::GetProxyOutcomeCallable Dms_enterpriseClient::getProxyCall
27152715
return task->get_future();
27162716
}
27172717

2718+
Dms_enterpriseClient::GetProxyAccessOutcome Dms_enterpriseClient::getProxyAccess(const GetProxyAccessRequest &request) const
2719+
{
2720+
auto endpointOutcome = endpointProvider_->getEndpoint();
2721+
if (!endpointOutcome.isSuccess())
2722+
return GetProxyAccessOutcome(endpointOutcome.error());
2723+
2724+
auto outcome = makeRequest(endpointOutcome.result(), request);
2725+
2726+
if (outcome.isSuccess())
2727+
return GetProxyAccessOutcome(GetProxyAccessResult(outcome.result()));
2728+
else
2729+
return GetProxyAccessOutcome(outcome.error());
2730+
}
2731+
2732+
void Dms_enterpriseClient::getProxyAccessAsync(const GetProxyAccessRequest& request, const GetProxyAccessAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
2733+
{
2734+
auto fn = [this, request, handler, context]()
2735+
{
2736+
handler(this, request, getProxyAccess(request), context);
2737+
};
2738+
2739+
asyncExecute(new Runnable(fn));
2740+
}
2741+
2742+
Dms_enterpriseClient::GetProxyAccessOutcomeCallable Dms_enterpriseClient::getProxyAccessCallable(const GetProxyAccessRequest &request) const
2743+
{
2744+
auto task = std::make_shared<std::packaged_task<GetProxyAccessOutcome()>>(
2745+
[this, request]()
2746+
{
2747+
return this->getProxyAccess(request);
2748+
});
2749+
2750+
asyncExecute(new Runnable([task]() { (*task)(); }));
2751+
return task->get_future();
2752+
}
2753+
27182754
Dms_enterpriseClient::GetRuleNumLimitOfSLAOutcome Dms_enterpriseClient::getRuleNumLimitOfSLA(const GetRuleNumLimitOfSLARequest &request) const
27192755
{
27202756
auto endpointOutcome = endpointProvider_->getEndpoint();

dms-enterprise/src/model/AddTaskFlowEdgesResult.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ void AddTaskFlowEdgesResult::parse(const std::string &payload)
3939
Json::Value value;
4040
reader.parse(payload, value);
4141
setRequestId(value["RequestId"].asString());
42+
auto allEdgeIds = value["EdgeIds"]["EdgeId"];
43+
for (const auto &item : allEdgeIds)
44+
edgeIds_.push_back(item.asString());
4245
if(!value["ErrorCode"].isNull())
4346
errorCode_ = value["ErrorCode"].asString();
4447
if(!value["ErrorMessage"].isNull())
@@ -48,6 +51,11 @@ void AddTaskFlowEdgesResult::parse(const std::string &payload)
4851

4952
}
5053

54+
std::vector<std::string> AddTaskFlowEdgesResult::getEdgeIds()const
55+
{
56+
return edgeIds_;
57+
}
58+
5159
std::string AddTaskFlowEdgesResult::getErrorCode()const
5260
{
5361
return errorCode_;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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/dms-enterprise/model/GetProxyAccessRequest.h>
18+
19+
using AlibabaCloud::Dms_enterprise::Model::GetProxyAccessRequest;
20+
21+
GetProxyAccessRequest::GetProxyAccessRequest()
22+
: RpcServiceRequest("dms-enterprise", "2018-11-01", "GetProxyAccess") {
23+
setMethod(HttpRequest::Method::Post);
24+
}
25+
26+
GetProxyAccessRequest::~GetProxyAccessRequest() {}
27+
28+
long GetProxyAccessRequest::getProxyAccessId() const {
29+
return proxyAccessId_;
30+
}
31+
32+
void GetProxyAccessRequest::setProxyAccessId(long proxyAccessId) {
33+
proxyAccessId_ = proxyAccessId;
34+
setParameter(std::string("ProxyAccessId"), std::to_string(proxyAccessId));
35+
}
36+
37+
long GetProxyAccessRequest::getTid() const {
38+
return tid_;
39+
}
40+
41+
void GetProxyAccessRequest::setTid(long tid) {
42+
tid_ = tid;
43+
setParameter(std::string("Tid"), std::to_string(tid));
44+
}
45+

0 commit comments

Comments
 (0)