Generated 2019-06-01 for smc.
This commit is contained in:
@@ -87,6 +87,42 @@ SmcClient::CreateReplicationJobOutcomeCallable SmcClient::createReplicationJobCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SmcClient::CutOverReplicationJobOutcome SmcClient::cutOverReplicationJob(const CutOverReplicationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CutOverReplicationJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CutOverReplicationJobOutcome(CutOverReplicationJobResult(outcome.result()));
|
||||
else
|
||||
return CutOverReplicationJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SmcClient::cutOverReplicationJobAsync(const CutOverReplicationJobRequest& request, const CutOverReplicationJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, cutOverReplicationJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SmcClient::CutOverReplicationJobOutcomeCallable SmcClient::cutOverReplicationJobCallable(const CutOverReplicationJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CutOverReplicationJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->cutOverReplicationJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SmcClient::DeleteReplicationJobOutcome SmcClient::deleteReplicationJob(const DeleteReplicationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -87,6 +87,17 @@ void CreateReplicationJobRequest::setNetMode(int netMode)
|
||||
setParameter("NetMode", std::to_string(netMode));
|
||||
}
|
||||
|
||||
std::string CreateReplicationJobRequest::getLicenseType()const
|
||||
{
|
||||
return licenseType_;
|
||||
}
|
||||
|
||||
void CreateReplicationJobRequest::setLicenseType(const std::string& licenseType)
|
||||
{
|
||||
licenseType_ = licenseType;
|
||||
setParameter("LicenseType", licenseType);
|
||||
}
|
||||
|
||||
std::string CreateReplicationJobRequest::getContainerNamespace()const
|
||||
{
|
||||
return containerNamespace_;
|
||||
|
||||
84
smc/src/model/CutOverReplicationJobRequest.cc
Normal file
84
smc/src/model/CutOverReplicationJobRequest.cc
Normal 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/smc/model/CutOverReplicationJobRequest.h>
|
||||
|
||||
using AlibabaCloud::Smc::Model::CutOverReplicationJobRequest;
|
||||
|
||||
CutOverReplicationJobRequest::CutOverReplicationJobRequest() :
|
||||
RpcServiceRequest("smc", "2019-06-01", "CutOverReplicationJob")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CutOverReplicationJobRequest::~CutOverReplicationJobRequest()
|
||||
{}
|
||||
|
||||
std::string CutOverReplicationJobRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void CutOverReplicationJobRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
long CutOverReplicationJobRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void CutOverReplicationJobRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string CutOverReplicationJobRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CutOverReplicationJobRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string CutOverReplicationJobRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void CutOverReplicationJobRequest::setJobId(const std::string& jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setParameter("JobId", jobId);
|
||||
}
|
||||
|
||||
bool CutOverReplicationJobRequest::getSyncData()const
|
||||
{
|
||||
return syncData_;
|
||||
}
|
||||
|
||||
void CutOverReplicationJobRequest::setSyncData(bool syncData)
|
||||
{
|
||||
syncData_ = syncData;
|
||||
setParameter("SyncData", syncData ? "true" : "false");
|
||||
}
|
||||
|
||||
44
smc/src/model/CutOverReplicationJobResult.cc
Normal file
44
smc/src/model/CutOverReplicationJobResult.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/smc/model/CutOverReplicationJobResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Smc;
|
||||
using namespace AlibabaCloud::Smc::Model;
|
||||
|
||||
CutOverReplicationJobResult::CutOverReplicationJobResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CutOverReplicationJobResult::CutOverReplicationJobResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CutOverReplicationJobResult::~CutOverReplicationJobResult()
|
||||
{}
|
||||
|
||||
void CutOverReplicationJobResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -113,6 +113,8 @@ void DescribeReplicationJobsResult::parse(const std::string &payload)
|
||||
replicationJobsObject.containerRepository = valueReplicationJobsReplicationJob["ContainerRepository"].asString();
|
||||
if(!valueReplicationJobsReplicationJob["ContainerTag"].isNull())
|
||||
replicationJobsObject.containerTag = valueReplicationJobsReplicationJob["ContainerTag"].asString();
|
||||
if(!valueReplicationJobsReplicationJob["LicenseType"].isNull())
|
||||
replicationJobsObject.licenseType = valueReplicationJobsReplicationJob["LicenseType"].asString();
|
||||
auto allSystemDiskPartsNode = valueReplicationJobsReplicationJob["SystemDiskParts"]["SystemDiskPart"];
|
||||
for (auto valueReplicationJobsReplicationJobSystemDiskPartsSystemDiskPart : allSystemDiskPartsNode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user