Create Lindorm Open api.

This commit is contained in:
sdk-team
2022-01-25 13:01:49 +00:00
parent 6007aa1ea1
commit 7e07a62c24
11 changed files with 13 additions and 346 deletions

View File

@@ -33,8 +33,6 @@ set(hitsdb_public_header_model
include/alibabacloud/hitsdb/model/GetLindormInstanceEngineListResult.h
include/alibabacloud/hitsdb/model/GetLindormInstanceListRequest.h
include/alibabacloud/hitsdb/model/GetLindormInstanceListResult.h
include/alibabacloud/hitsdb/model/GetLindormSSLCertUrlRequest.h
include/alibabacloud/hitsdb/model/GetLindormSSLCertUrlResult.h
include/alibabacloud/hitsdb/model/ReleaseLindormInstanceRequest.h
include/alibabacloud/hitsdb/model/ReleaseLindormInstanceResult.h
include/alibabacloud/hitsdb/model/UpdateInstanceIpWhiteListRequest.h
@@ -56,8 +54,6 @@ set(hitsdb_src
src/model/GetLindormInstanceEngineListResult.cc
src/model/GetLindormInstanceListRequest.cc
src/model/GetLindormInstanceListResult.cc
src/model/GetLindormSSLCertUrlRequest.cc
src/model/GetLindormSSLCertUrlResult.cc
src/model/ReleaseLindormInstanceRequest.cc
src/model/ReleaseLindormInstanceResult.cc
src/model/UpdateInstanceIpWhiteListRequest.cc

View File

@@ -34,8 +34,6 @@
#include "model/GetLindormInstanceEngineListResult.h"
#include "model/GetLindormInstanceListRequest.h"
#include "model/GetLindormInstanceListResult.h"
#include "model/GetLindormSSLCertUrlRequest.h"
#include "model/GetLindormSSLCertUrlResult.h"
#include "model/ReleaseLindormInstanceRequest.h"
#include "model/ReleaseLindormInstanceResult.h"
#include "model/UpdateInstanceIpWhiteListRequest.h"
@@ -69,9 +67,6 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetLindormInstanceListResult> GetLindormInstanceListOutcome;
typedef std::future<GetLindormInstanceListOutcome> GetLindormInstanceListOutcomeCallable;
typedef std::function<void(const HitsdbClient*, const Model::GetLindormInstanceListRequest&, const GetLindormInstanceListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetLindormInstanceListAsyncHandler;
typedef Outcome<Error, Model::GetLindormSSLCertUrlResult> GetLindormSSLCertUrlOutcome;
typedef std::future<GetLindormSSLCertUrlOutcome> GetLindormSSLCertUrlOutcomeCallable;
typedef std::function<void(const HitsdbClient*, const Model::GetLindormSSLCertUrlRequest&, const GetLindormSSLCertUrlOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetLindormSSLCertUrlAsyncHandler;
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;
@@ -104,9 +99,6 @@ namespace AlibabaCloud
GetLindormInstanceListOutcome getLindormInstanceList(const Model::GetLindormInstanceListRequest &request)const;
void getLindormInstanceListAsync(const Model::GetLindormInstanceListRequest& request, const GetLindormInstanceListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetLindormInstanceListOutcomeCallable getLindormInstanceListCallable(const Model::GetLindormInstanceListRequest& request) const;
GetLindormSSLCertUrlOutcome getLindormSSLCertUrl(const Model::GetLindormSSLCertUrlRequest &request)const;
void getLindormSSLCertUrlAsync(const Model::GetLindormSSLCertUrlRequest& request, const GetLindormSSLCertUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetLindormSSLCertUrlOutcomeCallable getLindormSSLCertUrlCallable(const Model::GetLindormSSLCertUrlRequest& 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;

View File

@@ -73,6 +73,7 @@ namespace AlibabaCloud
std::string getDeletionProtection()const;
std::string getVswitchId()const;
std::string getVpcId()const;
bool getEnableCdc()const;
bool getEnablePhoenix()const;
std::string getRegionId()const;
std::string getExpireTime()const;
@@ -107,6 +108,7 @@ namespace AlibabaCloud
std::string deletionProtection_;
std::string vswitchId_;
std::string vpcId_;
bool enableCdc_;
bool enablePhoenix_;
std::string regionId_;
std::string expireTime_;

View File

@@ -1,69 +0,0 @@
/*
* 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_GETLINDORMSSLCERTURLREQUEST_H_
#define ALIBABACLOUD_HITSDB_MODEL_GETLINDORMSSLCERTURLREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/hitsdb/HitsdbExport.h>
namespace AlibabaCloud
{
namespace Hitsdb
{
namespace Model
{
class ALIBABACLOUD_HITSDB_EXPORT GetLindormSSLCertUrlRequest : public RpcServiceRequest
{
public:
GetLindormSSLCertUrlRequest();
~GetLindormSSLCertUrlRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSecurityToken()const;
void setSecurityToken(const std::string& securityToken);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
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);
private:
long resourceOwnerId_;
std::string accessKeyId_;
std::string securityToken_;
std::string regionId_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string instanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_HITSDB_MODEL_GETLINDORMSSLCERTURLREQUEST_H_

View File

@@ -1,53 +0,0 @@
/*
* 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_GETLINDORMSSLCERTURLRESULT_H_
#define ALIBABACLOUD_HITSDB_MODEL_GETLINDORMSSLCERTURLRESULT_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 GetLindormSSLCertUrlResult : public ServiceResult
{
public:
GetLindormSSLCertUrlResult();
explicit GetLindormSSLCertUrlResult(const std::string &payload);
~GetLindormSSLCertUrlResult();
long getCertExpiresAt()const;
std::string getCertUrl()const;
protected:
void parse(const std::string &payload);
private:
long certExpiresAt_;
std::string certUrl_;
};
}
}
}
#endif // !ALIBABACLOUD_HITSDB_MODEL_GETLINDORMSSLCERTURLRESULT_H_

View File

@@ -267,42 +267,6 @@ HitsdbClient::GetLindormInstanceListOutcomeCallable HitsdbClient::getLindormInst
return task->get_future();
}
HitsdbClient::GetLindormSSLCertUrlOutcome HitsdbClient::getLindormSSLCertUrl(const GetLindormSSLCertUrlRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetLindormSSLCertUrlOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetLindormSSLCertUrlOutcome(GetLindormSSLCertUrlResult(outcome.result()));
else
return GetLindormSSLCertUrlOutcome(outcome.error());
}
void HitsdbClient::getLindormSSLCertUrlAsync(const GetLindormSSLCertUrlRequest& request, const GetLindormSSLCertUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getLindormSSLCertUrl(request), context);
};
asyncExecute(new Runnable(fn));
}
HitsdbClient::GetLindormSSLCertUrlOutcomeCallable HitsdbClient::getLindormSSLCertUrlCallable(const GetLindormSSLCertUrlRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetLindormSSLCertUrlOutcome()>>(
[this, request]()
{
return this->getLindormSSLCertUrl(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HitsdbClient::ReleaseLindormInstanceOutcome HitsdbClient::releaseLindormInstance(const ReleaseLindormInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -117,6 +117,8 @@ void GetLindormInstanceResult::parse(const std::string &payload)
enableCompute_ = value["EnableCompute"].asString() == "true";
if(!value["EnableSSL"].isNull())
enableSSL_ = value["EnableSSL"].asString() == "true";
if(!value["EnableCdc"].isNull())
enableCdc_ = value["EnableCdc"].asString() == "true";
}
@@ -250,6 +252,11 @@ std::string GetLindormInstanceResult::getVpcId()const
return vpcId_;
}
bool GetLindormInstanceResult::getEnableCdc()const
{
return enableCdc_;
}
bool GetLindormInstanceResult::getEnablePhoenix()const
{
return enablePhoenix_;

View File

@@ -1,117 +0,0 @@
/*
* 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/GetLindormSSLCertUrlRequest.h>
using AlibabaCloud::Hitsdb::Model::GetLindormSSLCertUrlRequest;
GetLindormSSLCertUrlRequest::GetLindormSSLCertUrlRequest() :
RpcServiceRequest("hitsdb", "2020-06-15", "GetLindormSSLCertUrl")
{
setMethod(HttpRequest::Method::Post);
}
GetLindormSSLCertUrlRequest::~GetLindormSSLCertUrlRequest()
{}
long GetLindormSSLCertUrlRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetLindormSSLCertUrlRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetLindormSSLCertUrlRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetLindormSSLCertUrlRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetLindormSSLCertUrlRequest::getSecurityToken()const
{
return securityToken_;
}
void GetLindormSSLCertUrlRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
std::string GetLindormSSLCertUrlRequest::getRegionId()const
{
return regionId_;
}
void GetLindormSSLCertUrlRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string GetLindormSSLCertUrlRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void GetLindormSSLCertUrlRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string GetLindormSSLCertUrlRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void GetLindormSSLCertUrlRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long GetLindormSSLCertUrlRequest::getOwnerId()const
{
return ownerId_;
}
void GetLindormSSLCertUrlRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string GetLindormSSLCertUrlRequest::getInstanceId()const
{
return instanceId_;
}
void GetLindormSSLCertUrlRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -1,58 +0,0 @@
/*
* 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/GetLindormSSLCertUrlResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Hitsdb;
using namespace AlibabaCloud::Hitsdb::Model;
GetLindormSSLCertUrlResult::GetLindormSSLCertUrlResult() :
ServiceResult()
{}
GetLindormSSLCertUrlResult::GetLindormSSLCertUrlResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetLindormSSLCertUrlResult::~GetLindormSSLCertUrlResult()
{}
void GetLindormSSLCertUrlResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["CertUrl"].isNull())
certUrl_ = value["CertUrl"].asString();
if(!value["CertExpiresAt"].isNull())
certExpiresAt_ = std::stol(value["CertExpiresAt"].asString());
}
long GetLindormSSLCertUrlResult::getCertExpiresAt()const
{
return certExpiresAt_;
}
std::string GetLindormSSLCertUrlResult::getCertUrl()const
{
return certUrl_;
}