sdk-team 3 年之前
父節點
當前提交
4b1dc6a6c3

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1545
+1.36.1546

+ 4 - 0
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/ListCardDayUsagesRequest.h
+	include/alibabacloud/cc5g/model/ListCardDayUsagesResult.h
 	include/alibabacloud/cc5g/model/ListCardUsagesRequest.h
 	include/alibabacloud/cc5g/model/ListCardUsagesResult.h
 	include/alibabacloud/cc5g/model/ListCardsRequest.h
@@ -192,6 +194,8 @@ set(cc5g_src
 	src/model/ListAuthorizationRulesResult.cc
 	src/model/ListBatchOperateCardsTasksRequest.cc
 	src/model/ListBatchOperateCardsTasksResult.cc
+	src/model/ListCardDayUsagesRequest.cc
+	src/model/ListCardDayUsagesResult.cc
 	src/model/ListCardUsagesRequest.cc
 	src/model/ListCardUsagesResult.cc
 	src/model/ListCardsRequest.cc

+ 8 - 0
cc5g/include/alibabacloud/cc5g/CC5GClient.h

@@ -76,6 +76,8 @@
 #include "model/ListAuthorizationRulesResult.h"
 #include "model/ListBatchOperateCardsTasksRequest.h"
 #include "model/ListBatchOperateCardsTasksResult.h"
+#include "model/ListCardDayUsagesRequest.h"
+#include "model/ListCardDayUsagesResult.h"
 #include "model/ListCardUsagesRequest.h"
 #include "model/ListCardUsagesResult.h"
 #include "model/ListCardsRequest.h"
@@ -226,6 +228,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::ListBatchOperateCardsTasksResult> ListBatchOperateCardsTasksOutcome;
 			typedef std::future<ListBatchOperateCardsTasksOutcome> ListBatchOperateCardsTasksOutcomeCallable;
 			typedef std::function<void(const CC5GClient*, const Model::ListBatchOperateCardsTasksRequest&, const ListBatchOperateCardsTasksOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListBatchOperateCardsTasksAsyncHandler;
+			typedef Outcome<Error, Model::ListCardDayUsagesResult> ListCardDayUsagesOutcome;
+			typedef std::future<ListCardDayUsagesOutcome> ListCardDayUsagesOutcomeCallable;
+			typedef std::function<void(const CC5GClient*, const Model::ListCardDayUsagesRequest&, const ListCardDayUsagesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCardDayUsagesAsyncHandler;
 			typedef Outcome<Error, Model::ListCardUsagesResult> ListCardUsagesOutcome;
 			typedef std::future<ListCardUsagesOutcome> ListCardUsagesOutcomeCallable;
 			typedef std::function<void(const CC5GClient*, const Model::ListCardUsagesRequest&, const ListCardUsagesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCardUsagesAsyncHandler;
@@ -402,6 +407,9 @@ namespace AlibabaCloud
 			ListBatchOperateCardsTasksOutcome listBatchOperateCardsTasks(const Model::ListBatchOperateCardsTasksRequest &request)const;
 			void listBatchOperateCardsTasksAsync(const Model::ListBatchOperateCardsTasksRequest& request, const ListBatchOperateCardsTasksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ListBatchOperateCardsTasksOutcomeCallable listBatchOperateCardsTasksCallable(const Model::ListBatchOperateCardsTasksRequest& request) const;
+			ListCardDayUsagesOutcome listCardDayUsages(const Model::ListCardDayUsagesRequest &request)const;
+			void listCardDayUsagesAsync(const Model::ListCardDayUsagesRequest& request, const ListCardDayUsagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			ListCardDayUsagesOutcomeCallable listCardDayUsagesCallable(const Model::ListCardDayUsagesRequest& request) const;
 			ListCardUsagesOutcome listCardUsages(const Model::ListCardUsagesRequest &request)const;
 			void listCardUsagesAsync(const Model::ListCardUsagesRequest& request, const ListCardUsagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			ListCardUsagesOutcomeCallable listCardUsagesCallable(const Model::ListCardUsagesRequest& request) const;

+ 48 - 0
cc5g/include/alibabacloud/cc5g/model/ListCardDayUsagesRequest.h

@@ -0,0 +1,48 @@
+/*
+ * 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_LISTCARDDAYUSAGESREQUEST_H_
+#define ALIBABACLOUD_CC5G_MODEL_LISTCARDDAYUSAGESREQUEST_H_
+
+#include <alibabacloud/cc5g/CC5GExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace CC5G {
+namespace Model {
+class ALIBABACLOUD_CC5G_EXPORT ListCardDayUsagesRequest : public RpcServiceRequest {
+public:
+	ListCardDayUsagesRequest();
+	~ListCardDayUsagesRequest();
+	int getLatestMonthNum() const;
+	void setLatestMonthNum(int latestMonthNum);
+	std::vector<std::string> getIccids() const;
+	void setIccids(const std::vector<std::string> &iccids);
+	std::string getWirelessCloudConnectorId() const;
+	void setWirelessCloudConnectorId(const std::string &wirelessCloudConnectorId);
+
+private:
+	int latestMonthNum_;
+	std::vector<std::string> iccids_;
+	std::string wirelessCloudConnectorId_;
+};
+} // namespace Model
+} // namespace CC5G
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_CC5G_MODEL_LISTCARDDAYUSAGESREQUEST_H_

+ 67 - 0
cc5g/include/alibabacloud/cc5g/model/ListCardDayUsagesResult.h

@@ -0,0 +1,67 @@
+/*
+ * 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_LISTCARDDAYUSAGESRESULT_H_
+#define ALIBABACLOUD_CC5G_MODEL_LISTCARDDAYUSAGESRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/cc5g/CC5GExport.h>
+
+namespace AlibabaCloud
+{
+	namespace CC5G
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_CC5G_EXPORT ListCardDayUsagesResult : public ServiceResult
+			{
+			public:
+				struct Card
+				{
+					struct UsageDataMonth
+					{
+						struct CardDayUsage
+						{
+							std::string usageData;
+							std::string day;
+						};
+						std::string month;
+						std::string usageDataMonth;
+						std::vector<UsageDataMonth::CardDayUsage> cardDayUsages;
+					};
+					std::vector<Card::UsageDataMonth> usageDataMonths;
+					std::string iccid;
+				};
+
+
+				ListCardDayUsagesResult();
+				explicit ListCardDayUsagesResult(const std::string &payload);
+				~ListCardDayUsagesResult();
+				std::vector<Card> getCards()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::vector<Card> cards_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_CC5G_MODEL_LISTCARDDAYUSAGESRESULT_H_

+ 36 - 0
cc5g/src/CC5GClient.cc

@@ -1023,6 +1023,42 @@ CC5GClient::ListBatchOperateCardsTasksOutcomeCallable CC5GClient::listBatchOpera
 	return task->get_future();
 }
 
+CC5GClient::ListCardDayUsagesOutcome CC5GClient::listCardDayUsages(const ListCardDayUsagesRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return ListCardDayUsagesOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return ListCardDayUsagesOutcome(ListCardDayUsagesResult(outcome.result()));
+	else
+		return ListCardDayUsagesOutcome(outcome.error());
+}
+
+void CC5GClient::listCardDayUsagesAsync(const ListCardDayUsagesRequest& request, const ListCardDayUsagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, listCardDayUsages(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+CC5GClient::ListCardDayUsagesOutcomeCallable CC5GClient::listCardDayUsagesCallable(const ListCardDayUsagesRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<ListCardDayUsagesOutcome()>>(
+			[this, request]()
+			{
+			return this->listCardDayUsages(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 CC5GClient::ListCardUsagesOutcome CC5GClient::listCardUsages(const ListCardUsagesRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 56 - 0
cc5g/src/model/ListCardDayUsagesRequest.cc

@@ -0,0 +1,56 @@
+/*
+ * 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/ListCardDayUsagesRequest.h>
+
+using AlibabaCloud::CC5G::Model::ListCardDayUsagesRequest;
+
+ListCardDayUsagesRequest::ListCardDayUsagesRequest()
+    : RpcServiceRequest("cc5g", "2022-03-14", "ListCardDayUsages") {
+  setMethod(HttpRequest::Method::Get);
+}
+
+ListCardDayUsagesRequest::~ListCardDayUsagesRequest() {}
+
+int ListCardDayUsagesRequest::getLatestMonthNum() const {
+  return latestMonthNum_;
+}
+
+void ListCardDayUsagesRequest::setLatestMonthNum(int latestMonthNum) {
+  latestMonthNum_ = latestMonthNum;
+  setParameter(std::string("LatestMonthNum"), std::to_string(latestMonthNum));
+}
+
+std::vector<ListCardDayUsagesRequest::std::string> ListCardDayUsagesRequest::getIccids() const {
+  return iccids_;
+}
+
+void ListCardDayUsagesRequest::setIccids(const std::vector<ListCardDayUsagesRequest::std::string> &iccids) {
+  iccids_ = iccids;
+  for(int dep1 = 0; dep1 != iccids.size(); dep1++) {
+    setParameter(std::string("Iccids") + "." + std::to_string(dep1 + 1), iccids[dep1]);
+  }
+}
+
+std::string ListCardDayUsagesRequest::getWirelessCloudConnectorId() const {
+  return wirelessCloudConnectorId_;
+}
+
+void ListCardDayUsagesRequest::setWirelessCloudConnectorId(const std::string &wirelessCloudConnectorId) {
+  wirelessCloudConnectorId_ = wirelessCloudConnectorId;
+  setParameter(std::string("WirelessCloudConnectorId"), wirelessCloudConnectorId);
+}
+

+ 77 - 0
cc5g/src/model/ListCardDayUsagesResult.cc

@@ -0,0 +1,77 @@
+/*
+ * 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/ListCardDayUsagesResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::CC5G;
+using namespace AlibabaCloud::CC5G::Model;
+
+ListCardDayUsagesResult::ListCardDayUsagesResult() :
+	ServiceResult()
+{}
+
+ListCardDayUsagesResult::ListCardDayUsagesResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+ListCardDayUsagesResult::~ListCardDayUsagesResult()
+{}
+
+void ListCardDayUsagesResult::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();
+		auto allUsageDataMonthsNode = valueCardsCard["UsageDataMonths"]["UsageDataMonth"];
+		for (auto valueCardsCardUsageDataMonthsUsageDataMonth : allUsageDataMonthsNode)
+		{
+			Card::UsageDataMonth usageDataMonthsObject;
+			if(!valueCardsCardUsageDataMonthsUsageDataMonth["UsageDataMonth"].isNull())
+				usageDataMonthsObject.usageDataMonth = valueCardsCardUsageDataMonthsUsageDataMonth["UsageDataMonth"].asString();
+			if(!valueCardsCardUsageDataMonthsUsageDataMonth["Month"].isNull())
+				usageDataMonthsObject.month = valueCardsCardUsageDataMonthsUsageDataMonth["Month"].asString();
+			auto allCardDayUsagesNode = valueCardsCardUsageDataMonthsUsageDataMonth["CardDayUsages"]["CardDayUsage"];
+			for (auto valueCardsCardUsageDataMonthsUsageDataMonthCardDayUsagesCardDayUsage : allCardDayUsagesNode)
+			{
+				Card::UsageDataMonth::CardDayUsage cardDayUsagesObject;
+				if(!valueCardsCardUsageDataMonthsUsageDataMonthCardDayUsagesCardDayUsage["Day"].isNull())
+					cardDayUsagesObject.day = valueCardsCardUsageDataMonthsUsageDataMonthCardDayUsagesCardDayUsage["Day"].asString();
+				if(!valueCardsCardUsageDataMonthsUsageDataMonthCardDayUsagesCardDayUsage["UsageData"].isNull())
+					cardDayUsagesObject.usageData = valueCardsCardUsageDataMonthsUsageDataMonthCardDayUsagesCardDayUsage["UsageData"].asString();
+				usageDataMonthsObject.cardDayUsages.push_back(cardDayUsagesObject);
+			}
+			cardsObject.usageDataMonths.push_back(usageDataMonthsObject);
+		}
+		cards_.push_back(cardsObject);
+	}
+
+}
+
+std::vector<ListCardDayUsagesResult::Card> ListCardDayUsagesResult::getCards()const
+{
+	return cards_;
+}
+