Supported delete snapshots.
This commit is contained in:
56
dbfs/src/model/CancelAutoSnapshotPolicyRequest.cc
Normal file
56
dbfs/src/model/CancelAutoSnapshotPolicyRequest.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/dbfs/model/CancelAutoSnapshotPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::DBFS::Model::CancelAutoSnapshotPolicyRequest;
|
||||
|
||||
CancelAutoSnapshotPolicyRequest::CancelAutoSnapshotPolicyRequest()
|
||||
: RpcServiceRequest("dbfs", "2020-04-18", "CancelAutoSnapshotPolicy") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CancelAutoSnapshotPolicyRequest::~CancelAutoSnapshotPolicyRequest() {}
|
||||
|
||||
std::vector<CancelAutoSnapshotPolicyRequest::std::string> CancelAutoSnapshotPolicyRequest::getDbfsIds() const {
|
||||
return dbfsIds_;
|
||||
}
|
||||
|
||||
void CancelAutoSnapshotPolicyRequest::setDbfsIds(const std::vector<CancelAutoSnapshotPolicyRequest::std::string> &dbfsIds) {
|
||||
dbfsIds_ = dbfsIds;
|
||||
for(int dep1 = 0; dep1 != dbfsIds.size(); dep1++) {
|
||||
setParameter(std::string("DbfsIds") + "." + std::to_string(dep1 + 1), dbfsIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CancelAutoSnapshotPolicyRequest::getPolicyId() const {
|
||||
return policyId_;
|
||||
}
|
||||
|
||||
void CancelAutoSnapshotPolicyRequest::setPolicyId(const std::string &policyId) {
|
||||
policyId_ = policyId;
|
||||
setParameter(std::string("PolicyId"), policyId);
|
||||
}
|
||||
|
||||
std::string CancelAutoSnapshotPolicyRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CancelAutoSnapshotPolicyRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
44
dbfs/src/model/CancelAutoSnapshotPolicyResult.cc
Normal file
44
dbfs/src/model/CancelAutoSnapshotPolicyResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dbfs/model/CancelAutoSnapshotPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::DBFS;
|
||||
using namespace AlibabaCloud::DBFS::Model;
|
||||
|
||||
CancelAutoSnapshotPolicyResult::CancelAutoSnapshotPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CancelAutoSnapshotPolicyResult::CancelAutoSnapshotPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CancelAutoSnapshotPolicyResult::~CancelAutoSnapshotPolicyResult()
|
||||
{}
|
||||
|
||||
void CancelAutoSnapshotPolicyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
76
dbfs/src/model/CreateAutoSnapshotPolicyRequest.cc
Normal file
76
dbfs/src/model/CreateAutoSnapshotPolicyRequest.cc
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 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/dbfs/model/CreateAutoSnapshotPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::DBFS::Model::CreateAutoSnapshotPolicyRequest;
|
||||
|
||||
CreateAutoSnapshotPolicyRequest::CreateAutoSnapshotPolicyRequest()
|
||||
: RpcServiceRequest("dbfs", "2020-04-18", "CreateAutoSnapshotPolicy") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateAutoSnapshotPolicyRequest::~CreateAutoSnapshotPolicyRequest() {}
|
||||
|
||||
std::vector<CreateAutoSnapshotPolicyRequest::std::string> CreateAutoSnapshotPolicyRequest::getTimePoints() const {
|
||||
return timePoints_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setTimePoints(const std::vector<CreateAutoSnapshotPolicyRequest::std::string> &timePoints) {
|
||||
timePoints_ = timePoints;
|
||||
for(int dep1 = 0; dep1 != timePoints.size(); dep1++) {
|
||||
setParameter(std::string("TimePoints") + "." + std::to_string(dep1 + 1), timePoints[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateAutoSnapshotPolicyRequest::std::string> CreateAutoSnapshotPolicyRequest::getRepeatWeekdays() const {
|
||||
return repeatWeekdays_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setRepeatWeekdays(const std::vector<CreateAutoSnapshotPolicyRequest::std::string> &repeatWeekdays) {
|
||||
repeatWeekdays_ = repeatWeekdays;
|
||||
for(int dep1 = 0; dep1 != repeatWeekdays.size(); dep1++) {
|
||||
setParameter(std::string("RepeatWeekdays") + "." + std::to_string(dep1 + 1), repeatWeekdays[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateAutoSnapshotPolicyRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string CreateAutoSnapshotPolicyRequest::getPolicyName() const {
|
||||
return policyName_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setPolicyName(const std::string &policyName) {
|
||||
policyName_ = policyName;
|
||||
setParameter(std::string("PolicyName"), policyName);
|
||||
}
|
||||
|
||||
int CreateAutoSnapshotPolicyRequest::getRetentionDays() const {
|
||||
return retentionDays_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setRetentionDays(int retentionDays) {
|
||||
retentionDays_ = retentionDays;
|
||||
setParameter(std::string("RetentionDays"), std::to_string(retentionDays));
|
||||
}
|
||||
|
||||
51
dbfs/src/model/CreateAutoSnapshotPolicyResult.cc
Normal file
51
dbfs/src/model/CreateAutoSnapshotPolicyResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/dbfs/model/CreateAutoSnapshotPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::DBFS;
|
||||
using namespace AlibabaCloud::DBFS::Model;
|
||||
|
||||
CreateAutoSnapshotPolicyResult::CreateAutoSnapshotPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateAutoSnapshotPolicyResult::CreateAutoSnapshotPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateAutoSnapshotPolicyResult::~CreateAutoSnapshotPolicyResult()
|
||||
{}
|
||||
|
||||
void CreateAutoSnapshotPolicyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["PolicyId"].isNull())
|
||||
policyId_ = value["PolicyId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateAutoSnapshotPolicyResult::getPolicyId()const
|
||||
{
|
||||
return policyId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user