|
|
@@ -1,45 +1,45 @@
|
|
|
-/*
|
|
|
- * 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/dbs/model/DescribeFullBackupListResult.h>
|
|
|
-#include <json/json.h>
|
|
|
-
|
|
|
-using namespace AlibabaCloud::Dbs;
|
|
|
-using namespace AlibabaCloud::Dbs::Model;
|
|
|
-
|
|
|
-DescribeFullBackupListResult::DescribeFullBackupListResult() :
|
|
|
- ServiceResult()
|
|
|
-{}
|
|
|
-
|
|
|
-DescribeFullBackupListResult::DescribeFullBackupListResult(const std::string &payload) :
|
|
|
- ServiceResult()
|
|
|
-{
|
|
|
- parse(payload);
|
|
|
-}
|
|
|
-
|
|
|
-DescribeFullBackupListResult::~DescribeFullBackupListResult()
|
|
|
-{}
|
|
|
-
|
|
|
-void DescribeFullBackupListResult::parse(const std::string &payload)
|
|
|
-{
|
|
|
- Json::Reader reader;
|
|
|
- Json::Value value;
|
|
|
- reader.parse(payload, value);
|
|
|
-
|
|
|
- setRequestId(value["RequestId"].asString());
|
|
|
+/*
|
|
|
+ * 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/dbs/model/DescribeFullBackupListResult.h>
|
|
|
+#include <json/json.h>
|
|
|
+
|
|
|
+using namespace AlibabaCloud::Dbs;
|
|
|
+using namespace AlibabaCloud::Dbs::Model;
|
|
|
+
|
|
|
+DescribeFullBackupListResult::DescribeFullBackupListResult() :
|
|
|
+ ServiceResult()
|
|
|
+{}
|
|
|
+
|
|
|
+DescribeFullBackupListResult::DescribeFullBackupListResult(const std::string &payload) :
|
|
|
+ ServiceResult()
|
|
|
+{
|
|
|
+ parse(payload);
|
|
|
+}
|
|
|
+
|
|
|
+DescribeFullBackupListResult::~DescribeFullBackupListResult()
|
|
|
+{}
|
|
|
+
|
|
|
+void DescribeFullBackupListResult::parse(const std::string &payload)
|
|
|
+{
|
|
|
+ Json::Reader reader;
|
|
|
+ Json::Value value;
|
|
|
+ reader.parse(payload, value);
|
|
|
+
|
|
|
+ setRequestId(value["RequestId"].asString());
|
|
|
auto allItems = value["Items"]["FullBackupFile"];
|
|
|
for (auto value : allItems)
|
|
|
{
|
|
|
@@ -64,6 +64,10 @@ void DescribeFullBackupListResult::parse(const std::string &payload)
|
|
|
itemsObject.errMessage = value["ErrMessage"].asString();
|
|
|
if(!value["BackupObjects"].isNull())
|
|
|
itemsObject.backupObjects = value["BackupObjects"].asString();
|
|
|
+ if(!value["CreateTime"].isNull())
|
|
|
+ itemsObject.createTime = std::stol(value["CreateTime"].asString());
|
|
|
+ if(!value["FinishTime"].isNull())
|
|
|
+ itemsObject.finishTime = std::stol(value["FinishTime"].asString());
|
|
|
items_.push_back(itemsObject);
|
|
|
}
|
|
|
if(!value["Success"].isNull())
|
|
|
@@ -82,9 +86,9 @@ void DescribeFullBackupListResult::parse(const std::string &payload)
|
|
|
pageNum_ = std::stoi(value["PageNum"].asString());
|
|
|
if(!value["TotalElements"].isNull())
|
|
|
totalElements_ = std::stoi(value["TotalElements"].asString());
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
int DescribeFullBackupListResult::getPageSize()const
|
|
|
{
|
|
|
return pageSize_;
|