Supported delete snapshots.
This commit is contained in:
@@ -25,6 +25,10 @@ set(dbfs_public_header_model
|
||||
include/alibabacloud/dbfs/model/AddTagsBatchResult.h
|
||||
include/alibabacloud/dbfs/model/AttachDbfsRequest.h
|
||||
include/alibabacloud/dbfs/model/AttachDbfsResult.h
|
||||
include/alibabacloud/dbfs/model/CancelAutoSnapshotPolicyRequest.h
|
||||
include/alibabacloud/dbfs/model/CancelAutoSnapshotPolicyResult.h
|
||||
include/alibabacloud/dbfs/model/CreateAutoSnapshotPolicyRequest.h
|
||||
include/alibabacloud/dbfs/model/CreateAutoSnapshotPolicyResult.h
|
||||
include/alibabacloud/dbfs/model/CreateDbfsRequest.h
|
||||
include/alibabacloud/dbfs/model/CreateDbfsResult.h
|
||||
include/alibabacloud/dbfs/model/CreateServiceLinkedRoleRequest.h
|
||||
@@ -74,6 +78,10 @@ set(dbfs_src
|
||||
src/model/AddTagsBatchResult.cc
|
||||
src/model/AttachDbfsRequest.cc
|
||||
src/model/AttachDbfsResult.cc
|
||||
src/model/CancelAutoSnapshotPolicyRequest.cc
|
||||
src/model/CancelAutoSnapshotPolicyResult.cc
|
||||
src/model/CreateAutoSnapshotPolicyRequest.cc
|
||||
src/model/CreateAutoSnapshotPolicyResult.cc
|
||||
src/model/CreateDbfsRequest.cc
|
||||
src/model/CreateDbfsResult.cc
|
||||
src/model/CreateServiceLinkedRoleRequest.cc
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
#include "model/AddTagsBatchResult.h"
|
||||
#include "model/AttachDbfsRequest.h"
|
||||
#include "model/AttachDbfsResult.h"
|
||||
#include "model/CancelAutoSnapshotPolicyRequest.h"
|
||||
#include "model/CancelAutoSnapshotPolicyResult.h"
|
||||
#include "model/CreateAutoSnapshotPolicyRequest.h"
|
||||
#include "model/CreateAutoSnapshotPolicyResult.h"
|
||||
#include "model/CreateDbfsRequest.h"
|
||||
#include "model/CreateDbfsResult.h"
|
||||
#include "model/CreateServiceLinkedRoleRequest.h"
|
||||
@@ -83,6 +87,12 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::AttachDbfsResult> AttachDbfsOutcome;
|
||||
typedef std::future<AttachDbfsOutcome> AttachDbfsOutcomeCallable;
|
||||
typedef std::function<void(const DBFSClient*, const Model::AttachDbfsRequest&, const AttachDbfsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AttachDbfsAsyncHandler;
|
||||
typedef Outcome<Error, Model::CancelAutoSnapshotPolicyResult> CancelAutoSnapshotPolicyOutcome;
|
||||
typedef std::future<CancelAutoSnapshotPolicyOutcome> CancelAutoSnapshotPolicyOutcomeCallable;
|
||||
typedef std::function<void(const DBFSClient*, const Model::CancelAutoSnapshotPolicyRequest&, const CancelAutoSnapshotPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelAutoSnapshotPolicyAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateAutoSnapshotPolicyResult> CreateAutoSnapshotPolicyOutcome;
|
||||
typedef std::future<CreateAutoSnapshotPolicyOutcome> CreateAutoSnapshotPolicyOutcomeCallable;
|
||||
typedef std::function<void(const DBFSClient*, const Model::CreateAutoSnapshotPolicyRequest&, const CreateAutoSnapshotPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAutoSnapshotPolicyAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateDbfsResult> CreateDbfsOutcome;
|
||||
typedef std::future<CreateDbfsOutcome> CreateDbfsOutcomeCallable;
|
||||
typedef std::function<void(const DBFSClient*, const Model::CreateDbfsRequest&, const CreateDbfsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateDbfsAsyncHandler;
|
||||
@@ -157,6 +167,12 @@ namespace AlibabaCloud
|
||||
AttachDbfsOutcome attachDbfs(const Model::AttachDbfsRequest &request)const;
|
||||
void attachDbfsAsync(const Model::AttachDbfsRequest& request, const AttachDbfsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AttachDbfsOutcomeCallable attachDbfsCallable(const Model::AttachDbfsRequest& request) const;
|
||||
CancelAutoSnapshotPolicyOutcome cancelAutoSnapshotPolicy(const Model::CancelAutoSnapshotPolicyRequest &request)const;
|
||||
void cancelAutoSnapshotPolicyAsync(const Model::CancelAutoSnapshotPolicyRequest& request, const CancelAutoSnapshotPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CancelAutoSnapshotPolicyOutcomeCallable cancelAutoSnapshotPolicyCallable(const Model::CancelAutoSnapshotPolicyRequest& request) const;
|
||||
CreateAutoSnapshotPolicyOutcome createAutoSnapshotPolicy(const Model::CreateAutoSnapshotPolicyRequest &request)const;
|
||||
void createAutoSnapshotPolicyAsync(const Model::CreateAutoSnapshotPolicyRequest& request, const CreateAutoSnapshotPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateAutoSnapshotPolicyOutcomeCallable createAutoSnapshotPolicyCallable(const Model::CreateAutoSnapshotPolicyRequest& request) const;
|
||||
CreateDbfsOutcome createDbfs(const Model::CreateDbfsRequest &request)const;
|
||||
void createDbfsAsync(const Model::CreateDbfsRequest& request, const CreateDbfsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateDbfsOutcomeCallable createDbfsCallable(const Model::CreateDbfsRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DBFS_MODEL_CANCELAUTOSNAPSHOTPOLICYREQUEST_H_
|
||||
#define ALIBABACLOUD_DBFS_MODEL_CANCELAUTOSNAPSHOTPOLICYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/dbfs/DBFSExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace DBFS {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_DBFS_EXPORT CancelAutoSnapshotPolicyRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CancelAutoSnapshotPolicyRequest();
|
||||
~CancelAutoSnapshotPolicyRequest();
|
||||
std::vector<std::string> getDbfsIds() const;
|
||||
void setDbfsIds(const std::vector<std::string> &dbfsIds);
|
||||
std::string getPolicyId() const;
|
||||
void setPolicyId(const std::string &policyId);
|
||||
std::string getRegionId() const;
|
||||
void setRegionId(const std::string ®ionId);
|
||||
|
||||
private:
|
||||
std::vector<std::string> dbfsIds_;
|
||||
std::string policyId_;
|
||||
std::string regionId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace DBFS
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DBFS_MODEL_CANCELAUTOSNAPSHOTPOLICYREQUEST_H_
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DBFS_MODEL_CANCELAUTOSNAPSHOTPOLICYRESULT_H_
|
||||
#define ALIBABACLOUD_DBFS_MODEL_CANCELAUTOSNAPSHOTPOLICYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dbfs/DBFSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DBFS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DBFS_EXPORT CancelAutoSnapshotPolicyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CancelAutoSnapshotPolicyResult();
|
||||
explicit CancelAutoSnapshotPolicyResult(const std::string &payload);
|
||||
~CancelAutoSnapshotPolicyResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DBFS_MODEL_CANCELAUTOSNAPSHOTPOLICYRESULT_H_
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DBFS_MODEL_CREATEAUTOSNAPSHOTPOLICYREQUEST_H_
|
||||
#define ALIBABACLOUD_DBFS_MODEL_CREATEAUTOSNAPSHOTPOLICYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/dbfs/DBFSExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace DBFS {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_DBFS_EXPORT CreateAutoSnapshotPolicyRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CreateAutoSnapshotPolicyRequest();
|
||||
~CreateAutoSnapshotPolicyRequest();
|
||||
std::vector<std::string> getTimePoints() const;
|
||||
void setTimePoints(const std::vector<std::string> &timePoints);
|
||||
std::vector<std::string> getRepeatWeekdays() const;
|
||||
void setRepeatWeekdays(const std::vector<std::string> &repeatWeekdays);
|
||||
std::string getRegionId() const;
|
||||
void setRegionId(const std::string ®ionId);
|
||||
std::string getPolicyName() const;
|
||||
void setPolicyName(const std::string &policyName);
|
||||
int getRetentionDays() const;
|
||||
void setRetentionDays(int retentionDays);
|
||||
|
||||
private:
|
||||
std::vector<std::string> timePoints_;
|
||||
std::vector<std::string> repeatWeekdays_;
|
||||
std::string regionId_;
|
||||
std::string policyName_;
|
||||
int retentionDays_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace DBFS
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DBFS_MODEL_CREATEAUTOSNAPSHOTPOLICYREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DBFS_MODEL_CREATEAUTOSNAPSHOTPOLICYRESULT_H_
|
||||
#define ALIBABACLOUD_DBFS_MODEL_CREATEAUTOSNAPSHOTPOLICYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dbfs/DBFSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DBFS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DBFS_EXPORT CreateAutoSnapshotPolicyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateAutoSnapshotPolicyResult();
|
||||
explicit CreateAutoSnapshotPolicyResult(const std::string &payload);
|
||||
~CreateAutoSnapshotPolicyResult();
|
||||
std::string getPolicyId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string policyId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DBFS_MODEL_CREATEAUTOSNAPSHOTPOLICYRESULT_H_
|
||||
@@ -123,6 +123,78 @@ DBFSClient::AttachDbfsOutcomeCallable DBFSClient::attachDbfsCallable(const Attac
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DBFSClient::CancelAutoSnapshotPolicyOutcome DBFSClient::cancelAutoSnapshotPolicy(const CancelAutoSnapshotPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CancelAutoSnapshotPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CancelAutoSnapshotPolicyOutcome(CancelAutoSnapshotPolicyResult(outcome.result()));
|
||||
else
|
||||
return CancelAutoSnapshotPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DBFSClient::cancelAutoSnapshotPolicyAsync(const CancelAutoSnapshotPolicyRequest& request, const CancelAutoSnapshotPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, cancelAutoSnapshotPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DBFSClient::CancelAutoSnapshotPolicyOutcomeCallable DBFSClient::cancelAutoSnapshotPolicyCallable(const CancelAutoSnapshotPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CancelAutoSnapshotPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->cancelAutoSnapshotPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DBFSClient::CreateAutoSnapshotPolicyOutcome DBFSClient::createAutoSnapshotPolicy(const CreateAutoSnapshotPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateAutoSnapshotPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateAutoSnapshotPolicyOutcome(CreateAutoSnapshotPolicyResult(outcome.result()));
|
||||
else
|
||||
return CreateAutoSnapshotPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DBFSClient::createAutoSnapshotPolicyAsync(const CreateAutoSnapshotPolicyRequest& request, const CreateAutoSnapshotPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createAutoSnapshotPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DBFSClient::CreateAutoSnapshotPolicyOutcomeCallable DBFSClient::createAutoSnapshotPolicyCallable(const CreateAutoSnapshotPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateAutoSnapshotPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createAutoSnapshotPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DBFSClient::CreateDbfsOutcome DBFSClient::createDbfs(const CreateDbfsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
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