This commit is contained in:
sdk-team
2023-04-04 07:04:48 +00:00
parent 0137ae2b16
commit 28e4f58d7c
8 changed files with 255 additions and 1 deletions

View File

@@ -1527,6 +1527,42 @@ CC5GClient::OpenCc5gServiceOutcomeCallable CC5GClient::openCc5gServiceCallable(c
return task->get_future();
}
CC5GClient::RebindCardsOutcome CC5GClient::rebindCards(const RebindCardsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RebindCardsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RebindCardsOutcome(RebindCardsResult(outcome.result()));
else
return RebindCardsOutcome(outcome.error());
}
void CC5GClient::rebindCardsAsync(const RebindCardsRequest& request, const RebindCardsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, rebindCards(request), context);
};
asyncExecute(new Runnable(fn));
}
CC5GClient::RebindCardsOutcomeCallable CC5GClient::rebindCardsCallable(const RebindCardsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RebindCardsOutcome()>>(
[this, request]()
{
return this->rebindCards(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CC5GClient::RemoveWirelessCloudConnectorFromGroupOutcome CC5GClient::removeWirelessCloudConnectorFromGroup(const RemoveWirelessCloudConnectorFromGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

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/cc5g/model/RebindCardsRequest.h>
using AlibabaCloud::CC5G::Model::RebindCardsRequest;
RebindCardsRequest::RebindCardsRequest()
: RpcServiceRequest("cc5g", "2022-03-14", "RebindCards") {
setMethod(HttpRequest::Method::Post);
}
RebindCardsRequest::~RebindCardsRequest() {}
std::vector<std::string> RebindCardsRequest::getIccids() const {
return iccids_;
}
void RebindCardsRequest::setIccids(const std::vector<std::string> &iccids) {
iccids_ = iccids;
}
bool RebindCardsRequest::getDryRun() const {
return dryRun_;
}
void RebindCardsRequest::setDryRun(bool dryRun) {
dryRun_ = dryRun;
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
}
std::string RebindCardsRequest::getClientToken() const {
return clientToken_;
}
void RebindCardsRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
std::string RebindCardsRequest::getRegionId() const {
return regionId_;
}
void RebindCardsRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/cc5g/model/RebindCardsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CC5G;
using namespace AlibabaCloud::CC5G::Model;
RebindCardsResult::RebindCardsResult() :
ServiceResult()
{}
RebindCardsResult::RebindCardsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RebindCardsResult::~RebindCardsResult()
{}
void RebindCardsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}