From 031448bbada0b1ada683e0e668914e5d45e2aa27 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 16 May 2023 05:56:41 +0000 Subject: [PATCH] Add response Permission. --- VERSION | 2 +- computenestsupplier/CMakeLists.txt | 12 + .../ComputeNestSupplierClient.h | 24 ++ .../model/CreateServiceRequest.h | 112 +++++++++ .../model/CreateServiceResult.h | 55 +++++ .../model/GetServiceEstimateCostRequest.h | 60 +++++ .../model/GetServiceEstimateCostResult.h | 51 ++++ .../model/GetServiceInstanceResult.h | 3 + .../model/ListServicesRequest.h | 67 +++++ .../model/ListServicesResult.h | 96 ++++++++ .../src/ComputeNestSupplierClient.cc | 108 +++++++++ .../src/model/CreateServiceRequest.cc | 228 ++++++++++++++++++ .../src/model/CreateServiceResult.cc | 65 +++++ .../model/GetServiceEstimateCostRequest.cc | 90 +++++++ .../src/model/GetServiceEstimateCostResult.cc | 51 ++++ .../src/model/GetServiceInstanceResult.cc | 9 + .../src/model/ListServicesRequest.cc | 99 ++++++++ .../src/model/ListServicesResult.cc | 144 +++++++++++ 18 files changed, 1275 insertions(+), 1 deletion(-) create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/CreateServiceRequest.h create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/CreateServiceResult.h create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostRequest.h create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostResult.h create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesRequest.h create mode 100644 computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesResult.h create mode 100644 computenestsupplier/src/model/CreateServiceRequest.cc create mode 100644 computenestsupplier/src/model/CreateServiceResult.cc create mode 100644 computenestsupplier/src/model/GetServiceEstimateCostRequest.cc create mode 100644 computenestsupplier/src/model/GetServiceEstimateCostResult.cc create mode 100644 computenestsupplier/src/model/ListServicesRequest.cc create mode 100644 computenestsupplier/src/model/ListServicesResult.cc diff --git a/VERSION b/VERSION index 270b5e9ba..cc505a361 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1571 \ No newline at end of file +1.36.1572 \ No newline at end of file diff --git a/computenestsupplier/CMakeLists.txt b/computenestsupplier/CMakeLists.txt index cd7a204db..ecc776835 100644 --- a/computenestsupplier/CMakeLists.txt +++ b/computenestsupplier/CMakeLists.txt @@ -23,12 +23,16 @@ set(computenestsupplier_public_header set(computenestsupplier_public_header_model include/alibabacloud/computenestsupplier/model/CreateArtifactRequest.h include/alibabacloud/computenestsupplier/model/CreateArtifactResult.h + include/alibabacloud/computenestsupplier/model/CreateServiceRequest.h + include/alibabacloud/computenestsupplier/model/CreateServiceResult.h include/alibabacloud/computenestsupplier/model/DeleteArtifactRequest.h include/alibabacloud/computenestsupplier/model/DeleteArtifactResult.h include/alibabacloud/computenestsupplier/model/GetArtifactRequest.h include/alibabacloud/computenestsupplier/model/GetArtifactResult.h include/alibabacloud/computenestsupplier/model/GetArtifactRepositoryCredentialsRequest.h include/alibabacloud/computenestsupplier/model/GetArtifactRepositoryCredentialsResult.h + include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostRequest.h + include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostResult.h include/alibabacloud/computenestsupplier/model/GetServiceInstanceRequest.h include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h include/alibabacloud/computenestsupplier/model/ListArtifactVersionsRequest.h @@ -39,6 +43,8 @@ set(computenestsupplier_public_header_model include/alibabacloud/computenestsupplier/model/ListServiceInstancesResult.h include/alibabacloud/computenestsupplier/model/ListServiceUsagesRequest.h include/alibabacloud/computenestsupplier/model/ListServiceUsagesResult.h + include/alibabacloud/computenestsupplier/model/ListServicesRequest.h + include/alibabacloud/computenestsupplier/model/ListServicesResult.h include/alibabacloud/computenestsupplier/model/ReleaseArtifactRequest.h include/alibabacloud/computenestsupplier/model/ReleaseArtifactResult.h include/alibabacloud/computenestsupplier/model/UpdateArtifactRequest.h @@ -48,12 +54,16 @@ set(computenestsupplier_src src/ComputeNestSupplierClient.cc src/model/CreateArtifactRequest.cc src/model/CreateArtifactResult.cc + src/model/CreateServiceRequest.cc + src/model/CreateServiceResult.cc src/model/DeleteArtifactRequest.cc src/model/DeleteArtifactResult.cc src/model/GetArtifactRequest.cc src/model/GetArtifactResult.cc src/model/GetArtifactRepositoryCredentialsRequest.cc src/model/GetArtifactRepositoryCredentialsResult.cc + src/model/GetServiceEstimateCostRequest.cc + src/model/GetServiceEstimateCostResult.cc src/model/GetServiceInstanceRequest.cc src/model/GetServiceInstanceResult.cc src/model/ListArtifactVersionsRequest.cc @@ -64,6 +74,8 @@ set(computenestsupplier_src src/model/ListServiceInstancesResult.cc src/model/ListServiceUsagesRequest.cc src/model/ListServiceUsagesResult.cc + src/model/ListServicesRequest.cc + src/model/ListServicesResult.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 dc8bb58d9..7825ac25b 100644 --- a/computenestsupplier/include/alibabacloud/computenestsupplier/ComputeNestSupplierClient.h +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/ComputeNestSupplierClient.h @@ -24,12 +24,16 @@ #include "ComputeNestSupplierExport.h" #include "model/CreateArtifactRequest.h" #include "model/CreateArtifactResult.h" +#include "model/CreateServiceRequest.h" +#include "model/CreateServiceResult.h" #include "model/DeleteArtifactRequest.h" #include "model/DeleteArtifactResult.h" #include "model/GetArtifactRequest.h" #include "model/GetArtifactResult.h" #include "model/GetArtifactRepositoryCredentialsRequest.h" #include "model/GetArtifactRepositoryCredentialsResult.h" +#include "model/GetServiceEstimateCostRequest.h" +#include "model/GetServiceEstimateCostResult.h" #include "model/GetServiceInstanceRequest.h" #include "model/GetServiceInstanceResult.h" #include "model/ListArtifactVersionsRequest.h" @@ -40,6 +44,8 @@ #include "model/ListServiceInstancesResult.h" #include "model/ListServiceUsagesRequest.h" #include "model/ListServiceUsagesResult.h" +#include "model/ListServicesRequest.h" +#include "model/ListServicesResult.h" #include "model/ReleaseArtifactRequest.h" #include "model/ReleaseArtifactResult.h" #include "model/UpdateArtifactRequest.h" @@ -56,6 +62,9 @@ namespace AlibabaCloud typedef Outcome CreateArtifactOutcome; typedef std::future CreateArtifactOutcomeCallable; typedef std::function&)> CreateArtifactAsyncHandler; + typedef Outcome CreateServiceOutcome; + typedef std::future CreateServiceOutcomeCallable; + typedef std::function&)> CreateServiceAsyncHandler; typedef Outcome DeleteArtifactOutcome; typedef std::future DeleteArtifactOutcomeCallable; typedef std::function&)> DeleteArtifactAsyncHandler; @@ -65,6 +74,9 @@ namespace AlibabaCloud typedef Outcome GetArtifactRepositoryCredentialsOutcome; typedef std::future GetArtifactRepositoryCredentialsOutcomeCallable; typedef std::function&)> GetArtifactRepositoryCredentialsAsyncHandler; + typedef Outcome GetServiceEstimateCostOutcome; + typedef std::future GetServiceEstimateCostOutcomeCallable; + typedef std::function&)> GetServiceEstimateCostAsyncHandler; typedef Outcome GetServiceInstanceOutcome; typedef std::future GetServiceInstanceOutcomeCallable; typedef std::function&)> GetServiceInstanceAsyncHandler; @@ -80,6 +92,9 @@ namespace AlibabaCloud typedef Outcome ListServiceUsagesOutcome; typedef std::future ListServiceUsagesOutcomeCallable; typedef std::function&)> ListServiceUsagesAsyncHandler; + typedef Outcome ListServicesOutcome; + typedef std::future ListServicesOutcomeCallable; + typedef std::function&)> ListServicesAsyncHandler; typedef Outcome ReleaseArtifactOutcome; typedef std::future ReleaseArtifactOutcomeCallable; typedef std::function&)> ReleaseArtifactAsyncHandler; @@ -94,6 +109,9 @@ namespace AlibabaCloud CreateArtifactOutcome createArtifact(const Model::CreateArtifactRequest &request)const; void createArtifactAsync(const Model::CreateArtifactRequest& request, const CreateArtifactAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateArtifactOutcomeCallable createArtifactCallable(const Model::CreateArtifactRequest& request) const; + CreateServiceOutcome createService(const Model::CreateServiceRequest &request)const; + void createServiceAsync(const Model::CreateServiceRequest& request, const CreateServiceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateServiceOutcomeCallable createServiceCallable(const Model::CreateServiceRequest& request) const; DeleteArtifactOutcome deleteArtifact(const Model::DeleteArtifactRequest &request)const; void deleteArtifactAsync(const Model::DeleteArtifactRequest& request, const DeleteArtifactAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteArtifactOutcomeCallable deleteArtifactCallable(const Model::DeleteArtifactRequest& request) const; @@ -103,6 +121,9 @@ namespace AlibabaCloud GetArtifactRepositoryCredentialsOutcome getArtifactRepositoryCredentials(const Model::GetArtifactRepositoryCredentialsRequest &request)const; void getArtifactRepositoryCredentialsAsync(const Model::GetArtifactRepositoryCredentialsRequest& request, const GetArtifactRepositoryCredentialsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetArtifactRepositoryCredentialsOutcomeCallable getArtifactRepositoryCredentialsCallable(const Model::GetArtifactRepositoryCredentialsRequest& request) const; + GetServiceEstimateCostOutcome getServiceEstimateCost(const Model::GetServiceEstimateCostRequest &request)const; + void getServiceEstimateCostAsync(const Model::GetServiceEstimateCostRequest& request, const GetServiceEstimateCostAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetServiceEstimateCostOutcomeCallable getServiceEstimateCostCallable(const Model::GetServiceEstimateCostRequest& request) const; GetServiceInstanceOutcome getServiceInstance(const Model::GetServiceInstanceRequest &request)const; void getServiceInstanceAsync(const Model::GetServiceInstanceRequest& request, const GetServiceInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetServiceInstanceOutcomeCallable getServiceInstanceCallable(const Model::GetServiceInstanceRequest& request) const; @@ -118,6 +139,9 @@ namespace AlibabaCloud 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; + ListServicesOutcome listServices(const Model::ListServicesRequest &request)const; + void listServicesAsync(const Model::ListServicesRequest& request, const ListServicesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListServicesOutcomeCallable listServicesCallable(const Model::ListServicesRequest& 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/CreateServiceRequest.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/CreateServiceRequest.h new file mode 100644 index 000000000..ffec48b47 --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/CreateServiceRequest.h @@ -0,0 +1,112 @@ +/* + * 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_CREATESERVICEREQUEST_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_CREATESERVICEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ComputeNestSupplier { +namespace Model { +class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT CreateServiceRequest : public RpcServiceRequest { +public: + struct Tag { + std::string value; + std::string key; + }; + struct ServiceInfo { + std::string shortDescription; + std::string image; + std::string name; + std::string locale; + }; + CreateServiceRequest(); + ~CreateServiceRequest(); + std::string getAlarmMetadata() const; + void setAlarmMetadata(const std::string &alarmMetadata); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getPolicyNames() const; + void setPolicyNames(const std::string &policyNames); + std::string getLicenseMetadata() const; + void setLicenseMetadata(const std::string &licenseMetadata); + long getDuration() const; + void setDuration(long duration); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getApprovalType() const; + void setApprovalType(const std::string &approvalType); + long getTrialDuration() const; + void setTrialDuration(long trialDuration); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getShareType() const; + void setShareType(const std::string &shareType); + std::vector getTag() const; + void setTag(const std::vector &tag); + std::string getUpgradeMetadata() const; + void setUpgradeMetadata(const std::string &upgradeMetadata); + std::string getDeployMetadata() const; + void setDeployMetadata(const std::string &deployMetadata); + std::string getServiceType() const; + void setServiceType(const std::string &serviceType); + bool getIsSupportOperated() const; + void setIsSupportOperated(bool isSupportOperated); + std::string getTenantType() const; + void setTenantType(const std::string &tenantType); + std::vector getServiceInfo() const; + void setServiceInfo(const std::vector &serviceInfo); + std::string getServiceId() const; + void setServiceId(const std::string &serviceId); + std::string getVersionName() const; + void setVersionName(const std::string &versionName); + std::string getOperationMetadata() const; + void setOperationMetadata(const std::string &operationMetadata); + std::string getDeployType() const; + void setDeployType(const std::string &deployType); + +private: + std::string alarmMetadata_; + std::string clientToken_; + std::string policyNames_; + std::string licenseMetadata_; + long duration_; + std::string resourceGroupId_; + std::string approvalType_; + long trialDuration_; + std::string regionId_; + std::string shareType_; + std::vector tag_; + std::string upgradeMetadata_; + std::string deployMetadata_; + std::string serviceType_; + bool isSupportOperated_; + std::string tenantType_; + std::vector serviceInfo_; + std::string serviceId_; + std::string versionName_; + std::string operationMetadata_; + std::string deployType_; +}; +} // namespace Model +} // namespace ComputeNestSupplier +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_CREATESERVICEREQUEST_H_ diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/CreateServiceResult.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/CreateServiceResult.h new file mode 100644 index 000000000..4b9009739 --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/CreateServiceResult.h @@ -0,0 +1,55 @@ +/* + * 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_CREATESERVICERESULT_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_CREATESERVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ComputeNestSupplier + { + namespace Model + { + class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT CreateServiceResult : public ServiceResult + { + public: + + + CreateServiceResult(); + explicit CreateServiceResult(const std::string &payload); + ~CreateServiceResult(); + std::string getStatus()const; + std::string getVersion()const; + std::string getServiceId()const; + + protected: + void parse(const std::string &payload); + private: + std::string status_; + std::string version_; + std::string serviceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_CREATESERVICERESULT_H_ \ No newline at end of file diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostRequest.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostRequest.h new file mode 100644 index 000000000..bd11e4c2d --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostRequest.h @@ -0,0 +1,60 @@ +/* + * 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_GETSERVICEESTIMATECOSTREQUEST_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_GETSERVICEESTIMATECOSTREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ComputeNestSupplier { +namespace Model { +class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT GetServiceEstimateCostRequest : public RpcServiceRequest { +public: + GetServiceEstimateCostRequest(); + ~GetServiceEstimateCostRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getServiceVersion() const; + void setServiceVersion(const std::string &serviceVersion); + std::string getTemplateName() const; + void setTemplateName(const std::string &templateName); + std::string getServiceId() const; + void setServiceId(const std::string &serviceId); + std::string getParameters() const; + void setParameters(const std::string ¶meters); + std::string getServiceInstanceId() const; + void setServiceInstanceId(const std::string &serviceInstanceId); + +private: + std::string clientToken_; + std::string regionId_; + std::string serviceVersion_; + std::string templateName_; + std::string serviceId_; + std::string parameters_; + std::string serviceInstanceId_; +}; +} // namespace Model +} // namespace ComputeNestSupplier +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_GETSERVICEESTIMATECOSTREQUEST_H_ diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostResult.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostResult.h new file mode 100644 index 000000000..fc7f2cacf --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceEstimateCostResult.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_GETSERVICEESTIMATECOSTRESULT_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_GETSERVICEESTIMATECOSTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ComputeNestSupplier + { + namespace Model + { + class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT GetServiceEstimateCostResult : public ServiceResult + { + public: + + + GetServiceEstimateCostResult(); + explicit GetServiceEstimateCostResult(const std::string &payload); + ~GetServiceEstimateCostResult(); + std::string getResources()const; + + protected: + void parse(const std::string &payload); + private: + std::string resources_; + + }; + } + } +} +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_GETSERVICEESTIMATECOSTRESULT_H_ \ No newline at end of file diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h index ca08e93b8..3be7a9484 100644 --- a/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/GetServiceInstanceResult.h @@ -68,6 +68,7 @@ namespace AlibabaCloud std::string vpcId; std::string domainName; std::string networkServiceStatus; + int connectBandwidth; std::vector vSwitches; }; std::string endpointServiceId; @@ -114,6 +115,7 @@ namespace AlibabaCloud NetworkConfig getNetworkConfig()const; Service getService()const; std::string getPayType()const; + std::string getRdAccountLoginUrl()const; long getUserId()const; std::string getEnableUserPrometheus()const; std::string getStatusDetail()const; @@ -145,6 +147,7 @@ namespace AlibabaCloud NetworkConfig networkConfig_; Service service_; std::string payType_; + std::string rdAccountLoginUrl_; long userId_; std::string enableUserPrometheus_; std::string statusDetail_; diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesRequest.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesRequest.h new file mode 100644 index 000000000..32edc5a3d --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesRequest.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_COMPUTENESTSUPPLIER_MODEL_LISTSERVICESREQUEST_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace ComputeNestSupplier { +namespace Model { +class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT ListServicesRequest : public RpcServiceRequest { +public: + struct Tag { + std::string value; + std::string key; + }; + struct Filter { + std::string name; + }; + ListServicesRequest(); + ~ListServicesRequest(); + bool getAllVersions() const; + void setAllVersions(bool allVersions); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getTag() const; + void setTag(const std::vector &tag); + std::vector getFilter() const; + void setFilter(const std::vector &filter); + std::string getMaxResults() const; + void setMaxResults(const std::string &maxResults); + +private: + bool allVersions_; + std::string resourceGroupId_; + std::string regionId_; + std::string nextToken_; + std::vector tag_; + std::vector filter_; + std::string maxResults_; +}; +} // namespace Model +} // namespace ComputeNestSupplier +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICESREQUEST_H_ diff --git a/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesResult.h b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesResult.h new file mode 100644 index 000000000..c486b02c5 --- /dev/null +++ b/computenestsupplier/include/alibabacloud/computenestsupplier/model/ListServicesResult.h @@ -0,0 +1,96 @@ +/* + * 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_LISTSERVICESRESULT_H_ +#define ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ComputeNestSupplier + { + namespace Model + { + class ALIBABACLOUD_COMPUTENESTSUPPLIER_EXPORT ListServicesResult : public ServiceResult + { + public: + struct Service + { + struct ServiceInfo + { + std::string locale; + std::string image; + std::string name; + std::string shortDescription; + }; + struct Tag + { + std::string value; + std::string key; + }; + std::string status; + std::string deployType; + std::string artifactId; + std::string sourceImage; + std::string resourceGroupId; + bool defaultVersion; + std::string createTime; + std::string serviceId; + std::string tenantType; + std::string artifactVersion; + std::string version; + std::string supplierName; + std::string serviceType; + std::string relationType; + std::vector serviceInfos; + std::string commodityCode; + std::string updateTime; + std::string approvalType; + std::string trialType; + std::string publishTime; + std::string versionName; + std::vector tags; + std::string supplierUrl; + std::string shareType; + }; + + + ListServicesResult(); + explicit ListServicesResult(const std::string &payload); + ~ListServicesResult(); + std::vector getServices()const; + std::string getTotalCount()const; + std::string getNextToken()const; + int getMaxResults()const; + + protected: + void parse(const std::string &payload); + private: + std::vector services_; + std::string totalCount_; + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_COMPUTENESTSUPPLIER_MODEL_LISTSERVICESRESULT_H_ \ No newline at end of file diff --git a/computenestsupplier/src/ComputeNestSupplierClient.cc b/computenestsupplier/src/ComputeNestSupplierClient.cc index 4dd4140d8..9d01cfc39 100644 --- a/computenestsupplier/src/ComputeNestSupplierClient.cc +++ b/computenestsupplier/src/ComputeNestSupplierClient.cc @@ -87,6 +87,42 @@ ComputeNestSupplierClient::CreateArtifactOutcomeCallable ComputeNestSupplierClie return task->get_future(); } +ComputeNestSupplierClient::CreateServiceOutcome ComputeNestSupplierClient::createService(const CreateServiceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateServiceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateServiceOutcome(CreateServiceResult(outcome.result())); + else + return CreateServiceOutcome(outcome.error()); +} + +void ComputeNestSupplierClient::createServiceAsync(const CreateServiceRequest& request, const CreateServiceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createService(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ComputeNestSupplierClient::CreateServiceOutcomeCallable ComputeNestSupplierClient::createServiceCallable(const CreateServiceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createService(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ComputeNestSupplierClient::DeleteArtifactOutcome ComputeNestSupplierClient::deleteArtifact(const DeleteArtifactRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -195,6 +231,42 @@ ComputeNestSupplierClient::GetArtifactRepositoryCredentialsOutcomeCallable Compu return task->get_future(); } +ComputeNestSupplierClient::GetServiceEstimateCostOutcome ComputeNestSupplierClient::getServiceEstimateCost(const GetServiceEstimateCostRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetServiceEstimateCostOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetServiceEstimateCostOutcome(GetServiceEstimateCostResult(outcome.result())); + else + return GetServiceEstimateCostOutcome(outcome.error()); +} + +void ComputeNestSupplierClient::getServiceEstimateCostAsync(const GetServiceEstimateCostRequest& request, const GetServiceEstimateCostAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getServiceEstimateCost(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ComputeNestSupplierClient::GetServiceEstimateCostOutcomeCallable ComputeNestSupplierClient::getServiceEstimateCostCallable(const GetServiceEstimateCostRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getServiceEstimateCost(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ComputeNestSupplierClient::GetServiceInstanceOutcome ComputeNestSupplierClient::getServiceInstance(const GetServiceInstanceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -375,6 +447,42 @@ ComputeNestSupplierClient::ListServiceUsagesOutcomeCallable ComputeNestSupplierC return task->get_future(); } +ComputeNestSupplierClient::ListServicesOutcome ComputeNestSupplierClient::listServices(const ListServicesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListServicesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListServicesOutcome(ListServicesResult(outcome.result())); + else + return ListServicesOutcome(outcome.error()); +} + +void ComputeNestSupplierClient::listServicesAsync(const ListServicesRequest& request, const ListServicesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listServices(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ComputeNestSupplierClient::ListServicesOutcomeCallable ComputeNestSupplierClient::listServicesCallable(const ListServicesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listServices(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/CreateServiceRequest.cc b/computenestsupplier/src/model/CreateServiceRequest.cc new file mode 100644 index 000000000..b5cb20cd7 --- /dev/null +++ b/computenestsupplier/src/model/CreateServiceRequest.cc @@ -0,0 +1,228 @@ +/* + * 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::CreateServiceRequest; + +CreateServiceRequest::CreateServiceRequest() + : RpcServiceRequest("computenestsupplier", "2021-05-21", "CreateService") { + setMethod(HttpRequest::Method::Post); +} + +CreateServiceRequest::~CreateServiceRequest() {} + +std::string CreateServiceRequest::getAlarmMetadata() const { + return alarmMetadata_; +} + +void CreateServiceRequest::setAlarmMetadata(const std::string &alarmMetadata) { + alarmMetadata_ = alarmMetadata; + setParameter(std::string("AlarmMetadata"), alarmMetadata); +} + +std::string CreateServiceRequest::getClientToken() const { + return clientToken_; +} + +void CreateServiceRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string CreateServiceRequest::getPolicyNames() const { + return policyNames_; +} + +void CreateServiceRequest::setPolicyNames(const std::string &policyNames) { + policyNames_ = policyNames; + setParameter(std::string("PolicyNames"), policyNames); +} + +std::string CreateServiceRequest::getLicenseMetadata() const { + return licenseMetadata_; +} + +void CreateServiceRequest::setLicenseMetadata(const std::string &licenseMetadata) { + licenseMetadata_ = licenseMetadata; + setParameter(std::string("LicenseMetadata"), licenseMetadata); +} + +long CreateServiceRequest::getDuration() const { + return duration_; +} + +void CreateServiceRequest::setDuration(long duration) { + duration_ = duration; + setParameter(std::string("Duration"), std::to_string(duration)); +} + +std::string CreateServiceRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateServiceRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string CreateServiceRequest::getApprovalType() const { + return approvalType_; +} + +void CreateServiceRequest::setApprovalType(const std::string &approvalType) { + approvalType_ = approvalType; + setParameter(std::string("ApprovalType"), approvalType); +} + +long CreateServiceRequest::getTrialDuration() const { + return trialDuration_; +} + +void CreateServiceRequest::setTrialDuration(long trialDuration) { + trialDuration_ = trialDuration; + setParameter(std::string("TrialDuration"), std::to_string(trialDuration)); +} + +std::string CreateServiceRequest::getRegionId() const { + return regionId_; +} + +void CreateServiceRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string CreateServiceRequest::getShareType() const { + return shareType_; +} + +void CreateServiceRequest::setShareType(const std::string &shareType) { + shareType_ = shareType; + setParameter(std::string("ShareType"), shareType); +} + +std::vector CreateServiceRequest::getTag() const { + return tag_; +} + +void CreateServiceRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + +std::string CreateServiceRequest::getUpgradeMetadata() const { + return upgradeMetadata_; +} + +void CreateServiceRequest::setUpgradeMetadata(const std::string &upgradeMetadata) { + upgradeMetadata_ = upgradeMetadata; + setParameter(std::string("UpgradeMetadata"), upgradeMetadata); +} + +std::string CreateServiceRequest::getDeployMetadata() const { + return deployMetadata_; +} + +void CreateServiceRequest::setDeployMetadata(const std::string &deployMetadata) { + deployMetadata_ = deployMetadata; + setParameter(std::string("DeployMetadata"), deployMetadata); +} + +std::string CreateServiceRequest::getServiceType() const { + return serviceType_; +} + +void CreateServiceRequest::setServiceType(const std::string &serviceType) { + serviceType_ = serviceType; + setParameter(std::string("ServiceType"), serviceType); +} + +bool CreateServiceRequest::getIsSupportOperated() const { + return isSupportOperated_; +} + +void CreateServiceRequest::setIsSupportOperated(bool isSupportOperated) { + isSupportOperated_ = isSupportOperated; + setParameter(std::string("IsSupportOperated"), isSupportOperated ? "true" : "false"); +} + +std::string CreateServiceRequest::getTenantType() const { + return tenantType_; +} + +void CreateServiceRequest::setTenantType(const std::string &tenantType) { + tenantType_ = tenantType; + setParameter(std::string("TenantType"), tenantType); +} + +std::vector CreateServiceRequest::getServiceInfo() const { + return serviceInfo_; +} + +void CreateServiceRequest::setServiceInfo(const std::vector &serviceInfo) { + serviceInfo_ = serviceInfo; + for(int dep1 = 0; dep1 != serviceInfo.size(); dep1++) { + auto serviceInfoObj = serviceInfo.at(dep1); + std::string serviceInfoObjStr = std::string("ServiceInfo") + "." + std::to_string(dep1 + 1); + setParameter(serviceInfoObjStr + ".ShortDescription", serviceInfoObj.shortDescription); + setParameter(serviceInfoObjStr + ".Image", serviceInfoObj.image); + setParameter(serviceInfoObjStr + ".Name", serviceInfoObj.name); + setParameter(serviceInfoObjStr + ".Locale", serviceInfoObj.locale); + } +} + +std::string CreateServiceRequest::getServiceId() const { + return serviceId_; +} + +void CreateServiceRequest::setServiceId(const std::string &serviceId) { + serviceId_ = serviceId; + setParameter(std::string("ServiceId"), serviceId); +} + +std::string CreateServiceRequest::getVersionName() const { + return versionName_; +} + +void CreateServiceRequest::setVersionName(const std::string &versionName) { + versionName_ = versionName; + setParameter(std::string("VersionName"), versionName); +} + +std::string CreateServiceRequest::getOperationMetadata() const { + return operationMetadata_; +} + +void CreateServiceRequest::setOperationMetadata(const std::string &operationMetadata) { + operationMetadata_ = operationMetadata; + setParameter(std::string("OperationMetadata"), operationMetadata); +} + +std::string CreateServiceRequest::getDeployType() const { + return deployType_; +} + +void CreateServiceRequest::setDeployType(const std::string &deployType) { + deployType_ = deployType; + setParameter(std::string("DeployType"), deployType); +} + diff --git a/computenestsupplier/src/model/CreateServiceResult.cc b/computenestsupplier/src/model/CreateServiceResult.cc new file mode 100644 index 000000000..529d5307f --- /dev/null +++ b/computenestsupplier/src/model/CreateServiceResult.cc @@ -0,0 +1,65 @@ +/* + * 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; + +CreateServiceResult::CreateServiceResult() : + ServiceResult() +{} + +CreateServiceResult::CreateServiceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateServiceResult::~CreateServiceResult() +{} + +void CreateServiceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Status"].isNull()) + status_ = value["Status"].asString(); + if(!value["Version"].isNull()) + version_ = value["Version"].asString(); + if(!value["ServiceId"].isNull()) + serviceId_ = value["ServiceId"].asString(); + +} + +std::string CreateServiceResult::getStatus()const +{ + return status_; +} + +std::string CreateServiceResult::getVersion()const +{ + return version_; +} + +std::string CreateServiceResult::getServiceId()const +{ + return serviceId_; +} + diff --git a/computenestsupplier/src/model/GetServiceEstimateCostRequest.cc b/computenestsupplier/src/model/GetServiceEstimateCostRequest.cc new file mode 100644 index 000000000..72dd126d1 --- /dev/null +++ b/computenestsupplier/src/model/GetServiceEstimateCostRequest.cc @@ -0,0 +1,90 @@ +/* + * 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::GetServiceEstimateCostRequest; + +GetServiceEstimateCostRequest::GetServiceEstimateCostRequest() + : RpcServiceRequest("computenestsupplier", "2021-05-21", "GetServiceEstimateCost") { + setMethod(HttpRequest::Method::Post); +} + +GetServiceEstimateCostRequest::~GetServiceEstimateCostRequest() {} + +std::string GetServiceEstimateCostRequest::getClientToken() const { + return clientToken_; +} + +void GetServiceEstimateCostRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string GetServiceEstimateCostRequest::getRegionId() const { + return regionId_; +} + +void GetServiceEstimateCostRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string GetServiceEstimateCostRequest::getServiceVersion() const { + return serviceVersion_; +} + +void GetServiceEstimateCostRequest::setServiceVersion(const std::string &serviceVersion) { + serviceVersion_ = serviceVersion; + setParameter(std::string("ServiceVersion"), serviceVersion); +} + +std::string GetServiceEstimateCostRequest::getTemplateName() const { + return templateName_; +} + +void GetServiceEstimateCostRequest::setTemplateName(const std::string &templateName) { + templateName_ = templateName; + setParameter(std::string("TemplateName"), templateName); +} + +std::string GetServiceEstimateCostRequest::getServiceId() const { + return serviceId_; +} + +void GetServiceEstimateCostRequest::setServiceId(const std::string &serviceId) { + serviceId_ = serviceId; + setParameter(std::string("ServiceId"), serviceId); +} + +std::string GetServiceEstimateCostRequest::getParameters() const { + return parameters_; +} + +void GetServiceEstimateCostRequest::setParameters(const std::string ¶meters) { + parameters_ = parameters; + setParameter(std::string("Parameters"), parameters); +} + +std::string GetServiceEstimateCostRequest::getServiceInstanceId() const { + return serviceInstanceId_; +} + +void GetServiceEstimateCostRequest::setServiceInstanceId(const std::string &serviceInstanceId) { + serviceInstanceId_ = serviceInstanceId; + setParameter(std::string("ServiceInstanceId"), serviceInstanceId); +} + diff --git a/computenestsupplier/src/model/GetServiceEstimateCostResult.cc b/computenestsupplier/src/model/GetServiceEstimateCostResult.cc new file mode 100644 index 000000000..0282c4571 --- /dev/null +++ b/computenestsupplier/src/model/GetServiceEstimateCostResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::ComputeNestSupplier; +using namespace AlibabaCloud::ComputeNestSupplier::Model; + +GetServiceEstimateCostResult::GetServiceEstimateCostResult() : + ServiceResult() +{} + +GetServiceEstimateCostResult::GetServiceEstimateCostResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetServiceEstimateCostResult::~GetServiceEstimateCostResult() +{} + +void GetServiceEstimateCostResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Resources"].isNull()) + resources_ = value["Resources"].asString(); + +} + +std::string GetServiceEstimateCostResult::getResources()const +{ + return resources_; +} + diff --git a/computenestsupplier/src/model/GetServiceInstanceResult.cc b/computenestsupplier/src/model/GetServiceInstanceResult.cc index 411e5b8fa..94843a541 100644 --- a/computenestsupplier/src/model/GetServiceInstanceResult.cc +++ b/computenestsupplier/src/model/GetServiceInstanceResult.cc @@ -118,6 +118,8 @@ void GetServiceInstanceResult::parse(const std::string &payload) connectionConfigsObject.networkServiceStatus = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["NetworkServiceStatus"].asString(); if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["DomainName"].isNull()) connectionConfigsObject.domainName = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["DomainName"].asString(); + if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["ConnectBandwidth"].isNull()) + connectionConfigsObject.connectBandwidth = std::stoi(networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["ConnectBandwidth"].asString()); auto allSecurityGroups = value["SecurityGroups"]["SecurityGroup"]; for (auto value : allSecurityGroups) connectionConfigsObject.securityGroups.push_back(value.asString()); @@ -189,6 +191,8 @@ void GetServiceInstanceResult::parse(const std::string &payload) name_ = value["Name"].asString(); if(!value["EnableUserPrometheus"].isNull()) enableUserPrometheus_ = value["EnableUserPrometheus"].asString(); + if(!value["RdAccountLoginUrl"].isNull()) + rdAccountLoginUrl_ = value["RdAccountLoginUrl"].asString(); } @@ -287,6 +291,11 @@ std::string GetServiceInstanceResult::getPayType()const return payType_; } +std::string GetServiceInstanceResult::getRdAccountLoginUrl()const +{ + return rdAccountLoginUrl_; +} + long GetServiceInstanceResult::getUserId()const { return userId_; diff --git a/computenestsupplier/src/model/ListServicesRequest.cc b/computenestsupplier/src/model/ListServicesRequest.cc new file mode 100644 index 000000000..32c7ee0e1 --- /dev/null +++ b/computenestsupplier/src/model/ListServicesRequest.cc @@ -0,0 +1,99 @@ +/* + * 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::ListServicesRequest; + +ListServicesRequest::ListServicesRequest() + : RpcServiceRequest("computenestsupplier", "2021-05-21", "ListServices") { + setMethod(HttpRequest::Method::Post); +} + +ListServicesRequest::~ListServicesRequest() {} + +bool ListServicesRequest::getAllVersions() const { + return allVersions_; +} + +void ListServicesRequest::setAllVersions(bool allVersions) { + allVersions_ = allVersions; + setParameter(std::string("AllVersions"), allVersions ? "true" : "false"); +} + +std::string ListServicesRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ListServicesRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + +std::string ListServicesRequest::getRegionId() const { + return regionId_; +} + +void ListServicesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string ListServicesRequest::getNextToken() const { + return nextToken_; +} + +void ListServicesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListServicesRequest::getTag() const { + return tag_; +} + +void ListServicesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + +std::vector ListServicesRequest::getFilter() const { + return filter_; +} + +void ListServicesRequest::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); + } +} + +std::string ListServicesRequest::getMaxResults() const { + return maxResults_; +} + +void ListServicesRequest::setMaxResults(const std::string &maxResults) { + maxResults_ = maxResults; + setParameter(std::string("MaxResults"), maxResults); +} + diff --git a/computenestsupplier/src/model/ListServicesResult.cc b/computenestsupplier/src/model/ListServicesResult.cc new file mode 100644 index 000000000..ff4591cdb --- /dev/null +++ b/computenestsupplier/src/model/ListServicesResult.cc @@ -0,0 +1,144 @@ +/* + * 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; + +ListServicesResult::ListServicesResult() : + ServiceResult() +{} + +ListServicesResult::ListServicesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListServicesResult::~ListServicesResult() +{} + +void ListServicesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allServicesNode = value["Services"]["Service"]; + for (auto valueServicesService : allServicesNode) + { + Service servicesObject; + if(!valueServicesService["Status"].isNull()) + servicesObject.status = valueServicesService["Status"].asString(); + if(!valueServicesService["DefaultVersion"].isNull()) + servicesObject.defaultVersion = valueServicesService["DefaultVersion"].asString() == "true"; + if(!valueServicesService["PublishTime"].isNull()) + servicesObject.publishTime = valueServicesService["PublishTime"].asString(); + if(!valueServicesService["Version"].isNull()) + servicesObject.version = valueServicesService["Version"].asString(); + if(!valueServicesService["DeployType"].isNull()) + servicesObject.deployType = valueServicesService["DeployType"].asString(); + if(!valueServicesService["ServiceId"].isNull()) + servicesObject.serviceId = valueServicesService["ServiceId"].asString(); + if(!valueServicesService["SupplierUrl"].isNull()) + servicesObject.supplierUrl = valueServicesService["SupplierUrl"].asString(); + if(!valueServicesService["ServiceType"].isNull()) + servicesObject.serviceType = valueServicesService["ServiceType"].asString(); + if(!valueServicesService["SupplierName"].isNull()) + servicesObject.supplierName = valueServicesService["SupplierName"].asString(); + if(!valueServicesService["CommodityCode"].isNull()) + servicesObject.commodityCode = valueServicesService["CommodityCode"].asString(); + if(!valueServicesService["CreateTime"].isNull()) + servicesObject.createTime = valueServicesService["CreateTime"].asString(); + if(!valueServicesService["UpdateTime"].isNull()) + servicesObject.updateTime = valueServicesService["UpdateTime"].asString(); + if(!valueServicesService["ShareType"].isNull()) + servicesObject.shareType = valueServicesService["ShareType"].asString(); + if(!valueServicesService["ApprovalType"].isNull()) + servicesObject.approvalType = valueServicesService["ApprovalType"].asString(); + if(!valueServicesService["VersionName"].isNull()) + servicesObject.versionName = valueServicesService["VersionName"].asString(); + if(!valueServicesService["ArtifactId"].isNull()) + servicesObject.artifactId = valueServicesService["ArtifactId"].asString(); + if(!valueServicesService["ArtifactVersion"].isNull()) + servicesObject.artifactVersion = valueServicesService["ArtifactVersion"].asString(); + if(!valueServicesService["SourceImage"].isNull()) + servicesObject.sourceImage = valueServicesService["SourceImage"].asString(); + if(!valueServicesService["RelationType"].isNull()) + servicesObject.relationType = valueServicesService["RelationType"].asString(); + if(!valueServicesService["TrialType"].isNull()) + servicesObject.trialType = valueServicesService["TrialType"].asString(); + if(!valueServicesService["TenantType"].isNull()) + servicesObject.tenantType = valueServicesService["TenantType"].asString(); + if(!valueServicesService["ResourceGroupId"].isNull()) + servicesObject.resourceGroupId = valueServicesService["ResourceGroupId"].asString(); + auto allServiceInfosNode = valueServicesService["ServiceInfos"]["ServiceInfo"]; + for (auto valueServicesServiceServiceInfosServiceInfo : allServiceInfosNode) + { + Service::ServiceInfo serviceInfosObject; + if(!valueServicesServiceServiceInfosServiceInfo["Locale"].isNull()) + serviceInfosObject.locale = valueServicesServiceServiceInfosServiceInfo["Locale"].asString(); + if(!valueServicesServiceServiceInfosServiceInfo["Image"].isNull()) + serviceInfosObject.image = valueServicesServiceServiceInfosServiceInfo["Image"].asString(); + if(!valueServicesServiceServiceInfosServiceInfo["Name"].isNull()) + serviceInfosObject.name = valueServicesServiceServiceInfosServiceInfo["Name"].asString(); + if(!valueServicesServiceServiceInfosServiceInfo["ShortDescription"].isNull()) + serviceInfosObject.shortDescription = valueServicesServiceServiceInfosServiceInfo["ShortDescription"].asString(); + servicesObject.serviceInfos.push_back(serviceInfosObject); + } + auto allTagsNode = valueServicesService["Tags"]["Tag"]; + for (auto valueServicesServiceTagsTag : allTagsNode) + { + Service::Tag tagsObject; + if(!valueServicesServiceTagsTag["Key"].isNull()) + tagsObject.key = valueServicesServiceTagsTag["Key"].asString(); + if(!valueServicesServiceTagsTag["Value"].isNull()) + tagsObject.value = valueServicesServiceTagsTag["Value"].asString(); + servicesObject.tags.push_back(tagsObject); + } + services_.push_back(servicesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + if(!value["TotalCount"].isNull()) + totalCount_ = value["TotalCount"].asString(); + if(!value["MaxResults"].isNull()) + maxResults_ = std::stoi(value["MaxResults"].asString()); + +} + +std::vector ListServicesResult::getServices()const +{ + return services_; +} + +std::string ListServicesResult::getTotalCount()const +{ + return totalCount_; +} + +std::string ListServicesResult::getNextToken()const +{ + return nextToken_; +} + +int ListServicesResult::getMaxResults()const +{ + return maxResults_; +} +