Support CreateDBLink for polardb oracle.

This commit is contained in:
sdk-team
2020-12-02 09:41:12 +00:00
parent 969a4a2631
commit 818bfd3cf1
34 changed files with 2707 additions and 9 deletions

View File

@@ -0,0 +1,161 @@
/*
* 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/polardb/model/CreateDBLinkRequest.h>
using AlibabaCloud::Polardb::Model::CreateDBLinkRequest;
CreateDBLinkRequest::CreateDBLinkRequest() :
RpcServiceRequest("polardb", "2017-08-01", "CreateDBLink")
{
setMethod(HttpRequest::Method::Post);
}
CreateDBLinkRequest::~CreateDBLinkRequest()
{}
long CreateDBLinkRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void CreateDBLinkRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string CreateDBLinkRequest::getSourceDBName()const
{
return sourceDBName_;
}
void CreateDBLinkRequest::setSourceDBName(const std::string& sourceDBName)
{
sourceDBName_ = sourceDBName;
setParameter("SourceDBName", sourceDBName);
}
std::string CreateDBLinkRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateDBLinkRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateDBLinkRequest::getTargetDBName()const
{
return targetDBName_;
}
void CreateDBLinkRequest::setTargetDBName(const std::string& targetDBName)
{
targetDBName_ = targetDBName;
setParameter("TargetDBName", targetDBName);
}
std::string CreateDBLinkRequest::getDBLinkName()const
{
return dBLinkName_;
}
void CreateDBLinkRequest::setDBLinkName(const std::string& dBLinkName)
{
dBLinkName_ = dBLinkName;
setParameter("DBLinkName", dBLinkName);
}
std::string CreateDBLinkRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void CreateDBLinkRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string CreateDBLinkRequest::getTargetDBInstanceName()const
{
return targetDBInstanceName_;
}
void CreateDBLinkRequest::setTargetDBInstanceName(const std::string& targetDBInstanceName)
{
targetDBInstanceName_ = targetDBInstanceName;
setParameter("TargetDBInstanceName", targetDBInstanceName);
}
std::string CreateDBLinkRequest::getDBClusterId()const
{
return dBClusterId_;
}
void CreateDBLinkRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string CreateDBLinkRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void CreateDBLinkRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string CreateDBLinkRequest::getTargetDBPasswd()const
{
return targetDBPasswd_;
}
void CreateDBLinkRequest::setTargetDBPasswd(const std::string& targetDBPasswd)
{
targetDBPasswd_ = targetDBPasswd;
setParameter("TargetDBPasswd", targetDBPasswd);
}
long CreateDBLinkRequest::getOwnerId()const
{
return ownerId_;
}
void CreateDBLinkRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateDBLinkRequest::getTargetDBAccount()const
{
return targetDBAccount_;
}
void CreateDBLinkRequest::setTargetDBAccount(const std::string& targetDBAccount)
{
targetDBAccount_ = targetDBAccount;
setParameter("TargetDBAccount", targetDBAccount);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/polardb/model/CreateDBLinkResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
CreateDBLinkResult::CreateDBLinkResult() :
ServiceResult()
{}
CreateDBLinkResult::CreateDBLinkResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateDBLinkResult::~CreateDBLinkResult()
{}
void CreateDBLinkResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,106 @@
/*
* 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/polardb/model/DeleteDBLinkRequest.h>
using AlibabaCloud::Polardb::Model::DeleteDBLinkRequest;
DeleteDBLinkRequest::DeleteDBLinkRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DeleteDBLink")
{
setMethod(HttpRequest::Method::Post);
}
DeleteDBLinkRequest::~DeleteDBLinkRequest()
{}
long DeleteDBLinkRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DeleteDBLinkRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DeleteDBLinkRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteDBLinkRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DeleteDBLinkRequest::getDBLinkName()const
{
return dBLinkName_;
}
void DeleteDBLinkRequest::setDBLinkName(const std::string& dBLinkName)
{
dBLinkName_ = dBLinkName;
setParameter("DBLinkName", dBLinkName);
}
std::string DeleteDBLinkRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DeleteDBLinkRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DeleteDBLinkRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DeleteDBLinkRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DeleteDBLinkRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DeleteDBLinkRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long DeleteDBLinkRequest::getOwnerId()const
{
return ownerId_;
}
void DeleteDBLinkRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -0,0 +1,44 @@
/*
* 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/polardb/model/DeleteDBLinkResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DeleteDBLinkResult::DeleteDBLinkResult() :
ServiceResult()
{}
DeleteDBLinkResult::DeleteDBLinkResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteDBLinkResult::~DeleteDBLinkResult()
{}
void DeleteDBLinkResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -39,8 +39,8 @@ void DescribeDBClusterVersionResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["DBInstanceName"].isNull())
dBInstanceName_ = value["DBInstanceName"].asString();
if(!value["DBClusterId"].isNull())
dBClusterId_ = value["DBClusterId"].asString();
if(!value["DBVersion"].isNull())
dBVersion_ = value["DBVersion"].asString();
if(!value["DBMinorVersion"].isNull())
@@ -81,13 +81,13 @@ std::string DescribeDBClusterVersionResult::getDBVersionStatus()const
return dBVersionStatus_;
}
std::string DescribeDBClusterVersionResult::getDBClusterId()const
{
return dBClusterId_;
}
std::string DescribeDBClusterVersionResult::getDBMinorVersion()const
{
return dBMinorVersion_;
}
std::string DescribeDBClusterVersionResult::getDBInstanceName()const
{
return dBInstanceName_;
}

View File

@@ -0,0 +1,106 @@
/*
* 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/polardb/model/DescribeDBLinksRequest.h>
using AlibabaCloud::Polardb::Model::DescribeDBLinksRequest;
DescribeDBLinksRequest::DescribeDBLinksRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeDBLinks")
{
setMethod(HttpRequest::Method::Post);
}
DescribeDBLinksRequest::~DescribeDBLinksRequest()
{}
long DescribeDBLinksRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeDBLinksRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeDBLinksRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeDBLinksRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DescribeDBLinksRequest::getDBLinkName()const
{
return dBLinkName_;
}
void DescribeDBLinksRequest::setDBLinkName(const std::string& dBLinkName)
{
dBLinkName_ = dBLinkName;
setParameter("DBLinkName", dBLinkName);
}
std::string DescribeDBLinksRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeDBLinksRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeDBLinksRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeDBLinksRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeDBLinksRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeDBLinksRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long DescribeDBLinksRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeDBLinksRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -0,0 +1,74 @@
/*
* 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/polardb/model/DescribeDBLinksResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeDBLinksResult::DescribeDBLinksResult() :
ServiceResult()
{}
DescribeDBLinksResult::DescribeDBLinksResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDBLinksResult::~DescribeDBLinksResult()
{}
void DescribeDBLinksResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDBLinkInfosNode = value["DBLinkInfos"]["DBLinkInfosItem"];
for (auto valueDBLinkInfosDBLinkInfosItem : allDBLinkInfosNode)
{
DBLinkInfosItem dBLinkInfosObject;
if(!valueDBLinkInfosDBLinkInfosItem["TargetDBInstanceName"].isNull())
dBLinkInfosObject.targetDBInstanceName = valueDBLinkInfosDBLinkInfosItem["TargetDBInstanceName"].asString();
if(!valueDBLinkInfosDBLinkInfosItem["DBInstanceName"].isNull())
dBLinkInfosObject.dBInstanceName = valueDBLinkInfosDBLinkInfosItem["DBInstanceName"].asString();
if(!valueDBLinkInfosDBLinkInfosItem["TargetDBName"].isNull())
dBLinkInfosObject.targetDBName = valueDBLinkInfosDBLinkInfosItem["TargetDBName"].asString();
if(!valueDBLinkInfosDBLinkInfosItem["TargetAccount"].isNull())
dBLinkInfosObject.targetAccount = valueDBLinkInfosDBLinkInfosItem["TargetAccount"].asString();
if(!valueDBLinkInfosDBLinkInfosItem["DBLinkName"].isNull())
dBLinkInfosObject.dBLinkName = valueDBLinkInfosDBLinkInfosItem["DBLinkName"].asString();
if(!valueDBLinkInfosDBLinkInfosItem["SourceDBName"].isNull())
dBLinkInfosObject.sourceDBName = valueDBLinkInfosDBLinkInfosItem["SourceDBName"].asString();
dBLinkInfos_.push_back(dBLinkInfosObject);
}
if(!value["DBInstanceName"].isNull())
dBInstanceName_ = value["DBInstanceName"].asString();
}
std::vector<DescribeDBLinksResult::DBLinkInfosItem> DescribeDBLinksResult::getDBLinkInfos()const
{
return dBLinkInfos_;
}
std::string DescribeDBLinksResult::getDBInstanceName()const
{
return dBInstanceName_;
}

View File

@@ -0,0 +1,106 @@
/*
* 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/polardb/model/DescribeLocalAvailableRecoveryTimeRequest.h>
using AlibabaCloud::Polardb::Model::DescribeLocalAvailableRecoveryTimeRequest;
DescribeLocalAvailableRecoveryTimeRequest::DescribeLocalAvailableRecoveryTimeRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeLocalAvailableRecoveryTime")
{
setMethod(HttpRequest::Method::Post);
}
DescribeLocalAvailableRecoveryTimeRequest::~DescribeLocalAvailableRecoveryTimeRequest()
{}
long DescribeLocalAvailableRecoveryTimeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getSecurityToken()const
{
return securityToken_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeLocalAvailableRecoveryTimeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long DescribeLocalAvailableRecoveryTimeRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeLocalAvailableRecoveryTimeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -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 <alibabacloud/polardb/model/DescribeLocalAvailableRecoveryTimeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeLocalAvailableRecoveryTimeResult::DescribeLocalAvailableRecoveryTimeResult() :
ServiceResult()
{}
DescribeLocalAvailableRecoveryTimeResult::DescribeLocalAvailableRecoveryTimeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeLocalAvailableRecoveryTimeResult::~DescribeLocalAvailableRecoveryTimeResult()
{}
void DescribeLocalAvailableRecoveryTimeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["RecoveryEndTime"].isNull())
recoveryEndTime_ = value["RecoveryEndTime"].asString();
if(!value["RecoveryBeginTime"].isNull())
recoveryBeginTime_ = value["RecoveryBeginTime"].asString();
if(!value["DBClusterId"].isNull())
dBClusterId_ = value["DBClusterId"].asString();
}
std::string DescribeLocalAvailableRecoveryTimeResult::getRecoveryEndTime()const
{
return recoveryEndTime_;
}
std::string DescribeLocalAvailableRecoveryTimeResult::getRecoveryBeginTime()const
{
return recoveryBeginTime_;
}
std::string DescribeLocalAvailableRecoveryTimeResult::getDBClusterId()const
{
return dBClusterId_;
}

View File

@@ -0,0 +1,161 @@
/*
* 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/polardb/model/DescribeMetaListRequest.h>
using AlibabaCloud::Polardb::Model::DescribeMetaListRequest;
DescribeMetaListRequest::DescribeMetaListRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeMetaList")
{
setMethod(HttpRequest::Method::Post);
}
DescribeMetaListRequest::~DescribeMetaListRequest()
{}
long DescribeMetaListRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeMetaListRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
int DescribeMetaListRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeMetaListRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeMetaListRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeMetaListRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DescribeMetaListRequest::getSecurityToken()const
{
return securityToken_;
}
void DescribeMetaListRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
int DescribeMetaListRequest::getPageSize()const
{
return pageSize_;
}
void DescribeMetaListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeMetaListRequest::getRestoreTime()const
{
return restoreTime_;
}
void DescribeMetaListRequest::setRestoreTime(const std::string& restoreTime)
{
restoreTime_ = restoreTime;
setParameter("RestoreTime", restoreTime);
}
std::string DescribeMetaListRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeMetaListRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeMetaListRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeMetaListRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeMetaListRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeMetaListRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string DescribeMetaListRequest::getBackupId()const
{
return backupId_;
}
void DescribeMetaListRequest::setBackupId(const std::string& backupId)
{
backupId_ = backupId;
setParameter("BackupId", backupId);
}
long DescribeMetaListRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeMetaListRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeMetaListRequest::getGetDbName()const
{
return getDbName_;
}
void DescribeMetaListRequest::setGetDbName(const std::string& getDbName)
{
getDbName_ = getDbName;
setParameter("GetDbName", getDbName);
}

View File

@@ -0,0 +1,88 @@
/*
* 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/polardb/model/DescribeMetaListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeMetaListResult::DescribeMetaListResult() :
ServiceResult()
{}
DescribeMetaListResult::DescribeMetaListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeMetaListResult::~DescribeMetaListResult()
{}
void DescribeMetaListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItemsNode = value["Items"]["MetaItem"];
for (auto valueItemsMetaItem : allItemsNode)
{
MetaItem itemsObject;
if(!valueItemsMetaItem["Database"].isNull())
itemsObject.database = valueItemsMetaItem["Database"].asString();
auto allTables = value["Tables"]["Table"];
for (auto value : allTables)
itemsObject.tables.push_back(value.asString());
items_.push_back(itemsObject);
}
if(!value["TotalRecordCount"].isNull())
totalRecordCount_ = value["TotalRecordCount"].asString();
if(!value["TotalPageCount"].isNull())
totalPageCount_ = value["TotalPageCount"].asString();
if(!value["PageSize"].isNull())
pageSize_ = value["PageSize"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = value["PageNumber"].asString();
}
std::string DescribeMetaListResult::getTotalRecordCount()const
{
return totalRecordCount_;
}
std::string DescribeMetaListResult::getTotalPageCount()const
{
return totalPageCount_;
}
std::string DescribeMetaListResult::getPageSize()const
{
return pageSize_;
}
std::string DescribeMetaListResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<DescribeMetaListResult::MetaItem> DescribeMetaListResult::getItems()const
{
return items_;
}

View File

@@ -0,0 +1,161 @@
/*
* 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/polardb/model/DescribeTasksRequest.h>
using AlibabaCloud::Polardb::Model::DescribeTasksRequest;
DescribeTasksRequest::DescribeTasksRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeTasks")
{
setMethod(HttpRequest::Method::Post);
}
DescribeTasksRequest::~DescribeTasksRequest()
{}
long DescribeTasksRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeTasksRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeTasksRequest::getDBNodeId()const
{
return dBNodeId_;
}
void DescribeTasksRequest::setDBNodeId(const std::string& dBNodeId)
{
dBNodeId_ = dBNodeId;
setParameter("DBNodeId", dBNodeId);
}
std::string DescribeTasksRequest::getStartTime()const
{
return startTime_;
}
void DescribeTasksRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setParameter("StartTime", startTime);
}
int DescribeTasksRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeTasksRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeTasksRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeTasksRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
int DescribeTasksRequest::getPageSize()const
{
return pageSize_;
}
void DescribeTasksRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeTasksRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeTasksRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeTasksRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeTasksRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeTasksRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeTasksRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string DescribeTasksRequest::getEndTime()const
{
return endTime_;
}
void DescribeTasksRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setParameter("EndTime", endTime);
}
long DescribeTasksRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeTasksRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeTasksRequest::getStatus()const
{
return status_;
}
void DescribeTasksRequest::setStatus(const std::string& status)
{
status_ = status;
setParameter("Status", status);
}

View File

@@ -0,0 +1,132 @@
/*
* 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/polardb/model/DescribeTasksResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeTasksResult::DescribeTasksResult() :
ServiceResult()
{}
DescribeTasksResult::DescribeTasksResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeTasksResult::~DescribeTasksResult()
{}
void DescribeTasksResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTasksNode = value["Tasks"]["Task"];
for (auto valueTasksTask : allTasksNode)
{
Task tasksObject;
if(!valueTasksTask["TaskId"].isNull())
tasksObject.taskId = valueTasksTask["TaskId"].asString();
if(!valueTasksTask["BeginTime"].isNull())
tasksObject.beginTime = valueTasksTask["BeginTime"].asString();
if(!valueTasksTask["FinishTime"].isNull())
tasksObject.finishTime = valueTasksTask["FinishTime"].asString();
if(!valueTasksTask["ExpectedFinishTime"].isNull())
tasksObject.expectedFinishTime = valueTasksTask["ExpectedFinishTime"].asString();
if(!valueTasksTask["TaskAction"].isNull())
tasksObject.taskAction = valueTasksTask["TaskAction"].asString();
if(!valueTasksTask["Progress"].isNull())
tasksObject.progress = std::stoi(valueTasksTask["Progress"].asString());
if(!valueTasksTask["DBName"].isNull())
tasksObject.dBName = valueTasksTask["DBName"].asString();
if(!valueTasksTask["ProgressInfo"].isNull())
tasksObject.progressInfo = valueTasksTask["ProgressInfo"].asString();
if(!valueTasksTask["TaskErrorCode"].isNull())
tasksObject.taskErrorCode = valueTasksTask["TaskErrorCode"].asString();
if(!valueTasksTask["TaskErrorMessage"].isNull())
tasksObject.taskErrorMessage = valueTasksTask["TaskErrorMessage"].asString();
if(!valueTasksTask["StepsInfo"].isNull())
tasksObject.stepsInfo = valueTasksTask["StepsInfo"].asString();
if(!valueTasksTask["Remain"].isNull())
tasksObject.remain = std::stoi(valueTasksTask["Remain"].asString());
if(!valueTasksTask["StepProgressInfo"].isNull())
tasksObject.stepProgressInfo = valueTasksTask["StepProgressInfo"].asString();
if(!valueTasksTask["CurrentStepName"].isNull())
tasksObject.currentStepName = valueTasksTask["CurrentStepName"].asString();
tasks_.push_back(tasksObject);
}
if(!value["StartTime"].isNull())
startTime_ = value["StartTime"].asString();
if(!value["EndTime"].isNull())
endTime_ = value["EndTime"].asString();
if(!value["TotalRecordCount"].isNull())
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageRecordCount"].isNull())
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
if(!value["DBInstanceName"].isNull())
dBInstanceName_ = value["DBInstanceName"].asString();
if(!value["DBInstanceId"].isNull())
dBInstanceId_ = value["DBInstanceId"].asString();
}
int DescribeTasksResult::getTotalRecordCount()const
{
return totalRecordCount_;
}
std::vector<DescribeTasksResult::Task> DescribeTasksResult::getTasks()const
{
return tasks_;
}
int DescribeTasksResult::getPageRecordCount()const
{
return pageRecordCount_;
}
std::string DescribeTasksResult::getEndTime()const
{
return endTime_;
}
int DescribeTasksResult::getPageNumber()const
{
return pageNumber_;
}
std::string DescribeTasksResult::getDBInstanceId()const
{
return dBInstanceId_;
}
std::string DescribeTasksResult::getStartTime()const
{
return startTime_;
}
std::string DescribeTasksResult::getDBInstanceName()const
{
return dBInstanceName_;
}

View File

@@ -0,0 +1,139 @@
/*
* 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/polardb/model/RestoreTableRequest.h>
using AlibabaCloud::Polardb::Model::RestoreTableRequest;
RestoreTableRequest::RestoreTableRequest() :
RpcServiceRequest("polardb", "2017-08-01", "RestoreTable")
{
setMethod(HttpRequest::Method::Post);
}
RestoreTableRequest::~RestoreTableRequest()
{}
long RestoreTableRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void RestoreTableRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string RestoreTableRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void RestoreTableRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string RestoreTableRequest::getSecurityToken()const
{
return securityToken_;
}
void RestoreTableRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
std::string RestoreTableRequest::getTableMeta()const
{
return tableMeta_;
}
void RestoreTableRequest::setTableMeta(const std::string& tableMeta)
{
tableMeta_ = tableMeta;
setParameter("TableMeta", tableMeta);
}
std::string RestoreTableRequest::getRestoreTime()const
{
return restoreTime_;
}
void RestoreTableRequest::setRestoreTime(const std::string& restoreTime)
{
restoreTime_ = restoreTime;
setParameter("RestoreTime", restoreTime);
}
std::string RestoreTableRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void RestoreTableRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string RestoreTableRequest::getDBClusterId()const
{
return dBClusterId_;
}
void RestoreTableRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string RestoreTableRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void RestoreTableRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string RestoreTableRequest::getBackupId()const
{
return backupId_;
}
void RestoreTableRequest::setBackupId(const std::string& backupId)
{
backupId_ = backupId;
setParameter("BackupId", backupId);
}
long RestoreTableRequest::getOwnerId()const
{
return ownerId_;
}
void RestoreTableRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -0,0 +1,44 @@
/*
* 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/polardb/model/RestoreTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
RestoreTableResult::RestoreTableResult() :
ServiceResult()
{}
RestoreTableResult::RestoreTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RestoreTableResult::~RestoreTableResult()
{}
void RestoreTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}