From 57a114d7eff8ea5494432b7a9e07a90a70fdeea5 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 15 Nov 2022 11:08:13 +0000 Subject: [PATCH] Add renew and modify instance pay type api. --- VERSION | 2 +- hitsdb/CMakeLists.txt | 8 ++ .../alibabacloud/hitsdb/HitsdbClient.h | 16 +++ .../model/CreateLindormInstanceRequest.h | 6 + .../model/ModifyInstancePayTypeRequest.h | 69 +++++++++++ .../model/ModifyInstancePayTypeResult.h | 53 ++++++++ .../model/RenewLindormInstanceRequest.h | 69 +++++++++++ .../hitsdb/model/RenewLindormInstanceResult.h | 53 ++++++++ hitsdb/src/HitsdbClient.cc | 72 +++++++++++ .../src/model/CreateLindormInstanceRequest.cc | 18 +++ .../src/model/ModifyInstancePayTypeRequest.cc | 117 ++++++++++++++++++ .../src/model/ModifyInstancePayTypeResult.cc | 58 +++++++++ .../src/model/RenewLindormInstanceRequest.cc | 117 ++++++++++++++++++ .../src/model/RenewLindormInstanceResult.cc | 58 +++++++++ 14 files changed, 715 insertions(+), 1 deletion(-) create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeRequest.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeResult.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceRequest.h create mode 100644 hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceResult.h create mode 100644 hitsdb/src/model/ModifyInstancePayTypeRequest.cc create mode 100644 hitsdb/src/model/ModifyInstancePayTypeResult.cc create mode 100644 hitsdb/src/model/RenewLindormInstanceRequest.cc create mode 100644 hitsdb/src/model/RenewLindormInstanceResult.cc diff --git a/VERSION b/VERSION index 49c6adf3d..8917acbb6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1335 \ No newline at end of file +1.36.1336 \ No newline at end of file diff --git a/hitsdb/CMakeLists.txt b/hitsdb/CMakeLists.txt index e8bcc2adc..5602833fc 100644 --- a/hitsdb/CMakeLists.txt +++ b/hitsdb/CMakeLists.txt @@ -35,8 +35,12 @@ set(hitsdb_public_header_model include/alibabacloud/hitsdb/model/GetLindormInstanceListResult.h include/alibabacloud/hitsdb/model/ListTagResourcesRequest.h include/alibabacloud/hitsdb/model/ListTagResourcesResult.h + include/alibabacloud/hitsdb/model/ModifyInstancePayTypeRequest.h + include/alibabacloud/hitsdb/model/ModifyInstancePayTypeResult.h include/alibabacloud/hitsdb/model/ReleaseLindormInstanceRequest.h include/alibabacloud/hitsdb/model/ReleaseLindormInstanceResult.h + include/alibabacloud/hitsdb/model/RenewLindormInstanceRequest.h + include/alibabacloud/hitsdb/model/RenewLindormInstanceResult.h include/alibabacloud/hitsdb/model/TagResourcesRequest.h include/alibabacloud/hitsdb/model/TagResourcesResult.h include/alibabacloud/hitsdb/model/UntagResourcesRequest.h @@ -62,8 +66,12 @@ set(hitsdb_src src/model/GetLindormInstanceListResult.cc src/model/ListTagResourcesRequest.cc src/model/ListTagResourcesResult.cc + src/model/ModifyInstancePayTypeRequest.cc + src/model/ModifyInstancePayTypeResult.cc src/model/ReleaseLindormInstanceRequest.cc src/model/ReleaseLindormInstanceResult.cc + src/model/RenewLindormInstanceRequest.cc + src/model/RenewLindormInstanceResult.cc src/model/TagResourcesRequest.cc src/model/TagResourcesResult.cc src/model/UntagResourcesRequest.cc diff --git a/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h b/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h index babb5a5b3..e045c544b 100644 --- a/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h +++ b/hitsdb/include/alibabacloud/hitsdb/HitsdbClient.h @@ -36,8 +36,12 @@ #include "model/GetLindormInstanceListResult.h" #include "model/ListTagResourcesRequest.h" #include "model/ListTagResourcesResult.h" +#include "model/ModifyInstancePayTypeRequest.h" +#include "model/ModifyInstancePayTypeResult.h" #include "model/ReleaseLindormInstanceRequest.h" #include "model/ReleaseLindormInstanceResult.h" +#include "model/RenewLindormInstanceRequest.h" +#include "model/RenewLindormInstanceResult.h" #include "model/TagResourcesRequest.h" #include "model/TagResourcesResult.h" #include "model/UntagResourcesRequest.h" @@ -76,9 +80,15 @@ namespace AlibabaCloud typedef Outcome ListTagResourcesOutcome; typedef std::future ListTagResourcesOutcomeCallable; typedef std::function&)> ListTagResourcesAsyncHandler; + typedef Outcome ModifyInstancePayTypeOutcome; + typedef std::future ModifyInstancePayTypeOutcomeCallable; + typedef std::function&)> ModifyInstancePayTypeAsyncHandler; typedef Outcome ReleaseLindormInstanceOutcome; typedef std::future ReleaseLindormInstanceOutcomeCallable; typedef std::function&)> ReleaseLindormInstanceAsyncHandler; + typedef Outcome RenewLindormInstanceOutcome; + typedef std::future RenewLindormInstanceOutcomeCallable; + typedef std::function&)> RenewLindormInstanceAsyncHandler; typedef Outcome TagResourcesOutcome; typedef std::future TagResourcesOutcomeCallable; typedef std::function&)> TagResourcesAsyncHandler; @@ -117,9 +127,15 @@ namespace AlibabaCloud ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const; void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const; + ModifyInstancePayTypeOutcome modifyInstancePayType(const Model::ModifyInstancePayTypeRequest &request)const; + void modifyInstancePayTypeAsync(const Model::ModifyInstancePayTypeRequest& request, const ModifyInstancePayTypeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyInstancePayTypeOutcomeCallable modifyInstancePayTypeCallable(const Model::ModifyInstancePayTypeRequest& request) const; ReleaseLindormInstanceOutcome releaseLindormInstance(const Model::ReleaseLindormInstanceRequest &request)const; void releaseLindormInstanceAsync(const Model::ReleaseLindormInstanceRequest& request, const ReleaseLindormInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ReleaseLindormInstanceOutcomeCallable releaseLindormInstanceCallable(const Model::ReleaseLindormInstanceRequest& request) const; + RenewLindormInstanceOutcome renewLindormInstance(const Model::RenewLindormInstanceRequest &request)const; + void renewLindormInstanceAsync(const Model::RenewLindormInstanceRequest& request, const RenewLindormInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RenewLindormInstanceOutcomeCallable renewLindormInstanceCallable(const Model::RenewLindormInstanceRequest& request) const; TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const; void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const; diff --git a/hitsdb/include/alibabacloud/hitsdb/model/CreateLindormInstanceRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/CreateLindormInstanceRequest.h index 0bc5b5be6..2a15ae47c 100644 --- a/hitsdb/include/alibabacloud/hitsdb/model/CreateLindormInstanceRequest.h +++ b/hitsdb/include/alibabacloud/hitsdb/model/CreateLindormInstanceRequest.h @@ -42,6 +42,8 @@ public: void setSecurityToken(const std::string &securityToken); int getTsdbNum() const; void setTsdbNum(int tsdbNum); + std::string getPrimaryVSwitchId() const; + void setPrimaryVSwitchId(const std::string &primaryVSwitchId); int getSolrNum() const; void setSolrNum(int solrNum); std::string getInstanceStorage() const; @@ -66,6 +68,8 @@ public: void setMultiZoneCombination(const std::string &multiZoneCombination); std::string getTsdbSpec() const; void setTsdbSpec(const std::string &tsdbSpec); + std::string getPrimaryZoneId() const; + void setPrimaryZoneId(const std::string &primaryZoneId); std::string getFilestoreSpec() const; void setFilestoreSpec(const std::string &filestoreSpec); std::string getAccessKeyId() const; @@ -116,6 +120,7 @@ private: std::string logSpec_; std::string securityToken_; int tsdbNum_; + std::string primaryVSwitchId_; int solrNum_; std::string instanceStorage_; long ownerId_; @@ -128,6 +133,7 @@ private: std::string clientToken_; std::string multiZoneCombination_; std::string tsdbSpec_; + std::string primaryZoneId_; std::string filestoreSpec_; std::string accessKeyId_; std::string duration_; diff --git a/hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeRequest.h new file mode 100644 index 000000000..dba479def --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeRequest.h @@ -0,0 +1,69 @@ +/* + * 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_HITSDB_MODEL_MODIFYINSTANCEPAYTYPEREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_MODIFYINSTANCEPAYTYPEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Hitsdb { +namespace Model { +class ALIBABACLOUD_HITSDB_EXPORT ModifyInstancePayTypeRequest : public RpcServiceRequest { +public: + ModifyInstancePayTypeRequest(); + ~ModifyInstancePayTypeRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId() const; + void setAccessKeyId(const std::string &accessKeyId); + int getDuration() const; + void setDuration(int duration); + std::string getSecurityToken() const; + void setSecurityToken(const std::string &securityToken); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + std::string getPricingCycle() const; + void setPricingCycle(const std::string &pricingCycle); + std::string getPayType() const; + void setPayType(const std::string &payType); + +private: + long resourceOwnerId_; + std::string accessKeyId_; + int duration_; + std::string securityToken_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string instanceId_; + std::string pricingCycle_; + std::string payType_; +}; +} // namespace Model +} // namespace Hitsdb +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_HITSDB_MODEL_MODIFYINSTANCEPAYTYPEREQUEST_H_ diff --git a/hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeResult.h b/hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeResult.h new file mode 100644 index 000000000..c32a0a1cd --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/ModifyInstancePayTypeResult.h @@ -0,0 +1,53 @@ +/* + * 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_HITSDB_MODEL_MODIFYINSTANCEPAYTYPERESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_MODIFYINSTANCEPAYTYPERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT ModifyInstancePayTypeResult : public ServiceResult + { + public: + + + ModifyInstancePayTypeResult(); + explicit ModifyInstancePayTypeResult(const std::string &payload); + ~ModifyInstancePayTypeResult(); + std::string getInstanceId()const; + long getOrderId()const; + + protected: + void parse(const std::string &payload); + private: + std::string instanceId_; + long orderId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_MODIFYINSTANCEPAYTYPERESULT_H_ \ No newline at end of file diff --git a/hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceRequest.h b/hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceRequest.h new file mode 100644 index 000000000..f891a6150 --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceRequest.h @@ -0,0 +1,69 @@ +/* + * 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_HITSDB_MODEL_RENEWLINDORMINSTANCEREQUEST_H_ +#define ALIBABACLOUD_HITSDB_MODEL_RENEWLINDORMINSTANCEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Hitsdb { +namespace Model { +class ALIBABACLOUD_HITSDB_EXPORT RenewLindormInstanceRequest : public RpcServiceRequest { +public: + RenewLindormInstanceRequest(); + ~RenewLindormInstanceRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getAccessKeyId() const; + void setAccessKeyId(const std::string &accessKeyId); + int getDuration() const; + void setDuration(int duration); + std::string getSecurityToken() const; + void setSecurityToken(const std::string &securityToken); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); + std::string getPricingCycle() const; + void setPricingCycle(const std::string &pricingCycle); + +private: + long resourceOwnerId_; + std::string accessKeyId_; + int duration_; + std::string securityToken_; + std::string regionId_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string instanceId_; + std::string pricingCycle_; +}; +} // namespace Model +} // namespace Hitsdb +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_HITSDB_MODEL_RENEWLINDORMINSTANCEREQUEST_H_ diff --git a/hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceResult.h b/hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceResult.h new file mode 100644 index 000000000..b7453d42c --- /dev/null +++ b/hitsdb/include/alibabacloud/hitsdb/model/RenewLindormInstanceResult.h @@ -0,0 +1,53 @@ +/* + * 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_HITSDB_MODEL_RENEWLINDORMINSTANCERESULT_H_ +#define ALIBABACLOUD_HITSDB_MODEL_RENEWLINDORMINSTANCERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Hitsdb + { + namespace Model + { + class ALIBABACLOUD_HITSDB_EXPORT RenewLindormInstanceResult : public ServiceResult + { + public: + + + RenewLindormInstanceResult(); + explicit RenewLindormInstanceResult(const std::string &payload); + ~RenewLindormInstanceResult(); + std::string getInstanceId()const; + long getOrderId()const; + + protected: + void parse(const std::string &payload); + private: + std::string instanceId_; + long orderId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_HITSDB_MODEL_RENEWLINDORMINSTANCERESULT_H_ \ No newline at end of file diff --git a/hitsdb/src/HitsdbClient.cc b/hitsdb/src/HitsdbClient.cc index 1a9da6d3b..97188c5c8 100644 --- a/hitsdb/src/HitsdbClient.cc +++ b/hitsdb/src/HitsdbClient.cc @@ -303,6 +303,42 @@ HitsdbClient::ListTagResourcesOutcomeCallable HitsdbClient::listTagResourcesCall return task->get_future(); } +HitsdbClient::ModifyInstancePayTypeOutcome HitsdbClient::modifyInstancePayType(const ModifyInstancePayTypeRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyInstancePayTypeOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyInstancePayTypeOutcome(ModifyInstancePayTypeResult(outcome.result())); + else + return ModifyInstancePayTypeOutcome(outcome.error()); +} + +void HitsdbClient::modifyInstancePayTypeAsync(const ModifyInstancePayTypeRequest& request, const ModifyInstancePayTypeAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyInstancePayType(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::ModifyInstancePayTypeOutcomeCallable HitsdbClient::modifyInstancePayTypeCallable(const ModifyInstancePayTypeRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyInstancePayType(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + HitsdbClient::ReleaseLindormInstanceOutcome HitsdbClient::releaseLindormInstance(const ReleaseLindormInstanceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -339,6 +375,42 @@ HitsdbClient::ReleaseLindormInstanceOutcomeCallable HitsdbClient::releaseLindorm return task->get_future(); } +HitsdbClient::RenewLindormInstanceOutcome HitsdbClient::renewLindormInstance(const RenewLindormInstanceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RenewLindormInstanceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RenewLindormInstanceOutcome(RenewLindormInstanceResult(outcome.result())); + else + return RenewLindormInstanceOutcome(outcome.error()); +} + +void HitsdbClient::renewLindormInstanceAsync(const RenewLindormInstanceRequest& request, const RenewLindormInstanceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, renewLindormInstance(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +HitsdbClient::RenewLindormInstanceOutcomeCallable HitsdbClient::renewLindormInstanceCallable(const RenewLindormInstanceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->renewLindormInstance(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + HitsdbClient::TagResourcesOutcome HitsdbClient::tagResources(const TagResourcesRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/hitsdb/src/model/CreateLindormInstanceRequest.cc b/hitsdb/src/model/CreateLindormInstanceRequest.cc index 604d86184..d0390e6f0 100644 --- a/hitsdb/src/model/CreateLindormInstanceRequest.cc +++ b/hitsdb/src/model/CreateLindormInstanceRequest.cc @@ -79,6 +79,15 @@ void CreateLindormInstanceRequest::setTsdbNum(int tsdbNum) { setParameter(std::string("TsdbNum"), std::to_string(tsdbNum)); } +std::string CreateLindormInstanceRequest::getPrimaryVSwitchId() const { + return primaryVSwitchId_; +} + +void CreateLindormInstanceRequest::setPrimaryVSwitchId(const std::string &primaryVSwitchId) { + primaryVSwitchId_ = primaryVSwitchId; + setParameter(std::string("PrimaryVSwitchId"), primaryVSwitchId); +} + int CreateLindormInstanceRequest::getSolrNum() const { return solrNum_; } @@ -187,6 +196,15 @@ void CreateLindormInstanceRequest::setTsdbSpec(const std::string &tsdbSpec) { setParameter(std::string("TsdbSpec"), tsdbSpec); } +std::string CreateLindormInstanceRequest::getPrimaryZoneId() const { + return primaryZoneId_; +} + +void CreateLindormInstanceRequest::setPrimaryZoneId(const std::string &primaryZoneId) { + primaryZoneId_ = primaryZoneId; + setParameter(std::string("PrimaryZoneId"), primaryZoneId); +} + std::string CreateLindormInstanceRequest::getFilestoreSpec() const { return filestoreSpec_; } diff --git a/hitsdb/src/model/ModifyInstancePayTypeRequest.cc b/hitsdb/src/model/ModifyInstancePayTypeRequest.cc new file mode 100644 index 000000000..ef0437620 --- /dev/null +++ b/hitsdb/src/model/ModifyInstancePayTypeRequest.cc @@ -0,0 +1,117 @@ +/* + * 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::Hitsdb::Model::ModifyInstancePayTypeRequest; + +ModifyInstancePayTypeRequest::ModifyInstancePayTypeRequest() + : RpcServiceRequest("hitsdb", "2020-06-15", "ModifyInstancePayType") { + setMethod(HttpRequest::Method::Post); +} + +ModifyInstancePayTypeRequest::~ModifyInstancePayTypeRequest() {} + +long ModifyInstancePayTypeRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void ModifyInstancePayTypeRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string ModifyInstancePayTypeRequest::getAccessKeyId() const { + return accessKeyId_; +} + +void ModifyInstancePayTypeRequest::setAccessKeyId(const std::string &accessKeyId) { + accessKeyId_ = accessKeyId; + setParameter(std::string("AccessKeyId"), accessKeyId); +} + +int ModifyInstancePayTypeRequest::getDuration() const { + return duration_; +} + +void ModifyInstancePayTypeRequest::setDuration(int duration) { + duration_ = duration; + setParameter(std::string("Duration"), std::to_string(duration)); +} + +std::string ModifyInstancePayTypeRequest::getSecurityToken() const { + return securityToken_; +} + +void ModifyInstancePayTypeRequest::setSecurityToken(const std::string &securityToken) { + securityToken_ = securityToken; + setParameter(std::string("SecurityToken"), securityToken); +} + +std::string ModifyInstancePayTypeRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void ModifyInstancePayTypeRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string ModifyInstancePayTypeRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void ModifyInstancePayTypeRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long ModifyInstancePayTypeRequest::getOwnerId() const { + return ownerId_; +} + +void ModifyInstancePayTypeRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string ModifyInstancePayTypeRequest::getInstanceId() const { + return instanceId_; +} + +void ModifyInstancePayTypeRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), instanceId); +} + +std::string ModifyInstancePayTypeRequest::getPricingCycle() const { + return pricingCycle_; +} + +void ModifyInstancePayTypeRequest::setPricingCycle(const std::string &pricingCycle) { + pricingCycle_ = pricingCycle; + setParameter(std::string("PricingCycle"), pricingCycle); +} + +std::string ModifyInstancePayTypeRequest::getPayType() const { + return payType_; +} + +void ModifyInstancePayTypeRequest::setPayType(const std::string &payType) { + payType_ = payType; + setParameter(std::string("PayType"), payType); +} + diff --git a/hitsdb/src/model/ModifyInstancePayTypeResult.cc b/hitsdb/src/model/ModifyInstancePayTypeResult.cc new file mode 100644 index 000000000..51dfbb02a --- /dev/null +++ b/hitsdb/src/model/ModifyInstancePayTypeResult.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 +#include + +using namespace AlibabaCloud::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +ModifyInstancePayTypeResult::ModifyInstancePayTypeResult() : + ServiceResult() +{} + +ModifyInstancePayTypeResult::ModifyInstancePayTypeResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyInstancePayTypeResult::~ModifyInstancePayTypeResult() +{} + +void ModifyInstancePayTypeResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["OrderId"].isNull()) + orderId_ = std::stol(value["OrderId"].asString()); + if(!value["InstanceId"].isNull()) + instanceId_ = value["InstanceId"].asString(); + +} + +std::string ModifyInstancePayTypeResult::getInstanceId()const +{ + return instanceId_; +} + +long ModifyInstancePayTypeResult::getOrderId()const +{ + return orderId_; +} + diff --git a/hitsdb/src/model/RenewLindormInstanceRequest.cc b/hitsdb/src/model/RenewLindormInstanceRequest.cc new file mode 100644 index 000000000..572e63fcb --- /dev/null +++ b/hitsdb/src/model/RenewLindormInstanceRequest.cc @@ -0,0 +1,117 @@ +/* + * 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::Hitsdb::Model::RenewLindormInstanceRequest; + +RenewLindormInstanceRequest::RenewLindormInstanceRequest() + : RpcServiceRequest("hitsdb", "2020-06-15", "RenewLindormInstance") { + setMethod(HttpRequest::Method::Post); +} + +RenewLindormInstanceRequest::~RenewLindormInstanceRequest() {} + +long RenewLindormInstanceRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void RenewLindormInstanceRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string RenewLindormInstanceRequest::getAccessKeyId() const { + return accessKeyId_; +} + +void RenewLindormInstanceRequest::setAccessKeyId(const std::string &accessKeyId) { + accessKeyId_ = accessKeyId; + setParameter(std::string("AccessKeyId"), accessKeyId); +} + +int RenewLindormInstanceRequest::getDuration() const { + return duration_; +} + +void RenewLindormInstanceRequest::setDuration(int duration) { + duration_ = duration; + setParameter(std::string("Duration"), std::to_string(duration)); +} + +std::string RenewLindormInstanceRequest::getSecurityToken() const { + return securityToken_; +} + +void RenewLindormInstanceRequest::setSecurityToken(const std::string &securityToken) { + securityToken_ = securityToken; + setParameter(std::string("SecurityToken"), securityToken); +} + +std::string RenewLindormInstanceRequest::getRegionId() const { + return regionId_; +} + +void RenewLindormInstanceRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string RenewLindormInstanceRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void RenewLindormInstanceRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string RenewLindormInstanceRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void RenewLindormInstanceRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long RenewLindormInstanceRequest::getOwnerId() const { + return ownerId_; +} + +void RenewLindormInstanceRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string RenewLindormInstanceRequest::getInstanceId() const { + return instanceId_; +} + +void RenewLindormInstanceRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), instanceId); +} + +std::string RenewLindormInstanceRequest::getPricingCycle() const { + return pricingCycle_; +} + +void RenewLindormInstanceRequest::setPricingCycle(const std::string &pricingCycle) { + pricingCycle_ = pricingCycle; + setParameter(std::string("PricingCycle"), pricingCycle); +} + diff --git a/hitsdb/src/model/RenewLindormInstanceResult.cc b/hitsdb/src/model/RenewLindormInstanceResult.cc new file mode 100644 index 000000000..681956e59 --- /dev/null +++ b/hitsdb/src/model/RenewLindormInstanceResult.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 +#include + +using namespace AlibabaCloud::Hitsdb; +using namespace AlibabaCloud::Hitsdb::Model; + +RenewLindormInstanceResult::RenewLindormInstanceResult() : + ServiceResult() +{} + +RenewLindormInstanceResult::RenewLindormInstanceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RenewLindormInstanceResult::~RenewLindormInstanceResult() +{} + +void RenewLindormInstanceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["InstanceId"].isNull()) + instanceId_ = value["InstanceId"].asString(); + if(!value["OrderId"].isNull()) + orderId_ = std::stol(value["OrderId"].asString()); + +} + +std::string RenewLindormInstanceResult::getInstanceId()const +{ + return instanceId_; +} + +long RenewLindormInstanceResult::getOrderId()const +{ + return orderId_; +} +