Build c sdk.

This commit is contained in:
sdk-team
2023-04-10 08:52:21 +00:00
parent 8eda6c1cc6
commit 3d20963438
369 changed files with 28327 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/AbortLockRequest.h>
using AlibabaCloud::DataLake::Model::AbortLockRequest;
AbortLockRequest::AbortLockRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/locks/abort"};
setMethod(HttpRequest::Method::Delete);
}
AbortLockRequest::~AbortLockRequest() {}
long AbortLockRequest::getLockId() const {
return lockId_;
}
void AbortLockRequest::setLockId(long lockId) {
lockId_ = lockId;
setParameter(std::string("LockId"), std::to_string(lockId));
}

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/datalake/model/AbortLockResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
AbortLockResult::AbortLockResult() :
ServiceResult()
{}
AbortLockResult::AbortLockResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AbortLockResult::~AbortLockResult()
{}
void AbortLockResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string AbortLockResult::getMessage()const
{
return message_;
}
std::string AbortLockResult::getCode()const
{
return code_;
}
bool AbortLockResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchCreatePartitionsRequest.h>
using AlibabaCloud::DataLake::Model::BatchCreatePartitionsRequest;
BatchCreatePartitionsRequest::BatchCreatePartitionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/batchcreate"};
setMethod(HttpRequest::Method::Post);
}
BatchCreatePartitionsRequest::~BatchCreatePartitionsRequest() {}
std::string BatchCreatePartitionsRequest::getBody() const {
return body_;
}
void BatchCreatePartitionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,175 @@
/*
* 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/datalake/model/BatchCreatePartitionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchCreatePartitionsResult::BatchCreatePartitionsResult() :
ServiceResult()
{}
BatchCreatePartitionsResult::BatchCreatePartitionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchCreatePartitionsResult::~BatchCreatePartitionsResult()
{}
void BatchCreatePartitionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPartitionErrorsNode = value["PartitionErrors"]["PartitionError"];
for (auto valuePartitionErrorsPartitionError : allPartitionErrorsNode)
{
PartitionError partitionErrorsObject;
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
partitionErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
partitionErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
auto allPartitionValues = value["PartitionValues"]["null"];
for (auto value : allPartitionValues)
partitionErrorsObject.partitionValues.push_back(value.asString());
partitionErrors_.push_back(partitionErrorsObject);
}
auto allPartitionsNode = value["Partitions"]["PartitionsItem"];
for (auto valuePartitionsPartitionsItem : allPartitionsNode)
{
PartitionsItem partitionsObject;
if(!valuePartitionsPartitionsItem["CreateTime"].isNull())
partitionsObject.createTime = std::stoi(valuePartitionsPartitionsItem["CreateTime"].asString());
if(!valuePartitionsPartitionsItem["DatabaseName"].isNull())
partitionsObject.databaseName = valuePartitionsPartitionsItem["DatabaseName"].asString();
if(!valuePartitionsPartitionsItem["LastAccessTime"].isNull())
partitionsObject.lastAccessTime = std::stoi(valuePartitionsPartitionsItem["LastAccessTime"].asString());
if(!valuePartitionsPartitionsItem["LastAnalyzedTime"].isNull())
partitionsObject.lastAnalyzedTime = std::stoi(valuePartitionsPartitionsItem["LastAnalyzedTime"].asString());
if(!valuePartitionsPartitionsItem["Parameters"].isNull())
partitionsObject.parameters = valuePartitionsPartitionsItem["Parameters"].asString();
if(!valuePartitionsPartitionsItem["TableName"].isNull())
partitionsObject.tableName = valuePartitionsPartitionsItem["TableName"].asString();
auto privilegesNode = value["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
partitionsObject.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
partitionsObject.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
partitionsObject.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
auto sdNode = value["Sd"];
if(!sdNode["Compressed"].isNull())
partitionsObject.sd.compressed = sdNode["Compressed"].asString() == "true";
if(!sdNode["InputFormat"].isNull())
partitionsObject.sd.inputFormat = sdNode["InputFormat"].asString();
if(!sdNode["Location"].isNull())
partitionsObject.sd.location = sdNode["Location"].asString();
if(!sdNode["NumBuckets"].isNull())
partitionsObject.sd.numBuckets = std::stoi(sdNode["NumBuckets"].asString());
if(!sdNode["OutputFormat"].isNull())
partitionsObject.sd.outputFormat = sdNode["OutputFormat"].asString();
if(!sdNode["Parameters"].isNull())
partitionsObject.sd.parameters = sdNode["Parameters"].asString();
if(!sdNode["StoredAsSubDirectories"].isNull())
partitionsObject.sd.storedAsSubDirectories = sdNode["StoredAsSubDirectories"].asString() == "true";
auto allColsNode = sdNode["Cols"]["ColsItem"];
for (auto sdNodeColsColsItem : allColsNode)
{
PartitionsItem::Sd::ColsItem colsItemObject;
if(!sdNodeColsColsItem["Comment"].isNull())
colsItemObject.comment = sdNodeColsColsItem["Comment"].asString();
if(!sdNodeColsColsItem["Name"].isNull())
colsItemObject.name = sdNodeColsColsItem["Name"].asString();
if(!sdNodeColsColsItem["Parameters"].isNull())
colsItemObject.parameters = sdNodeColsColsItem["Parameters"].asString();
if(!sdNodeColsColsItem["Type"].isNull())
colsItemObject.type = sdNodeColsColsItem["Type"].asString();
partitionsObject.sd.cols.push_back(colsItemObject);
}
auto allSortColsNode = sdNode["SortCols"]["SortColsItem"];
for (auto sdNodeSortColsSortColsItem : allSortColsNode)
{
PartitionsItem::Sd::SortColsItem sortColsItemObject;
if(!sdNodeSortColsSortColsItem["Col"].isNull())
sortColsItemObject.col = sdNodeSortColsSortColsItem["Col"].asString();
if(!sdNodeSortColsSortColsItem["Order"].isNull())
sortColsItemObject.order = std::stoi(sdNodeSortColsSortColsItem["Order"].asString());
partitionsObject.sd.sortCols.push_back(sortColsItemObject);
}
auto serDeInfoNode = sdNode["SerDeInfo"];
if(!serDeInfoNode["Name"].isNull())
partitionsObject.sd.serDeInfo.name = serDeInfoNode["Name"].asString();
if(!serDeInfoNode["Parameters"].isNull())
partitionsObject.sd.serDeInfo.parameters = serDeInfoNode["Parameters"].asString();
if(!serDeInfoNode["SerializationLib"].isNull())
partitionsObject.sd.serDeInfo.serializationLib = serDeInfoNode["SerializationLib"].asString();
auto skewedInfoNode = sdNode["SkewedInfo"];
if(!skewedInfoNode["SkewedColValueLocationMaps"].isNull())
partitionsObject.sd.skewedInfo.skewedColValueLocationMaps = skewedInfoNode["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames = skewedInfoNode["SkewedColNames"]["null"];
for (auto value : allSkewedColNames)
partitionsObject.sd.skewedInfo.skewedColNames.push_back(value.asString());
auto allSkewedColValues = skewedInfoNode["SkewedColValues"]["null"];
for (auto value : allSkewedColValues)
partitionsObject.sd.skewedInfo.skewedColValues.push_back(value.asString());
auto allBucketCols = sdNode["BucketCols"]["null"];
for (auto value : allBucketCols)
partitionsObject.sd.bucketCols.push_back(value.asString());
auto allValues = value["Values"]["null"];
for (auto value : allValues)
partitionsObject.values.push_back(value.asString());
partitions_.push_back(partitionsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::vector<BatchCreatePartitionsResult::PartitionsItem> BatchCreatePartitionsResult::getPartitions()const
{
return partitions_;
}
std::string BatchCreatePartitionsResult::getMessage()const
{
return message_;
}
std::vector<BatchCreatePartitionsResult::PartitionError> BatchCreatePartitionsResult::getPartitionErrors()const
{
return partitionErrors_;
}
std::string BatchCreatePartitionsResult::getCode()const
{
return code_;
}
bool BatchCreatePartitionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchCreateTablesRequest.h>
using AlibabaCloud::DataLake::Model::BatchCreateTablesRequest;
BatchCreateTablesRequest::BatchCreateTablesRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/batchcreate"};
setMethod(HttpRequest::Method::Post);
}
BatchCreateTablesRequest::~BatchCreateTablesRequest() {}
std::string BatchCreateTablesRequest::getBody() const {
return body_;
}
void BatchCreateTablesRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,83 @@
/*
* 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/datalake/model/BatchCreateTablesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchCreateTablesResult::BatchCreateTablesResult() :
ServiceResult()
{}
BatchCreateTablesResult::BatchCreateTablesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchCreateTablesResult::~BatchCreateTablesResult()
{}
void BatchCreateTablesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTableErrorsNode = value["TableErrors"]["TableError"];
for (auto valueTableErrorsTableError : allTableErrorsNode)
{
TableError tableErrorsObject;
if(!valueTableErrorsTableError["TableName"].isNull())
tableErrorsObject.tableName = valueTableErrorsTableError["TableName"].asString();
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
tableErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
tableErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
tableErrors_.push_back(tableErrorsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchCreateTablesResult::getMessage()const
{
return message_;
}
std::vector<BatchCreateTablesResult::TableError> BatchCreateTablesResult::getTableErrors()const
{
return tableErrors_;
}
std::string BatchCreateTablesResult::getCode()const
{
return code_;
}
bool BatchCreateTablesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchDeletePartitionsRequest.h>
using AlibabaCloud::DataLake::Model::BatchDeletePartitionsRequest;
BatchDeletePartitionsRequest::BatchDeletePartitionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/batchdelete"};
setMethod(HttpRequest::Method::Post);
}
BatchDeletePartitionsRequest::~BatchDeletePartitionsRequest() {}
std::string BatchDeletePartitionsRequest::getBody() const {
return body_;
}
void BatchDeletePartitionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,84 @@
/*
* 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/datalake/model/BatchDeletePartitionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchDeletePartitionsResult::BatchDeletePartitionsResult() :
ServiceResult()
{}
BatchDeletePartitionsResult::BatchDeletePartitionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchDeletePartitionsResult::~BatchDeletePartitionsResult()
{}
void BatchDeletePartitionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPartitionErrorsNode = value["PartitionErrors"]["PartitionErrorsItem"];
for (auto valuePartitionErrorsPartitionErrorsItem : allPartitionErrorsNode)
{
PartitionErrorsItem partitionErrorsObject;
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
partitionErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
partitionErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
auto allPartitionValues = value["PartitionValues"]["null"];
for (auto value : allPartitionValues)
partitionErrorsObject.partitionValues.push_back(value.asString());
partitionErrors_.push_back(partitionErrorsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchDeletePartitionsResult::getMessage()const
{
return message_;
}
std::vector<BatchDeletePartitionsResult::PartitionErrorsItem> BatchDeletePartitionsResult::getPartitionErrors()const
{
return partitionErrors_;
}
std::string BatchDeletePartitionsResult::getCode()const
{
return code_;
}
bool BatchDeletePartitionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchDeleteTableVersionsRequest.h>
using AlibabaCloud::DataLake::Model::BatchDeleteTableVersionsRequest;
BatchDeleteTableVersionsRequest::BatchDeleteTableVersionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/versions/batchdelete"};
setMethod(HttpRequest::Method::Post);
}
BatchDeleteTableVersionsRequest::~BatchDeleteTableVersionsRequest() {}
std::string BatchDeleteTableVersionsRequest::getBody() const {
return body_;
}
void BatchDeleteTableVersionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

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/datalake/model/BatchDeleteTableVersionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchDeleteTableVersionsResult::BatchDeleteTableVersionsResult() :
ServiceResult()
{}
BatchDeleteTableVersionsResult::BatchDeleteTableVersionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchDeleteTableVersionsResult::~BatchDeleteTableVersionsResult()
{}
void BatchDeleteTableVersionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchDeleteTableVersionsResult::getMessage()const
{
return message_;
}
std::string BatchDeleteTableVersionsResult::getCode()const
{
return code_;
}
bool BatchDeleteTableVersionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchDeleteTablesRequest.h>
using AlibabaCloud::DataLake::Model::BatchDeleteTablesRequest;
BatchDeleteTablesRequest::BatchDeleteTablesRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/batchdelete"};
setMethod(HttpRequest::Method::Post);
}
BatchDeleteTablesRequest::~BatchDeleteTablesRequest() {}
std::string BatchDeleteTablesRequest::getBody() const {
return body_;
}
void BatchDeleteTablesRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,83 @@
/*
* 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/datalake/model/BatchDeleteTablesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchDeleteTablesResult::BatchDeleteTablesResult() :
ServiceResult()
{}
BatchDeleteTablesResult::BatchDeleteTablesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchDeleteTablesResult::~BatchDeleteTablesResult()
{}
void BatchDeleteTablesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTableErrorsNode = value["TableErrors"]["TableError"];
for (auto valueTableErrorsTableError : allTableErrorsNode)
{
TableError tableErrorsObject;
if(!valueTableErrorsTableError["TableName"].isNull())
tableErrorsObject.tableName = valueTableErrorsTableError["TableName"].asString();
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
tableErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
tableErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
tableErrors_.push_back(tableErrorsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchDeleteTablesResult::getMessage()const
{
return message_;
}
std::vector<BatchDeleteTablesResult::TableError> BatchDeleteTablesResult::getTableErrors()const
{
return tableErrors_;
}
std::string BatchDeleteTablesResult::getCode()const
{
return code_;
}
bool BatchDeleteTablesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,36 @@
/*
* 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/datalake/model/BatchGetPartitionColumnStatisticsRequest.h>
using AlibabaCloud::DataLake::Model::BatchGetPartitionColumnStatisticsRequest;
BatchGetPartitionColumnStatisticsRequest::BatchGetPartitionColumnStatisticsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/columnstatistics/batchget"};
setMethod(HttpRequest::Method::Post);
}
BatchGetPartitionColumnStatisticsRequest::~BatchGetPartitionColumnStatisticsRequest() {}
BatchGetPartitionColumnStatisticsRequest::body BatchGetPartitionColumnStatisticsRequest::getBody() const {
return body_;
}
void BatchGetPartitionColumnStatisticsRequest::setBody(const BatchGetPartitionColumnStatisticsRequest::body &body) {
body_ = body;
}

View File

@@ -0,0 +1,72 @@
/*
* 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/datalake/model/BatchGetPartitionColumnStatisticsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchGetPartitionColumnStatisticsResult::BatchGetPartitionColumnStatisticsResult() :
ServiceResult()
{}
BatchGetPartitionColumnStatisticsResult::BatchGetPartitionColumnStatisticsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchGetPartitionColumnStatisticsResult::~BatchGetPartitionColumnStatisticsResult()
{}
void BatchGetPartitionColumnStatisticsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["PartitionStatisticsMap"].isNull())
partitionStatisticsMap_ = value["PartitionStatisticsMap"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchGetPartitionColumnStatisticsResult::getMessage()const
{
return message_;
}
std::string BatchGetPartitionColumnStatisticsResult::getCode()const
{
return code_;
}
std::string BatchGetPartitionColumnStatisticsResult::getPartitionStatisticsMap()const
{
return partitionStatisticsMap_;
}
bool BatchGetPartitionColumnStatisticsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchGetPartitionsRequest.h>
using AlibabaCloud::DataLake::Model::BatchGetPartitionsRequest;
BatchGetPartitionsRequest::BatchGetPartitionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/batchget"};
setMethod(HttpRequest::Method::Post);
}
BatchGetPartitionsRequest::~BatchGetPartitionsRequest() {}
std::string BatchGetPartitionsRequest::getBody() const {
return body_;
}
void BatchGetPartitionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,289 @@
/*
* 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/datalake/model/BatchGetPartitionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchGetPartitionsResult::BatchGetPartitionsResult() :
ServiceResult()
{}
BatchGetPartitionsResult::BatchGetPartitionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchGetPartitionsResult::~BatchGetPartitionsResult()
{}
void BatchGetPartitionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPartitionErrorsNode = value["PartitionErrors"]["PartitionErrorsItem"];
for (auto valuePartitionErrorsPartitionErrorsItem : allPartitionErrorsNode)
{
PartitionErrorsItem partitionErrorsObject;
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
partitionErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
partitionErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
auto allPartitionValues = value["PartitionValues"]["null"];
for (auto value : allPartitionValues)
partitionErrorsObject.partitionValues.push_back(value.asString());
partitionErrors_.push_back(partitionErrorsObject);
}
auto allPartitionsNode = value["Partitions"]["PartitionsItem"];
for (auto valuePartitionsPartitionsItem : allPartitionsNode)
{
PartitionsItem partitionsObject;
if(!valuePartitionsPartitionsItem["CreateTime"].isNull())
partitionsObject.createTime = std::stoi(valuePartitionsPartitionsItem["CreateTime"].asString());
if(!valuePartitionsPartitionsItem["DatabaseName"].isNull())
partitionsObject.databaseName = valuePartitionsPartitionsItem["DatabaseName"].asString();
if(!valuePartitionsPartitionsItem["LastAccessTime"].isNull())
partitionsObject.lastAccessTime = std::stoi(valuePartitionsPartitionsItem["LastAccessTime"].asString());
if(!valuePartitionsPartitionsItem["LastAnalyzedTime"].isNull())
partitionsObject.lastAnalyzedTime = std::stoi(valuePartitionsPartitionsItem["LastAnalyzedTime"].asString());
if(!valuePartitionsPartitionsItem["Parameters"].isNull())
partitionsObject.parameters = valuePartitionsPartitionsItem["Parameters"].asString();
if(!valuePartitionsPartitionsItem["TableName"].isNull())
partitionsObject.tableName = valuePartitionsPartitionsItem["TableName"].asString();
auto privilegesNode = value["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
partitionsObject.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
partitionsObject.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
partitionsObject.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
auto sdNode = value["Sd"];
if(!sdNode["Compressed"].isNull())
partitionsObject.sd.compressed = sdNode["Compressed"].asString() == "true";
if(!sdNode["InputFormat"].isNull())
partitionsObject.sd.inputFormat = sdNode["InputFormat"].asString();
if(!sdNode["Location"].isNull())
partitionsObject.sd.location = sdNode["Location"].asString();
if(!sdNode["NumBuckets"].isNull())
partitionsObject.sd.numBuckets = std::stoi(sdNode["NumBuckets"].asString());
if(!sdNode["OutputFormat"].isNull())
partitionsObject.sd.outputFormat = sdNode["OutputFormat"].asString();
if(!sdNode["Parameters"].isNull())
partitionsObject.sd.parameters = sdNode["Parameters"].asString();
if(!sdNode["StoredAsSubDirectories"].isNull())
partitionsObject.sd.storedAsSubDirectories = sdNode["StoredAsSubDirectories"].asString() == "true";
auto allColsNode = sdNode["Cols"]["ColsItem"];
for (auto sdNodeColsColsItem : allColsNode)
{
PartitionsItem::Sd::ColsItem colsItemObject;
if(!sdNodeColsColsItem["Comment"].isNull())
colsItemObject.comment = sdNodeColsColsItem["Comment"].asString();
if(!sdNodeColsColsItem["Name"].isNull())
colsItemObject.name = sdNodeColsColsItem["Name"].asString();
if(!sdNodeColsColsItem["Parameters"].isNull())
colsItemObject.parameters = sdNodeColsColsItem["Parameters"].asString();
if(!sdNodeColsColsItem["Type"].isNull())
colsItemObject.type = sdNodeColsColsItem["Type"].asString();
partitionsObject.sd.cols.push_back(colsItemObject);
}
auto allSortColsNode = sdNode["SortCols"]["SortColsItem"];
for (auto sdNodeSortColsSortColsItem : allSortColsNode)
{
PartitionsItem::Sd::SortColsItem sortColsItemObject;
if(!sdNodeSortColsSortColsItem["Col"].isNull())
sortColsItemObject.col = sdNodeSortColsSortColsItem["Col"].asString();
if(!sdNodeSortColsSortColsItem["Order"].isNull())
sortColsItemObject.order = std::stoi(sdNodeSortColsSortColsItem["Order"].asString());
partitionsObject.sd.sortCols.push_back(sortColsItemObject);
}
auto serDeInfoNode = sdNode["SerDeInfo"];
if(!serDeInfoNode["Name"].isNull())
partitionsObject.sd.serDeInfo.name = serDeInfoNode["Name"].asString();
if(!serDeInfoNode["Parameters"].isNull())
partitionsObject.sd.serDeInfo.parameters = serDeInfoNode["Parameters"].asString();
if(!serDeInfoNode["SerializationLib"].isNull())
partitionsObject.sd.serDeInfo.serializationLib = serDeInfoNode["SerializationLib"].asString();
auto skewedInfoNode = sdNode["SkewedInfo"];
if(!skewedInfoNode["SkewedColValueLocationMaps"].isNull())
partitionsObject.sd.skewedInfo.skewedColValueLocationMaps = skewedInfoNode["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames = skewedInfoNode["SkewedColNames"]["null"];
for (auto value : allSkewedColNames)
partitionsObject.sd.skewedInfo.skewedColNames.push_back(value.asString());
auto allSkewedColValues = skewedInfoNode["SkewedColValues"]["null"];
for (auto value : allSkewedColValues)
partitionsObject.sd.skewedInfo.skewedColValues.push_back(value.asString());
auto allBucketCols = sdNode["BucketCols"]["null"];
for (auto value : allBucketCols)
partitionsObject.sd.bucketCols.push_back(value.asString());
auto allValues = value["Values"]["null"];
for (auto value : allValues)
partitionsObject.values.push_back(value.asString());
partitions_.push_back(partitionsObject);
}
auto allPartitionSpecsNode = value["PartitionSpecs"]["PartitionSpecsItem"];
for (auto valuePartitionSpecsPartitionSpecsItem : allPartitionSpecsNode)
{
PartitionSpecsItem partitionSpecsObject;
auto allSharedSDPartitionsNode = valuePartitionSpecsPartitionSpecsItem["SharedSDPartitions"]["SharedSDPartitionsItem"];
for (auto valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem : allSharedSDPartitionsNode)
{
PartitionSpecsItem::SharedSDPartitionsItem sharedSDPartitionsObject;
if(!valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["CreateTime"].isNull())
sharedSDPartitionsObject.createTime = std::stoi(valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["CreateTime"].asString());
if(!valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["DatabaseName"].isNull())
sharedSDPartitionsObject.databaseName = valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["DatabaseName"].asString();
if(!valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["LastAccessTime"].isNull())
sharedSDPartitionsObject.lastAccessTime = std::stoi(valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["LastAccessTime"].asString());
if(!valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["LastAnalyzedTime"].isNull())
sharedSDPartitionsObject.lastAnalyzedTime = std::stoi(valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["LastAnalyzedTime"].asString());
if(!valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["Parameters"].isNull())
sharedSDPartitionsObject.parameters = valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["Parameters"].asString();
if(!valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["TableName"].isNull())
sharedSDPartitionsObject.tableName = valuePartitionSpecsPartitionSpecsItemSharedSDPartitionsSharedSDPartitionsItem["TableName"].asString();
auto privileges2Node = value["Privileges"];
if(!privileges2Node["GroupPrivileges"].isNull())
sharedSDPartitionsObject.privileges2.groupPrivileges = privileges2Node["GroupPrivileges"].asString();
if(!privileges2Node["RolePrivileges"].isNull())
sharedSDPartitionsObject.privileges2.rolePrivileges = privileges2Node["RolePrivileges"].asString();
if(!privileges2Node["UserPrivileges"].isNull())
sharedSDPartitionsObject.privileges2.userPrivileges = privileges2Node["UserPrivileges"].asString();
auto sd3Node = value["Sd"];
if(!sd3Node["Compressed"].isNull())
sharedSDPartitionsObject.sd3.compressed = sd3Node["Compressed"].asString() == "true";
if(!sd3Node["InputFormat"].isNull())
sharedSDPartitionsObject.sd3.inputFormat = sd3Node["InputFormat"].asString();
if(!sd3Node["Location"].isNull())
sharedSDPartitionsObject.sd3.location = sd3Node["Location"].asString();
if(!sd3Node["NumBuckets"].isNull())
sharedSDPartitionsObject.sd3.numBuckets = std::stoi(sd3Node["NumBuckets"].asString());
if(!sd3Node["OutputFormat"].isNull())
sharedSDPartitionsObject.sd3.outputFormat = sd3Node["OutputFormat"].asString();
if(!sd3Node["Parameters"].isNull())
sharedSDPartitionsObject.sd3.parameters = sd3Node["Parameters"].asString();
if(!sd3Node["StoredAsSubDirectories"].isNull())
sharedSDPartitionsObject.sd3.storedAsSubDirectories = sd3Node["StoredAsSubDirectories"].asString() == "true";
auto allCols7Node = sd3Node["Cols"]["ColsItem"];
for (auto sd3NodeColsColsItem : allCols7Node)
{
PartitionSpecsItem::SharedSDPartitionsItem::Sd3::ColsItem9 colsItem9Object;
if(!sd3NodeColsColsItem["Comment"].isNull())
colsItem9Object.comment = sd3NodeColsColsItem["Comment"].asString();
if(!sd3NodeColsColsItem["Name"].isNull())
colsItem9Object.name = sd3NodeColsColsItem["Name"].asString();
if(!sd3NodeColsColsItem["Parameters"].isNull())
colsItem9Object.parameters = sd3NodeColsColsItem["Parameters"].asString();
if(!sd3NodeColsColsItem["Type"].isNull())
colsItem9Object.type = sd3NodeColsColsItem["Type"].asString();
sharedSDPartitionsObject.sd3.cols7.push_back(colsItem9Object);
}
auto allSortCols8Node = sd3Node["SortCols"]["SortColsItem"];
for (auto sd3NodeSortColsSortColsItem : allSortCols8Node)
{
PartitionSpecsItem::SharedSDPartitionsItem::Sd3::SortColsItem10 sortColsItem10Object;
if(!sd3NodeSortColsSortColsItem["Col"].isNull())
sortColsItem10Object.col = sd3NodeSortColsSortColsItem["Col"].asString();
if(!sd3NodeSortColsSortColsItem["Order"].isNull())
sortColsItem10Object.order = std::stoi(sd3NodeSortColsSortColsItem["Order"].asString());
sharedSDPartitionsObject.sd3.sortCols8.push_back(sortColsItem10Object);
}
auto serDeInfo5Node = sd3Node["SerDeInfo"];
if(!serDeInfo5Node["Name"].isNull())
sharedSDPartitionsObject.sd3.serDeInfo5.name = serDeInfo5Node["Name"].asString();
if(!serDeInfo5Node["Parameters"].isNull())
sharedSDPartitionsObject.sd3.serDeInfo5.parameters = serDeInfo5Node["Parameters"].asString();
if(!serDeInfo5Node["SerializationLib"].isNull())
sharedSDPartitionsObject.sd3.serDeInfo5.serializationLib = serDeInfo5Node["SerializationLib"].asString();
auto skewedInfo6Node = sd3Node["SkewedInfo"];
if(!skewedInfo6Node["SkewedColValueLocationMaps"].isNull())
sharedSDPartitionsObject.sd3.skewedInfo6.skewedColValueLocationMaps = skewedInfo6Node["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames11 = skewedInfo6Node["SkewedColNames"]["null"];
for (auto value : allSkewedColNames11)
sharedSDPartitionsObject.sd3.skewedInfo6.skewedColNames11.push_back(value.asString());
auto allSkewedColValues12 = skewedInfo6Node["SkewedColValues"]["null"];
for (auto value : allSkewedColValues12)
sharedSDPartitionsObject.sd3.skewedInfo6.skewedColValues12.push_back(value.asString());
auto allBucketCols4 = sd3Node["BucketCols"]["null"];
for (auto value : allBucketCols4)
sharedSDPartitionsObject.sd3.bucketCols4.push_back(value.asString());
auto allValues1 = value["Values"]["null"];
for (auto value : allValues1)
sharedSDPartitionsObject.values1.push_back(value.asString());
partitionSpecsObject.sharedSDPartitions.push_back(sharedSDPartitionsObject);
}
auto sharedStorageDescriptorNode = value["SharedStorageDescriptor"];
if(!sharedStorageDescriptorNode["Location"].isNull())
partitionSpecsObject.sharedStorageDescriptor.location = sharedStorageDescriptorNode["Location"].asString();
auto allCols13Node = sharedStorageDescriptorNode["Cols"]["ColsItem"];
for (auto sharedStorageDescriptorNodeColsColsItem : allCols13Node)
{
PartitionSpecsItem::SharedStorageDescriptor::ColsItem14 colsItem14Object;
if(!sharedStorageDescriptorNodeColsColsItem["Comment"].isNull())
colsItem14Object.comment = sharedStorageDescriptorNodeColsColsItem["Comment"].asString();
if(!sharedStorageDescriptorNodeColsColsItem["Name"].isNull())
colsItem14Object.name = sharedStorageDescriptorNodeColsColsItem["Name"].asString();
if(!sharedStorageDescriptorNodeColsColsItem["Parameters"].isNull())
colsItem14Object.parameters = sharedStorageDescriptorNodeColsColsItem["Parameters"].asString();
if(!sharedStorageDescriptorNodeColsColsItem["Type"].isNull())
colsItem14Object.type = sharedStorageDescriptorNodeColsColsItem["Type"].asString();
partitionSpecsObject.sharedStorageDescriptor.cols13.push_back(colsItem14Object);
}
partitionSpecs_.push_back(partitionSpecsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::vector<BatchGetPartitionsResult::PartitionsItem> BatchGetPartitionsResult::getPartitions()const
{
return partitions_;
}
std::vector<BatchGetPartitionsResult::PartitionSpecsItem> BatchGetPartitionsResult::getPartitionSpecs()const
{
return partitionSpecs_;
}
std::string BatchGetPartitionsResult::getMessage()const
{
return message_;
}
std::vector<BatchGetPartitionsResult::PartitionErrorsItem> BatchGetPartitionsResult::getPartitionErrors()const
{
return partitionErrors_;
}
std::string BatchGetPartitionsResult::getCode()const
{
return code_;
}
bool BatchGetPartitionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchGetTablesRequest.h>
using AlibabaCloud::DataLake::Model::BatchGetTablesRequest;
BatchGetTablesRequest::BatchGetTablesRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/batchget"};
setMethod(HttpRequest::Method::Post);
}
BatchGetTablesRequest::~BatchGetTablesRequest() {}
std::string BatchGetTablesRequest::getBody() const {
return body_;
}
void BatchGetTablesRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,214 @@
/*
* 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/datalake/model/BatchGetTablesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchGetTablesResult::BatchGetTablesResult() :
ServiceResult()
{}
BatchGetTablesResult::BatchGetTablesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchGetTablesResult::~BatchGetTablesResult()
{}
void BatchGetTablesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTableErrorsNode = value["TableErrors"]["TableErrorsItem"];
for (auto valueTableErrorsTableErrorsItem : allTableErrorsNode)
{
TableErrorsItem tableErrorsObject;
if(!valueTableErrorsTableErrorsItem["TableName"].isNull())
tableErrorsObject.tableName = valueTableErrorsTableErrorsItem["TableName"].asString();
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
tableErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
tableErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
tableErrors_.push_back(tableErrorsObject);
}
auto allTablesNode = value["Tables"]["TablesItem"];
for (auto valueTablesTablesItem : allTablesNode)
{
TablesItem tablesObject;
if(!valueTablesTablesItem["Cascade"].isNull())
tablesObject.cascade = valueTablesTablesItem["Cascade"].asString() == "true";
if(!valueTablesTablesItem["CreateTime"].isNull())
tablesObject.createTime = std::stoi(valueTablesTablesItem["CreateTime"].asString());
if(!valueTablesTablesItem["CreatedBy"].isNull())
tablesObject.createdBy = valueTablesTablesItem["CreatedBy"].asString();
if(!valueTablesTablesItem["DatabaseName"].isNull())
tablesObject.databaseName = valueTablesTablesItem["DatabaseName"].asString();
if(!valueTablesTablesItem["LastAccessTime"].isNull())
tablesObject.lastAccessTime = std::stoi(valueTablesTablesItem["LastAccessTime"].asString());
if(!valueTablesTablesItem["LastAnalyzedTime"].isNull())
tablesObject.lastAnalyzedTime = std::stoi(valueTablesTablesItem["LastAnalyzedTime"].asString());
if(!valueTablesTablesItem["Owner"].isNull())
tablesObject.owner = valueTablesTablesItem["Owner"].asString();
if(!valueTablesTablesItem["OwnerType"].isNull())
tablesObject.ownerType = valueTablesTablesItem["OwnerType"].asString();
if(!valueTablesTablesItem["Parameters"].isNull())
tablesObject.parameters = valueTablesTablesItem["Parameters"].asString();
if(!valueTablesTablesItem["Retention"].isNull())
tablesObject.retention = std::stoi(valueTablesTablesItem["Retention"].asString());
if(!valueTablesTablesItem["RewriteEnabled"].isNull())
tablesObject.rewriteEnabled = valueTablesTablesItem["RewriteEnabled"].asString() == "true";
if(!valueTablesTablesItem["TableName"].isNull())
tablesObject.tableName = valueTablesTablesItem["TableName"].asString();
if(!valueTablesTablesItem["TableType"].isNull())
tablesObject.tableType = valueTablesTablesItem["TableType"].asString();
if(!valueTablesTablesItem["Temporary"].isNull())
tablesObject.temporary = valueTablesTablesItem["Temporary"].asString() == "true";
if(!valueTablesTablesItem["UpdateTime"].isNull())
tablesObject.updateTime = std::stoi(valueTablesTablesItem["UpdateTime"].asString());
if(!valueTablesTablesItem["ViewExpandedText"].isNull())
tablesObject.viewExpandedText = valueTablesTablesItem["ViewExpandedText"].asString();
if(!valueTablesTablesItem["ViewOriginalText"].isNull())
tablesObject.viewOriginalText = valueTablesTablesItem["ViewOriginalText"].asString();
if(!valueTablesTablesItem["TableId"].isNull())
tablesObject.tableId = valueTablesTablesItem["TableId"].asString();
auto allPartitionKeysNode = valueTablesTablesItem["PartitionKeys"]["PartitionKeysItem"];
for (auto valueTablesTablesItemPartitionKeysPartitionKeysItem : allPartitionKeysNode)
{
TablesItem::PartitionKeysItem partitionKeysObject;
if(!valueTablesTablesItemPartitionKeysPartitionKeysItem["Comment"].isNull())
partitionKeysObject.comment = valueTablesTablesItemPartitionKeysPartitionKeysItem["Comment"].asString();
if(!valueTablesTablesItemPartitionKeysPartitionKeysItem["Name"].isNull())
partitionKeysObject.name = valueTablesTablesItemPartitionKeysPartitionKeysItem["Name"].asString();
if(!valueTablesTablesItemPartitionKeysPartitionKeysItem["Parameters"].isNull())
partitionKeysObject.parameters = valueTablesTablesItemPartitionKeysPartitionKeysItem["Parameters"].asString();
if(!valueTablesTablesItemPartitionKeysPartitionKeysItem["Type"].isNull())
partitionKeysObject.type = valueTablesTablesItemPartitionKeysPartitionKeysItem["Type"].asString();
tablesObject.partitionKeys.push_back(partitionKeysObject);
}
auto privilegesNode = value["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
tablesObject.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
tablesObject.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
tablesObject.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
auto sdNode = value["Sd"];
if(!sdNode["Compressed"].isNull())
tablesObject.sd.compressed = sdNode["Compressed"].asString() == "true";
if(!sdNode["InputFormat"].isNull())
tablesObject.sd.inputFormat = sdNode["InputFormat"].asString();
if(!sdNode["Location"].isNull())
tablesObject.sd.location = sdNode["Location"].asString();
if(!sdNode["NumBuckets"].isNull())
tablesObject.sd.numBuckets = std::stoi(sdNode["NumBuckets"].asString());
if(!sdNode["OutputFormat"].isNull())
tablesObject.sd.outputFormat = sdNode["OutputFormat"].asString();
if(!sdNode["Parameters"].isNull())
tablesObject.sd.parameters = sdNode["Parameters"].asString();
if(!sdNode["StoredAsSubDirectories"].isNull())
tablesObject.sd.storedAsSubDirectories = sdNode["StoredAsSubDirectories"].asString() == "true";
auto allColsNode = sdNode["Cols"]["ColsItem"];
for (auto sdNodeColsColsItem : allColsNode)
{
TablesItem::Sd::ColsItem colsItemObject;
if(!sdNodeColsColsItem["Comment"].isNull())
colsItemObject.comment = sdNodeColsColsItem["Comment"].asString();
if(!sdNodeColsColsItem["Name"].isNull())
colsItemObject.name = sdNodeColsColsItem["Name"].asString();
if(!sdNodeColsColsItem["Parameters"].isNull())
colsItemObject.parameters = sdNodeColsColsItem["Parameters"].asString();
if(!sdNodeColsColsItem["Type"].isNull())
colsItemObject.type = sdNodeColsColsItem["Type"].asString();
tablesObject.sd.cols.push_back(colsItemObject);
}
auto allSortColsNode = sdNode["SortCols"]["SortColsItem"];
for (auto sdNodeSortColsSortColsItem : allSortColsNode)
{
TablesItem::Sd::SortColsItem sortColsItemObject;
if(!sdNodeSortColsSortColsItem["Col"].isNull())
sortColsItemObject.col = sdNodeSortColsSortColsItem["Col"].asString();
if(!sdNodeSortColsSortColsItem["Order"].isNull())
sortColsItemObject.order = std::stoi(sdNodeSortColsSortColsItem["Order"].asString());
tablesObject.sd.sortCols.push_back(sortColsItemObject);
}
auto serDeInfoNode = sdNode["SerDeInfo"];
if(!serDeInfoNode["Name"].isNull())
tablesObject.sd.serDeInfo.name = serDeInfoNode["Name"].asString();
if(!serDeInfoNode["Parameters"].isNull())
tablesObject.sd.serDeInfo.parameters = serDeInfoNode["Parameters"].asString();
if(!serDeInfoNode["SerializationLib"].isNull())
tablesObject.sd.serDeInfo.serializationLib = serDeInfoNode["SerializationLib"].asString();
auto skewedInfoNode = sdNode["SkewedInfo"];
if(!skewedInfoNode["SkewedColValueLocationMaps"].isNull())
tablesObject.sd.skewedInfo.skewedColValueLocationMaps = skewedInfoNode["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames = skewedInfoNode["SkewedColNames"]["null"];
for (auto value : allSkewedColNames)
tablesObject.sd.skewedInfo.skewedColNames.push_back(value.asString());
auto allSkewedColValues = skewedInfoNode["SkewedColValues"]["null"];
for (auto value : allSkewedColValues)
tablesObject.sd.skewedInfo.skewedColValues.push_back(value.asString());
auto allBucketCols = sdNode["BucketCols"]["null"];
for (auto value : allBucketCols)
tablesObject.sd.bucketCols.push_back(value.asString());
auto tableVersionNode = value["TableVersion"];
if(!tableVersionNode["Table"].isNull())
tablesObject.tableVersion.table = tableVersionNode["Table"].asString();
if(!tableVersionNode["VersionId"].isNull())
tablesObject.tableVersion.versionId = std::stoi(tableVersionNode["VersionId"].asString());
tables_.push_back(tablesObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchGetTablesResult::getMessage()const
{
return message_;
}
std::vector<BatchGetTablesResult::TableErrorsItem> BatchGetTablesResult::getTableErrors()const
{
return tableErrors_;
}
std::vector<BatchGetTablesResult::TablesItem> BatchGetTablesResult::getTables()const
{
return tables_;
}
std::string BatchGetTablesResult::getCode()const
{
return code_;
}
bool BatchGetTablesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchGrantPermissionsRequest.h>
using AlibabaCloud::DataLake::Model::BatchGrantPermissionsRequest;
BatchGrantPermissionsRequest::BatchGrantPermissionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/auth/permissions/batchgrant"};
setMethod(HttpRequest::Method::Post);
}
BatchGrantPermissionsRequest::~BatchGrantPermissionsRequest() {}
std::string BatchGrantPermissionsRequest::getBody() const {
return body_;
}
void BatchGrantPermissionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,122 @@
/*
* 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/datalake/model/BatchGrantPermissionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchGrantPermissionsResult::BatchGrantPermissionsResult() :
ServiceResult()
{}
BatchGrantPermissionsResult::BatchGrantPermissionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchGrantPermissionsResult::~BatchGrantPermissionsResult()
{}
void BatchGrantPermissionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allBatchGrantRevokeFailureResultNode = value["BatchGrantRevokeFailureResult"]["BatchGrantRevokeFailureResultItem"];
for (auto valueBatchGrantRevokeFailureResultBatchGrantRevokeFailureResultItem : allBatchGrantRevokeFailureResultNode)
{
BatchGrantRevokeFailureResultItem batchGrantRevokeFailureResultObject;
auto grantRevokeEntryNode = value["GrantRevokeEntry"];
if(!grantRevokeEntryNode["Id"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.id = grantRevokeEntryNode["Id"].asString();
auto metaResourceNode = grantRevokeEntryNode["MetaResource"];
if(!metaResourceNode["ResourceType"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.resourceType = metaResourceNode["ResourceType"].asString();
auto catalogResourceNode = metaResourceNode["CatalogResource"];
if(!catalogResourceNode["CatalogId"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.catalogResource.catalogId = catalogResourceNode["CatalogId"].asString();
auto databaseResourceNode = metaResourceNode["DatabaseResource"];
if(!databaseResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.databaseResource.databaseName = databaseResourceNode["DatabaseName"].asString();
if(!databaseResourceNode["DatabaseWildcard"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.databaseResource.databaseWildcard = databaseResourceNode["DatabaseWildcard"].asString();
auto tableResourceNode = metaResourceNode["TableResource"];
if(!tableResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.tableResource.databaseName = tableResourceNode["DatabaseName"].asString();
if(!tableResourceNode["TableName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.tableResource.tableName = tableResourceNode["TableName"].asString();
auto functionResourceNode = metaResourceNode["FunctionResource"];
if(!functionResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.functionResource.databaseName = functionResourceNode["DatabaseName"].asString();
if(!functionResourceNode["FunctionName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.functionResource.functionName = functionResourceNode["FunctionName"].asString();
auto columnResourceNode = metaResourceNode["ColumnResource"];
if(!columnResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.columnResource.databaseName = columnResourceNode["DatabaseName"].asString();
if(!columnResourceNode["TableName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.columnResource.tableName = columnResourceNode["TableName"].asString();
auto allColumnNames = columnResourceNode["ColumnNames"]["ColumnName"];
for (auto value : allColumnNames)
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.columnResource.columnNames.push_back(value.asString());
auto principalNode = grantRevokeEntryNode["Principal"];
if(!principalNode["PrincipalArn"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.principal.principalArn = principalNode["PrincipalArn"].asString();
auto allAccesses = grantRevokeEntryNode["Accesses"]["null"];
for (auto value : allAccesses)
batchGrantRevokeFailureResultObject.grantRevokeEntry.accesses.push_back(value.asString());
auto allDelegateAccesses = grantRevokeEntryNode["DelegateAccesses"]["null"];
for (auto value : allDelegateAccesses)
batchGrantRevokeFailureResultObject.grantRevokeEntry.delegateAccesses.push_back(value.asString());
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
batchGrantRevokeFailureResultObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
batchGrantRevokeFailureResultObject.errorDetail.message = errorDetailNode["Message"].asString();
batchGrantRevokeFailureResult_.push_back(batchGrantRevokeFailureResultObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchGrantPermissionsResult::getMessage()const
{
return message_;
}
std::vector<BatchGrantPermissionsResult::BatchGrantRevokeFailureResultItem> BatchGrantPermissionsResult::getBatchGrantRevokeFailureResult()const
{
return batchGrantRevokeFailureResult_;
}
std::string BatchGrantPermissionsResult::getCode()const
{
return code_;
}
bool BatchGrantPermissionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchRevokePermissionsRequest.h>
using AlibabaCloud::DataLake::Model::BatchRevokePermissionsRequest;
BatchRevokePermissionsRequest::BatchRevokePermissionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/auth/permissions/batchrevoke"};
setMethod(HttpRequest::Method::Post);
}
BatchRevokePermissionsRequest::~BatchRevokePermissionsRequest() {}
std::string BatchRevokePermissionsRequest::getBody() const {
return body_;
}
void BatchRevokePermissionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,122 @@
/*
* 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/datalake/model/BatchRevokePermissionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchRevokePermissionsResult::BatchRevokePermissionsResult() :
ServiceResult()
{}
BatchRevokePermissionsResult::BatchRevokePermissionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchRevokePermissionsResult::~BatchRevokePermissionsResult()
{}
void BatchRevokePermissionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allBatchGrantRevokeFailureResultNode = value["BatchGrantRevokeFailureResult"]["BatchGrantRevokeFailureResultItem"];
for (auto valueBatchGrantRevokeFailureResultBatchGrantRevokeFailureResultItem : allBatchGrantRevokeFailureResultNode)
{
BatchGrantRevokeFailureResultItem batchGrantRevokeFailureResultObject;
auto grantRevokeEntryNode = value["GrantRevokeEntry"];
if(!grantRevokeEntryNode["Id"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.id = grantRevokeEntryNode["Id"].asString();
auto metaResourceNode = grantRevokeEntryNode["MetaResource"];
if(!metaResourceNode["ResourceType"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.resourceType = metaResourceNode["ResourceType"].asString();
auto catalogResourceNode = metaResourceNode["CatalogResource"];
if(!catalogResourceNode["CatalogId"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.catalogResource.catalogId = catalogResourceNode["CatalogId"].asString();
auto databaseResourceNode = metaResourceNode["DatabaseResource"];
if(!databaseResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.databaseResource.databaseName = databaseResourceNode["DatabaseName"].asString();
if(!databaseResourceNode["DatabaseWildcard"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.databaseResource.databaseWildcard = databaseResourceNode["DatabaseWildcard"].asString();
auto tableResourceNode = metaResourceNode["TableResource"];
if(!tableResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.tableResource.databaseName = tableResourceNode["DatabaseName"].asString();
if(!tableResourceNode["TableName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.tableResource.tableName = tableResourceNode["TableName"].asString();
auto functionResourceNode = metaResourceNode["FunctionResource"];
if(!functionResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.functionResource.databaseName = functionResourceNode["DatabaseName"].asString();
if(!functionResourceNode["FunctionName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.functionResource.functionName = functionResourceNode["FunctionName"].asString();
auto columnResourceNode = metaResourceNode["ColumnResource"];
if(!columnResourceNode["DatabaseName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.columnResource.databaseName = columnResourceNode["DatabaseName"].asString();
if(!columnResourceNode["TableName"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.columnResource.tableName = columnResourceNode["TableName"].asString();
auto allColumnNames = columnResourceNode["ColumnNames"]["ColumnName"];
for (auto value : allColumnNames)
batchGrantRevokeFailureResultObject.grantRevokeEntry.metaResource.columnResource.columnNames.push_back(value.asString());
auto principalNode = grantRevokeEntryNode["Principal"];
if(!principalNode["PrincipalArn"].isNull())
batchGrantRevokeFailureResultObject.grantRevokeEntry.principal.principalArn = principalNode["PrincipalArn"].asString();
auto allAccesses = grantRevokeEntryNode["Accesses"]["null"];
for (auto value : allAccesses)
batchGrantRevokeFailureResultObject.grantRevokeEntry.accesses.push_back(value.asString());
auto allDelegateAccesses = grantRevokeEntryNode["DelegateAccesses"]["null"];
for (auto value : allDelegateAccesses)
batchGrantRevokeFailureResultObject.grantRevokeEntry.delegateAccesses.push_back(value.asString());
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
batchGrantRevokeFailureResultObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
batchGrantRevokeFailureResultObject.errorDetail.message = errorDetailNode["Message"].asString();
batchGrantRevokeFailureResult_.push_back(batchGrantRevokeFailureResultObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchRevokePermissionsResult::getMessage()const
{
return message_;
}
std::vector<BatchRevokePermissionsResult::BatchGrantRevokeFailureResultItem> BatchRevokePermissionsResult::getBatchGrantRevokeFailureResult()const
{
return batchGrantRevokeFailureResult_;
}
std::string BatchRevokePermissionsResult::getCode()const
{
return code_;
}
bool BatchRevokePermissionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchUpdatePartitionsRequest.h>
using AlibabaCloud::DataLake::Model::BatchUpdatePartitionsRequest;
BatchUpdatePartitionsRequest::BatchUpdatePartitionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/batchupdate"};
setMethod(HttpRequest::Method::Put);
}
BatchUpdatePartitionsRequest::~BatchUpdatePartitionsRequest() {}
std::string BatchUpdatePartitionsRequest::getBody() const {
return body_;
}
void BatchUpdatePartitionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,84 @@
/*
* 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/datalake/model/BatchUpdatePartitionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchUpdatePartitionsResult::BatchUpdatePartitionsResult() :
ServiceResult()
{}
BatchUpdatePartitionsResult::BatchUpdatePartitionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchUpdatePartitionsResult::~BatchUpdatePartitionsResult()
{}
void BatchUpdatePartitionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPartitionErrorsNode = value["PartitionErrors"]["PartitionErrorsItem"];
for (auto valuePartitionErrorsPartitionErrorsItem : allPartitionErrorsNode)
{
PartitionErrorsItem partitionErrorsObject;
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
partitionErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
partitionErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
auto allPartitionValues = value["PartitionValues"]["null"];
for (auto value : allPartitionValues)
partitionErrorsObject.partitionValues.push_back(value.asString());
partitionErrors_.push_back(partitionErrorsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchUpdatePartitionsResult::getMessage()const
{
return message_;
}
std::vector<BatchUpdatePartitionsResult::PartitionErrorsItem> BatchUpdatePartitionsResult::getPartitionErrors()const
{
return partitionErrors_;
}
std::string BatchUpdatePartitionsResult::getCode()const
{
return code_;
}
bool BatchUpdatePartitionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/BatchUpdateTablesRequest.h>
using AlibabaCloud::DataLake::Model::BatchUpdateTablesRequest;
BatchUpdateTablesRequest::BatchUpdateTablesRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/batchupdate"};
setMethod(HttpRequest::Method::Post);
}
BatchUpdateTablesRequest::~BatchUpdateTablesRequest() {}
std::string BatchUpdateTablesRequest::getBody() const {
return body_;
}
void BatchUpdateTablesRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,90 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/BatchUpdateTablesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
BatchUpdateTablesResult::BatchUpdateTablesResult() :
ServiceResult()
{}
BatchUpdateTablesResult::BatchUpdateTablesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchUpdateTablesResult::~BatchUpdateTablesResult()
{}
void BatchUpdateTablesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTableErrorsNode = value["TableErrors"]["TableError"];
for (auto valueTableErrorsTableError : allTableErrorsNode)
{
TableError tableErrorsObject;
if(!valueTableErrorsTableError["TableName"].isNull())
tableErrorsObject.tableName = valueTableErrorsTableError["TableName"].asString();
auto errorDetailNode = value["ErrorDetail"];
if(!errorDetailNode["Code"].isNull())
tableErrorsObject.errorDetail.code = errorDetailNode["Code"].asString();
if(!errorDetailNode["Message"].isNull())
tableErrorsObject.errorDetail.message = errorDetailNode["Message"].asString();
tableErrors_.push_back(tableErrorsObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["TaskId"].isNull())
taskId_ = value["TaskId"].asString();
}
std::string BatchUpdateTablesResult::getTaskId()const
{
return taskId_;
}
std::string BatchUpdateTablesResult::getMessage()const
{
return message_;
}
std::vector<BatchUpdateTablesResult::TableError> BatchUpdateTablesResult::getTableErrors()const
{
return tableErrors_;
}
std::string BatchUpdateTablesResult::getCode()const
{
return code_;
}
bool BatchUpdateTablesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CancelQueryRequest.h>
using AlibabaCloud::DataLake::Model::CancelQueryRequest;
CancelQueryRequest::CancelQueryRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/webapi/query/cancelQuery"};
setMethod(HttpRequest::Method::Post);
}
CancelQueryRequest::~CancelQueryRequest() {}
std::string CancelQueryRequest::getQueryId() const {
return queryId_;
}
void CancelQueryRequest::setQueryId(const std::string &queryId) {
queryId_ = queryId;
setParameter(std::string("QueryId"), queryId);
}

View 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/datalake/model/CancelQueryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CancelQueryResult::CancelQueryResult() :
ServiceResult()
{}
CancelQueryResult::CancelQueryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CancelQueryResult::~CancelQueryResult()
{}
void CancelQueryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CancelQueryResult::getData()const
{
return data_;
}
bool CancelQueryResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CheckPermissionsRequest.h>
using AlibabaCloud::DataLake::Model::CheckPermissionsRequest;
CheckPermissionsRequest::CheckPermissionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/auth/permissions/check"};
setMethod(HttpRequest::Method::Post);
}
CheckPermissionsRequest::~CheckPermissionsRequest() {}
std::string CheckPermissionsRequest::getBody() const {
return body_;
}
void CheckPermissionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

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/datalake/model/CheckPermissionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CheckPermissionsResult::CheckPermissionsResult() :
ServiceResult()
{}
CheckPermissionsResult::CheckPermissionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CheckPermissionsResult::~CheckPermissionsResult()
{}
void CheckPermissionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CheckPermissionsResult::getMessage()const
{
return message_;
}
std::string CheckPermissionsResult::getCode()const
{
return code_;
}
bool CheckPermissionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CreateCatalogRequest.h>
using AlibabaCloud::DataLake::Model::CreateCatalogRequest;
CreateCatalogRequest::CreateCatalogRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs"};
setMethod(HttpRequest::Method::Post);
}
CreateCatalogRequest::~CreateCatalogRequest() {}
std::string CreateCatalogRequest::getBody() const {
return body_;
}
void CreateCatalogRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

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/datalake/model/CreateCatalogResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CreateCatalogResult::CreateCatalogResult() :
ServiceResult()
{}
CreateCatalogResult::CreateCatalogResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateCatalogResult::~CreateCatalogResult()
{}
void CreateCatalogResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateCatalogResult::getMessage()const
{
return message_;
}
std::string CreateCatalogResult::getCode()const
{
return code_;
}
bool CreateCatalogResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CreateDatabaseRequest.h>
using AlibabaCloud::DataLake::Model::CreateDatabaseRequest;
CreateDatabaseRequest::CreateDatabaseRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases"};
setMethod(HttpRequest::Method::Post);
}
CreateDatabaseRequest::~CreateDatabaseRequest() {}
std::string CreateDatabaseRequest::getBody() const {
return body_;
}
void CreateDatabaseRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

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/datalake/model/CreateDatabaseResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CreateDatabaseResult::CreateDatabaseResult() :
ServiceResult()
{}
CreateDatabaseResult::CreateDatabaseResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateDatabaseResult::~CreateDatabaseResult()
{}
void CreateDatabaseResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateDatabaseResult::getMessage()const
{
return message_;
}
std::string CreateDatabaseResult::getCode()const
{
return code_;
}
bool CreateDatabaseResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CreateFunctionRequest.h>
using AlibabaCloud::DataLake::Model::CreateFunctionRequest;
CreateFunctionRequest::CreateFunctionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/functions"};
setMethod(HttpRequest::Method::Post);
}
CreateFunctionRequest::~CreateFunctionRequest() {}
std::string CreateFunctionRequest::getBody() const {
return body_;
}
void CreateFunctionRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

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/datalake/model/CreateFunctionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CreateFunctionResult::CreateFunctionResult() :
ServiceResult()
{}
CreateFunctionResult::CreateFunctionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateFunctionResult::~CreateFunctionResult()
{}
void CreateFunctionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateFunctionResult::getMessage()const
{
return message_;
}
std::string CreateFunctionResult::getCode()const
{
return code_;
}
bool CreateFunctionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,36 @@
/*
* 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/datalake/model/CreateLockRequest.h>
using AlibabaCloud::DataLake::Model::CreateLockRequest;
CreateLockRequest::CreateLockRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/locks"};
setMethod(HttpRequest::Method::Post);
}
CreateLockRequest::~CreateLockRequest() {}
CreateLockRequest::Body CreateLockRequest::getBody() const {
return body_;
}
void CreateLockRequest::setBody(const CreateLockRequest::Body &body) {
body_ = body;
}

View File

@@ -0,0 +1,75 @@
/*
* 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/datalake/model/CreateLockResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CreateLockResult::CreateLockResult() :
ServiceResult()
{}
CreateLockResult::CreateLockResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateLockResult::~CreateLockResult()
{}
void CreateLockResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto lockStatusNode = value["LockStatus"];
if(!lockStatusNode["LockId"].isNull())
lockStatus_.lockId = std::stol(lockStatusNode["LockId"].asString());
if(!lockStatusNode["LockState"].isNull())
lockStatus_.lockState = lockStatusNode["LockState"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateLockResult::getMessage()const
{
return message_;
}
CreateLockResult::LockStatus CreateLockResult::getLockStatus()const
{
return lockStatus_;
}
std::string CreateLockResult::getCode()const
{
return code_;
}
bool CreateLockResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CreatePartitionRequest.h>
using AlibabaCloud::DataLake::Model::CreatePartitionRequest;
CreatePartitionRequest::CreatePartitionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions"};
setMethod(HttpRequest::Method::Post);
}
CreatePartitionRequest::~CreatePartitionRequest() {}
std::string CreatePartitionRequest::getBody() const {
return body_;
}
void CreatePartitionRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,151 @@
/*
* 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/datalake/model/CreatePartitionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CreatePartitionResult::CreatePartitionResult() :
ServiceResult()
{}
CreatePartitionResult::CreatePartitionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreatePartitionResult::~CreatePartitionResult()
{}
void CreatePartitionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto partitionNode = value["Partition"];
if(!partitionNode["CreateTime"].isNull())
partition_.createTime = std::stoi(partitionNode["CreateTime"].asString());
if(!partitionNode["DatabaseName"].isNull())
partition_.databaseName = partitionNode["DatabaseName"].asString();
if(!partitionNode["LastAccessTime"].isNull())
partition_.lastAccessTime = std::stoi(partitionNode["LastAccessTime"].asString());
if(!partitionNode["LastAnalyzedTime"].isNull())
partition_.lastAnalyzedTime = std::stoi(partitionNode["LastAnalyzedTime"].asString());
if(!partitionNode["Parameters"].isNull())
partition_.parameters = partitionNode["Parameters"].asString();
if(!partitionNode["TableName"].isNull())
partition_.tableName = partitionNode["TableName"].asString();
auto privilegesNode = partitionNode["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
partition_.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
partition_.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
partition_.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
auto sdNode = partitionNode["Sd"];
if(!sdNode["Compressed"].isNull())
partition_.sd.compressed = sdNode["Compressed"].asString() == "true";
if(!sdNode["InputFormat"].isNull())
partition_.sd.inputFormat = sdNode["InputFormat"].asString();
if(!sdNode["Location"].isNull())
partition_.sd.location = sdNode["Location"].asString();
if(!sdNode["NumBuckets"].isNull())
partition_.sd.numBuckets = std::stoi(sdNode["NumBuckets"].asString());
if(!sdNode["OutputFormat"].isNull())
partition_.sd.outputFormat = sdNode["OutputFormat"].asString();
if(!sdNode["Parameters"].isNull())
partition_.sd.parameters = sdNode["Parameters"].asString();
if(!sdNode["StoredAsSubDirectories"].isNull())
partition_.sd.storedAsSubDirectories = sdNode["StoredAsSubDirectories"].asString() == "true";
auto allColsNode = sdNode["Cols"]["ColsItem"];
for (auto sdNodeColsColsItem : allColsNode)
{
Partition::Sd::ColsItem colsItemObject;
if(!sdNodeColsColsItem["Comment"].isNull())
colsItemObject.comment = sdNodeColsColsItem["Comment"].asString();
if(!sdNodeColsColsItem["Name"].isNull())
colsItemObject.name = sdNodeColsColsItem["Name"].asString();
if(!sdNodeColsColsItem["Parameters"].isNull())
colsItemObject.parameters = sdNodeColsColsItem["Parameters"].asString();
if(!sdNodeColsColsItem["Type"].isNull())
colsItemObject.type = sdNodeColsColsItem["Type"].asString();
partition_.sd.cols.push_back(colsItemObject);
}
auto allSortColsNode = sdNode["SortCols"]["SortColsItem"];
for (auto sdNodeSortColsSortColsItem : allSortColsNode)
{
Partition::Sd::SortColsItem sortColsItemObject;
if(!sdNodeSortColsSortColsItem["Col"].isNull())
sortColsItemObject.col = sdNodeSortColsSortColsItem["Col"].asString();
if(!sdNodeSortColsSortColsItem["Order"].isNull())
sortColsItemObject.order = std::stoi(sdNodeSortColsSortColsItem["Order"].asString());
partition_.sd.sortCols.push_back(sortColsItemObject);
}
auto serDeInfoNode = sdNode["SerDeInfo"];
if(!serDeInfoNode["Name"].isNull())
partition_.sd.serDeInfo.name = serDeInfoNode["Name"].asString();
if(!serDeInfoNode["Parameters"].isNull())
partition_.sd.serDeInfo.parameters = serDeInfoNode["Parameters"].asString();
if(!serDeInfoNode["SerializationLib"].isNull())
partition_.sd.serDeInfo.serializationLib = serDeInfoNode["SerializationLib"].asString();
auto skewedInfoNode = sdNode["SkewedInfo"];
if(!skewedInfoNode["SkewedColValueLocationMaps"].isNull())
partition_.sd.skewedInfo.skewedColValueLocationMaps = skewedInfoNode["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames = skewedInfoNode["SkewedColNames"]["null"];
for (auto value : allSkewedColNames)
partition_.sd.skewedInfo.skewedColNames.push_back(value.asString());
auto allSkewedColValues = skewedInfoNode["SkewedColValues"]["null"];
for (auto value : allSkewedColValues)
partition_.sd.skewedInfo.skewedColValues.push_back(value.asString());
auto allBucketCols = sdNode["BucketCols"]["null"];
for (auto value : allBucketCols)
partition_.sd.bucketCols.push_back(value.asString());
auto allValues = partitionNode["Values"]["null"];
for (auto value : allValues)
partition_.values.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
CreatePartitionResult::Partition CreatePartitionResult::getPartition()const
{
return partition_;
}
std::string CreatePartitionResult::getMessage()const
{
return message_;
}
std::string CreatePartitionResult::getCode()const
{
return code_;
}
bool CreatePartitionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CreateRoleRequest.h>
using AlibabaCloud::DataLake::Model::CreateRoleRequest;
CreateRoleRequest::CreateRoleRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/auth/roles"};
setMethod(HttpRequest::Method::Post);
}
CreateRoleRequest::~CreateRoleRequest() {}
std::string CreateRoleRequest::getBody() const {
return body_;
}
void CreateRoleRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("body"), body);
}

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/datalake/model/CreateRoleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CreateRoleResult::CreateRoleResult() :
ServiceResult()
{}
CreateRoleResult::CreateRoleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateRoleResult::~CreateRoleResult()
{}
void CreateRoleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateRoleResult::getMessage()const
{
return message_;
}
std::string CreateRoleResult::getCode()const
{
return code_;
}
bool CreateRoleResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/CreateTableRequest.h>
using AlibabaCloud::DataLake::Model::CreateTableRequest;
CreateTableRequest::CreateTableRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables"};
setMethod(HttpRequest::Method::Post);
}
CreateTableRequest::~CreateTableRequest() {}
std::string CreateTableRequest::getBody() const {
return body_;
}
void CreateTableRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

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/datalake/model/CreateTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
CreateTableResult::CreateTableResult() :
ServiceResult()
{}
CreateTableResult::CreateTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateTableResult::~CreateTableResult()
{}
void CreateTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateTableResult::getMessage()const
{
return message_;
}
std::string CreateTableResult::getCode()const
{
return code_;
}
bool CreateTableResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,46 @@
/*
* 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/datalake/model/DeleteCatalogRequest.h>
using AlibabaCloud::DataLake::Model::DeleteCatalogRequest;
DeleteCatalogRequest::DeleteCatalogRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs"};
setMethod(HttpRequest::Method::Delete);
}
DeleteCatalogRequest::~DeleteCatalogRequest() {}
std::string DeleteCatalogRequest::getCatalogId() const {
return catalogId_;
}
void DeleteCatalogRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
bool DeleteCatalogRequest::getIsAsync() const {
return isAsync_;
}
void DeleteCatalogRequest::setIsAsync(bool isAsync) {
isAsync_ = isAsync;
setParameter(std::string("IsAsync"), isAsync ? "true" : "false");
}

View File

@@ -0,0 +1,72 @@
/*
* 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/datalake/model/DeleteCatalogResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeleteCatalogResult::DeleteCatalogResult() :
ServiceResult()
{}
DeleteCatalogResult::DeleteCatalogResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteCatalogResult::~DeleteCatalogResult()
{}
void DeleteCatalogResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["TaskId"].isNull())
taskId_ = value["TaskId"].asString();
}
std::string DeleteCatalogResult::getTaskId()const
{
return taskId_;
}
std::string DeleteCatalogResult::getMessage()const
{
return message_;
}
std::string DeleteCatalogResult::getCode()const
{
return code_;
}
bool DeleteCatalogResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/DeleteDatabaseRequest.h>
using AlibabaCloud::DataLake::Model::DeleteDatabaseRequest;
DeleteDatabaseRequest::DeleteDatabaseRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases"};
setMethod(HttpRequest::Method::Delete);
}
DeleteDatabaseRequest::~DeleteDatabaseRequest() {}
std::string DeleteDatabaseRequest::getCatalogId() const {
return catalogId_;
}
void DeleteDatabaseRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
bool DeleteDatabaseRequest::getCascade() const {
return cascade_;
}
void DeleteDatabaseRequest::setCascade(bool cascade) {
cascade_ = cascade;
setParameter(std::string("Cascade"), cascade ? "true" : "false");
}
std::string DeleteDatabaseRequest::getName() const {
return name_;
}
void DeleteDatabaseRequest::setName(const std::string &name) {
name_ = name;
setParameter(std::string("Name"), name);
}

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/datalake/model/DeleteDatabaseResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeleteDatabaseResult::DeleteDatabaseResult() :
ServiceResult()
{}
DeleteDatabaseResult::DeleteDatabaseResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteDatabaseResult::~DeleteDatabaseResult()
{}
void DeleteDatabaseResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteDatabaseResult::getMessage()const
{
return message_;
}
std::string DeleteDatabaseResult::getCode()const
{
return code_;
}
bool DeleteDatabaseResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/DeleteFunctionRequest.h>
using AlibabaCloud::DataLake::Model::DeleteFunctionRequest;
DeleteFunctionRequest::DeleteFunctionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/functions"};
setMethod(HttpRequest::Method::Delete);
}
DeleteFunctionRequest::~DeleteFunctionRequest() {}
std::string DeleteFunctionRequest::getCatalogId() const {
return catalogId_;
}
void DeleteFunctionRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string DeleteFunctionRequest::getFunctionName() const {
return functionName_;
}
void DeleteFunctionRequest::setFunctionName(const std::string &functionName) {
functionName_ = functionName;
setParameter(std::string("FunctionName"), functionName);
}
std::string DeleteFunctionRequest::getDatabaseName() const {
return databaseName_;
}
void DeleteFunctionRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}

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/datalake/model/DeleteFunctionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeleteFunctionResult::DeleteFunctionResult() :
ServiceResult()
{}
DeleteFunctionResult::DeleteFunctionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteFunctionResult::~DeleteFunctionResult()
{}
void DeleteFunctionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteFunctionResult::getMessage()const
{
return message_;
}
std::string DeleteFunctionResult::getCode()const
{
return code_;
}
bool DeleteFunctionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/DeletePartitionColumnStatisticsRequest.h>
using AlibabaCloud::DataLake::Model::DeletePartitionColumnStatisticsRequest;
DeletePartitionColumnStatisticsRequest::DeletePartitionColumnStatisticsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/columnstatistics"};
setMethod(HttpRequest::Method::Delete);
}
DeletePartitionColumnStatisticsRequest::~DeletePartitionColumnStatisticsRequest() {}
std::string DeletePartitionColumnStatisticsRequest::getCatalogId() const {
return catalogId_;
}
void DeletePartitionColumnStatisticsRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string DeletePartitionColumnStatisticsRequest::getDatabaseName() const {
return databaseName_;
}
void DeletePartitionColumnStatisticsRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string DeletePartitionColumnStatisticsRequest::getTableName() const {
return tableName_;
}
void DeletePartitionColumnStatisticsRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

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/datalake/model/DeletePartitionColumnStatisticsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeletePartitionColumnStatisticsResult::DeletePartitionColumnStatisticsResult() :
ServiceResult()
{}
DeletePartitionColumnStatisticsResult::DeletePartitionColumnStatisticsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeletePartitionColumnStatisticsResult::~DeletePartitionColumnStatisticsResult()
{}
void DeletePartitionColumnStatisticsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeletePartitionColumnStatisticsResult::getMessage()const
{
return message_;
}
std::string DeletePartitionColumnStatisticsResult::getCode()const
{
return code_;
}
bool DeletePartitionColumnStatisticsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/DeletePartitionRequest.h>
using AlibabaCloud::DataLake::Model::DeletePartitionRequest;
DeletePartitionRequest::DeletePartitionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/delete"};
setMethod(HttpRequest::Method::Post);
}
DeletePartitionRequest::~DeletePartitionRequest() {}
std::string DeletePartitionRequest::getBody() const {
return body_;
}
void DeletePartitionRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

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/datalake/model/DeletePartitionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeletePartitionResult::DeletePartitionResult() :
ServiceResult()
{}
DeletePartitionResult::DeletePartitionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeletePartitionResult::~DeletePartitionResult()
{}
void DeletePartitionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeletePartitionResult::getMessage()const
{
return message_;
}
std::string DeletePartitionResult::getCode()const
{
return code_;
}
bool DeletePartitionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/DeleteRoleRequest.h>
using AlibabaCloud::DataLake::Model::DeleteRoleRequest;
DeleteRoleRequest::DeleteRoleRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/auth/roles"};
setMethod(HttpRequest::Method::Delete);
}
DeleteRoleRequest::~DeleteRoleRequest() {}
std::string DeleteRoleRequest::getRoleName() const {
return roleName_;
}
void DeleteRoleRequest::setRoleName(const std::string &roleName) {
roleName_ = roleName;
setParameter(std::string("RoleName"), roleName);
}

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/datalake/model/DeleteRoleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeleteRoleResult::DeleteRoleResult() :
ServiceResult()
{}
DeleteRoleResult::DeleteRoleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteRoleResult::~DeleteRoleResult()
{}
void DeleteRoleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteRoleResult::getMessage()const
{
return message_;
}
std::string DeleteRoleResult::getCode()const
{
return code_;
}
bool DeleteRoleResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/DeleteTableColumnStatisticsRequest.h>
using AlibabaCloud::DataLake::Model::DeleteTableColumnStatisticsRequest;
DeleteTableColumnStatisticsRequest::DeleteTableColumnStatisticsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/columnstatistics"};
setMethod(HttpRequest::Method::Delete);
}
DeleteTableColumnStatisticsRequest::~DeleteTableColumnStatisticsRequest() {}
std::string DeleteTableColumnStatisticsRequest::getCatalogId() const {
return catalogId_;
}
void DeleteTableColumnStatisticsRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string DeleteTableColumnStatisticsRequest::getDatabaseName() const {
return databaseName_;
}
void DeleteTableColumnStatisticsRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string DeleteTableColumnStatisticsRequest::getTableName() const {
return tableName_;
}
void DeleteTableColumnStatisticsRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

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/datalake/model/DeleteTableColumnStatisticsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeleteTableColumnStatisticsResult::DeleteTableColumnStatisticsResult() :
ServiceResult()
{}
DeleteTableColumnStatisticsResult::DeleteTableColumnStatisticsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteTableColumnStatisticsResult::~DeleteTableColumnStatisticsResult()
{}
void DeleteTableColumnStatisticsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteTableColumnStatisticsResult::getMessage()const
{
return message_;
}
std::string DeleteTableColumnStatisticsResult::getCode()const
{
return code_;
}
bool DeleteTableColumnStatisticsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/DeleteTableRequest.h>
using AlibabaCloud::DataLake::Model::DeleteTableRequest;
DeleteTableRequest::DeleteTableRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables"};
setMethod(HttpRequest::Method::Delete);
}
DeleteTableRequest::~DeleteTableRequest() {}
std::string DeleteTableRequest::getCatalogId() const {
return catalogId_;
}
void DeleteTableRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string DeleteTableRequest::getDatabaseName() const {
return databaseName_;
}
void DeleteTableRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string DeleteTableRequest::getTableName() const {
return tableName_;
}
void DeleteTableRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

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/datalake/model/DeleteTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeleteTableResult::DeleteTableResult() :
ServiceResult()
{}
DeleteTableResult::DeleteTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteTableResult::~DeleteTableResult()
{}
void DeleteTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteTableResult::getMessage()const
{
return message_;
}
std::string DeleteTableResult::getCode()const
{
return code_;
}
bool DeleteTableResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,64 @@
/*
* 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/datalake/model/DeleteTableVersionRequest.h>
using AlibabaCloud::DataLake::Model::DeleteTableVersionRequest;
DeleteTableVersionRequest::DeleteTableVersionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/versions"};
setMethod(HttpRequest::Method::Delete);
}
DeleteTableVersionRequest::~DeleteTableVersionRequest() {}
int DeleteTableVersionRequest::getVersionId() const {
return versionId_;
}
void DeleteTableVersionRequest::setVersionId(int versionId) {
versionId_ = versionId;
setParameter(std::string("VersionId"), std::to_string(versionId));
}
std::string DeleteTableVersionRequest::getCatalogId() const {
return catalogId_;
}
void DeleteTableVersionRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string DeleteTableVersionRequest::getDatabaseName() const {
return databaseName_;
}
void DeleteTableVersionRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string DeleteTableVersionRequest::getTableName() const {
return tableName_;
}
void DeleteTableVersionRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

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/datalake/model/DeleteTableVersionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeleteTableVersionResult::DeleteTableVersionResult() :
ServiceResult()
{}
DeleteTableVersionResult::DeleteTableVersionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteTableVersionResult::~DeleteTableVersionResult()
{}
void DeleteTableVersionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteTableVersionResult::getMessage()const
{
return message_;
}
std::string DeleteTableVersionResult::getCode()const
{
return code_;
}
bool DeleteTableVersionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/DeregisterLocationRequest.h>
using AlibabaCloud::DataLake::Model::DeregisterLocationRequest;
DeregisterLocationRequest::DeregisterLocationRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/webapi/locations"};
setMethod(HttpRequest::Method::Delete);
}
DeregisterLocationRequest::~DeregisterLocationRequest() {}
std::string DeregisterLocationRequest::getLocationId() const {
return locationId_;
}
void DeregisterLocationRequest::setLocationId(const std::string &locationId) {
locationId_ = locationId;
setParameter(std::string("LocationId"), locationId);
}

View File

@@ -0,0 +1,77 @@
/*
* 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/datalake/model/DeregisterLocationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DeregisterLocationResult::DeregisterLocationResult() :
ServiceResult()
{}
DeregisterLocationResult::DeregisterLocationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeregisterLocationResult::~DeregisterLocationResult()
{}
void DeregisterLocationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["LocationId"].isNull())
data_.locationId = dataNode["LocationId"].asString();
auto allStorageCollectTaskOperationResultListNode = dataNode["StorageCollectTaskOperationResultList"]["StorageCollectTaskOperationResultListItem"];
for (auto dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem : allStorageCollectTaskOperationResultListNode)
{
Data::StorageCollectTaskOperationResultListItem storageCollectTaskOperationResultListItemObject;
if(!dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["Success"].isNull())
storageCollectTaskOperationResultListItemObject.success = dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["Success"].asString() == "true";
if(!dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["TaskId"].isNull())
storageCollectTaskOperationResultListItemObject.taskId = dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["TaskId"].asString();
if(!dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["TaskType"].isNull())
storageCollectTaskOperationResultListItemObject.taskType = dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["TaskType"].asString();
if(!dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["DlfCreated"].isNull())
storageCollectTaskOperationResultListItemObject.dlfCreated = dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["DlfCreated"].asString() == "true";
if(!dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["ErrCode"].isNull())
storageCollectTaskOperationResultListItemObject.errCode = dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["ErrCode"].asString();
if(!dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["ErrMessage"].isNull())
storageCollectTaskOperationResultListItemObject.errMessage = dataNodeStorageCollectTaskOperationResultListStorageCollectTaskOperationResultListItem["ErrMessage"].asString();
data_.storageCollectTaskOperationResultList.push_back(storageCollectTaskOperationResultListItemObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
DeregisterLocationResult::Data DeregisterLocationResult::getData()const
{
return data_;
}
bool DeregisterLocationResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,28 @@
/*
* 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/datalake/model/DescribeRegionsRequest.h>
using AlibabaCloud::DataLake::Model::DescribeRegionsRequest;
DescribeRegionsRequest::DescribeRegionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/webapi/service/describeRegions"};
setMethod(HttpRequest::Method::Get);
}
DescribeRegionsRequest::~DescribeRegionsRequest() {}

View File

@@ -0,0 +1,70 @@
/*
* 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/datalake/model/DescribeRegionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
DescribeRegionsResult::DescribeRegionsResult() :
ServiceResult()
{}
DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeRegionsResult::~DescribeRegionsResult()
{}
void DescribeRegionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRegionsNode = value["Regions"]["Region"];
for (auto valueRegionsRegion : allRegionsNode)
{
Region regionsObject;
if(!valueRegionsRegion["Type"].isNull())
regionsObject.type = valueRegionsRegion["Type"].asString();
if(!valueRegionsRegion["ShowName"].isNull())
regionsObject.showName = valueRegionsRegion["ShowName"].asString();
if(!valueRegionsRegion["Name"].isNull())
regionsObject.name = valueRegionsRegion["Name"].asString();
if(!valueRegionsRegion["Description"].isNull())
regionsObject.description = valueRegionsRegion["Description"].asString();
regions_.push_back(regionsObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::vector<DescribeRegionsResult::Region> DescribeRegionsResult::getRegions()const
{
return regions_;
}
bool DescribeRegionsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,46 @@
/*
* 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/datalake/model/GetAsyncTaskStatusRequest.h>
using AlibabaCloud::DataLake::Model::GetAsyncTaskStatusRequest;
GetAsyncTaskStatusRequest::GetAsyncTaskStatusRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/tasks"};
setMethod(HttpRequest::Method::Get);
}
GetAsyncTaskStatusRequest::~GetAsyncTaskStatusRequest() {}
std::string GetAsyncTaskStatusRequest::getCatalogId() const {
return catalogId_;
}
void GetAsyncTaskStatusRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetAsyncTaskStatusRequest::getTaskId() const {
return taskId_;
}
void GetAsyncTaskStatusRequest::setTaskId(const std::string &taskId) {
taskId_ = taskId;
setParameter(std::string("TaskId"), taskId);
}

View File

@@ -0,0 +1,75 @@
/*
* 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/datalake/model/GetAsyncTaskStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetAsyncTaskStatusResult::GetAsyncTaskStatusResult() :
ServiceResult()
{}
GetAsyncTaskStatusResult::GetAsyncTaskStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetAsyncTaskStatusResult::~GetAsyncTaskStatusResult()
{}
void GetAsyncTaskStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto taskStatusNode = value["TaskStatus"];
if(!taskStatusNode["Status"].isNull())
taskStatus_.status = taskStatusNode["Status"].asString();
if(!taskStatusNode["Message"].isNull())
taskStatus_.message = taskStatusNode["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetAsyncTaskStatusResult::getMessage()const
{
return message_;
}
GetAsyncTaskStatusResult::TaskStatus GetAsyncTaskStatusResult::getTaskStatus()const
{
return taskStatus_;
}
std::string GetAsyncTaskStatusResult::getCode()const
{
return code_;
}
bool GetAsyncTaskStatusResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/GetCatalogRequest.h>
using AlibabaCloud::DataLake::Model::GetCatalogRequest;
GetCatalogRequest::GetCatalogRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs"};
setMethod(HttpRequest::Method::Get);
}
GetCatalogRequest::~GetCatalogRequest() {}
std::string GetCatalogRequest::getCatalogId() const {
return catalogId_;
}
void GetCatalogRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}

View File

@@ -0,0 +1,87 @@
/*
* 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/datalake/model/GetCatalogResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetCatalogResult::GetCatalogResult() :
ServiceResult()
{}
GetCatalogResult::GetCatalogResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetCatalogResult::~GetCatalogResult()
{}
void GetCatalogResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto catalogNode = value["Catalog"];
if(!catalogNode["CatalogId"].isNull())
catalog_.catalogId = catalogNode["CatalogId"].asString();
if(!catalogNode["Description"].isNull())
catalog_.description = catalogNode["Description"].asString();
if(!catalogNode["LocationUri"].isNull())
catalog_.locationUri = catalogNode["LocationUri"].asString();
if(!catalogNode["Owner"].isNull())
catalog_.owner = catalogNode["Owner"].asString();
if(!catalogNode["CreatedBy"].isNull())
catalog_.createdBy = catalogNode["CreatedBy"].asString();
if(!catalogNode["CreateTime"].isNull())
catalog_.createTime = std::stol(catalogNode["CreateTime"].asString());
if(!catalogNode["UpdateTime"].isNull())
catalog_.updateTime = std::stol(catalogNode["UpdateTime"].asString());
if(!catalogNode["Status"].isNull())
catalog_.status = catalogNode["Status"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetCatalogResult::getMessage()const
{
return message_;
}
std::string GetCatalogResult::getCode()const
{
return code_;
}
GetCatalogResult::Catalog GetCatalogResult::getCatalog()const
{
return catalog_;
}
bool GetCatalogResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/GetCatalogSettingsRequest.h>
using AlibabaCloud::DataLake::Model::GetCatalogSettingsRequest;
GetCatalogSettingsRequest::GetCatalogSettingsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/settings"};
setMethod(HttpRequest::Method::Get);
}
GetCatalogSettingsRequest::~GetCatalogSettingsRequest() {}
std::string GetCatalogSettingsRequest::getCatalogId() const {
return catalogId_;
}
void GetCatalogSettingsRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/datalake/model/GetCatalogSettingsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetCatalogSettingsResult::GetCatalogSettingsResult() :
ServiceResult()
{}
GetCatalogSettingsResult::GetCatalogSettingsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetCatalogSettingsResult::~GetCatalogSettingsResult()
{}
void GetCatalogSettingsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto catalogSettingsNode = value["CatalogSettings"];
if(!catalogSettingsNode["Config"].isNull())
catalogSettings_.config = catalogSettingsNode["Config"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
GetCatalogSettingsResult::CatalogSettings GetCatalogSettingsResult::getCatalogSettings()const
{
return catalogSettings_;
}
std::string GetCatalogSettingsResult::getMessage()const
{
return message_;
}
std::string GetCatalogSettingsResult::getCode()const
{
return code_;
}
bool GetCatalogSettingsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,46 @@
/*
* 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/datalake/model/GetDatabaseRequest.h>
using AlibabaCloud::DataLake::Model::GetDatabaseRequest;
GetDatabaseRequest::GetDatabaseRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases"};
setMethod(HttpRequest::Method::Get);
}
GetDatabaseRequest::~GetDatabaseRequest() {}
std::string GetDatabaseRequest::getCatalogId() const {
return catalogId_;
}
void GetDatabaseRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetDatabaseRequest::getName() const {
return name_;
}
void GetDatabaseRequest::setName(const std::string &name) {
name_ = name;
setParameter(std::string("Name"), name);
}

View File

@@ -0,0 +1,96 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetDatabaseResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetDatabaseResult::GetDatabaseResult() :
ServiceResult()
{}
GetDatabaseResult::GetDatabaseResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetDatabaseResult::~GetDatabaseResult()
{}
void GetDatabaseResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto databaseNode = value["Database"];
if(!databaseNode["CreateTime"].isNull())
database_.createTime = std::stoi(databaseNode["CreateTime"].asString());
if(!databaseNode["Description"].isNull())
database_.description = databaseNode["Description"].asString();
if(!databaseNode["LocationUri"].isNull())
database_.locationUri = databaseNode["LocationUri"].asString();
if(!databaseNode["Name"].isNull())
database_.name = databaseNode["Name"].asString();
if(!databaseNode["OwnerName"].isNull())
database_.ownerName = databaseNode["OwnerName"].asString();
if(!databaseNode["OwnerType"].isNull())
database_.ownerType = databaseNode["OwnerType"].asString();
if(!databaseNode["Parameters"].isNull())
database_.parameters = databaseNode["Parameters"].asString();
if(!databaseNode["UpdateTime"].isNull())
database_.updateTime = std::stoi(databaseNode["UpdateTime"].asString());
if(!databaseNode["CreatedBy"].isNull())
database_.createdBy = databaseNode["CreatedBy"].asString();
auto privilegesNode = databaseNode["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
database_.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
database_.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
database_.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetDatabaseResult::getMessage()const
{
return message_;
}
GetDatabaseResult::Database GetDatabaseResult::getDatabase()const
{
return database_;
}
std::string GetDatabaseResult::getCode()const
{
return code_;
}
bool GetDatabaseResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetFunctionRequest.h>
using AlibabaCloud::DataLake::Model::GetFunctionRequest;
GetFunctionRequest::GetFunctionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/functions"};
setMethod(HttpRequest::Method::Get);
}
GetFunctionRequest::~GetFunctionRequest() {}
std::string GetFunctionRequest::getCatalogId() const {
return catalogId_;
}
void GetFunctionRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetFunctionRequest::getFunctionName() const {
return functionName_;
}
void GetFunctionRequest::setFunctionName(const std::string &functionName) {
functionName_ = functionName;
setParameter(std::string("FunctionName"), functionName);
}
std::string GetFunctionRequest::getDatabaseName() const {
return databaseName_;
}
void GetFunctionRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}

View File

@@ -0,0 +1,101 @@
/*
* 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/datalake/model/GetFunctionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetFunctionResult::GetFunctionResult() :
ServiceResult()
{}
GetFunctionResult::GetFunctionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetFunctionResult::~GetFunctionResult()
{}
void GetFunctionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto functionNode = value["Function"];
if(!functionNode["CatalogId"].isNull())
function_.catalogId = functionNode["CatalogId"].asString();
if(!functionNode["ClassName"].isNull())
function_.className = functionNode["ClassName"].asString();
if(!functionNode["CreateTime"].isNull())
function_.createTime = std::stoi(functionNode["CreateTime"].asString());
if(!functionNode["DatabaseName"].isNull())
function_.databaseName = functionNode["DatabaseName"].asString();
if(!functionNode["FunctionName"].isNull())
function_.functionName = functionNode["FunctionName"].asString();
if(!functionNode["FunctionType"].isNull())
function_.functionType = functionNode["FunctionType"].asString();
if(!functionNode["OwnerName"].isNull())
function_.ownerName = functionNode["OwnerName"].asString();
if(!functionNode["OwnerType"].isNull())
function_.ownerType = functionNode["OwnerType"].asString();
if(!functionNode["UpdateTime"].isNull())
function_.updateTime = std::stoi(functionNode["UpdateTime"].asString());
if(!functionNode["CreatedBy"].isNull())
function_.createdBy = functionNode["CreatedBy"].asString();
auto allResourceUriNode = functionNode["ResourceUri"]["ResourceUriItem"];
for (auto functionNodeResourceUriResourceUriItem : allResourceUriNode)
{
Function::ResourceUriItem resourceUriItemObject;
if(!functionNodeResourceUriResourceUriItem["ResourceType"].isNull())
resourceUriItemObject.resourceType = functionNodeResourceUriResourceUriItem["ResourceType"].asString();
if(!functionNodeResourceUriResourceUriItem["Uri"].isNull())
resourceUriItemObject.uri = functionNodeResourceUriResourceUriItem["Uri"].asString();
function_.resourceUri.push_back(resourceUriItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
GetFunctionResult::Function GetFunctionResult::getFunction()const
{
return function_;
}
std::string GetFunctionResult::getMessage()const
{
return message_;
}
std::string GetFunctionResult::getCode()const
{
return code_;
}
bool GetFunctionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/GetLockRequest.h>
using AlibabaCloud::DataLake::Model::GetLockRequest;
GetLockRequest::GetLockRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/locks"};
setMethod(HttpRequest::Method::Get);
}
GetLockRequest::~GetLockRequest() {}
long GetLockRequest::getLockId() const {
return lockId_;
}
void GetLockRequest::setLockId(long lockId) {
lockId_ = lockId;
setParameter(std::string("LockId"), std::to_string(lockId));
}

View File

@@ -0,0 +1,75 @@
/*
* 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/datalake/model/GetLockResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetLockResult::GetLockResult() :
ServiceResult()
{}
GetLockResult::GetLockResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetLockResult::~GetLockResult()
{}
void GetLockResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto lockStatusNode = value["LockStatus"];
if(!lockStatusNode["LockId"].isNull())
lockStatus_.lockId = std::stol(lockStatusNode["LockId"].asString());
if(!lockStatusNode["LockState"].isNull())
lockStatus_.lockState = lockStatusNode["LockState"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetLockResult::getMessage()const
{
return message_;
}
GetLockResult::LockStatus GetLockResult::getLockStatus()const
{
return lockStatus_;
}
std::string GetLockResult::getCode()const
{
return code_;
}
bool GetLockResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetPartitionColumnStatisticsRequest.h>
using AlibabaCloud::DataLake::Model::GetPartitionColumnStatisticsRequest;
GetPartitionColumnStatisticsRequest::GetPartitionColumnStatisticsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/columnstatistics"};
setMethod(HttpRequest::Method::Get);
}
GetPartitionColumnStatisticsRequest::~GetPartitionColumnStatisticsRequest() {}
std::string GetPartitionColumnStatisticsRequest::getCatalogId() const {
return catalogId_;
}
void GetPartitionColumnStatisticsRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetPartitionColumnStatisticsRequest::getDatabaseName() const {
return databaseName_;
}
void GetPartitionColumnStatisticsRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string GetPartitionColumnStatisticsRequest::getTableName() const {
return tableName_;
}
void GetPartitionColumnStatisticsRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

View File

@@ -0,0 +1,72 @@
/*
* 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/datalake/model/GetPartitionColumnStatisticsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetPartitionColumnStatisticsResult::GetPartitionColumnStatisticsResult() :
ServiceResult()
{}
GetPartitionColumnStatisticsResult::GetPartitionColumnStatisticsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetPartitionColumnStatisticsResult::~GetPartitionColumnStatisticsResult()
{}
void GetPartitionColumnStatisticsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["PartitionStatisticsMap"].isNull())
partitionStatisticsMap_ = value["PartitionStatisticsMap"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetPartitionColumnStatisticsResult::getMessage()const
{
return message_;
}
std::string GetPartitionColumnStatisticsResult::getCode()const
{
return code_;
}
std::string GetPartitionColumnStatisticsResult::getPartitionStatisticsMap()const
{
return partitionStatisticsMap_;
}
bool GetPartitionColumnStatisticsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/GetPartitionRequest.h>
using AlibabaCloud::DataLake::Model::GetPartitionRequest;
GetPartitionRequest::GetPartitionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/partitions/get"};
setMethod(HttpRequest::Method::Post);
}
GetPartitionRequest::~GetPartitionRequest() {}
std::string GetPartitionRequest::getBody() const {
return body_;
}
void GetPartitionRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

View File

@@ -0,0 +1,151 @@
/*
* 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/datalake/model/GetPartitionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetPartitionResult::GetPartitionResult() :
ServiceResult()
{}
GetPartitionResult::GetPartitionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetPartitionResult::~GetPartitionResult()
{}
void GetPartitionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto partitionNode = value["Partition"];
if(!partitionNode["CreateTime"].isNull())
partition_.createTime = std::stoi(partitionNode["CreateTime"].asString());
if(!partitionNode["DatabaseName"].isNull())
partition_.databaseName = partitionNode["DatabaseName"].asString();
if(!partitionNode["LastAccessTime"].isNull())
partition_.lastAccessTime = std::stoi(partitionNode["LastAccessTime"].asString());
if(!partitionNode["LastAnalyzedTime"].isNull())
partition_.lastAnalyzedTime = std::stoi(partitionNode["LastAnalyzedTime"].asString());
if(!partitionNode["Parameters"].isNull())
partition_.parameters = partitionNode["Parameters"].asString();
if(!partitionNode["TableName"].isNull())
partition_.tableName = partitionNode["TableName"].asString();
auto privilegesNode = partitionNode["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
partition_.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
partition_.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
partition_.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
auto sdNode = partitionNode["Sd"];
if(!sdNode["Compressed"].isNull())
partition_.sd.compressed = sdNode["Compressed"].asString() == "true";
if(!sdNode["InputFormat"].isNull())
partition_.sd.inputFormat = sdNode["InputFormat"].asString();
if(!sdNode["Location"].isNull())
partition_.sd.location = sdNode["Location"].asString();
if(!sdNode["NumBuckets"].isNull())
partition_.sd.numBuckets = std::stoi(sdNode["NumBuckets"].asString());
if(!sdNode["OutputFormat"].isNull())
partition_.sd.outputFormat = sdNode["OutputFormat"].asString();
if(!sdNode["Parameters"].isNull())
partition_.sd.parameters = sdNode["Parameters"].asString();
if(!sdNode["StoredAsSubDirectories"].isNull())
partition_.sd.storedAsSubDirectories = sdNode["StoredAsSubDirectories"].asString() == "true";
auto allColsNode = sdNode["Cols"]["ColsItem"];
for (auto sdNodeColsColsItem : allColsNode)
{
Partition::Sd::ColsItem colsItemObject;
if(!sdNodeColsColsItem["Comment"].isNull())
colsItemObject.comment = sdNodeColsColsItem["Comment"].asString();
if(!sdNodeColsColsItem["Name"].isNull())
colsItemObject.name = sdNodeColsColsItem["Name"].asString();
if(!sdNodeColsColsItem["Parameters"].isNull())
colsItemObject.parameters = sdNodeColsColsItem["Parameters"].asString();
if(!sdNodeColsColsItem["Type"].isNull())
colsItemObject.type = sdNodeColsColsItem["Type"].asString();
partition_.sd.cols.push_back(colsItemObject);
}
auto allSortColsNode = sdNode["SortCols"]["SortColsItem"];
for (auto sdNodeSortColsSortColsItem : allSortColsNode)
{
Partition::Sd::SortColsItem sortColsItemObject;
if(!sdNodeSortColsSortColsItem["Col"].isNull())
sortColsItemObject.col = sdNodeSortColsSortColsItem["Col"].asString();
if(!sdNodeSortColsSortColsItem["Order"].isNull())
sortColsItemObject.order = std::stoi(sdNodeSortColsSortColsItem["Order"].asString());
partition_.sd.sortCols.push_back(sortColsItemObject);
}
auto serDeInfoNode = sdNode["SerDeInfo"];
if(!serDeInfoNode["Name"].isNull())
partition_.sd.serDeInfo.name = serDeInfoNode["Name"].asString();
if(!serDeInfoNode["Parameters"].isNull())
partition_.sd.serDeInfo.parameters = serDeInfoNode["Parameters"].asString();
if(!serDeInfoNode["SerializationLib"].isNull())
partition_.sd.serDeInfo.serializationLib = serDeInfoNode["SerializationLib"].asString();
auto skewedInfoNode = sdNode["SkewedInfo"];
if(!skewedInfoNode["SkewedColValueLocationMaps"].isNull())
partition_.sd.skewedInfo.skewedColValueLocationMaps = skewedInfoNode["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames = skewedInfoNode["SkewedColNames"]["null"];
for (auto value : allSkewedColNames)
partition_.sd.skewedInfo.skewedColNames.push_back(value.asString());
auto allSkewedColValues = skewedInfoNode["SkewedColValues"]["null"];
for (auto value : allSkewedColValues)
partition_.sd.skewedInfo.skewedColValues.push_back(value.asString());
auto allBucketCols = sdNode["BucketCols"]["null"];
for (auto value : allBucketCols)
partition_.sd.bucketCols.push_back(value.asString());
auto allValues = partitionNode["Values"]["null"];
for (auto value : allValues)
partition_.values.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
GetPartitionResult::Partition GetPartitionResult::getPartition()const
{
return partition_;
}
std::string GetPartitionResult::getMessage()const
{
return message_;
}
std::string GetPartitionResult::getCode()const
{
return code_;
}
bool GetPartitionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetQueryResultRequest.h>
using AlibabaCloud::DataLake::Model::GetQueryResultRequest;
GetQueryResultRequest::GetQueryResultRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/webapi/query/getQueryResult"};
setMethod(HttpRequest::Method::Get);
}
GetQueryResultRequest::~GetQueryResultRequest() {}
int GetQueryResultRequest::getPageSize() const {
return pageSize_;
}
void GetQueryResultRequest::setPageSize(int pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
int GetQueryResultRequest::getPageNumber() const {
return pageNumber_;
}
void GetQueryResultRequest::setPageNumber(int pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
std::string GetQueryResultRequest::getQueryId() const {
return queryId_;
}
void GetQueryResultRequest::setQueryId(const std::string &queryId) {
queryId_ = queryId;
setParameter(std::string("QueryId"), queryId);
}

View File

@@ -0,0 +1,198 @@
/*
* 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/datalake/model/GetQueryResultResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetQueryResultResult::GetQueryResultResult() :
ServiceResult()
{}
GetQueryResultResult::GetQueryResultResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetQueryResultResult::~GetQueryResultResult()
{}
void GetQueryResultResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["ResultTmpTable"].isNull())
resultTmpTable_ = value["ResultTmpTable"].asString();
if(!value["Owner"].isNull())
owner_ = std::stol(value["Owner"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Progress"].isNull())
progress_ = std::stoi(value["Progress"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Schema"].isNull())
schema_ = value["Schema"].asString();
if(!value["ResultTmpDb"].isNull())
resultTmpDb_ = value["ResultTmpDb"].asString();
if(!value["GmtModified"].isNull())
gmtModified_ = value["GmtModified"].asString();
if(!value["JobCompleted"].isNull())
jobCompleted_ = value["JobCompleted"].asString() == "true";
if(!value["RowCount"].isNull())
rowCount_ = std::stoi(value["RowCount"].asString());
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
if(!value["EndTime"].isNull())
endTime_ = value["EndTime"].asString();
if(!value["StartTime"].isNull())
startTime_ = value["StartTime"].asString();
if(!value["Rows"].isNull())
rows_ = value["Rows"].asString();
if(!value["Logs"].isNull())
logs_ = value["Logs"].asString();
if(!value["GmtCreate"].isNull())
gmtCreate_ = value["GmtCreate"].asString();
if(!value["Duration"].isNull())
duration_ = std::stol(value["Duration"].asString());
if(!value["Sql"].isNull())
sql_ = value["Sql"].asString();
if(!value["RowCountOverLimit"].isNull())
rowCountOverLimit_ = value["RowCountOverLimit"].asString() == "true";
if(!value["Id"].isNull())
id_ = value["Id"].asString();
if(!value["TotalBytesProcessed"].isNull())
totalBytesProcessed_ = std::stol(value["TotalBytesProcessed"].asString());
}
std::string GetQueryResultResult::getStatus()const
{
return status_;
}
long GetQueryResultResult::getOwner()const
{
return owner_;
}
int GetQueryResultResult::getProgress()const
{
return progress_;
}
std::string GetQueryResultResult::getEndTime()const
{
return endTime_;
}
std::string GetQueryResultResult::getSchema()const
{
return schema_;
}
std::string GetQueryResultResult::getGmtModified()const
{
return gmtModified_;
}
std::string GetQueryResultResult::getStartTime()const
{
return startTime_;
}
long GetQueryResultResult::getDuration()const
{
return duration_;
}
std::string GetQueryResultResult::getLogs()const
{
return logs_;
}
bool GetQueryResultResult::getSuccess()const
{
return success_;
}
std::string GetQueryResultResult::getSql()const
{
return sql_;
}
std::string GetQueryResultResult::getResultTmpDb()const
{
return resultTmpDb_;
}
std::string GetQueryResultResult::getGmtCreate()const
{
return gmtCreate_;
}
bool GetQueryResultResult::getRowCountOverLimit()const
{
return rowCountOverLimit_;
}
std::string GetQueryResultResult::getResultTmpTable()const
{
return resultTmpTable_;
}
std::string GetQueryResultResult::getRegionId()const
{
return regionId_;
}
std::string GetQueryResultResult::getId()const
{
return id_;
}
long GetQueryResultResult::getTotalBytesProcessed()const
{
return totalBytesProcessed_;
}
std::string GetQueryResultResult::getErrorMessage()const
{
return errorMessage_;
}
int GetQueryResultResult::getRowCount()const
{
return rowCount_;
}
bool GetQueryResultResult::getJobCompleted()const
{
return jobCompleted_;
}
std::string GetQueryResultResult::getRows()const
{
return rows_;
}

View File

@@ -0,0 +1,28 @@
/*
* 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/datalake/model/GetRegionStatusRequest.h>
using AlibabaCloud::DataLake::Model::GetRegionStatusRequest;
GetRegionStatusRequest::GetRegionStatusRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/webapi/service/getRegionStatus"};
setMethod(HttpRequest::Method::Get);
}
GetRegionStatusRequest::~GetRegionStatusRequest() {}

View File

@@ -0,0 +1,67 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetRegionStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetRegionStatusResult::GetRegionStatusResult() :
ServiceResult()
{}
GetRegionStatusResult::GetRegionStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetRegionStatusResult::~GetRegionStatusResult()
{}
void GetRegionStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["IsDlfServiceOpen"].isNull())
data_.isDlfServiceOpen = dataNode["IsDlfServiceOpen"].asString() == "true";
if(!dataNode["RegionStatus"].isNull())
data_.regionStatus = dataNode["RegionStatus"].asString();
if(!dataNode["AccountStatus"].isNull())
data_.accountStatus = dataNode["AccountStatus"].asString();
if(!dataNode["IsDependencyReady"].isNull())
data_.isDependencyReady = dataNode["IsDependencyReady"].asString() == "true";
if(!dataNode["RegionId"].isNull())
data_.regionId = dataNode["RegionId"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
}
GetRegionStatusResult::Data GetRegionStatusResult::getData()const
{
return data_;
}
std::string GetRegionStatusResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/GetRoleRequest.h>
using AlibabaCloud::DataLake::Model::GetRoleRequest;
GetRoleRequest::GetRoleRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/auth/roles"};
setMethod(HttpRequest::Method::Get);
}
GetRoleRequest::~GetRoleRequest() {}
std::string GetRoleRequest::getRoleName() const {
return roleName_;
}
void GetRoleRequest::setRoleName(const std::string &roleName) {
roleName_ = roleName;
setParameter(std::string("RoleName"), roleName);
}

View File

@@ -0,0 +1,93 @@
/*
* 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/datalake/model/GetRoleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetRoleResult::GetRoleResult() :
ServiceResult()
{}
GetRoleResult::GetRoleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetRoleResult::~GetRoleResult()
{}
void GetRoleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto roleNode = value["Role"];
if(!roleNode["Name"].isNull())
role_.name = roleNode["Name"].asString();
if(!roleNode["Description"].isNull())
role_.description = roleNode["Description"].asString();
if(!roleNode["DisplayName"].isNull())
role_.displayName = roleNode["DisplayName"].asString();
if(!roleNode["PrincipalArn"].isNull())
role_.principalArn = roleNode["PrincipalArn"].asString();
if(!roleNode["CreateTime"].isNull())
role_.createTime = std::stol(roleNode["CreateTime"].asString());
if(!roleNode["UpdateTime"].isNull())
role_.updateTime = std::stol(roleNode["UpdateTime"].asString());
if(!roleNode["IsPredefined"].isNull())
role_.isPredefined = std::stoi(roleNode["IsPredefined"].asString());
auto allUsersNode = roleNode["Users"]["UsersItem"];
for (auto roleNodeUsersUsersItem : allUsersNode)
{
Role::UsersItem usersItemObject;
if(!roleNodeUsersUsersItem["PrincipalArn"].isNull())
usersItemObject.principalArn = roleNodeUsersUsersItem["PrincipalArn"].asString();
role_.users.push_back(usersItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
GetRoleResult::Role GetRoleResult::getRole()const
{
return role_;
}
std::string GetRoleResult::getMessage()const
{
return message_;
}
std::string GetRoleResult::getCode()const
{
return code_;
}
bool GetRoleResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,28 @@
/*
* 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/datalake/model/GetServiceStatusRequest.h>
using AlibabaCloud::DataLake::Model::GetServiceStatusRequest;
GetServiceStatusRequest::GetServiceStatusRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/webapi/service/getServiceStatus"};
setMethod(HttpRequest::Method::Get);
}
GetServiceStatusRequest::~GetServiceStatusRequest() {}

View File

@@ -0,0 +1,63 @@
/*
* 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/datalake/model/GetServiceStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetServiceStatusResult::GetServiceStatusResult() :
ServiceResult()
{}
GetServiceStatusResult::GetServiceStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetServiceStatusResult::~GetServiceStatusResult()
{}
void GetServiceStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["IsDlfServiceOpen"].isNull())
data_.isDlfServiceOpen = dataNode["IsDlfServiceOpen"].asString() == "true";
if(!dataNode["HasRamPermissions"].isNull())
data_.hasRamPermissions = dataNode["HasRamPermissions"].asString() == "true";
if(!dataNode["IsOssOpen"].isNull())
data_.isOssOpen = dataNode["IsOssOpen"].asString() == "true";
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
GetServiceStatusResult::Data GetServiceStatusResult::getData()const
{
return data_;
}
bool GetServiceStatusResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetTableColumnStatisticsRequest.h>
using AlibabaCloud::DataLake::Model::GetTableColumnStatisticsRequest;
GetTableColumnStatisticsRequest::GetTableColumnStatisticsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/columnstatistics"};
setMethod(HttpRequest::Method::Get);
}
GetTableColumnStatisticsRequest::~GetTableColumnStatisticsRequest() {}
std::string GetTableColumnStatisticsRequest::getCatalogId() const {
return catalogId_;
}
void GetTableColumnStatisticsRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetTableColumnStatisticsRequest::getDatabaseName() const {
return databaseName_;
}
void GetTableColumnStatisticsRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string GetTableColumnStatisticsRequest::getTableName() const {
return tableName_;
}
void GetTableColumnStatisticsRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

View File

@@ -0,0 +1,85 @@
/*
* 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/datalake/model/GetTableColumnStatisticsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetTableColumnStatisticsResult::GetTableColumnStatisticsResult() :
ServiceResult()
{}
GetTableColumnStatisticsResult::GetTableColumnStatisticsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTableColumnStatisticsResult::~GetTableColumnStatisticsResult()
{}
void GetTableColumnStatisticsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allColumnStatisticsObjListNode = value["ColumnStatisticsObjList"]["ColumnStatisticsObjListItem"];
for (auto valueColumnStatisticsObjListColumnStatisticsObjListItem : allColumnStatisticsObjListNode)
{
ColumnStatisticsObjListItem columnStatisticsObjListObject;
if(!valueColumnStatisticsObjListColumnStatisticsObjListItem["ColumnName"].isNull())
columnStatisticsObjListObject.columnName = valueColumnStatisticsObjListColumnStatisticsObjListItem["ColumnName"].asString();
if(!valueColumnStatisticsObjListColumnStatisticsObjListItem["ColumnType"].isNull())
columnStatisticsObjListObject.columnType = valueColumnStatisticsObjListColumnStatisticsObjListItem["ColumnType"].asString();
auto columnStatisticsDataNode = value["ColumnStatisticsData"];
if(!columnStatisticsDataNode["StatisticsData"].isNull())
columnStatisticsObjListObject.columnStatisticsData.statisticsData = columnStatisticsDataNode["StatisticsData"].asString();
if(!columnStatisticsDataNode["StatisticsType"].isNull())
columnStatisticsObjListObject.columnStatisticsData.statisticsType = columnStatisticsDataNode["StatisticsType"].asString();
columnStatisticsObjList_.push_back(columnStatisticsObjListObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetTableColumnStatisticsResult::getMessage()const
{
return message_;
}
std::vector<GetTableColumnStatisticsResult::ColumnStatisticsObjListItem> GetTableColumnStatisticsResult::getColumnStatisticsObjList()const
{
return columnStatisticsObjList_;
}
std::string GetTableColumnStatisticsResult::getCode()const
{
return code_;
}
bool GetTableColumnStatisticsResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetTableProfileRequest.h>
using AlibabaCloud::DataLake::Model::GetTableProfileRequest;
GetTableProfileRequest::GetTableProfileRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/webapi/metastorehouse/catalog/database/tableprofile"};
setMethod(HttpRequest::Method::Get);
}
GetTableProfileRequest::~GetTableProfileRequest() {}
std::string GetTableProfileRequest::getCatalogId() const {
return catalogId_;
}
void GetTableProfileRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetTableProfileRequest::getDatabaseName() const {
return databaseName_;
}
void GetTableProfileRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string GetTableProfileRequest::getTableName() const {
return tableName_;
}
void GetTableProfileRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

View File

@@ -0,0 +1,101 @@
/*
* 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/datalake/model/GetTableProfileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetTableProfileResult::GetTableProfileResult() :
ServiceResult()
{}
GetTableProfileResult::GetTableProfileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTableProfileResult::~GetTableProfileResult()
{}
void GetTableProfileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto tableProfileNode = value["TableProfile"];
if(!tableProfileNode["PartitionCnt"].isNull())
tableProfile_.partitionCnt = std::stol(tableProfileNode["PartitionCnt"].asString());
if(!tableProfileNode["FileCnt"].isNull())
tableProfile_.fileCnt = std::stol(tableProfileNode["FileCnt"].asString());
if(!tableProfileNode["FileSize"].isNull())
tableProfile_.fileSize = std::stol(tableProfileNode["FileSize"].asString());
if(!tableProfileNode["RecordCnt"].isNull())
tableProfile_.recordCnt = std::stol(tableProfileNode["RecordCnt"].asString());
if(!tableProfileNode["IsPartitioned"].isNull())
tableProfile_.isPartitioned = tableProfileNode["IsPartitioned"].asString() == "true";
if(!tableProfileNode["LastModifyTime"].isNull())
tableProfile_.lastModifyTime = tableProfileNode["LastModifyTime"].asString();
if(!tableProfileNode["LastAccessTime"].isNull())
tableProfile_.lastAccessTime = tableProfileNode["LastAccessTime"].asString();
if(!tableProfileNode["DatabaseName"].isNull())
tableProfile_.databaseName = tableProfileNode["DatabaseName"].asString();
if(!tableProfileNode["TableName"].isNull())
tableProfile_.tableName = tableProfileNode["TableName"].asString();
if(!tableProfileNode["CreateTime"].isNull())
tableProfile_.createTime = tableProfileNode["CreateTime"].asString();
if(!tableProfileNode["Location"].isNull())
tableProfile_.location = tableProfileNode["Location"].asString();
if(!tableProfileNode["AccessNum"].isNull())
tableProfile_.accessNum = std::stol(tableProfileNode["AccessNum"].asString());
if(!tableProfileNode["AccessNumWeekly"].isNull())
tableProfile_.accessNumWeekly = std::stol(tableProfileNode["AccessNumWeekly"].asString());
if(!tableProfileNode["AccessNumMonthly"].isNull())
tableProfile_.accessNumMonthly = std::stol(tableProfileNode["AccessNumMonthly"].asString());
if(!tableProfileNode["LatestDate"].isNull())
tableProfile_.latestDate = tableProfileNode["LatestDate"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
GetTableProfileResult::TableProfile GetTableProfileResult::getTableProfile()const
{
return tableProfile_;
}
std::string GetTableProfileResult::getMessage()const
{
return message_;
}
std::string GetTableProfileResult::getCode()const
{
return code_;
}
bool GetTableProfileResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/datalake/model/GetTableRequest.h>
using AlibabaCloud::DataLake::Model::GetTableRequest;
GetTableRequest::GetTableRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables"};
setMethod(HttpRequest::Method::Get);
}
GetTableRequest::~GetTableRequest() {}
std::string GetTableRequest::getCatalogId() const {
return catalogId_;
}
void GetTableRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetTableRequest::getDatabaseName() const {
return databaseName_;
}
void GetTableRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string GetTableRequest::getTableName() const {
return tableName_;
}
void GetTableRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

View File

@@ -0,0 +1,191 @@
/*
* 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/datalake/model/GetTableResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetTableResult::GetTableResult() :
ServiceResult()
{}
GetTableResult::GetTableResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTableResult::~GetTableResult()
{}
void GetTableResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto tableNode = value["Table"];
if(!tableNode["Cascade"].isNull())
table_.cascade = tableNode["Cascade"].asString() == "true";
if(!tableNode["CreateTime"].isNull())
table_.createTime = std::stoi(tableNode["CreateTime"].asString());
if(!tableNode["CreatedBy"].isNull())
table_.createdBy = tableNode["CreatedBy"].asString();
if(!tableNode["DatabaseName"].isNull())
table_.databaseName = tableNode["DatabaseName"].asString();
if(!tableNode["LastAccessTime"].isNull())
table_.lastAccessTime = std::stoi(tableNode["LastAccessTime"].asString());
if(!tableNode["LastAnalyzedTime"].isNull())
table_.lastAnalyzedTime = std::stoi(tableNode["LastAnalyzedTime"].asString());
if(!tableNode["Owner"].isNull())
table_.owner = tableNode["Owner"].asString();
if(!tableNode["OwnerType"].isNull())
table_.ownerType = tableNode["OwnerType"].asString();
if(!tableNode["Parameters"].isNull())
table_.parameters = tableNode["Parameters"].asString();
if(!tableNode["Retention"].isNull())
table_.retention = std::stoi(tableNode["Retention"].asString());
if(!tableNode["RewriteEnabled"].isNull())
table_.rewriteEnabled = tableNode["RewriteEnabled"].asString() == "true";
if(!tableNode["TableName"].isNull())
table_.tableName = tableNode["TableName"].asString();
if(!tableNode["TableType"].isNull())
table_.tableType = tableNode["TableType"].asString();
if(!tableNode["Temporary"].isNull())
table_.temporary = tableNode["Temporary"].asString() == "true";
if(!tableNode["UpdateTime"].isNull())
table_.updateTime = std::stoi(tableNode["UpdateTime"].asString());
if(!tableNode["ViewExpandedText"].isNull())
table_.viewExpandedText = tableNode["ViewExpandedText"].asString();
if(!tableNode["ViewOriginalText"].isNull())
table_.viewOriginalText = tableNode["ViewOriginalText"].asString();
if(!tableNode["TableId"].isNull())
table_.tableId = tableNode["TableId"].asString();
auto allPartitionKeysNode = tableNode["PartitionKeys"]["PartitionKeysItem"];
for (auto tableNodePartitionKeysPartitionKeysItem : allPartitionKeysNode)
{
Table::PartitionKeysItem partitionKeysItemObject;
if(!tableNodePartitionKeysPartitionKeysItem["Comment"].isNull())
partitionKeysItemObject.comment = tableNodePartitionKeysPartitionKeysItem["Comment"].asString();
if(!tableNodePartitionKeysPartitionKeysItem["Name"].isNull())
partitionKeysItemObject.name = tableNodePartitionKeysPartitionKeysItem["Name"].asString();
if(!tableNodePartitionKeysPartitionKeysItem["Parameters"].isNull())
partitionKeysItemObject.parameters = tableNodePartitionKeysPartitionKeysItem["Parameters"].asString();
if(!tableNodePartitionKeysPartitionKeysItem["Type"].isNull())
partitionKeysItemObject.type = tableNodePartitionKeysPartitionKeysItem["Type"].asString();
table_.partitionKeys.push_back(partitionKeysItemObject);
}
auto privilegesNode = tableNode["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
table_.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
table_.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
table_.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
auto sdNode = tableNode["Sd"];
if(!sdNode["Compressed"].isNull())
table_.sd.compressed = sdNode["Compressed"].asString() == "true";
if(!sdNode["InputFormat"].isNull())
table_.sd.inputFormat = sdNode["InputFormat"].asString();
if(!sdNode["Location"].isNull())
table_.sd.location = sdNode["Location"].asString();
if(!sdNode["NumBuckets"].isNull())
table_.sd.numBuckets = std::stoi(sdNode["NumBuckets"].asString());
if(!sdNode["OutputFormat"].isNull())
table_.sd.outputFormat = sdNode["OutputFormat"].asString();
if(!sdNode["Parameters"].isNull())
table_.sd.parameters = sdNode["Parameters"].asString();
if(!sdNode["StoredAsSubDirectories"].isNull())
table_.sd.storedAsSubDirectories = sdNode["StoredAsSubDirectories"].asString() == "true";
auto allColsNode = sdNode["Cols"]["ColsItem"];
for (auto sdNodeColsColsItem : allColsNode)
{
Table::Sd::ColsItem colsItemObject;
if(!sdNodeColsColsItem["Comment"].isNull())
colsItemObject.comment = sdNodeColsColsItem["Comment"].asString();
if(!sdNodeColsColsItem["Name"].isNull())
colsItemObject.name = sdNodeColsColsItem["Name"].asString();
if(!sdNodeColsColsItem["Parameters"].isNull())
colsItemObject.parameters = sdNodeColsColsItem["Parameters"].asString();
if(!sdNodeColsColsItem["Type"].isNull())
colsItemObject.type = sdNodeColsColsItem["Type"].asString();
table_.sd.cols.push_back(colsItemObject);
}
auto allSortColsNode = sdNode["SortCols"]["SortColsItem"];
for (auto sdNodeSortColsSortColsItem : allSortColsNode)
{
Table::Sd::SortColsItem sortColsItemObject;
if(!sdNodeSortColsSortColsItem["Col"].isNull())
sortColsItemObject.col = sdNodeSortColsSortColsItem["Col"].asString();
if(!sdNodeSortColsSortColsItem["Order"].isNull())
sortColsItemObject.order = std::stoi(sdNodeSortColsSortColsItem["Order"].asString());
table_.sd.sortCols.push_back(sortColsItemObject);
}
auto serDeInfoNode = sdNode["SerDeInfo"];
if(!serDeInfoNode["Name"].isNull())
table_.sd.serDeInfo.name = serDeInfoNode["Name"].asString();
if(!serDeInfoNode["Parameters"].isNull())
table_.sd.serDeInfo.parameters = serDeInfoNode["Parameters"].asString();
if(!serDeInfoNode["SerializationLib"].isNull())
table_.sd.serDeInfo.serializationLib = serDeInfoNode["SerializationLib"].asString();
auto skewedInfoNode = sdNode["SkewedInfo"];
if(!skewedInfoNode["SkewedColValueLocationMaps"].isNull())
table_.sd.skewedInfo.skewedColValueLocationMaps = skewedInfoNode["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames = skewedInfoNode["SkewedColNames"]["null"];
for (auto value : allSkewedColNames)
table_.sd.skewedInfo.skewedColNames.push_back(value.asString());
auto allSkewedColValues = skewedInfoNode["SkewedColValues"]["null"];
for (auto value : allSkewedColValues)
table_.sd.skewedInfo.skewedColValues.push_back(value.asString());
auto allBucketCols = sdNode["BucketCols"]["null"];
for (auto value : allBucketCols)
table_.sd.bucketCols.push_back(value.asString());
auto tableVersionNode = tableNode["TableVersion"];
if(!tableVersionNode["Table"].isNull())
table_.tableVersion.table = tableVersionNode["Table"].asString();
if(!tableVersionNode["VersionId"].isNull())
table_.tableVersion.versionId = std::stoi(tableVersionNode["VersionId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
GetTableResult::Table GetTableResult::getTable()const
{
return table_;
}
std::string GetTableResult::getMessage()const
{
return message_;
}
std::string GetTableResult::getCode()const
{
return code_;
}
bool GetTableResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,64 @@
/*
* 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/datalake/model/GetTableVersionRequest.h>
using AlibabaCloud::DataLake::Model::GetTableVersionRequest;
GetTableVersionRequest::GetTableVersionRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/catalogs/databases/tables/versions"};
setMethod(HttpRequest::Method::Get);
}
GetTableVersionRequest::~GetTableVersionRequest() {}
int GetTableVersionRequest::getVersionId() const {
return versionId_;
}
void GetTableVersionRequest::setVersionId(int versionId) {
versionId_ = versionId;
setParameter(std::string("VersionId"), std::to_string(versionId));
}
std::string GetTableVersionRequest::getCatalogId() const {
return catalogId_;
}
void GetTableVersionRequest::setCatalogId(const std::string &catalogId) {
catalogId_ = catalogId;
setParameter(std::string("CatalogId"), catalogId);
}
std::string GetTableVersionRequest::getDatabaseName() const {
return databaseName_;
}
void GetTableVersionRequest::setDatabaseName(const std::string &databaseName) {
databaseName_ = databaseName;
setParameter(std::string("DatabaseName"), databaseName);
}
std::string GetTableVersionRequest::getTableName() const {
return tableName_;
}
void GetTableVersionRequest::setTableName(const std::string &tableName) {
tableName_ = tableName;
setParameter(std::string("TableName"), tableName);
}

View File

@@ -0,0 +1,191 @@
/*
* 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/datalake/model/GetTableVersionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::DataLake;
using namespace AlibabaCloud::DataLake::Model;
GetTableVersionResult::GetTableVersionResult() :
ServiceResult()
{}
GetTableVersionResult::GetTableVersionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTableVersionResult::~GetTableVersionResult()
{}
void GetTableVersionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto tableVersionNode = value["TableVersion"];
if(!tableVersionNode["VersionId"].isNull())
tableVersion_.versionId = std::stoi(tableVersionNode["VersionId"].asString());
auto tableNode = tableVersionNode["Table"];
if(!tableNode["Cascade"].isNull())
tableVersion_.table.cascade = tableNode["Cascade"].asString() == "true";
if(!tableNode["CreateTime"].isNull())
tableVersion_.table.createTime = std::stoi(tableNode["CreateTime"].asString());
if(!tableNode["CreatedBy"].isNull())
tableVersion_.table.createdBy = tableNode["CreatedBy"].asString();
if(!tableNode["DatabaseName"].isNull())
tableVersion_.table.databaseName = tableNode["DatabaseName"].asString();
if(!tableNode["LastAccessTime"].isNull())
tableVersion_.table.lastAccessTime = std::stoi(tableNode["LastAccessTime"].asString());
if(!tableNode["LastAnalyzedTime"].isNull())
tableVersion_.table.lastAnalyzedTime = std::stoi(tableNode["LastAnalyzedTime"].asString());
if(!tableNode["Owner"].isNull())
tableVersion_.table.owner = tableNode["Owner"].asString();
if(!tableNode["OwnerType"].isNull())
tableVersion_.table.ownerType = tableNode["OwnerType"].asString();
if(!tableNode["Parameters"].isNull())
tableVersion_.table.parameters = tableNode["Parameters"].asString();
if(!tableNode["Retention"].isNull())
tableVersion_.table.retention = std::stoi(tableNode["Retention"].asString());
if(!tableNode["RewriteEnabled"].isNull())
tableVersion_.table.rewriteEnabled = tableNode["RewriteEnabled"].asString() == "true";
if(!tableNode["TableName"].isNull())
tableVersion_.table.tableName = tableNode["TableName"].asString();
if(!tableNode["TableType"].isNull())
tableVersion_.table.tableType = tableNode["TableType"].asString();
if(!tableNode["Temporary"].isNull())
tableVersion_.table.temporary = tableNode["Temporary"].asString() == "true";
if(!tableNode["UpdateTime"].isNull())
tableVersion_.table.updateTime = std::stoi(tableNode["UpdateTime"].asString());
if(!tableNode["ViewExpandedText"].isNull())
tableVersion_.table.viewExpandedText = tableNode["ViewExpandedText"].asString();
if(!tableNode["ViewOriginalText"].isNull())
tableVersion_.table.viewOriginalText = tableNode["ViewOriginalText"].asString();
if(!tableNode["TableId"].isNull())
tableVersion_.table.tableId = tableNode["TableId"].asString();
if(!tableNode["TableVersion"].isNull())
tableVersion_.table.tableVersion = tableNode["TableVersion"].asString();
auto allPartitionKeysNode = tableNode["PartitionKeys"]["PartitionKeysItem"];
for (auto tableNodePartitionKeysPartitionKeysItem : allPartitionKeysNode)
{
TableVersion::Table::PartitionKeysItem partitionKeysItemObject;
if(!tableNodePartitionKeysPartitionKeysItem["Comment"].isNull())
partitionKeysItemObject.comment = tableNodePartitionKeysPartitionKeysItem["Comment"].asString();
if(!tableNodePartitionKeysPartitionKeysItem["Name"].isNull())
partitionKeysItemObject.name = tableNodePartitionKeysPartitionKeysItem["Name"].asString();
if(!tableNodePartitionKeysPartitionKeysItem["Parameters"].isNull())
partitionKeysItemObject.parameters = tableNodePartitionKeysPartitionKeysItem["Parameters"].asString();
if(!tableNodePartitionKeysPartitionKeysItem["Type"].isNull())
partitionKeysItemObject.type = tableNodePartitionKeysPartitionKeysItem["Type"].asString();
tableVersion_.table.partitionKeys.push_back(partitionKeysItemObject);
}
auto privilegesNode = tableNode["Privileges"];
if(!privilegesNode["GroupPrivileges"].isNull())
tableVersion_.table.privileges.groupPrivileges = privilegesNode["GroupPrivileges"].asString();
if(!privilegesNode["RolePrivileges"].isNull())
tableVersion_.table.privileges.rolePrivileges = privilegesNode["RolePrivileges"].asString();
if(!privilegesNode["UserPrivileges"].isNull())
tableVersion_.table.privileges.userPrivileges = privilegesNode["UserPrivileges"].asString();
auto sdNode = tableNode["Sd"];
if(!sdNode["Compressed"].isNull())
tableVersion_.table.sd.compressed = sdNode["Compressed"].asString() == "true";
if(!sdNode["InputFormat"].isNull())
tableVersion_.table.sd.inputFormat = sdNode["InputFormat"].asString();
if(!sdNode["Location"].isNull())
tableVersion_.table.sd.location = sdNode["Location"].asString();
if(!sdNode["NumBuckets"].isNull())
tableVersion_.table.sd.numBuckets = std::stoi(sdNode["NumBuckets"].asString());
if(!sdNode["OutputFormat"].isNull())
tableVersion_.table.sd.outputFormat = sdNode["OutputFormat"].asString();
if(!sdNode["Parameters"].isNull())
tableVersion_.table.sd.parameters = sdNode["Parameters"].asString();
if(!sdNode["StoredAsSubDirectories"].isNull())
tableVersion_.table.sd.storedAsSubDirectories = sdNode["StoredAsSubDirectories"].asString() == "true";
auto allColsNode = sdNode["Cols"]["ColsItem"];
for (auto sdNodeColsColsItem : allColsNode)
{
TableVersion::Table::Sd::ColsItem colsItemObject;
if(!sdNodeColsColsItem["Comment"].isNull())
colsItemObject.comment = sdNodeColsColsItem["Comment"].asString();
if(!sdNodeColsColsItem["Name"].isNull())
colsItemObject.name = sdNodeColsColsItem["Name"].asString();
if(!sdNodeColsColsItem["Parameters"].isNull())
colsItemObject.parameters = sdNodeColsColsItem["Parameters"].asString();
if(!sdNodeColsColsItem["Type"].isNull())
colsItemObject.type = sdNodeColsColsItem["Type"].asString();
tableVersion_.table.sd.cols.push_back(colsItemObject);
}
auto allSortColsNode = sdNode["SortCols"]["SortColsItem"];
for (auto sdNodeSortColsSortColsItem : allSortColsNode)
{
TableVersion::Table::Sd::SortColsItem sortColsItemObject;
if(!sdNodeSortColsSortColsItem["Col"].isNull())
sortColsItemObject.col = sdNodeSortColsSortColsItem["Col"].asString();
if(!sdNodeSortColsSortColsItem["Order"].isNull())
sortColsItemObject.order = std::stoi(sdNodeSortColsSortColsItem["Order"].asString());
tableVersion_.table.sd.sortCols.push_back(sortColsItemObject);
}
auto serDeInfoNode = sdNode["SerDeInfo"];
if(!serDeInfoNode["Name"].isNull())
tableVersion_.table.sd.serDeInfo.name = serDeInfoNode["Name"].asString();
if(!serDeInfoNode["Parameters"].isNull())
tableVersion_.table.sd.serDeInfo.parameters = serDeInfoNode["Parameters"].asString();
if(!serDeInfoNode["SerializationLib"].isNull())
tableVersion_.table.sd.serDeInfo.serializationLib = serDeInfoNode["SerializationLib"].asString();
auto skewedInfoNode = sdNode["SkewedInfo"];
if(!skewedInfoNode["SkewedColValueLocationMaps"].isNull())
tableVersion_.table.sd.skewedInfo.skewedColValueLocationMaps = skewedInfoNode["SkewedColValueLocationMaps"].asString();
auto allSkewedColNames = skewedInfoNode["SkewedColNames"]["null"];
for (auto value : allSkewedColNames)
tableVersion_.table.sd.skewedInfo.skewedColNames.push_back(value.asString());
auto allSkewedColValues = skewedInfoNode["SkewedColValues"]["null"];
for (auto value : allSkewedColValues)
tableVersion_.table.sd.skewedInfo.skewedColValues.push_back(value.asString());
auto allBucketCols = sdNode["BucketCols"]["null"];
for (auto value : allBucketCols)
tableVersion_.table.sd.bucketCols.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetTableVersionResult::getMessage()const
{
return message_;
}
GetTableVersionResult::TableVersion GetTableVersionResult::getTableVersion()const
{
return tableVersion_;
}
std::string GetTableVersionResult::getCode()const
{
return code_;
}
bool GetTableVersionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,37 @@
/*
* 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/datalake/model/GrantPermissionsRequest.h>
using AlibabaCloud::DataLake::Model::GrantPermissionsRequest;
GrantPermissionsRequest::GrantPermissionsRequest()
: RoaServiceRequest("datalake", "2020-07-10") {
setResourcePath("/api/metastore/auth/permissions/grant"};
setMethod(HttpRequest::Method::Post);
}
GrantPermissionsRequest::~GrantPermissionsRequest() {}
std::string GrantPermissionsRequest::getBody() const {
return body_;
}
void GrantPermissionsRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("Body"), body);
}

Some files were not shown because too many files have changed in this diff Show More