diff --git a/VERSION b/VERSION index ff7b65797..561868dfe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1457 \ No newline at end of file +1.36.1458 \ No newline at end of file diff --git a/cc5g/CMakeLists.txt b/cc5g/CMakeLists.txt index 95c16fe7e..24a007591 100644 --- a/cc5g/CMakeLists.txt +++ b/cc5g/CMakeLists.txt @@ -75,6 +75,8 @@ set(cc5g_public_header_model include/alibabacloud/cc5g/model/ListAuthorizationRulesResult.h include/alibabacloud/cc5g/model/ListBatchOperateCardsTasksRequest.h include/alibabacloud/cc5g/model/ListBatchOperateCardsTasksResult.h + include/alibabacloud/cc5g/model/ListCardUsagesRequest.h + include/alibabacloud/cc5g/model/ListCardUsagesResult.h include/alibabacloud/cc5g/model/ListCardsRequest.h include/alibabacloud/cc5g/model/ListCardsResult.h include/alibabacloud/cc5g/model/ListDataPackagesRequest.h @@ -188,6 +190,8 @@ set(cc5g_src src/model/ListAuthorizationRulesResult.cc src/model/ListBatchOperateCardsTasksRequest.cc src/model/ListBatchOperateCardsTasksResult.cc + src/model/ListCardUsagesRequest.cc + src/model/ListCardUsagesResult.cc src/model/ListCardsRequest.cc src/model/ListCardsResult.cc src/model/ListDataPackagesRequest.cc diff --git a/cc5g/include/alibabacloud/cc5g/CC5GClient.h b/cc5g/include/alibabacloud/cc5g/CC5GClient.h index 943234239..75788f19d 100644 --- a/cc5g/include/alibabacloud/cc5g/CC5GClient.h +++ b/cc5g/include/alibabacloud/cc5g/CC5GClient.h @@ -76,6 +76,8 @@ #include "model/ListAuthorizationRulesResult.h" #include "model/ListBatchOperateCardsTasksRequest.h" #include "model/ListBatchOperateCardsTasksResult.h" +#include "model/ListCardUsagesRequest.h" +#include "model/ListCardUsagesResult.h" #include "model/ListCardsRequest.h" #include "model/ListCardsResult.h" #include "model/ListDataPackagesRequest.h" @@ -222,6 +224,9 @@ namespace AlibabaCloud typedef Outcome ListBatchOperateCardsTasksOutcome; typedef std::future ListBatchOperateCardsTasksOutcomeCallable; typedef std::function&)> ListBatchOperateCardsTasksAsyncHandler; + typedef Outcome ListCardUsagesOutcome; + typedef std::future ListCardUsagesOutcomeCallable; + typedef std::function&)> ListCardUsagesAsyncHandler; typedef Outcome ListCardsOutcome; typedef std::future ListCardsOutcomeCallable; typedef std::function&)> ListCardsAsyncHandler; @@ -392,6 +397,9 @@ namespace AlibabaCloud ListBatchOperateCardsTasksOutcome listBatchOperateCardsTasks(const Model::ListBatchOperateCardsTasksRequest &request)const; void listBatchOperateCardsTasksAsync(const Model::ListBatchOperateCardsTasksRequest& request, const ListBatchOperateCardsTasksAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListBatchOperateCardsTasksOutcomeCallable listBatchOperateCardsTasksCallable(const Model::ListBatchOperateCardsTasksRequest& request) const; + ListCardUsagesOutcome listCardUsages(const Model::ListCardUsagesRequest &request)const; + void listCardUsagesAsync(const Model::ListCardUsagesRequest& request, const ListCardUsagesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListCardUsagesOutcomeCallable listCardUsagesCallable(const Model::ListCardUsagesRequest& request) const; ListCardsOutcome listCards(const Model::ListCardsRequest &request)const; void listCardsAsync(const Model::ListCardsRequest& request, const ListCardsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListCardsOutcomeCallable listCardsCallable(const Model::ListCardsRequest& request) const; diff --git a/cc5g/include/alibabacloud/cc5g/model/GetDiagnoseResultForSingleCardResult.h b/cc5g/include/alibabacloud/cc5g/model/GetDiagnoseResultForSingleCardResult.h index 52ff27f58..5c779bca0 100644 --- a/cc5g/include/alibabacloud/cc5g/model/GetDiagnoseResultForSingleCardResult.h +++ b/cc5g/include/alibabacloud/cc5g/model/GetDiagnoseResultForSingleCardResult.h @@ -37,10 +37,18 @@ namespace AlibabaCloud std::string errorDesc; std::string errorSuggestion; std::string errorLevel; + std::string errorItem; std::string errorPart; }; struct DiagnoseItemItem { + struct SubItemsItem + { + std::string subItem; + std::string subItemStatus; + std::string subItemInfo; + }; + std::vector subItems; std::string status; std::string part; }; diff --git a/cc5g/include/alibabacloud/cc5g/model/ListCardUsagesRequest.h b/cc5g/include/alibabacloud/cc5g/model/ListCardUsagesRequest.h new file mode 100644 index 000000000..35b7dbde0 --- /dev/null +++ b/cc5g/include/alibabacloud/cc5g/model/ListCardUsagesRequest.h @@ -0,0 +1,45 @@ +/* + * 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_LISTCARDUSAGESREQUEST_H_ +#define ALIBABACLOUD_CC5G_MODEL_LISTCARDUSAGESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace CC5G { +namespace Model { +class ALIBABACLOUD_CC5G_EXPORT ListCardUsagesRequest : public RpcServiceRequest { +public: + ListCardUsagesRequest(); + ~ListCardUsagesRequest(); + std::vector getIccids() const; + void setIccids(const std::vector &iccids); + std::string getWirelessCloudConnectorId() const; + void setWirelessCloudConnectorId(const std::string &wirelessCloudConnectorId); + +private: + std::vector iccids_; + std::string wirelessCloudConnectorId_; +}; +} // namespace Model +} // namespace CC5G +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_CC5G_MODEL_LISTCARDUSAGESREQUEST_H_ diff --git a/cc5g/include/alibabacloud/cc5g/model/ListCardUsagesResult.h b/cc5g/include/alibabacloud/cc5g/model/ListCardUsagesResult.h new file mode 100644 index 000000000..6fc0251d7 --- /dev/null +++ b/cc5g/include/alibabacloud/cc5g/model/ListCardUsagesResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_CC5G_MODEL_LISTCARDUSAGESRESULT_H_ +#define ALIBABACLOUD_CC5G_MODEL_LISTCARDUSAGESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CC5G + { + namespace Model + { + class ALIBABACLOUD_CC5G_EXPORT ListCardUsagesResult : public ServiceResult + { + public: + struct Card + { + long usageDataMonth; + std::string iccid; + }; + + + ListCardUsagesResult(); + explicit ListCardUsagesResult(const std::string &payload); + ~ListCardUsagesResult(); + std::string getTotalCount()const; + std::vector getCards()const; + + protected: + void parse(const std::string &payload); + private: + std::string totalCount_; + std::vector cards_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CC5G_MODEL_LISTCARDUSAGESRESULT_H_ \ No newline at end of file diff --git a/cc5g/include/alibabacloud/cc5g/model/ListRegionsResult.h b/cc5g/include/alibabacloud/cc5g/model/ListRegionsResult.h index 521d7039b..da1e848e2 100644 --- a/cc5g/include/alibabacloud/cc5g/model/ListRegionsResult.h +++ b/cc5g/include/alibabacloud/cc5g/model/ListRegionsResult.h @@ -35,7 +35,6 @@ namespace AlibabaCloud struct Region { std::string regionId; - std::string regionEndpoint; std::string localName; }; diff --git a/cc5g/src/CC5GClient.cc b/cc5g/src/CC5GClient.cc index cf26085f0..73bbf21ee 100644 --- a/cc5g/src/CC5GClient.cc +++ b/cc5g/src/CC5GClient.cc @@ -1023,6 +1023,42 @@ CC5GClient::ListBatchOperateCardsTasksOutcomeCallable CC5GClient::listBatchOpera return task->get_future(); } +CC5GClient::ListCardUsagesOutcome CC5GClient::listCardUsages(const ListCardUsagesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListCardUsagesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListCardUsagesOutcome(ListCardUsagesResult(outcome.result())); + else + return ListCardUsagesOutcome(outcome.error()); +} + +void CC5GClient::listCardUsagesAsync(const ListCardUsagesRequest& request, const ListCardUsagesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listCardUsages(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CC5GClient::ListCardUsagesOutcomeCallable CC5GClient::listCardUsagesCallable(const ListCardUsagesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listCardUsages(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CC5GClient::ListCardsOutcome CC5GClient::listCards(const ListCardsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/cc5g/src/model/GetDiagnoseResultForSingleCardResult.cc b/cc5g/src/model/GetDiagnoseResultForSingleCardResult.cc index 1f206b415..916e2392d 100644 --- a/cc5g/src/model/GetDiagnoseResultForSingleCardResult.cc +++ b/cc5g/src/model/GetDiagnoseResultForSingleCardResult.cc @@ -47,6 +47,8 @@ void GetDiagnoseResultForSingleCardResult::parse(const std::string &payload) errorResultObject.errorLevel = valueErrorResultdiagnoseResult["ErrorLevel"].asString(); if(!valueErrorResultdiagnoseResult["ErrorPart"].isNull()) errorResultObject.errorPart = valueErrorResultdiagnoseResult["ErrorPart"].asString(); + if(!valueErrorResultdiagnoseResult["ErrorItem"].isNull()) + errorResultObject.errorItem = valueErrorResultdiagnoseResult["ErrorItem"].asString(); if(!valueErrorResultdiagnoseResult["ErrorDesc"].isNull()) errorResultObject.errorDesc = valueErrorResultdiagnoseResult["ErrorDesc"].asString(); if(!valueErrorResultdiagnoseResult["ErrorSuggestion"].isNull()) @@ -61,6 +63,18 @@ void GetDiagnoseResultForSingleCardResult::parse(const std::string &payload) diagnoseItemObject.part = valueDiagnoseItemdiagnoseItemItem["Part"].asString(); if(!valueDiagnoseItemdiagnoseItemItem["Status"].isNull()) diagnoseItemObject.status = valueDiagnoseItemdiagnoseItemItem["Status"].asString(); + auto allSubItemsNode = valueDiagnoseItemdiagnoseItemItem["SubItems"]["subItemsItem"]; + for (auto valueDiagnoseItemdiagnoseItemItemSubItemssubItemsItem : allSubItemsNode) + { + DiagnoseItemItem::SubItemsItem subItemsObject; + if(!valueDiagnoseItemdiagnoseItemItemSubItemssubItemsItem["SubItem"].isNull()) + subItemsObject.subItem = valueDiagnoseItemdiagnoseItemItemSubItemssubItemsItem["SubItem"].asString(); + if(!valueDiagnoseItemdiagnoseItemItemSubItemssubItemsItem["SubItemStatus"].isNull()) + subItemsObject.subItemStatus = valueDiagnoseItemdiagnoseItemItemSubItemssubItemsItem["SubItemStatus"].asString(); + if(!valueDiagnoseItemdiagnoseItemItemSubItemssubItemsItem["SubItemInfo"].isNull()) + subItemsObject.subItemInfo = valueDiagnoseItemdiagnoseItemItemSubItemssubItemsItem["SubItemInfo"].asString(); + diagnoseItemObject.subItems.push_back(subItemsObject); + } diagnoseItem_.push_back(diagnoseItemObject); } if(!value["WirelessCloudConnectorId"].isNull()) diff --git a/cc5g/src/model/ListCardUsagesRequest.cc b/cc5g/src/model/ListCardUsagesRequest.cc new file mode 100644 index 000000000..325e0d94b --- /dev/null +++ b/cc5g/src/model/ListCardUsagesRequest.cc @@ -0,0 +1,47 @@ +/* + * 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::ListCardUsagesRequest; + +ListCardUsagesRequest::ListCardUsagesRequest() + : RpcServiceRequest("cc5g", "2022-03-14", "ListCardUsages") { + setMethod(HttpRequest::Method::Get); +} + +ListCardUsagesRequest::~ListCardUsagesRequest() {} + +std::vector ListCardUsagesRequest::getIccids() const { + return iccids_; +} + +void ListCardUsagesRequest::setIccids(const std::vector &iccids) { + iccids_ = iccids; + for(int dep1 = 0; dep1 != iccids.size(); dep1++) { + setParameter(std::string("Iccids") + "." + std::to_string(dep1 + 1), iccids[dep1]); + } +} + +std::string ListCardUsagesRequest::getWirelessCloudConnectorId() const { + return wirelessCloudConnectorId_; +} + +void ListCardUsagesRequest::setWirelessCloudConnectorId(const std::string &wirelessCloudConnectorId) { + wirelessCloudConnectorId_ = wirelessCloudConnectorId; + setParameter(std::string("WirelessCloudConnectorId"), wirelessCloudConnectorId); +} + diff --git a/cc5g/src/model/ListCardUsagesResult.cc b/cc5g/src/model/ListCardUsagesResult.cc new file mode 100644 index 000000000..523822eaa --- /dev/null +++ b/cc5g/src/model/ListCardUsagesResult.cc @@ -0,0 +1,66 @@ +/* + * 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; + +ListCardUsagesResult::ListCardUsagesResult() : + ServiceResult() +{} + +ListCardUsagesResult::ListCardUsagesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListCardUsagesResult::~ListCardUsagesResult() +{} + +void ListCardUsagesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allCardsNode = value["Cards"]["Card"]; + for (auto valueCardsCard : allCardsNode) + { + Card cardsObject; + if(!valueCardsCard["Iccid"].isNull()) + cardsObject.iccid = valueCardsCard["Iccid"].asString(); + if(!valueCardsCard["UsageDataMonth"].isNull()) + cardsObject.usageDataMonth = std::stol(valueCardsCard["UsageDataMonth"].asString()); + cards_.push_back(cardsObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = value["TotalCount"].asString(); + +} + +std::string ListCardUsagesResult::getTotalCount()const +{ + return totalCount_; +} + +std::vector ListCardUsagesResult::getCards()const +{ + return cards_; +} + diff --git a/cc5g/src/model/ListRegionsResult.cc b/cc5g/src/model/ListRegionsResult.cc index 521b2e623..cf2f1e93a 100644 --- a/cc5g/src/model/ListRegionsResult.cc +++ b/cc5g/src/model/ListRegionsResult.cc @@ -47,8 +47,6 @@ void ListRegionsResult::parse(const std::string &payload) regionsObject.regionId = valueRegionsRegion["RegionId"].asString(); if(!valueRegionsRegion["LocalName"].isNull()) regionsObject.localName = valueRegionsRegion["LocalName"].asString(); - if(!valueRegionsRegion["RegionEndpoint"].isNull()) - regionsObject.regionEndpoint = valueRegionsRegion["RegionEndpoint"].asString(); regions_.push_back(regionsObject); }