Add renew and modify instance pay type api.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<Error, Model::ListTagResourcesResult> ListTagResourcesOutcome;
|
||||
typedef std::future<ListTagResourcesOutcome> ListTagResourcesOutcomeCallable;
|
||||
typedef std::function<void(const HitsdbClient*, const Model::ListTagResourcesRequest&, const ListTagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagResourcesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyInstancePayTypeResult> ModifyInstancePayTypeOutcome;
|
||||
typedef std::future<ModifyInstancePayTypeOutcome> ModifyInstancePayTypeOutcomeCallable;
|
||||
typedef std::function<void(const HitsdbClient*, const Model::ModifyInstancePayTypeRequest&, const ModifyInstancePayTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyInstancePayTypeAsyncHandler;
|
||||
typedef Outcome<Error, Model::ReleaseLindormInstanceResult> ReleaseLindormInstanceOutcome;
|
||||
typedef std::future<ReleaseLindormInstanceOutcome> ReleaseLindormInstanceOutcomeCallable;
|
||||
typedef std::function<void(const HitsdbClient*, const Model::ReleaseLindormInstanceRequest&, const ReleaseLindormInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReleaseLindormInstanceAsyncHandler;
|
||||
typedef Outcome<Error, Model::RenewLindormInstanceResult> RenewLindormInstanceOutcome;
|
||||
typedef std::future<RenewLindormInstanceOutcome> RenewLindormInstanceOutcomeCallable;
|
||||
typedef std::function<void(const HitsdbClient*, const Model::RenewLindormInstanceRequest&, const RenewLindormInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RenewLindormInstanceAsyncHandler;
|
||||
typedef Outcome<Error, Model::TagResourcesResult> TagResourcesOutcome;
|
||||
typedef std::future<TagResourcesOutcome> TagResourcesOutcomeCallable;
|
||||
typedef std::function<void(const HitsdbClient*, const Model::TagResourcesRequest&, const TagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
|
||||
TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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 <alibabacloud/hitsdb/HitsdbExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/hitsdb/HitsdbExport.h>
|
||||
|
||||
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_
|
||||
@@ -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 <alibabacloud/hitsdb/HitsdbExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
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_
|
||||
@@ -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 <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/hitsdb/HitsdbExport.h>
|
||||
|
||||
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_
|
||||
@@ -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<const AsyncCallerContext>& 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<std::packaged_task<ModifyInstancePayTypeOutcome()>>(
|
||||
[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<const AsyncCallerContext>& 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<std::packaged_task<RenewLindormInstanceOutcome()>>(
|
||||
[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();
|
||||
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
117
hitsdb/src/model/ModifyInstancePayTypeRequest.cc
Normal file
117
hitsdb/src/model/ModifyInstancePayTypeRequest.cc
Normal file
@@ -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 <alibabacloud/hitsdb/model/ModifyInstancePayTypeRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
58
hitsdb/src/model/ModifyInstancePayTypeResult.cc
Normal file
58
hitsdb/src/model/ModifyInstancePayTypeResult.cc
Normal file
@@ -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 <alibabacloud/hitsdb/model/ModifyInstancePayTypeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
117
hitsdb/src/model/RenewLindormInstanceRequest.cc
Normal file
117
hitsdb/src/model/RenewLindormInstanceRequest.cc
Normal file
@@ -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 <alibabacloud/hitsdb/model/RenewLindormInstanceRequest.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
58
hitsdb/src/model/RenewLindormInstanceResult.cc
Normal file
58
hitsdb/src/model/RenewLindormInstanceResult.cc
Normal file
@@ -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 <alibabacloud/hitsdb/model/RenewLindormInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user