From 662d539c6fb1737c02b4a293b4fb50b31e2cf449 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Mon, 6 Feb 2023 08:10:37 +0000 Subject: [PATCH] Public ListServiceUsages OpenApi. --- VERSION | 2 +- computenestsupplier/CMakeLists.txt | 4 + .../ComputeNestSupplierClient.h | 8 ++ .../model/GetServiceInstanceResult.h | 11 ++ .../model/ListServiceInstancesResult.h | 1 + .../model/ListServiceUsagesRequest.h | 51 ++++++++ .../model/ListServiceUsagesResult.h | 80 +++++++++++++ .../src/ComputeNestSupplierClient.cc | 36 ++++++ .../src/model/GetServiceInstanceResult.cc | 23 ++++ .../src/model/ListServiceInstancesResult.cc | 2 + .../src/model/ListServiceUsagesRequest.cc | 58 ++++++++++ .../src/model/ListServiceUsagesResult.cc | 109 ++++++++++++++++++ 12 files changed, 384 insertions(+), 1 deletion(-) create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesRequest.h create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesResult.h create mode 100644 computenestsupplier/src/model/ListServiceUsagesRequest.cc create mode 100644 computenestsupplier/src/model/ListServiceUsagesResult.cc diff --git a/VERSION b/VERSION index 977520494..fc4f77c90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1438 \ No newline at end of file +1.36.1439 \ No newline at end of file diff --git a/computenestsupplier/CMakeLists.txt b/computenestsupplier/CMakeLists.txt index 7e7e328d4..cd7a204db 100644 --- a/computenestsupplier/CMakeLists.txt +++ b/computenestsupplier/CMakeLists.txt @@ -37,6 +37,8 @@ set(computenestsupplier_public_header_model include/alibabacloud/computenestsupplier/model/ListArtifactsResult.h include/alibabacloud/computenestsupplier/model/ListServiceInstancesRequest.h include/alibabacloud/computenestsupplier/model/ListServiceInstancesResult.h + include/alibabacloud/computenestsupplier/model/ListServiceUsagesRequest.h + include/alibabacloud/computenestsupplier/model/ListServiceUsagesResult.h include/alibabacloud/computenestsupplier/model/ReleaseArtifactRequest.h include/alibabacloud/computenestsupplier/model/ReleaseArtifactResult.h include/alibabacloud/computenestsupplier/model/UpdateArtifactRequest.h @@ -60,6 +62,8 @@ set(computenestsupplier_src src/model/ListArtifactsResult.cc src/model/ListServiceInstancesRequest.cc src/model/ListServiceInstancesResult.cc + src/model/ListServiceUsagesRequest.cc + src/model/ListServiceUsagesResult.cc src/model/ReleaseArtifactRequest.cc src/model/ReleaseArtifactResult.cc src/model/UpdateArtifactRequest.cc diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/ComputeNestSupplierClient.h b/computenestsupplier/include/alibabacloud/computenestsupplier/ComputeNestSupplierClient.h index 19c52a064..dc8bb58d9 100644 --- a/computenestsupplier/include/alibabacloud/computenestsupplier/ComputeNestSupplierClient.h +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/ComputeNestSupplierClient.h @@ -38,6 +38,8 @@ #include "model/ListArtifactsResult.h" #include "model/ListServiceInstancesRequest.h" #include "model/ListServiceInstancesResult.h" +#include "model/ListServiceUsagesRequest.h" +#include "model/ListServiceUsagesResult.h" #include "model/ReleaseArtifactRequest.h" #include "model/ReleaseArtifactResult.h" #include "model/UpdateArtifactRequest.h" @@ -75,6 +77,9 @@ namespace AlibabaCloud typedef Outcome ListServiceInstancesOutcome; typedef std::future ListServiceInstancesOutcomeCallable; typedef std::function&)> ListServiceInstancesAsyncHandler; + typedef Outcome ListServiceUsagesOutcome; + typedef std::future ListServiceUsagesOutcomeCallable; + typedef std::function&)> ListServiceUsagesAsyncHandler; typedef Outcome ReleaseArtifactOutcome; typedef std::future ReleaseArtifactOutcomeCallable; typedef std::function&)> ReleaseArtifactAsyncHandler; @@ -110,6 +115,9 @@ namespace AlibabaCloud ListServiceInstancesOutcome listServiceInstances(const Model::ListServiceInstancesRequest &request)const; void listServiceInstancesAsync(const Model::ListServiceInstancesRequest& request, const ListServiceInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListServiceInstancesOutcomeCallable listServiceInstancesCallable(const Model::ListServiceInstancesRequest& request) const; + ListServiceUsagesOutcome listServiceUsages(const Model::ListServiceUsagesRequest &request)const; + void listServiceUsagesAsync(const Model::ListServiceUsagesRequest& request, const ListServiceUsagesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListServiceUsagesOutcomeCallable listServiceUsagesCallable(const Model::ListServiceUsagesRequest& request) const; ReleaseArtifactOutcome releaseArtifact(const Model::ReleaseArtifactRequest &request)const; void releaseArtifactAsync(const Model::ReleaseArtifactRequest& request, const ReleaseArtifactAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ReleaseArtifactOutcomeCallable releaseArtifactCallable(const Model::ReleaseArtifactRequest& request) const; diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h index 64eff6676..4f8249da5 100644 --- a/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h @@ -59,7 +59,18 @@ namespace AlibabaCloud { struct PrivateVpcConnection { + struct ConnectionConfig + { + std::vector securityGroups; + std::vector endpointIps; + std::string ingressEndpointStatus; + std::string vpcId; + std::string networkServiceStatus; + std::vector vSwitches; + }; std::string endpointServiceId; + std::string privateZoneName; + std::vector connectionConfigs; std::string endpointId; }; struct ReversePrivateVpcConnection diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceInstancesResult.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceInstancesResult.h index 228e03534..1a6bd074f 100644 --- a/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceInstancesResult.h +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceInstancesResult.h @@ -79,6 +79,7 @@ namespace AlibabaCloud std::string statusDetail; std::string updateTime; std::string templateName; + bool isOperated; std::vector tags; }; diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesRequest.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesRequest.h new file mode 100644 index 000000000..6e46d2144 --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesRequest.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_COMPUTENESTSUPPLIER_MODEL_LISTSERVICEUSAGESREQUEST_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICEUSAGESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ComputeNestSupplier { +namespace Model { +class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT ListServiceUsagesRequest : public RpcServiceRequest { +public: + struct Filter { + std::string name; + }; + ListServiceUsagesRequest(); + ~ListServiceUsagesRequest(); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getFilter() const; + void setFilter(const std::vector &filter); + int getMaxResults() const; + void setMaxResults(int maxResults); + +private: + std::string nextToken_; + std::vector filter_; + int maxResults_; +}; +} // namespace Model +} // namespace ComputeNestSupplier +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICEUSAGESREQUEST_H_ diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesResult.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesResult.h new file mode 100644 index 000000000..4d58bf41f --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServiceUsagesResult.h @@ -0,0 +1,80 @@ +/* + * 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_COMPUTENESTSUPPLIER_MODEL_LISTSERVICEUSAGESRESULT_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICEUSAGESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ComputeNestSupplier + { + namespace Model + { + class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT ListServiceUsagesResult : public ServiceResult + { + public: + struct Policy + { + struct UserInformation + { + std::string industry; + std::string company; + std::string telephone; + std::string country; + std::string title; + std::string emailAddress; + std::string source; + std::string name; + }; + std::string status; + std::string serviceName; + std::string supplierName; + long userAliUid; + std::string comments; + std::string createTime; + UserInformation userInformation; + std::string updateTime; + std::string serviceId; + }; + + + ListServiceUsagesResult(); + explicit ListServiceUsagesResult(const std::string &payload); + ~ListServiceUsagesResult(); + int getTotalCount()const; + std::string getNextToken()const; + int getMaxResults()const; + std::vector getServiceUsages()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + std::string nextToken_; + int maxResults_; + std::vector serviceUsages_; + + }; + } + } +} +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICEUSAGESRESULT_H_ \ No newline at end of file diff --git a/computenestsupplier/src/ComputeNestSupplierClient.cc b/computenestsupplier/src/ComputeNestSupplierClient.cc index 2f68fe093..4dd4140d8 100644 --- a/computenestsupplier/src/ComputeNestSupplierClient.cc +++ b/computenestsupplier/src/ComputeNestSupplierClient.cc @@ -339,6 +339,42 @@ ComputeNestSupplierClient::ListServiceInstancesOutcomeCallable ComputeNestSuppli return task->get_future(); } +ComputeNestSupplierClient::ListServiceUsagesOutcome ComputeNestSupplierClient::listServiceUsages(const ListServiceUsagesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListServiceUsagesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListServiceUsagesOutcome(ListServiceUsagesResult(outcome.result())); + else + return ListServiceUsagesOutcome(outcome.error()); +} + +void ComputeNestSupplierClient::listServiceUsagesAsync(const ListServiceUsagesRequest& request, const ListServiceUsagesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listServiceUsages(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ComputeNestSupplierClient::ListServiceUsagesOutcomeCallable ComputeNestSupplierClient::listServiceUsagesCallable(const ListServiceUsagesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listServiceUsages(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ComputeNestSupplierClient::ReleaseArtifactOutcome ComputeNestSupplierClient::releaseArtifact(const ReleaseArtifactRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/computenestsupplier/src/model/GetServiceInstanceResult.cc b/computenestsupplier/src/model/GetServiceInstanceResult.cc index 895ca386b..0b89b1c0b 100644 --- a/computenestsupplier/src/model/GetServiceInstanceResult.cc +++ b/computenestsupplier/src/model/GetServiceInstanceResult.cc @@ -101,6 +101,29 @@ void GetServiceInstanceResult::parse(const std::string &payload) privateVpcConnectionObject.endpointId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointId"].asString(); if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointServiceId"].isNull()) privateVpcConnectionObject.endpointServiceId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointServiceId"].asString(); + if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["PrivateZoneName"].isNull()) + privateVpcConnectionObject.privateZoneName = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["PrivateZoneName"].asString(); + auto allConnectionConfigsNode = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["ConnectionConfigs"]["ConnectionConfig"]; + for (auto networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig : allConnectionConfigsNode) + { + NetworkConfig::PrivateVpcConnection::ConnectionConfig connectionConfigsObject; + if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["VpcId"].isNull()) + connectionConfigsObject.vpcId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["VpcId"].asString(); + if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["IngressEndpointStatus"].isNull()) + connectionConfigsObject.ingressEndpointStatus = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["IngressEndpointStatus"].asString(); + if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["NetworkServiceStatus"].isNull()) + connectionConfigsObject.networkServiceStatus = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["NetworkServiceStatus"].asString(); + auto allSecurityGroups = value["SecurityGroups"]["SecurityGroup"]; + for (auto value : allSecurityGroups) + connectionConfigsObject.securityGroups.push_back(value.asString()); + auto allVSwitches = value["VSwitches"]["VSwitch"]; + for (auto value : allVSwitches) + connectionConfigsObject.vSwitches.push_back(value.asString()); + auto allEndpointIps = value["EndpointIps"]["EndpointIp"]; + for (auto value : allEndpointIps) + connectionConfigsObject.endpointIps.push_back(value.asString()); + privateVpcConnectionObject.connectionConfigs.push_back(connectionConfigsObject); + } networkConfig_.privateVpcConnections.push_back(privateVpcConnectionObject); } auto allReversePrivateVpcConnectionsNode = networkConfigNode["ReversePrivateVpcConnections"]["ReversePrivateVpcConnection"]; diff --git a/computenestsupplier/src/model/ListServiceInstancesResult.cc b/computenestsupplier/src/model/ListServiceInstancesResult.cc index 51b000642..a5999b1c1 100644 --- a/computenestsupplier/src/model/ListServiceInstancesResult.cc +++ b/computenestsupplier/src/model/ListServiceInstancesResult.cc @@ -79,6 +79,8 @@ void ListServiceInstancesResult::parse(const std::string &payload) serviceInstancesObject.serviceType = valueServiceInstancesServiceInstance["ServiceType"].asString(); if(!valueServiceInstancesServiceInstance["PayType"].isNull()) serviceInstancesObject.payType = valueServiceInstancesServiceInstance["PayType"].asString(); + if(!valueServiceInstancesServiceInstance["IsOperated"].isNull()) + serviceInstancesObject.isOperated = valueServiceInstancesServiceInstance["IsOperated"].asString() == "true"; auto allTagsNode = valueServiceInstancesServiceInstance["Tags"]["Tag"]; for (auto valueServiceInstancesServiceInstanceTagsTag : allTagsNode) { diff --git a/computenestsupplier/src/model/ListServiceUsagesRequest.cc b/computenestsupplier/src/model/ListServiceUsagesRequest.cc new file mode 100644 index 000000000..097102eff --- /dev/null +++ b/computenestsupplier/src/model/ListServiceUsagesRequest.cc @@ -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 + +using AlibabaCloud::ComputeNestSupplier::Model::ListServiceUsagesRequest; + +ListServiceUsagesRequest::ListServiceUsagesRequest() + : RpcServiceRequest("computenestsupplier", "2021-05-21", "ListServiceUsages") { + setMethod(HttpRequest::Method::Post); +} + +ListServiceUsagesRequest::~ListServiceUsagesRequest() {} + +std::string ListServiceUsagesRequest::getNextToken() const { + return nextToken_; +} + +void ListServiceUsagesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListServiceUsagesRequest::getFilter() const { + return filter_; +} + +void ListServiceUsagesRequest::setFilter(const std::vector &filter) { + filter_ = filter; + for(int dep1 = 0; dep1 != filter.size(); dep1++) { + auto filterObj = filter.at(dep1); + std::string filterObjStr = std::string("Filter") + "." + std::to_string(dep1 + 1); + setParameter(filterObjStr + ".Name", filterObj.name); + } +} + +int ListServiceUsagesRequest::getMaxResults() const { + return maxResults_; +} + +void ListServiceUsagesRequest::setMaxResults(int maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), std::to_string(maxResults)); +} + diff --git a/computenestsupplier/src/model/ListServiceUsagesResult.cc b/computenestsupplier/src/model/ListServiceUsagesResult.cc new file mode 100644 index 000000000..c6042fa3c --- /dev/null +++ b/computenestsupplier/src/model/ListServiceUsagesResult.cc @@ -0,0 +1,109 @@ +/* + * 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::ComputeNestSupplier; +using namespace AlibabaCloud::ComputeNestSupplier::Model; + +ListServiceUsagesResult::ListServiceUsagesResult() : + ServiceResult() +{} + +ListServiceUsagesResult::ListServiceUsagesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListServiceUsagesResult::~ListServiceUsagesResult() +{} + +void ListServiceUsagesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allServiceUsagesNode = value["ServiceUsages"]["Policy"]; + for (auto valueServiceUsagesPolicy : allServiceUsagesNode) + { + Policy serviceUsagesObject; + if(!valueServiceUsagesPolicy["UserAliUid"].isNull()) + serviceUsagesObject.userAliUid = std::stol(valueServiceUsagesPolicy["UserAliUid"].asString()); + if(!valueServiceUsagesPolicy["ServiceId"].isNull()) + serviceUsagesObject.serviceId = valueServiceUsagesPolicy["ServiceId"].asString(); + if(!valueServiceUsagesPolicy["ServiceName"].isNull()) + serviceUsagesObject.serviceName = valueServiceUsagesPolicy["ServiceName"].asString(); + if(!valueServiceUsagesPolicy["SupplierName"].isNull()) + serviceUsagesObject.supplierName = valueServiceUsagesPolicy["SupplierName"].asString(); + if(!valueServiceUsagesPolicy["Status"].isNull()) + serviceUsagesObject.status = valueServiceUsagesPolicy["Status"].asString(); + if(!valueServiceUsagesPolicy["Comments"].isNull()) + serviceUsagesObject.comments = valueServiceUsagesPolicy["Comments"].asString(); + if(!valueServiceUsagesPolicy["CreateTime"].isNull()) + serviceUsagesObject.createTime = valueServiceUsagesPolicy["CreateTime"].asString(); + if(!valueServiceUsagesPolicy["UpdateTime"].isNull()) + serviceUsagesObject.updateTime = valueServiceUsagesPolicy["UpdateTime"].asString(); + auto userInformationNode = value["UserInformation"]; + if(!userInformationNode["Name"].isNull()) + serviceUsagesObject.userInformation.name = userInformationNode["Name"].asString(); + if(!userInformationNode["EmailAddress"].isNull()) + serviceUsagesObject.userInformation.emailAddress = userInformationNode["EmailAddress"].asString(); + if(!userInformationNode["Company"].isNull()) + serviceUsagesObject.userInformation.company = userInformationNode["Company"].asString(); + if(!userInformationNode["Country"].isNull()) + serviceUsagesObject.userInformation.country = userInformationNode["Country"].asString(); + if(!userInformationNode["Telephone"].isNull()) + serviceUsagesObject.userInformation.telephone = userInformationNode["Telephone"].asString(); + if(!userInformationNode["Title"].isNull()) + serviceUsagesObject.userInformation.title = userInformationNode["Title"].asString(); + if(!userInformationNode["Industry"].isNull()) + serviceUsagesObject.userInformation.industry = userInformationNode["Industry"].asString(); + if(!userInformationNode["Source"].isNull()) + serviceUsagesObject.userInformation.source = userInformationNode["Source"].asString(); + serviceUsages_.push_back(serviceUsagesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + +} + +int ListServiceUsagesResult::getTotalCount()const +{ + return totalCount_; +} + +std::string ListServiceUsagesResult::getNextToken()const +{ + return nextToken_; +} + +int ListServiceUsagesResult::getMaxResults()const +{ + return maxResults_; +} + +std::vector ListServiceUsagesResult::getServiceUsages()const +{ + return serviceUsages_; +} +