Supported AAA for BBB.

This commit is contained in:
sdk-team
2020-05-13 14:44:31 +08:00
parent e312177cd9
commit 396541400e
13 changed files with 569 additions and 1 deletions

View File

@@ -195,6 +195,42 @@ RetailcloudClient::CloseDeployOrderOutcomeCallable RetailcloudClient::closeDeplo
return task->get_future();
}
RetailcloudClient::CreateAccountOutcome RetailcloudClient::createAccount(const CreateAccountRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateAccountOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateAccountOutcome(CreateAccountResult(outcome.result()));
else
return CreateAccountOutcome(outcome.error());
}
void RetailcloudClient::createAccountAsync(const CreateAccountRequest& request, const CreateAccountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createAccount(request), context);
};
asyncExecute(new Runnable(fn));
}
RetailcloudClient::CreateAccountOutcomeCallable RetailcloudClient::createAccountCallable(const CreateAccountRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateAccountOutcome()>>(
[this, request]()
{
return this->createAccount(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RetailcloudClient::CreateAppOutcome RetailcloudClient::createApp(const CreateAppRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2319,6 +2355,42 @@ RetailcloudClient::RemoveClusterNodeOutcomeCallable RetailcloudClient::removeClu
return task->get_future();
}
RetailcloudClient::ResetAccountPasswordOutcome RetailcloudClient::resetAccountPassword(const ResetAccountPasswordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ResetAccountPasswordOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ResetAccountPasswordOutcome(ResetAccountPasswordResult(outcome.result()));
else
return ResetAccountPasswordOutcome(outcome.error());
}
void RetailcloudClient::resetAccountPasswordAsync(const ResetAccountPasswordRequest& request, const ResetAccountPasswordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, resetAccountPassword(request), context);
};
asyncExecute(new Runnable(fn));
}
RetailcloudClient::ResetAccountPasswordOutcomeCallable RetailcloudClient::resetAccountPasswordCallable(const ResetAccountPasswordRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ResetAccountPasswordOutcome()>>(
[this, request]()
{
return this->resetAccountPassword(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RetailcloudClient::ResourceStatusNotifyOutcome RetailcloudClient::resourceStatusNotify(const ResourceStatusNotifyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,73 @@
/*
* 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/retailcloud/model/CreateAccountRequest.h>
using AlibabaCloud::Retailcloud::Model::CreateAccountRequest;
CreateAccountRequest::CreateAccountRequest() :
RpcServiceRequest("retailcloud", "2018-03-13", "CreateAccount")
{
setMethod(HttpRequest::Method::Post);
}
CreateAccountRequest::~CreateAccountRequest()
{}
std::string CreateAccountRequest::getAccountPassword()const
{
return accountPassword_;
}
void CreateAccountRequest::setAccountPassword(const std::string& accountPassword)
{
accountPassword_ = accountPassword;
setBodyParameter("AccountPassword", accountPassword);
}
std::string CreateAccountRequest::getAccountName()const
{
return accountName_;
}
void CreateAccountRequest::setAccountName(const std::string& accountName)
{
accountName_ = accountName;
setBodyParameter("AccountName", accountName);
}
std::string CreateAccountRequest::getAccountType()const
{
return accountType_;
}
void CreateAccountRequest::setAccountType(const std::string& accountType)
{
accountType_ = accountType;
setBodyParameter("AccountType", accountType);
}
std::string CreateAccountRequest::getDbInstanceId()const
{
return dbInstanceId_;
}
void CreateAccountRequest::setDbInstanceId(const std::string& dbInstanceId)
{
dbInstanceId_ = dbInstanceId;
setBodyParameter("DbInstanceId", dbInstanceId);
}

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/retailcloud/model/CreateAccountResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Retailcloud;
using namespace AlibabaCloud::Retailcloud::Model;
CreateAccountResult::CreateAccountResult() :
ServiceResult()
{}
CreateAccountResult::CreateAccountResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateAccountResult::~CreateAccountResult()
{}
void CreateAccountResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string CreateAccountResult::getErrMsg()const
{
return errMsg_;
}
int CreateAccountResult::getCode()const
{
return code_;
}

View 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/retailcloud/model/ResetAccountPasswordRequest.h>
using AlibabaCloud::Retailcloud::Model::ResetAccountPasswordRequest;
ResetAccountPasswordRequest::ResetAccountPasswordRequest() :
RpcServiceRequest("retailcloud", "2018-03-13", "ResetAccountPassword")
{
setMethod(HttpRequest::Method::Post);
}
ResetAccountPasswordRequest::~ResetAccountPasswordRequest()
{}
std::string ResetAccountPasswordRequest::getAccountPassword()const
{
return accountPassword_;
}
void ResetAccountPasswordRequest::setAccountPassword(const std::string& accountPassword)
{
accountPassword_ = accountPassword;
setBodyParameter("AccountPassword", accountPassword);
}
std::string ResetAccountPasswordRequest::getAccountName()const
{
return accountName_;
}
void ResetAccountPasswordRequest::setAccountName(const std::string& accountName)
{
accountName_ = accountName;
setBodyParameter("AccountName", accountName);
}
std::string ResetAccountPasswordRequest::getDbInstanceId()const
{
return dbInstanceId_;
}
void ResetAccountPasswordRequest::setDbInstanceId(const std::string& dbInstanceId)
{
dbInstanceId_ = dbInstanceId;
setBodyParameter("DbInstanceId", dbInstanceId);
}

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/retailcloud/model/ResetAccountPasswordResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Retailcloud;
using namespace AlibabaCloud::Retailcloud::Model;
ResetAccountPasswordResult::ResetAccountPasswordResult() :
ServiceResult()
{}
ResetAccountPasswordResult::ResetAccountPasswordResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ResetAccountPasswordResult::~ResetAccountPasswordResult()
{}
void ResetAccountPasswordResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string ResetAccountPasswordResult::getErrMsg()const
{
return errMsg_;
}
int ResetAccountPasswordResult::getCode()const
{
return code_;
}