From 28e4f58d7cf1ffccd66b27e6cb586762971fa042 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 4 Apr 2023 07:04:48 +0000 Subject: [PATCH] Cc5g. --- VERSION | 2 +- cc5g/CMakeLists.txt | 4 ++ cc5g/include/alibabacloud/cc5g/CC5GClient.h | 8 +++ .../cc5g/model/RebindCardsRequest.h | 51 +++++++++++++++ .../cc5g/model/RebindCardsResult.h | 49 +++++++++++++++ cc5g/src/CC5GClient.cc | 36 +++++++++++ cc5g/src/model/RebindCardsRequest.cc | 62 +++++++++++++++++++ cc5g/src/model/RebindCardsResult.cc | 44 +++++++++++++ 8 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 cc5g/include/alibabacloud/cc5g/model/RebindCardsRequest.h create mode 100644 cc5g/include/alibabacloud/cc5g/model/RebindCardsResult.h create mode 100644 cc5g/src/model/RebindCardsRequest.cc create mode 100644 cc5g/src/model/RebindCardsResult.cc diff --git a/VERSION b/VERSION index 944250aa8..32a1eecae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1523 \ No newline at end of file +1.36.1524 \ No newline at end of file diff --git a/cc5g/CMakeLists.txt b/cc5g/CMakeLists.txt index 24a007591..1d9a3fa23 100644 --- a/cc5g/CMakeLists.txt +++ b/cc5g/CMakeLists.txt @@ -103,6 +103,8 @@ set(cc5g_public_header_model include/alibabacloud/cc5g/model/ModifyWirelessCloudConnectorFeatureResult.h include/alibabacloud/cc5g/model/OpenCc5gServiceRequest.h include/alibabacloud/cc5g/model/OpenCc5gServiceResult.h + include/alibabacloud/cc5g/model/RebindCardsRequest.h + include/alibabacloud/cc5g/model/RebindCardsResult.h include/alibabacloud/cc5g/model/RemoveWirelessCloudConnectorFromGroupRequest.h include/alibabacloud/cc5g/model/RemoveWirelessCloudConnectorFromGroupResult.h include/alibabacloud/cc5g/model/ResumeCardsRequest.h @@ -218,6 +220,8 @@ set(cc5g_src src/model/ModifyWirelessCloudConnectorFeatureResult.cc src/model/OpenCc5gServiceRequest.cc src/model/OpenCc5gServiceResult.cc + src/model/RebindCardsRequest.cc + src/model/RebindCardsResult.cc src/model/RemoveWirelessCloudConnectorFromGroupRequest.cc src/model/RemoveWirelessCloudConnectorFromGroupResult.cc src/model/ResumeCardsRequest.cc diff --git a/cc5g/include/alibabacloud/cc5g/CC5GClient.h b/cc5g/include/alibabacloud/cc5g/CC5GClient.h index 75788f19d..8f521d084 100644 --- a/cc5g/include/alibabacloud/cc5g/CC5GClient.h +++ b/cc5g/include/alibabacloud/cc5g/CC5GClient.h @@ -104,6 +104,8 @@ #include "model/ModifyWirelessCloudConnectorFeatureResult.h" #include "model/OpenCc5gServiceRequest.h" #include "model/OpenCc5gServiceResult.h" +#include "model/RebindCardsRequest.h" +#include "model/RebindCardsResult.h" #include "model/RemoveWirelessCloudConnectorFromGroupRequest.h" #include "model/RemoveWirelessCloudConnectorFromGroupResult.h" #include "model/ResumeCardsRequest.h" @@ -266,6 +268,9 @@ namespace AlibabaCloud typedef Outcome OpenCc5gServiceOutcome; typedef std::future OpenCc5gServiceOutcomeCallable; typedef std::function&)> OpenCc5gServiceAsyncHandler; + typedef Outcome RebindCardsOutcome; + typedef std::future RebindCardsOutcomeCallable; + typedef std::function&)> RebindCardsAsyncHandler; typedef Outcome RemoveWirelessCloudConnectorFromGroupOutcome; typedef std::future RemoveWirelessCloudConnectorFromGroupOutcomeCallable; typedef std::function&)> RemoveWirelessCloudConnectorFromGroupAsyncHandler; @@ -439,6 +444,9 @@ namespace AlibabaCloud OpenCc5gServiceOutcome openCc5gService(const Model::OpenCc5gServiceRequest &request)const; void openCc5gServiceAsync(const Model::OpenCc5gServiceRequest& request, const OpenCc5gServiceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; OpenCc5gServiceOutcomeCallable openCc5gServiceCallable(const Model::OpenCc5gServiceRequest& request) const; + RebindCardsOutcome rebindCards(const Model::RebindCardsRequest &request)const; + void rebindCardsAsync(const Model::RebindCardsRequest& request, const RebindCardsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RebindCardsOutcomeCallable rebindCardsCallable(const Model::RebindCardsRequest& request) const; RemoveWirelessCloudConnectorFromGroupOutcome removeWirelessCloudConnectorFromGroup(const Model::RemoveWirelessCloudConnectorFromGroupRequest &request)const; void removeWirelessCloudConnectorFromGroupAsync(const Model::RemoveWirelessCloudConnectorFromGroupRequest& request, const RemoveWirelessCloudConnectorFromGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RemoveWirelessCloudConnectorFromGroupOutcomeCallable removeWirelessCloudConnectorFromGroupCallable(const Model::RemoveWirelessCloudConnectorFromGroupRequest& request) const; diff --git a/cc5g/include/alibabacloud/cc5g/model/RebindCardsRequest.h b/cc5g/include/alibabacloud/cc5g/model/RebindCardsRequest.h new file mode 100644 index 000000000..d61e32a03 --- /dev/null +++ b/cc5g/include/alibabacloud/cc5g/model/RebindCardsRequest.h @@ -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_CC5G_MODEL_REBINDCARDSREQUEST_H_ +#define ALIBABACLOUD_CC5G_MODEL_REBINDCARDSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace CC5G { +namespace Model { +class ALIBABACLOUD_CC5G_EXPORT RebindCardsRequest : public RpcServiceRequest { +public: + RebindCardsRequest(); + ~RebindCardsRequest(); + std::vector getIccids() const; + void setIccids(const std::vector &iccids); + bool getDryRun() const; + void setDryRun(bool dryRun); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + +private: + std::vector iccids_; + bool dryRun_; + std::string clientToken_; + std::string regionId_; +}; +} // namespace Model +} // namespace CC5G +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_CC5G_MODEL_REBINDCARDSREQUEST_H_ diff --git a/cc5g/include/alibabacloud/cc5g/model/RebindCardsResult.h b/cc5g/include/alibabacloud/cc5g/model/RebindCardsResult.h new file mode 100644 index 000000000..71cf722f5 --- /dev/null +++ b/cc5g/include/alibabacloud/cc5g/model/RebindCardsResult.h @@ -0,0 +1,49 @@ +/* + * 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_CC5G_MODEL_REBINDCARDSRESULT_H_ +#define ALIBABACLOUD_CC5G_MODEL_REBINDCARDSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CC5G + { + namespace Model + { + class ALIBABACLOUD_CC5G_EXPORT RebindCardsResult : public ServiceResult + { + public: + + + RebindCardsResult(); + explicit RebindCardsResult(const std::string &payload); + ~RebindCardsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_CC5G_MODEL_REBINDCARDSRESULT_H_ \ No newline at end of file diff --git a/cc5g/src/CC5GClient.cc b/cc5g/src/CC5GClient.cc index 73bbf21ee..1ce9999bb 100644 --- a/cc5g/src/CC5GClient.cc +++ b/cc5g/src/CC5GClient.cc @@ -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& 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>( + [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(); diff --git a/cc5g/src/model/RebindCardsRequest.cc b/cc5g/src/model/RebindCardsRequest.cc new file mode 100644 index 000000000..e7d9edc6f --- /dev/null +++ b/cc5g/src/model/RebindCardsRequest.cc @@ -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 + +using AlibabaCloud::CC5G::Model::RebindCardsRequest; + +RebindCardsRequest::RebindCardsRequest() + : RpcServiceRequest("cc5g", "2022-03-14", "RebindCards") { + setMethod(HttpRequest::Method::Post); +} + +RebindCardsRequest::~RebindCardsRequest() {} + +std::vector RebindCardsRequest::getIccids() const { + return iccids_; +} + +void RebindCardsRequest::setIccids(const std::vector &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 ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + diff --git a/cc5g/src/model/RebindCardsResult.cc b/cc5g/src/model/RebindCardsResult.cc new file mode 100644 index 000000000..957a3f498 --- /dev/null +++ b/cc5g/src/model/RebindCardsResult.cc @@ -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 +#include + +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()); + +} +