Supported ModifyDtsJob and DeleteDtsJob.
This commit is contained in:
@@ -51,6 +51,42 @@ DtsClient::DtsClient(const std::string & accessKeyId, const std::string & access
|
||||
DtsClient::~DtsClient()
|
||||
{}
|
||||
|
||||
DtsClient::ConfigureDtsJobOutcome DtsClient::configureDtsJob(const ConfigureDtsJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ConfigureDtsJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ConfigureDtsJobOutcome(ConfigureDtsJobResult(outcome.result()));
|
||||
else
|
||||
return ConfigureDtsJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::configureDtsJobAsync(const ConfigureDtsJobRequest& request, const ConfigureDtsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, configureDtsJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::ConfigureDtsJobOutcomeCallable DtsClient::configureDtsJobCallable(const ConfigureDtsJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ConfigureDtsJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->configureDtsJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::ConfigureMigrationJobOutcome DtsClient::configureMigrationJob(const ConfigureMigrationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -339,6 +375,42 @@ DtsClient::CreateConsumerGroupOutcomeCallable DtsClient::createConsumerGroupCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::CreateDtsInstanceOutcome DtsClient::createDtsInstance(const CreateDtsInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateDtsInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateDtsInstanceOutcome(CreateDtsInstanceResult(outcome.result()));
|
||||
else
|
||||
return CreateDtsInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::createDtsInstanceAsync(const CreateDtsInstanceRequest& request, const CreateDtsInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createDtsInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::CreateDtsInstanceOutcomeCallable DtsClient::createDtsInstanceCallable(const CreateDtsInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateDtsInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createDtsInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::CreateMigrationJobOutcome DtsClient::createMigrationJob(const CreateMigrationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -483,6 +555,42 @@ DtsClient::DeleteConsumerGroupOutcomeCallable DtsClient::deleteConsumerGroupCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::DeleteDtsJobOutcome DtsClient::deleteDtsJob(const DeleteDtsJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteDtsJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteDtsJobOutcome(DeleteDtsJobResult(outcome.result()));
|
||||
else
|
||||
return DeleteDtsJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::deleteDtsJobAsync(const DeleteDtsJobRequest& request, const DeleteDtsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteDtsJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::DeleteDtsJobOutcomeCallable DtsClient::deleteDtsJobCallable(const DeleteDtsJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteDtsJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteDtsJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::DeleteMigrationJobOutcome DtsClient::deleteMigrationJob(const DeleteMigrationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -699,6 +807,78 @@ DtsClient::DescribeDTSIPOutcomeCallable DtsClient::describeDTSIPCallable(const D
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::DescribeDtsJobDetailOutcome DtsClient::describeDtsJobDetail(const DescribeDtsJobDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeDtsJobDetailOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeDtsJobDetailOutcome(DescribeDtsJobDetailResult(outcome.result()));
|
||||
else
|
||||
return DescribeDtsJobDetailOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::describeDtsJobDetailAsync(const DescribeDtsJobDetailRequest& request, const DescribeDtsJobDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeDtsJobDetail(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::DescribeDtsJobDetailOutcomeCallable DtsClient::describeDtsJobDetailCallable(const DescribeDtsJobDetailRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeDtsJobDetailOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeDtsJobDetail(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::DescribeDtsJobsOutcome DtsClient::describeDtsJobs(const DescribeDtsJobsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeDtsJobsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeDtsJobsOutcome(DescribeDtsJobsResult(outcome.result()));
|
||||
else
|
||||
return DescribeDtsJobsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::describeDtsJobsAsync(const DescribeDtsJobsRequest& request, const DescribeDtsJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeDtsJobs(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::DescribeDtsJobsOutcomeCallable DtsClient::describeDtsJobsCallable(const DescribeDtsJobsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeDtsJobsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeDtsJobs(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::DescribeEndpointSwitchStatusOutcome DtsClient::describeEndpointSwitchStatus(const DescribeEndpointSwitchStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -915,6 +1095,42 @@ DtsClient::DescribeMigrationJobsOutcomeCallable DtsClient::describeMigrationJobs
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::DescribePreCheckStatusOutcome DtsClient::describePreCheckStatus(const DescribePreCheckStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribePreCheckStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribePreCheckStatusOutcome(DescribePreCheckStatusResult(outcome.result()));
|
||||
else
|
||||
return DescribePreCheckStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::describePreCheckStatusAsync(const DescribePreCheckStatusRequest& request, const DescribePreCheckStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describePreCheckStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::DescribePreCheckStatusOutcomeCallable DtsClient::describePreCheckStatusCallable(const DescribePreCheckStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribePreCheckStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describePreCheckStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::DescribeSubscriptionInstanceAlertOutcome DtsClient::describeSubscriptionInstanceAlert(const DescribeSubscriptionInstanceAlertRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1347,6 +1563,114 @@ DtsClient::ModifyConsumptionTimestampOutcomeCallable DtsClient::modifyConsumptio
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::ModifyDtsJobOutcome DtsClient::modifyDtsJob(const ModifyDtsJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyDtsJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyDtsJobOutcome(ModifyDtsJobResult(outcome.result()));
|
||||
else
|
||||
return ModifyDtsJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::modifyDtsJobAsync(const ModifyDtsJobRequest& request, const ModifyDtsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyDtsJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::ModifyDtsJobOutcomeCallable DtsClient::modifyDtsJobCallable(const ModifyDtsJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyDtsJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyDtsJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::ModifyDtsJobNameOutcome DtsClient::modifyDtsJobName(const ModifyDtsJobNameRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyDtsJobNameOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyDtsJobNameOutcome(ModifyDtsJobNameResult(outcome.result()));
|
||||
else
|
||||
return ModifyDtsJobNameOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::modifyDtsJobNameAsync(const ModifyDtsJobNameRequest& request, const ModifyDtsJobNameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyDtsJobName(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::ModifyDtsJobNameOutcomeCallable DtsClient::modifyDtsJobNameCallable(const ModifyDtsJobNameRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyDtsJobNameOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyDtsJobName(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::ModifyDtsJobPasswordOutcome DtsClient::modifyDtsJobPassword(const ModifyDtsJobPasswordRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyDtsJobPasswordOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyDtsJobPasswordOutcome(ModifyDtsJobPasswordResult(outcome.result()));
|
||||
else
|
||||
return ModifyDtsJobPasswordOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::modifyDtsJobPasswordAsync(const ModifyDtsJobPasswordRequest& request, const ModifyDtsJobPasswordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyDtsJobPassword(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::ModifyDtsJobPasswordOutcomeCallable DtsClient::modifyDtsJobPasswordCallable(const ModifyDtsJobPasswordRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyDtsJobPasswordOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyDtsJobPassword(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::ModifySubscriptionObjectOutcome DtsClient::modifySubscriptionObject(const ModifySubscriptionObjectRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1419,6 +1743,42 @@ DtsClient::ModifySynchronizationObjectOutcomeCallable DtsClient::modifySynchroni
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::ResetDtsJobOutcome DtsClient::resetDtsJob(const ResetDtsJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ResetDtsJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ResetDtsJobOutcome(ResetDtsJobResult(outcome.result()));
|
||||
else
|
||||
return ResetDtsJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::resetDtsJobAsync(const ResetDtsJobRequest& request, const ResetDtsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, resetDtsJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::ResetDtsJobOutcomeCallable DtsClient::resetDtsJobCallable(const ResetDtsJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ResetDtsJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->resetDtsJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::ResetSynchronizationJobOutcome DtsClient::resetSynchronizationJob(const ResetSynchronizationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1491,6 +1851,78 @@ DtsClient::ShieldPrecheckOutcomeCallable DtsClient::shieldPrecheckCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::SkipPreCheckOutcome DtsClient::skipPreCheck(const SkipPreCheckRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SkipPreCheckOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SkipPreCheckOutcome(SkipPreCheckResult(outcome.result()));
|
||||
else
|
||||
return SkipPreCheckOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::skipPreCheckAsync(const SkipPreCheckRequest& request, const SkipPreCheckAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, skipPreCheck(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::SkipPreCheckOutcomeCallable DtsClient::skipPreCheckCallable(const SkipPreCheckRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SkipPreCheckOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->skipPreCheck(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::StartDtsJobOutcome DtsClient::startDtsJob(const StartDtsJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return StartDtsJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return StartDtsJobOutcome(StartDtsJobResult(outcome.result()));
|
||||
else
|
||||
return StartDtsJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::startDtsJobAsync(const StartDtsJobRequest& request, const StartDtsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, startDtsJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::StartDtsJobOutcomeCallable DtsClient::startDtsJobCallable(const StartDtsJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<StartDtsJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->startDtsJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::StartMigrationJobOutcome DtsClient::startMigrationJob(const StartMigrationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1599,6 +2031,42 @@ DtsClient::StartSynchronizationJobOutcomeCallable DtsClient::startSynchronizatio
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::StopDtsJobOutcome DtsClient::stopDtsJob(const StopDtsJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return StopDtsJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return StopDtsJobOutcome(StopDtsJobResult(outcome.result()));
|
||||
else
|
||||
return StopDtsJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::stopDtsJobAsync(const StopDtsJobRequest& request, const StopDtsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, stopDtsJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::StopDtsJobOutcomeCallable DtsClient::stopDtsJobCallable(const StopDtsJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<StopDtsJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->stopDtsJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::StopMigrationJobOutcome DtsClient::stopMigrationJob(const StopMigrationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1635,6 +2103,42 @@ DtsClient::StopMigrationJobOutcomeCallable DtsClient::stopMigrationJobCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::SuspendDtsJobOutcome DtsClient::suspendDtsJob(const SuspendDtsJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SuspendDtsJobOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SuspendDtsJobOutcome(SuspendDtsJobResult(outcome.result()));
|
||||
else
|
||||
return SuspendDtsJobOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DtsClient::suspendDtsJobAsync(const SuspendDtsJobRequest& request, const SuspendDtsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, suspendDtsJob(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DtsClient::SuspendDtsJobOutcomeCallable DtsClient::suspendDtsJobCallable(const SuspendDtsJobRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SuspendDtsJobOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->suspendDtsJob(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DtsClient::SuspendMigrationJobOutcome DtsClient::suspendMigrationJob(const SuspendMigrationJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
62
dts/src/model/DeleteDtsJobRequest.cc
Normal file
62
dts/src/model/DeleteDtsJobRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/dts/model/DeleteDtsJobRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::DeleteDtsJobRequest;
|
||||
|
||||
DeleteDtsJobRequest::DeleteDtsJobRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "DeleteDtsJob")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteDtsJobRequest::~DeleteDtsJobRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDtsJobRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void DeleteDtsJobRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
std::string DeleteDtsJobRequest::getDtsInstanceId()const
|
||||
{
|
||||
return dtsInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteDtsJobRequest::setDtsInstanceId(const std::string& dtsInstanceId)
|
||||
{
|
||||
dtsInstanceId_ = dtsInstanceId;
|
||||
setParameter("DtsInstanceId", dtsInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteDtsJobRequest::getSynchronizationDirection()const
|
||||
{
|
||||
return synchronizationDirection_;
|
||||
}
|
||||
|
||||
void DeleteDtsJobRequest::setSynchronizationDirection(const std::string& synchronizationDirection)
|
||||
{
|
||||
synchronizationDirection_ = synchronizationDirection;
|
||||
setParameter("SynchronizationDirection", synchronizationDirection);
|
||||
}
|
||||
|
||||
86
dts/src/model/DeleteDtsJobResult.cc
Normal file
86
dts/src/model/DeleteDtsJobResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/dts/model/DeleteDtsJobResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
DeleteDtsJobResult::DeleteDtsJobResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDtsJobResult::DeleteDtsJobResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDtsJobResult::~DeleteDtsJobResult()
|
||||
{}
|
||||
|
||||
void DeleteDtsJobResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int DeleteDtsJobResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string DeleteDtsJobResult::getDynamicCode()const
|
||||
{
|
||||
return dynamicCode_;
|
||||
}
|
||||
|
||||
std::string DeleteDtsJobResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string DeleteDtsJobResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool DeleteDtsJobResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string DeleteDtsJobResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
@@ -126,26 +126,26 @@ void DescribeConnectionStatusRequest::setDestinationEndpointUserName(const std::
|
||||
setParameter("DestinationEndpointUserName", destinationEndpointUserName);
|
||||
}
|
||||
|
||||
bool DescribeConnectionStatusRequest::getDestinationEndpointArchitecture()const
|
||||
std::string DescribeConnectionStatusRequest::getDestinationEndpointArchitecture()const
|
||||
{
|
||||
return destinationEndpointArchitecture_;
|
||||
}
|
||||
|
||||
void DescribeConnectionStatusRequest::setDestinationEndpointArchitecture(bool destinationEndpointArchitecture)
|
||||
void DescribeConnectionStatusRequest::setDestinationEndpointArchitecture(const std::string& destinationEndpointArchitecture)
|
||||
{
|
||||
destinationEndpointArchitecture_ = destinationEndpointArchitecture;
|
||||
setParameter("DestinationEndpointArchitecture", destinationEndpointArchitecture ? "true" : "false");
|
||||
setParameter("DestinationEndpointArchitecture", destinationEndpointArchitecture);
|
||||
}
|
||||
|
||||
bool DescribeConnectionStatusRequest::getDestinationEndpointOracleSID()const
|
||||
std::string DescribeConnectionStatusRequest::getDestinationEndpointOracleSID()const
|
||||
{
|
||||
return destinationEndpointOracleSID_;
|
||||
}
|
||||
|
||||
void DescribeConnectionStatusRequest::setDestinationEndpointOracleSID(bool destinationEndpointOracleSID)
|
||||
void DescribeConnectionStatusRequest::setDestinationEndpointOracleSID(const std::string& destinationEndpointOracleSID)
|
||||
{
|
||||
destinationEndpointOracleSID_ = destinationEndpointOracleSID;
|
||||
setParameter("DestinationEndpointOracleSID", destinationEndpointOracleSID ? "true" : "false");
|
||||
setParameter("DestinationEndpointOracleSID", destinationEndpointOracleSID);
|
||||
}
|
||||
|
||||
std::string DescribeConnectionStatusRequest::getDestinationEndpointEngineName()const
|
||||
|
||||
40
dts/src/model/DescribeDtsJobDetailRequest.cc
Normal file
40
dts/src/model/DescribeDtsJobDetailRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/dts/model/DescribeDtsJobDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::DescribeDtsJobDetailRequest;
|
||||
|
||||
DescribeDtsJobDetailRequest::DescribeDtsJobDetailRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "DescribeDtsJobDetail")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeDtsJobDetailRequest::~DescribeDtsJobDetailRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeDtsJobDetailRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobDetailRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
259
dts/src/model/DescribeDtsJobDetailResult.cc
Normal file
259
dts/src/model/DescribeDtsJobDetailResult.cc
Normal file
@@ -0,0 +1,259 @@
|
||||
/*
|
||||
* 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/dts/model/DescribeDtsJobDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
DescribeDtsJobDetailResult::DescribeDtsJobDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDtsJobDetailResult::DescribeDtsJobDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDtsJobDetailResult::~DescribeDtsJobDetailResult()
|
||||
{}
|
||||
|
||||
void DescribeDtsJobDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto sourceEndpointNode = value["SourceEndpoint"];
|
||||
if(!sourceEndpointNode["InstanceID"].isNull())
|
||||
sourceEndpoint_.instanceID = sourceEndpointNode["InstanceID"].asString();
|
||||
if(!sourceEndpointNode["Region"].isNull())
|
||||
sourceEndpoint_.region = sourceEndpointNode["Region"].asString();
|
||||
if(!sourceEndpointNode["InstanceType"].isNull())
|
||||
sourceEndpoint_.instanceType = sourceEndpointNode["InstanceType"].asString();
|
||||
if(!sourceEndpointNode["EngineName"].isNull())
|
||||
sourceEndpoint_.engineName = sourceEndpointNode["EngineName"].asString();
|
||||
if(!sourceEndpointNode["Ip"].isNull())
|
||||
sourceEndpoint_.ip = sourceEndpointNode["Ip"].asString();
|
||||
if(!sourceEndpointNode["Port"].isNull())
|
||||
sourceEndpoint_.port = sourceEndpointNode["Port"].asString();
|
||||
if(!sourceEndpointNode["DatabaseName"].isNull())
|
||||
sourceEndpoint_.databaseName = sourceEndpointNode["DatabaseName"].asString();
|
||||
if(!sourceEndpointNode["OracleSID"].isNull())
|
||||
sourceEndpoint_.oracleSID = sourceEndpointNode["OracleSID"].asString();
|
||||
if(!sourceEndpointNode["UserName"].isNull())
|
||||
sourceEndpoint_.userName = sourceEndpointNode["UserName"].asString();
|
||||
if(!sourceEndpointNode["SslSolutionEnum"].isNull())
|
||||
sourceEndpoint_.sslSolutionEnum = sourceEndpointNode["SslSolutionEnum"].asString();
|
||||
if(!sourceEndpointNode["RoleName"].isNull())
|
||||
sourceEndpoint_.roleName = sourceEndpointNode["RoleName"].asString();
|
||||
if(!sourceEndpointNode["AliyunUid"].isNull())
|
||||
sourceEndpoint_.aliyunUid = sourceEndpointNode["AliyunUid"].asString();
|
||||
auto destinationEndpointNode = value["DestinationEndpoint"];
|
||||
if(!destinationEndpointNode["InstanceID"].isNull())
|
||||
destinationEndpoint_.instanceID = destinationEndpointNode["InstanceID"].asString();
|
||||
if(!destinationEndpointNode["Region"].isNull())
|
||||
destinationEndpoint_.region = destinationEndpointNode["Region"].asString();
|
||||
if(!destinationEndpointNode["InstanceType"].isNull())
|
||||
destinationEndpoint_.instanceType = destinationEndpointNode["InstanceType"].asString();
|
||||
if(!destinationEndpointNode["EngineName"].isNull())
|
||||
destinationEndpoint_.engineName = destinationEndpointNode["EngineName"].asString();
|
||||
if(!destinationEndpointNode["Ip"].isNull())
|
||||
destinationEndpoint_.ip = destinationEndpointNode["Ip"].asString();
|
||||
if(!destinationEndpointNode["Port"].isNull())
|
||||
destinationEndpoint_.port = destinationEndpointNode["Port"].asString();
|
||||
if(!destinationEndpointNode["DatabaseName"].isNull())
|
||||
destinationEndpoint_.databaseName = destinationEndpointNode["DatabaseName"].asString();
|
||||
if(!destinationEndpointNode["OracleSID"].isNull())
|
||||
destinationEndpoint_.oracleSID = destinationEndpointNode["OracleSID"].asString();
|
||||
if(!destinationEndpointNode["UserName"].isNull())
|
||||
destinationEndpoint_.userName = destinationEndpointNode["UserName"].asString();
|
||||
if(!destinationEndpointNode["SslSolutionEnum"].isNull())
|
||||
destinationEndpoint_.sslSolutionEnum = destinationEndpointNode["SslSolutionEnum"].asString();
|
||||
auto migrationModeNode = value["MigrationMode"];
|
||||
if(!migrationModeNode["StructureInitialization"].isNull())
|
||||
migrationMode_.structureInitialization = migrationModeNode["StructureInitialization"].asString() == "true";
|
||||
if(!migrationModeNode["DataInitialization"].isNull())
|
||||
migrationMode_.dataInitialization = migrationModeNode["DataInitialization"].asString() == "true";
|
||||
if(!migrationModeNode["DataSynchronization"].isNull())
|
||||
migrationMode_.dataSynchronization = migrationModeNode["DataSynchronization"].asString() == "true";
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["DtsInstanceID"].isNull())
|
||||
dtsInstanceID_ = value["DtsInstanceID"].asString();
|
||||
if(!value["DtsJobId"].isNull())
|
||||
dtsJobId_ = value["DtsJobId"].asString();
|
||||
if(!value["DtsJobName"].isNull())
|
||||
dtsJobName_ = value["DtsJobName"].asString();
|
||||
if(!value["DtsJobClass"].isNull())
|
||||
dtsJobClass_ = value["DtsJobClass"].asString();
|
||||
if(!value["DtsJobDirection"].isNull())
|
||||
dtsJobDirection_ = value["DtsJobDirection"].asString();
|
||||
if(!value["PayType"].isNull())
|
||||
payType_ = value["PayType"].asString();
|
||||
if(!value["ExpireTime"].isNull())
|
||||
expireTime_ = value["ExpireTime"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["FinishTime"].isNull())
|
||||
finishTime_ = value["FinishTime"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["Checkpoint"].isNull())
|
||||
checkpoint_ = std::stoi(value["Checkpoint"].asString());
|
||||
if(!value["Delay"].isNull())
|
||||
delay_ = std::stoi(value["Delay"].asString());
|
||||
if(!value["Reserved"].isNull())
|
||||
reserved_ = value["Reserved"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["DbObject"].isNull())
|
||||
dbObject_ = value["DbObject"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getDbObject()const
|
||||
{
|
||||
return dbObject_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getDtsJobName()const
|
||||
{
|
||||
return dtsJobName_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getPayType()const
|
||||
{
|
||||
return payType_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
int DescribeDtsJobDetailResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getDtsInstanceID()const
|
||||
{
|
||||
return dtsInstanceID_;
|
||||
}
|
||||
|
||||
DescribeDtsJobDetailResult::MigrationMode DescribeDtsJobDetailResult::getMigrationMode()const
|
||||
{
|
||||
return migrationMode_;
|
||||
}
|
||||
|
||||
bool DescribeDtsJobDetailResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
int DescribeDtsJobDetailResult::getDelay()const
|
||||
{
|
||||
return delay_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getDtsJobClass()const
|
||||
{
|
||||
return dtsJobClass_;
|
||||
}
|
||||
|
||||
int DescribeDtsJobDetailResult::getCheckpoint()const
|
||||
{
|
||||
return checkpoint_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getDtsJobDirection()const
|
||||
{
|
||||
return dtsJobDirection_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getFinishTime()const
|
||||
{
|
||||
return finishTime_;
|
||||
}
|
||||
|
||||
DescribeDtsJobDetailResult::DestinationEndpoint DescribeDtsJobDetailResult::getDestinationEndpoint()const
|
||||
{
|
||||
return destinationEndpoint_;
|
||||
}
|
||||
|
||||
DescribeDtsJobDetailResult::SourceEndpoint DescribeDtsJobDetailResult::getSourceEndpoint()const
|
||||
{
|
||||
return sourceEndpoint_;
|
||||
}
|
||||
|
||||
int DescribeDtsJobDetailResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getExpireTime()const
|
||||
{
|
||||
return expireTime_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobDetailResult::getReserved()const
|
||||
{
|
||||
return reserved_;
|
||||
}
|
||||
|
||||
139
dts/src/model/DescribeDtsJobsRequest.cc
Normal file
139
dts/src/model/DescribeDtsJobsRequest.cc
Normal file
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* 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/dts/model/DescribeDtsJobsRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::DescribeDtsJobsRequest;
|
||||
|
||||
DescribeDtsJobsRequest::DescribeDtsJobsRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "DescribeDtsJobs")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeDtsJobsRequest::~DescribeDtsJobsRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getOrderDirection()const
|
||||
{
|
||||
return orderDirection_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setOrderDirection(const std::string& orderDirection)
|
||||
{
|
||||
orderDirection_ = orderDirection;
|
||||
setParameter("OrderDirection", orderDirection);
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getParams()const
|
||||
{
|
||||
return params_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setParams(const std::string& params)
|
||||
{
|
||||
params_ = params;
|
||||
setParameter("Params", params);
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getJobType()const
|
||||
{
|
||||
return jobType_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setJobType(const std::string& jobType)
|
||||
{
|
||||
jobType_ = jobType;
|
||||
setParameter("JobType", jobType);
|
||||
}
|
||||
|
||||
int DescribeDtsJobsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setTags(const std::string& tags)
|
||||
{
|
||||
tags_ = tags;
|
||||
setParameter("Tags", tags);
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getOrderColumn()const
|
||||
{
|
||||
return orderColumn_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setOrderColumn(const std::string& orderColumn)
|
||||
{
|
||||
orderColumn_ = orderColumn;
|
||||
setParameter("OrderColumn", orderColumn);
|
||||
}
|
||||
|
||||
int DescribeDtsJobsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getRegion()const
|
||||
{
|
||||
return region_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setRegion(const std::string& region)
|
||||
{
|
||||
region_ = region;
|
||||
setParameter("Region", region);
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void DescribeDtsJobsRequest::setStatus(const std::string& status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", status);
|
||||
}
|
||||
|
||||
393
dts/src/model/DescribeDtsJobsResult.cc
Normal file
393
dts/src/model/DescribeDtsJobsResult.cc
Normal file
@@ -0,0 +1,393 @@
|
||||
/*
|
||||
* 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/dts/model/DescribeDtsJobsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
DescribeDtsJobsResult::DescribeDtsJobsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDtsJobsResult::DescribeDtsJobsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDtsJobsResult::~DescribeDtsJobsResult()
|
||||
{}
|
||||
|
||||
void DescribeDtsJobsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDtsJobListNode = value["DtsJobList"]["DtsJobStatus"];
|
||||
for (auto valueDtsJobListDtsJobStatus : allDtsJobListNode)
|
||||
{
|
||||
DtsJobStatus dtsJobListObject;
|
||||
if(!valueDtsJobListDtsJobStatus["DtsInstanceID"].isNull())
|
||||
dtsJobListObject.dtsInstanceID = valueDtsJobListDtsJobStatus["DtsInstanceID"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["DtsJobId"].isNull())
|
||||
dtsJobListObject.dtsJobId = valueDtsJobListDtsJobStatus["DtsJobId"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["DtsJobName"].isNull())
|
||||
dtsJobListObject.dtsJobName = valueDtsJobListDtsJobStatus["DtsJobName"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["DtsJobClass"].isNull())
|
||||
dtsJobListObject.dtsJobClass = valueDtsJobListDtsJobStatus["DtsJobClass"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["DtsJobDirection"].isNull())
|
||||
dtsJobListObject.dtsJobDirection = valueDtsJobListDtsJobStatus["DtsJobDirection"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["PayType"].isNull())
|
||||
dtsJobListObject.payType = valueDtsJobListDtsJobStatus["PayType"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["ExpireTime"].isNull())
|
||||
dtsJobListObject.expireTime = valueDtsJobListDtsJobStatus["ExpireTime"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["CreateTime"].isNull())
|
||||
dtsJobListObject.createTime = valueDtsJobListDtsJobStatus["CreateTime"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["Status"].isNull())
|
||||
dtsJobListObject.status = valueDtsJobListDtsJobStatus["Status"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["ErrorMessage"].isNull())
|
||||
dtsJobListObject.errorMessage = valueDtsJobListDtsJobStatus["ErrorMessage"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["Delay"].isNull())
|
||||
dtsJobListObject.delay = std::stoi(valueDtsJobListDtsJobStatus["Delay"].asString());
|
||||
if(!valueDtsJobListDtsJobStatus["Checkpoint"].isNull())
|
||||
dtsJobListObject.checkpoint = valueDtsJobListDtsJobStatus["Checkpoint"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["DbObject"].isNull())
|
||||
dtsJobListObject.dbObject = valueDtsJobListDtsJobStatus["DbObject"].asString();
|
||||
if(!valueDtsJobListDtsJobStatus["Reserved"].isNull())
|
||||
dtsJobListObject.reserved = valueDtsJobListDtsJobStatus["Reserved"].asString();
|
||||
auto allTagListNode = valueDtsJobListDtsJobStatus["TagList"]["DtsTag"];
|
||||
for (auto valueDtsJobListDtsJobStatusTagListDtsTag : allTagListNode)
|
||||
{
|
||||
DtsJobStatus::DtsTag tagListObject;
|
||||
if(!valueDtsJobListDtsJobStatusTagListDtsTag["TagKey"].isNull())
|
||||
tagListObject.tagKey = valueDtsJobListDtsJobStatusTagListDtsTag["TagKey"].asString();
|
||||
if(!valueDtsJobListDtsJobStatusTagListDtsTag["TagValue"].isNull())
|
||||
tagListObject.tagValue = valueDtsJobListDtsJobStatusTagListDtsTag["TagValue"].asString();
|
||||
dtsJobListObject.tagList.push_back(tagListObject);
|
||||
}
|
||||
auto sourceEndpointNode = value["SourceEndpoint"];
|
||||
if(!sourceEndpointNode["InstanceID"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.instanceID = sourceEndpointNode["InstanceID"].asString();
|
||||
if(!sourceEndpointNode["InstanceType"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.instanceType = sourceEndpointNode["InstanceType"].asString();
|
||||
if(!sourceEndpointNode["EngineName"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.engineName = sourceEndpointNode["EngineName"].asString();
|
||||
if(!sourceEndpointNode["Ip"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.ip = sourceEndpointNode["Ip"].asString();
|
||||
if(!sourceEndpointNode["Port"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.port = sourceEndpointNode["Port"].asString();
|
||||
if(!sourceEndpointNode["DatabaseName"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.databaseName = sourceEndpointNode["DatabaseName"].asString();
|
||||
if(!sourceEndpointNode["OracleSID"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.oracleSID = sourceEndpointNode["OracleSID"].asString();
|
||||
if(!sourceEndpointNode["UserName"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.userName = sourceEndpointNode["UserName"].asString();
|
||||
if(!sourceEndpointNode["SslSolutionEnum"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.sslSolutionEnum = sourceEndpointNode["SslSolutionEnum"].asString();
|
||||
if(!sourceEndpointNode["Region"].isNull())
|
||||
dtsJobListObject.sourceEndpoint.region = sourceEndpointNode["Region"].asString();
|
||||
auto destinationEndpointNode = value["DestinationEndpoint"];
|
||||
if(!destinationEndpointNode["InstanceID"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.instanceID = destinationEndpointNode["InstanceID"].asString();
|
||||
if(!destinationEndpointNode["InstanceType"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.instanceType = destinationEndpointNode["InstanceType"].asString();
|
||||
if(!destinationEndpointNode["EngineName"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.engineName = destinationEndpointNode["EngineName"].asString();
|
||||
if(!destinationEndpointNode["Ip"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.ip = destinationEndpointNode["Ip"].asString();
|
||||
if(!destinationEndpointNode["Port"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.port = destinationEndpointNode["Port"].asString();
|
||||
if(!destinationEndpointNode["DatabaseName"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.databaseName = destinationEndpointNode["DatabaseName"].asString();
|
||||
if(!destinationEndpointNode["OracleSID"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.oracleSID = destinationEndpointNode["OracleSID"].asString();
|
||||
if(!destinationEndpointNode["UserName"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.userName = destinationEndpointNode["UserName"].asString();
|
||||
if(!destinationEndpointNode["SslSolutionEnum"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.sslSolutionEnum = destinationEndpointNode["SslSolutionEnum"].asString();
|
||||
if(!destinationEndpointNode["Region"].isNull())
|
||||
dtsJobListObject.destinationEndpoint.region = destinationEndpointNode["Region"].asString();
|
||||
auto migrationModeNode = value["MigrationMode"];
|
||||
if(!migrationModeNode["StructureInitialization"].isNull())
|
||||
dtsJobListObject.migrationMode.structureInitialization = migrationModeNode["StructureInitialization"].asString() == "true";
|
||||
if(!migrationModeNode["DataInitialization"].isNull())
|
||||
dtsJobListObject.migrationMode.dataInitialization = migrationModeNode["DataInitialization"].asString() == "true";
|
||||
if(!migrationModeNode["DataSynchronization"].isNull())
|
||||
dtsJobListObject.migrationMode.dataSynchronization = migrationModeNode["DataSynchronization"].asString() == "true";
|
||||
auto precheckStatusNode = value["PrecheckStatus"];
|
||||
if(!precheckStatusNode["Status"].isNull())
|
||||
dtsJobListObject.precheckStatus.status = precheckStatusNode["Status"].asString();
|
||||
if(!precheckStatusNode["Percent"].isNull())
|
||||
dtsJobListObject.precheckStatus.percent = precheckStatusNode["Percent"].asString();
|
||||
if(!precheckStatusNode["ErrorMessage"].isNull())
|
||||
dtsJobListObject.precheckStatus.errorMessage = precheckStatusNode["ErrorMessage"].asString();
|
||||
auto allDetailNode = precheckStatusNode["Detail"]["PrecheckDetail"];
|
||||
for (auto precheckStatusNodeDetailPrecheckDetail : allDetailNode)
|
||||
{
|
||||
DtsJobStatus::PrecheckStatus::PrecheckDetail precheckDetailObject;
|
||||
if(!precheckStatusNodeDetailPrecheckDetail["CheckItem"].isNull())
|
||||
precheckDetailObject.checkItem = precheckStatusNodeDetailPrecheckDetail["CheckItem"].asString();
|
||||
if(!precheckStatusNodeDetailPrecheckDetail["CheckItemDescription"].isNull())
|
||||
precheckDetailObject.checkItemDescription = precheckStatusNodeDetailPrecheckDetail["CheckItemDescription"].asString();
|
||||
if(!precheckStatusNodeDetailPrecheckDetail["CheckResult"].isNull())
|
||||
precheckDetailObject.checkResult = precheckStatusNodeDetailPrecheckDetail["CheckResult"].asString();
|
||||
if(!precheckStatusNodeDetailPrecheckDetail["FailedReason"].isNull())
|
||||
precheckDetailObject.failedReason = precheckStatusNodeDetailPrecheckDetail["FailedReason"].asString();
|
||||
if(!precheckStatusNodeDetailPrecheckDetail["RepairMethod"].isNull())
|
||||
precheckDetailObject.repairMethod = precheckStatusNodeDetailPrecheckDetail["RepairMethod"].asString();
|
||||
dtsJobListObject.precheckStatus.detail.push_back(precheckDetailObject);
|
||||
}
|
||||
auto structureInitializationStatusNode = value["StructureInitializationStatus"];
|
||||
if(!structureInitializationStatusNode["Status"].isNull())
|
||||
dtsJobListObject.structureInitializationStatus.status = structureInitializationStatusNode["Status"].asString();
|
||||
if(!structureInitializationStatusNode["ErrorMessage"].isNull())
|
||||
dtsJobListObject.structureInitializationStatus.errorMessage = structureInitializationStatusNode["ErrorMessage"].asString();
|
||||
if(!structureInitializationStatusNode["Percent"].isNull())
|
||||
dtsJobListObject.structureInitializationStatus.percent = structureInitializationStatusNode["Percent"].asString();
|
||||
if(!structureInitializationStatusNode["Progress"].isNull())
|
||||
dtsJobListObject.structureInitializationStatus.progress = structureInitializationStatusNode["Progress"].asString();
|
||||
auto dataInitializationStatusNode = value["DataInitializationStatus"];
|
||||
if(!dataInitializationStatusNode["Status"].isNull())
|
||||
dtsJobListObject.dataInitializationStatus.status = dataInitializationStatusNode["Status"].asString();
|
||||
if(!dataInitializationStatusNode["ErrorMessage"].isNull())
|
||||
dtsJobListObject.dataInitializationStatus.errorMessage = dataInitializationStatusNode["ErrorMessage"].asString();
|
||||
if(!dataInitializationStatusNode["Percent"].isNull())
|
||||
dtsJobListObject.dataInitializationStatus.percent = dataInitializationStatusNode["Percent"].asString();
|
||||
if(!dataInitializationStatusNode["Progress"].isNull())
|
||||
dtsJobListObject.dataInitializationStatus.progress = dataInitializationStatusNode["Progress"].asString();
|
||||
auto dataSynchronizationStatusNode = value["DataSynchronizationStatus"];
|
||||
if(!dataSynchronizationStatusNode["Status"].isNull())
|
||||
dtsJobListObject.dataSynchronizationStatus.status = dataSynchronizationStatusNode["Status"].asString();
|
||||
if(!dataSynchronizationStatusNode["ErrorMessage"].isNull())
|
||||
dtsJobListObject.dataSynchronizationStatus.errorMessage = dataSynchronizationStatusNode["ErrorMessage"].asString();
|
||||
if(!dataSynchronizationStatusNode["Percent"].isNull())
|
||||
dtsJobListObject.dataSynchronizationStatus.percent = dataSynchronizationStatusNode["Percent"].asString();
|
||||
if(!dataSynchronizationStatusNode["Progress"].isNull())
|
||||
dtsJobListObject.dataSynchronizationStatus.progress = dataSynchronizationStatusNode["Progress"].asString();
|
||||
auto performanceNode = value["Performance"];
|
||||
if(!performanceNode["Rps"].isNull())
|
||||
dtsJobListObject.performance.rps = performanceNode["Rps"].asString();
|
||||
if(!performanceNode["Flow"].isNull())
|
||||
dtsJobListObject.performance.flow = performanceNode["Flow"].asString();
|
||||
auto reverseJobNode = value["ReverseJob"];
|
||||
if(!reverseJobNode["DtsInstanceID"].isNull())
|
||||
dtsJobListObject.reverseJob.dtsInstanceID = reverseJobNode["DtsInstanceID"].asString();
|
||||
if(!reverseJobNode["DtsJobId"].isNull())
|
||||
dtsJobListObject.reverseJob.dtsJobId = reverseJobNode["DtsJobId"].asString();
|
||||
if(!reverseJobNode["DtsJobName"].isNull())
|
||||
dtsJobListObject.reverseJob.dtsJobName = reverseJobNode["DtsJobName"].asString();
|
||||
if(!reverseJobNode["DtsJobClass"].isNull())
|
||||
dtsJobListObject.reverseJob.dtsJobClass = reverseJobNode["DtsJobClass"].asString();
|
||||
if(!reverseJobNode["DtsJobDirection"].isNull())
|
||||
dtsJobListObject.reverseJob.dtsJobDirection = reverseJobNode["DtsJobDirection"].asString();
|
||||
if(!reverseJobNode["PayType"].isNull())
|
||||
dtsJobListObject.reverseJob.payType = reverseJobNode["PayType"].asString();
|
||||
if(!reverseJobNode["ExpireTime"].isNull())
|
||||
dtsJobListObject.reverseJob.expireTime = reverseJobNode["ExpireTime"].asString();
|
||||
if(!reverseJobNode["CreateTime"].isNull())
|
||||
dtsJobListObject.reverseJob.createTime = reverseJobNode["CreateTime"].asString();
|
||||
if(!reverseJobNode["Status"].isNull())
|
||||
dtsJobListObject.reverseJob.status = reverseJobNode["Status"].asString();
|
||||
if(!reverseJobNode["ErrorMessage"].isNull())
|
||||
dtsJobListObject.reverseJob.errorMessage = reverseJobNode["ErrorMessage"].asString();
|
||||
if(!reverseJobNode["Delay"].isNull())
|
||||
dtsJobListObject.reverseJob.delay = std::stoi(reverseJobNode["Delay"].asString());
|
||||
if(!reverseJobNode["Checkpoint"].isNull())
|
||||
dtsJobListObject.reverseJob.checkpoint = reverseJobNode["Checkpoint"].asString();
|
||||
if(!reverseJobNode["DbObject"].isNull())
|
||||
dtsJobListObject.reverseJob.dbObject = reverseJobNode["DbObject"].asString();
|
||||
if(!reverseJobNode["Reserved"].isNull())
|
||||
dtsJobListObject.reverseJob.reserved = reverseJobNode["Reserved"].asString();
|
||||
auto sourceEndpoint1Node = reverseJobNode["SourceEndpoint"];
|
||||
if(!sourceEndpoint1Node["InstanceID"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.instanceID = sourceEndpoint1Node["InstanceID"].asString();
|
||||
if(!sourceEndpoint1Node["InstanceType"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.instanceType = sourceEndpoint1Node["InstanceType"].asString();
|
||||
if(!sourceEndpoint1Node["EngineName"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.engineName = sourceEndpoint1Node["EngineName"].asString();
|
||||
if(!sourceEndpoint1Node["Ip"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.ip = sourceEndpoint1Node["Ip"].asString();
|
||||
if(!sourceEndpoint1Node["Port"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.port = sourceEndpoint1Node["Port"].asString();
|
||||
if(!sourceEndpoint1Node["DatabaseName"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.databaseName = sourceEndpoint1Node["DatabaseName"].asString();
|
||||
if(!sourceEndpoint1Node["OracleSID"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.oracleSID = sourceEndpoint1Node["OracleSID"].asString();
|
||||
if(!sourceEndpoint1Node["UserName"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.userName = sourceEndpoint1Node["UserName"].asString();
|
||||
if(!sourceEndpoint1Node["SslSolutionEnum"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.sslSolutionEnum = sourceEndpoint1Node["SslSolutionEnum"].asString();
|
||||
if(!sourceEndpoint1Node["Region"].isNull())
|
||||
dtsJobListObject.reverseJob.sourceEndpoint1.region = sourceEndpoint1Node["Region"].asString();
|
||||
auto destinationEndpoint2Node = reverseJobNode["DestinationEndpoint"];
|
||||
if(!destinationEndpoint2Node["InstanceID"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.instanceID = destinationEndpoint2Node["InstanceID"].asString();
|
||||
if(!destinationEndpoint2Node["InstanceType"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.instanceType = destinationEndpoint2Node["InstanceType"].asString();
|
||||
if(!destinationEndpoint2Node["EngineName"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.engineName = destinationEndpoint2Node["EngineName"].asString();
|
||||
if(!destinationEndpoint2Node["Ip"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.ip = destinationEndpoint2Node["Ip"].asString();
|
||||
if(!destinationEndpoint2Node["Port"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.port = destinationEndpoint2Node["Port"].asString();
|
||||
if(!destinationEndpoint2Node["DatabaseName"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.databaseName = destinationEndpoint2Node["DatabaseName"].asString();
|
||||
if(!destinationEndpoint2Node["OracleSID"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.oracleSID = destinationEndpoint2Node["OracleSID"].asString();
|
||||
if(!destinationEndpoint2Node["UserName"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.userName = destinationEndpoint2Node["UserName"].asString();
|
||||
if(!destinationEndpoint2Node["SslSolutionEnum"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.sslSolutionEnum = destinationEndpoint2Node["SslSolutionEnum"].asString();
|
||||
if(!destinationEndpoint2Node["Region"].isNull())
|
||||
dtsJobListObject.reverseJob.destinationEndpoint2.region = destinationEndpoint2Node["Region"].asString();
|
||||
auto migrationMode3Node = reverseJobNode["MigrationMode"];
|
||||
if(!migrationMode3Node["StructureInitialization"].isNull())
|
||||
dtsJobListObject.reverseJob.migrationMode3.structureInitialization = migrationMode3Node["StructureInitialization"].asString() == "true";
|
||||
if(!migrationMode3Node["DataInitialization"].isNull())
|
||||
dtsJobListObject.reverseJob.migrationMode3.dataInitialization = migrationMode3Node["DataInitialization"].asString() == "true";
|
||||
if(!migrationMode3Node["DataSynchronization"].isNull())
|
||||
dtsJobListObject.reverseJob.migrationMode3.dataSynchronization = migrationMode3Node["DataSynchronization"].asString() == "true";
|
||||
auto precheckStatus4Node = reverseJobNode["PrecheckStatus"];
|
||||
if(!precheckStatus4Node["Status"].isNull())
|
||||
dtsJobListObject.reverseJob.precheckStatus4.status = precheckStatus4Node["Status"].asString();
|
||||
if(!precheckStatus4Node["Percent"].isNull())
|
||||
dtsJobListObject.reverseJob.precheckStatus4.percent = precheckStatus4Node["Percent"].asString();
|
||||
if(!precheckStatus4Node["ErrorMessage"].isNull())
|
||||
dtsJobListObject.reverseJob.precheckStatus4.errorMessage = precheckStatus4Node["ErrorMessage"].asString();
|
||||
auto allDetail9Node = precheckStatus4Node["Detail"]["PrecheckDetail"];
|
||||
for (auto precheckStatus4NodeDetailPrecheckDetail : allDetail9Node)
|
||||
{
|
||||
DtsJobStatus::ReverseJob::PrecheckStatus4::PrecheckDetail10 precheckDetail10Object;
|
||||
if(!precheckStatus4NodeDetailPrecheckDetail["CheckItem"].isNull())
|
||||
precheckDetail10Object.checkItem = precheckStatus4NodeDetailPrecheckDetail["CheckItem"].asString();
|
||||
if(!precheckStatus4NodeDetailPrecheckDetail["CheckItemDescription"].isNull())
|
||||
precheckDetail10Object.checkItemDescription = precheckStatus4NodeDetailPrecheckDetail["CheckItemDescription"].asString();
|
||||
if(!precheckStatus4NodeDetailPrecheckDetail["CheckResult"].isNull())
|
||||
precheckDetail10Object.checkResult = precheckStatus4NodeDetailPrecheckDetail["CheckResult"].asString();
|
||||
if(!precheckStatus4NodeDetailPrecheckDetail["FailedReason"].isNull())
|
||||
precheckDetail10Object.failedReason = precheckStatus4NodeDetailPrecheckDetail["FailedReason"].asString();
|
||||
if(!precheckStatus4NodeDetailPrecheckDetail["RepairMethod"].isNull())
|
||||
precheckDetail10Object.repairMethod = precheckStatus4NodeDetailPrecheckDetail["RepairMethod"].asString();
|
||||
dtsJobListObject.reverseJob.precheckStatus4.detail9.push_back(precheckDetail10Object);
|
||||
}
|
||||
auto structureInitializationStatus5Node = reverseJobNode["StructureInitializationStatus"];
|
||||
if(!structureInitializationStatus5Node["Status"].isNull())
|
||||
dtsJobListObject.reverseJob.structureInitializationStatus5.status = structureInitializationStatus5Node["Status"].asString();
|
||||
if(!structureInitializationStatus5Node["ErrorMessage"].isNull())
|
||||
dtsJobListObject.reverseJob.structureInitializationStatus5.errorMessage = structureInitializationStatus5Node["ErrorMessage"].asString();
|
||||
if(!structureInitializationStatus5Node["Percent"].isNull())
|
||||
dtsJobListObject.reverseJob.structureInitializationStatus5.percent = structureInitializationStatus5Node["Percent"].asString();
|
||||
if(!structureInitializationStatus5Node["Progress"].isNull())
|
||||
dtsJobListObject.reverseJob.structureInitializationStatus5.progress = structureInitializationStatus5Node["Progress"].asString();
|
||||
auto dataInitializationStatus6Node = reverseJobNode["DataInitializationStatus"];
|
||||
if(!dataInitializationStatus6Node["Status"].isNull())
|
||||
dtsJobListObject.reverseJob.dataInitializationStatus6.status = dataInitializationStatus6Node["Status"].asString();
|
||||
if(!dataInitializationStatus6Node["ErrorMessage"].isNull())
|
||||
dtsJobListObject.reverseJob.dataInitializationStatus6.errorMessage = dataInitializationStatus6Node["ErrorMessage"].asString();
|
||||
if(!dataInitializationStatus6Node["Percent"].isNull())
|
||||
dtsJobListObject.reverseJob.dataInitializationStatus6.percent = dataInitializationStatus6Node["Percent"].asString();
|
||||
if(!dataInitializationStatus6Node["Progress"].isNull())
|
||||
dtsJobListObject.reverseJob.dataInitializationStatus6.progress = dataInitializationStatus6Node["Progress"].asString();
|
||||
auto dataSynchronizationStatus7Node = reverseJobNode["DataSynchronizationStatus"];
|
||||
if(!dataSynchronizationStatus7Node["Status"].isNull())
|
||||
dtsJobListObject.reverseJob.dataSynchronizationStatus7.status = dataSynchronizationStatus7Node["Status"].asString();
|
||||
if(!dataSynchronizationStatus7Node["ErrorMessage"].isNull())
|
||||
dtsJobListObject.reverseJob.dataSynchronizationStatus7.errorMessage = dataSynchronizationStatus7Node["ErrorMessage"].asString();
|
||||
if(!dataSynchronizationStatus7Node["Percent"].isNull())
|
||||
dtsJobListObject.reverseJob.dataSynchronizationStatus7.percent = dataSynchronizationStatus7Node["Percent"].asString();
|
||||
if(!dataSynchronizationStatus7Node["Progress"].isNull())
|
||||
dtsJobListObject.reverseJob.dataSynchronizationStatus7.progress = dataSynchronizationStatus7Node["Progress"].asString();
|
||||
auto performance8Node = reverseJobNode["Performance"];
|
||||
if(!performance8Node["Rps"].isNull())
|
||||
dtsJobListObject.reverseJob.performance8.rps = performance8Node["Rps"].asString();
|
||||
if(!performance8Node["Flow"].isNull())
|
||||
dtsJobListObject.reverseJob.performance8.flow = performance8Node["Flow"].asString();
|
||||
dtsJobList_.push_back(dtsJobListObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
if(!value["TotalRecordCount"].isNull())
|
||||
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeDtsJobsResult::getTotalRecordCount()const
|
||||
{
|
||||
return totalRecordCount_;
|
||||
}
|
||||
|
||||
std::vector<DescribeDtsJobsResult::DtsJobStatus> DescribeDtsJobsResult::getDtsJobList()const
|
||||
{
|
||||
return dtsJobList_;
|
||||
}
|
||||
|
||||
int DescribeDtsJobsResult::getPageRecordCount()const
|
||||
{
|
||||
return pageRecordCount_;
|
||||
}
|
||||
|
||||
int DescribeDtsJobsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
int DescribeDtsJobsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsResult::getDynamicCode()const
|
||||
{
|
||||
return dynamicCode_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool DescribeDtsJobsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string DescribeDtsJobsResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
@@ -146,6 +146,8 @@ void DescribeMigrationJobStatusResult::parse(const std::string &payload)
|
||||
payType_ = value["PayType"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString();
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -154,6 +156,11 @@ DescribeMigrationJobStatusResult::DataInitializationStatus DescribeMigrationJobS
|
||||
return dataInitializationStatus_;
|
||||
}
|
||||
|
||||
std::string DescribeMigrationJobStatusResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
std::string DescribeMigrationJobStatusResult::getMigrationJobName()const
|
||||
{
|
||||
return migrationJobName_;
|
||||
|
||||
@@ -27,6 +27,17 @@ DescribeMigrationJobsRequest::DescribeMigrationJobsRequest() :
|
||||
DescribeMigrationJobsRequest::~DescribeMigrationJobsRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeMigrationJobsRequest::getInstFilterRegion()const
|
||||
{
|
||||
return instFilterRegion_;
|
||||
}
|
||||
|
||||
void DescribeMigrationJobsRequest::setInstFilterRegion(const std::string& instFilterRegion)
|
||||
{
|
||||
instFilterRegion_ = instFilterRegion;
|
||||
setParameter("InstFilterRegion", instFilterRegion);
|
||||
}
|
||||
|
||||
int DescribeMigrationJobsRequest::getPageNum()const
|
||||
{
|
||||
return pageNum_;
|
||||
|
||||
84
dts/src/model/DescribePreCheckStatusRequest.cc
Normal file
84
dts/src/model/DescribePreCheckStatusRequest.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/dts/model/DescribePreCheckStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::DescribePreCheckStatusRequest;
|
||||
|
||||
DescribePreCheckStatusRequest::DescribePreCheckStatusRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "DescribePreCheckStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribePreCheckStatusRequest::~DescribePreCheckStatusRequest()
|
||||
{}
|
||||
|
||||
std::string DescribePreCheckStatusRequest::getStructType()const
|
||||
{
|
||||
return structType_;
|
||||
}
|
||||
|
||||
void DescribePreCheckStatusRequest::setStructType(const std::string& structType)
|
||||
{
|
||||
structType_ = structType;
|
||||
setParameter("StructType", structType);
|
||||
}
|
||||
|
||||
std::string DescribePreCheckStatusRequest::getPageNo()const
|
||||
{
|
||||
return pageNo_;
|
||||
}
|
||||
|
||||
void DescribePreCheckStatusRequest::setPageNo(const std::string& pageNo)
|
||||
{
|
||||
pageNo_ = pageNo;
|
||||
setParameter("PageNo", pageNo);
|
||||
}
|
||||
|
||||
std::string DescribePreCheckStatusRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribePreCheckStatusRequest::setPageSize(const std::string& pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", pageSize);
|
||||
}
|
||||
|
||||
std::string DescribePreCheckStatusRequest::getJobCode()const
|
||||
{
|
||||
return jobCode_;
|
||||
}
|
||||
|
||||
void DescribePreCheckStatusRequest::setJobCode(const std::string& jobCode)
|
||||
{
|
||||
jobCode_ = jobCode;
|
||||
setParameter("JobCode", jobCode);
|
||||
}
|
||||
|
||||
std::string DescribePreCheckStatusRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void DescribePreCheckStatusRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
162
dts/src/model/DescribePreCheckStatusResult.cc
Normal file
162
dts/src/model/DescribePreCheckStatusResult.cc
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* 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/dts/model/DescribePreCheckStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
DescribePreCheckStatusResult::DescribePreCheckStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribePreCheckStatusResult::DescribePreCheckStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribePreCheckStatusResult::~DescribePreCheckStatusResult()
|
||||
{}
|
||||
|
||||
void DescribePreCheckStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allJobProgressNode = value["JobProgress"]["ProgressInfo"];
|
||||
for (auto valueJobProgressProgressInfo : allJobProgressNode)
|
||||
{
|
||||
ProgressInfo jobProgressObject;
|
||||
if(!valueJobProgressProgressInfo["BootTime"].isNull())
|
||||
jobProgressObject.bootTime = std::stol(valueJobProgressProgressInfo["BootTime"].asString());
|
||||
if(!valueJobProgressProgressInfo["CanSkip"].isNull())
|
||||
jobProgressObject.canSkip = valueJobProgressProgressInfo["CanSkip"].asString() == "true";
|
||||
if(!valueJobProgressProgressInfo["DelaySeconds"].isNull())
|
||||
jobProgressObject.delaySeconds = std::stoi(valueJobProgressProgressInfo["DelaySeconds"].asString());
|
||||
if(!valueJobProgressProgressInfo["FinishTime"].isNull())
|
||||
jobProgressObject.finishTime = std::stol(valueJobProgressProgressInfo["FinishTime"].asString());
|
||||
if(!valueJobProgressProgressInfo["IgnoreFlag"].isNull())
|
||||
jobProgressObject.ignoreFlag = valueJobProgressProgressInfo["IgnoreFlag"].asString();
|
||||
if(!valueJobProgressProgressInfo["Item"].isNull())
|
||||
jobProgressObject.item = valueJobProgressProgressInfo["Item"].asString();
|
||||
if(!valueJobProgressProgressInfo["JobId"].isNull())
|
||||
jobProgressObject.jobId = valueJobProgressProgressInfo["JobId"].asString();
|
||||
if(!valueJobProgressProgressInfo["Names"].isNull())
|
||||
jobProgressObject.names = valueJobProgressProgressInfo["Names"].asString();
|
||||
if(!valueJobProgressProgressInfo["OrderNum"].isNull())
|
||||
jobProgressObject.orderNum = std::stoi(valueJobProgressProgressInfo["OrderNum"].asString());
|
||||
if(!valueJobProgressProgressInfo["Skip"].isNull())
|
||||
jobProgressObject.skip = valueJobProgressProgressInfo["Skip"].asString() == "true";
|
||||
if(!valueJobProgressProgressInfo["State"].isNull())
|
||||
jobProgressObject.state = valueJobProgressProgressInfo["State"].asString();
|
||||
if(!valueJobProgressProgressInfo["Sub"].isNull())
|
||||
jobProgressObject.sub = valueJobProgressProgressInfo["Sub"].asString();
|
||||
if(!valueJobProgressProgressInfo["RepairMethod"].isNull())
|
||||
jobProgressObject.repairMethod = valueJobProgressProgressInfo["RepairMethod"].asString();
|
||||
if(!valueJobProgressProgressInfo["TargetNames"].isNull())
|
||||
jobProgressObject.targetNames = valueJobProgressProgressInfo["TargetNames"].asString();
|
||||
if(!valueJobProgressProgressInfo["Total"].isNull())
|
||||
jobProgressObject.total = std::stoi(valueJobProgressProgressInfo["Total"].asString());
|
||||
if(!valueJobProgressProgressInfo["SourceSchema"].isNull())
|
||||
jobProgressObject.sourceSchema = valueJobProgressProgressInfo["SourceSchema"].asString();
|
||||
if(!valueJobProgressProgressInfo["ParentObj"].isNull())
|
||||
jobProgressObject.parentObj = valueJobProgressProgressInfo["ParentObj"].asString();
|
||||
if(!valueJobProgressProgressInfo["DiffRow"].isNull())
|
||||
jobProgressObject.diffRow = std::stol(valueJobProgressProgressInfo["DiffRow"].asString());
|
||||
if(!valueJobProgressProgressInfo["DestSchema"].isNull())
|
||||
jobProgressObject.destSchema = valueJobProgressProgressInfo["DestSchema"].asString();
|
||||
if(!valueJobProgressProgressInfo["ErrDetail"].isNull())
|
||||
jobProgressObject.errDetail = valueJobProgressProgressInfo["ErrDetail"].asString();
|
||||
if(!valueJobProgressProgressInfo["ErrMsg"].isNull())
|
||||
jobProgressObject.errMsg = valueJobProgressProgressInfo["ErrMsg"].asString();
|
||||
if(!valueJobProgressProgressInfo["DdlSql"].isNull())
|
||||
jobProgressObject.ddlSql = valueJobProgressProgressInfo["DdlSql"].asString();
|
||||
auto allLogsNode = valueJobProgressProgressInfo["Logs"]["JobLog"];
|
||||
for (auto valueJobProgressProgressInfoLogsJobLog : allLogsNode)
|
||||
{
|
||||
ProgressInfo::JobLog logsObject;
|
||||
if(!valueJobProgressProgressInfoLogsJobLog["ErrData"].isNull())
|
||||
logsObject.errData = valueJobProgressProgressInfoLogsJobLog["ErrData"].asString();
|
||||
if(!valueJobProgressProgressInfoLogsJobLog["ErrMsg"].isNull())
|
||||
logsObject.errMsg = valueJobProgressProgressInfoLogsJobLog["ErrMsg"].asString();
|
||||
if(!valueJobProgressProgressInfoLogsJobLog["ErrType"].isNull())
|
||||
logsObject.errType = valueJobProgressProgressInfoLogsJobLog["ErrType"].asString();
|
||||
if(!valueJobProgressProgressInfoLogsJobLog["LogLevel"].isNull())
|
||||
logsObject.logLevel = valueJobProgressProgressInfoLogsJobLog["LogLevel"].asString();
|
||||
jobProgressObject.logs.push_back(logsObject);
|
||||
}
|
||||
jobProgress_.push_back(jobProgressObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["ErrorItem"].isNull())
|
||||
errorItem_ = std::stoi(value["ErrorItem"].asString());
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["JobName"].isNull())
|
||||
jobName_ = value["JobName"].asString();
|
||||
if(!value["State"].isNull())
|
||||
state_ = value["State"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string DescribePreCheckStatusResult::getState()const
|
||||
{
|
||||
return state_;
|
||||
}
|
||||
|
||||
int DescribePreCheckStatusResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
int DescribePreCheckStatusResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string DescribePreCheckStatusResult::getJobName()const
|
||||
{
|
||||
return jobName_;
|
||||
}
|
||||
|
||||
int DescribePreCheckStatusResult::getErrorItem()const
|
||||
{
|
||||
return errorItem_;
|
||||
}
|
||||
|
||||
std::string DescribePreCheckStatusResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DescribePreCheckStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::vector<DescribePreCheckStatusResult::ProgressInfo> DescribePreCheckStatusResult::getJobProgress()const
|
||||
{
|
||||
return jobProgress_;
|
||||
}
|
||||
|
||||
@@ -97,6 +97,8 @@ void DescribeSubscriptionInstanceStatusResult::parse(const std::string &payload)
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage1_ = value["ErrorMessage"].asString();
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -105,6 +107,11 @@ std::string DescribeSubscriptionInstanceStatusResult::getStatus()const
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeSubscriptionInstanceStatusResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
DescribeSubscriptionInstanceStatusResult::SubscriptionHost DescribeSubscriptionInstanceStatusResult::getSubscriptionHost()const
|
||||
{
|
||||
return subscriptionHost_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void DescribeSubscriptionInstancesRequest::setClientToken(const std::string& cli
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string DescribeSubscriptionInstancesRequest::getInstFilterRegion()const
|
||||
{
|
||||
return instFilterRegion_;
|
||||
}
|
||||
|
||||
void DescribeSubscriptionInstancesRequest::setInstFilterRegion(const std::string& instFilterRegion)
|
||||
{
|
||||
instFilterRegion_ = instFilterRegion;
|
||||
setParameter("InstFilterRegion", instFilterRegion);
|
||||
}
|
||||
|
||||
int DescribeSubscriptionInstancesRequest::getPageNum()const
|
||||
{
|
||||
return pageNum_;
|
||||
|
||||
@@ -178,14 +178,11 @@ void DescribeSynchronizationJobStatusResult::parse(const std::string &payload)
|
||||
synchronizationJobId_ = value["SynchronizationJobId"].asString();
|
||||
if(!value["SynchronizationJobName"].isNull())
|
||||
synchronizationJobName_ = value["SynchronizationJobName"].asString();
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::vector<DescribeSynchronizationJobStatusResult::SynchronizationObject> DescribeSynchronizationJobStatusResult::getSynchronizationObjects()const
|
||||
{
|
||||
return synchronizationObjects_;
|
||||
@@ -196,6 +193,46 @@ DescribeSynchronizationJobStatusResult::DataInitializationStatus DescribeSynchro
|
||||
return dataInitializationStatus_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getDelay()const
|
||||
{
|
||||
return delay_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
long DescribeSynchronizationJobStatusResult::getDelayMillis()const
|
||||
{
|
||||
return delayMillis_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getDataInitialization()const
|
||||
{
|
||||
return dataInitialization_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getSynchronizationJobClass()const
|
||||
{
|
||||
return synchronizationJobClass_;
|
||||
}
|
||||
|
||||
DescribeSynchronizationJobStatusResult::DataSynchronizationStatus DescribeSynchronizationJobStatusResult::getDataSynchronizationStatus()const
|
||||
{
|
||||
return dataSynchronizationStatus_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getSynchronizationJobName()const
|
||||
{
|
||||
return synchronizationJobName_;
|
||||
@@ -211,16 +248,6 @@ std::string DescribeSynchronizationJobStatusResult::getErrMessage()const
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getDelay()const
|
||||
{
|
||||
return delay_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
@@ -236,21 +263,11 @@ std::string DescribeSynchronizationJobStatusResult::getCheckpoint()const
|
||||
return checkpoint_;
|
||||
}
|
||||
|
||||
long DescribeSynchronizationJobStatusResult::getDelayMillis()const
|
||||
{
|
||||
return delayMillis_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getSynchronizationJobId()const
|
||||
{
|
||||
return synchronizationJobId_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getDataInitialization()const
|
||||
{
|
||||
return dataInitialization_;
|
||||
}
|
||||
|
||||
DescribeSynchronizationJobStatusResult::DestinationEndpoint DescribeSynchronizationJobStatusResult::getDestinationEndpoint()const
|
||||
{
|
||||
return destinationEndpoint_;
|
||||
@@ -281,21 +298,11 @@ std::string DescribeSynchronizationJobStatusResult::getExpireTime()const
|
||||
return expireTime_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getSynchronizationJobClass()const
|
||||
{
|
||||
return synchronizationJobClass_;
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobStatusResult::getSynchronizationDirection()const
|
||||
{
|
||||
return synchronizationDirection_;
|
||||
}
|
||||
|
||||
DescribeSynchronizationJobStatusResult::DataSynchronizationStatus DescribeSynchronizationJobStatusResult::getDataSynchronizationStatus()const
|
||||
{
|
||||
return dataSynchronizationStatus_;
|
||||
}
|
||||
|
||||
DescribeSynchronizationJobStatusResult::StructureInitializationStatus DescribeSynchronizationJobStatusResult::getStructureInitializationStatus()const
|
||||
{
|
||||
return structureInitializationStatus_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void DescribeSynchronizationJobsRequest::setClientToken(const std::string& clien
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string DescribeSynchronizationJobsRequest::getInstFilterRegion()const
|
||||
{
|
||||
return instFilterRegion_;
|
||||
}
|
||||
|
||||
void DescribeSynchronizationJobsRequest::setInstFilterRegion(const std::string& instFilterRegion)
|
||||
{
|
||||
instFilterRegion_ = instFilterRegion;
|
||||
setParameter("InstFilterRegion", instFilterRegion);
|
||||
}
|
||||
|
||||
int DescribeSynchronizationJobsRequest::getPageNum()const
|
||||
{
|
||||
return pageNum_;
|
||||
|
||||
51
dts/src/model/ModifyDtsJobNameRequest.cc
Normal file
51
dts/src/model/ModifyDtsJobNameRequest.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/dts/model/ModifyDtsJobNameRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::ModifyDtsJobNameRequest;
|
||||
|
||||
ModifyDtsJobNameRequest::ModifyDtsJobNameRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "ModifyDtsJobName")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyDtsJobNameRequest::~ModifyDtsJobNameRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyDtsJobNameRequest::getDtsJobName()const
|
||||
{
|
||||
return dtsJobName_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobNameRequest::setDtsJobName(const std::string& dtsJobName)
|
||||
{
|
||||
dtsJobName_ = dtsJobName;
|
||||
setParameter("DtsJobName", dtsJobName);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobNameRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobNameRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
86
dts/src/model/ModifyDtsJobNameResult.cc
Normal file
86
dts/src/model/ModifyDtsJobNameResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/dts/model/ModifyDtsJobNameResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
ModifyDtsJobNameResult::ModifyDtsJobNameResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyDtsJobNameResult::ModifyDtsJobNameResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyDtsJobNameResult::~ModifyDtsJobNameResult()
|
||||
{}
|
||||
|
||||
void ModifyDtsJobNameResult::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["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int ModifyDtsJobNameResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobNameResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobNameResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobNameResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ModifyDtsJobNameResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobNameResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
73
dts/src/model/ModifyDtsJobPasswordRequest.cc
Normal file
73
dts/src/model/ModifyDtsJobPasswordRequest.cc
Normal 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/dts/model/ModifyDtsJobPasswordRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::ModifyDtsJobPasswordRequest;
|
||||
|
||||
ModifyDtsJobPasswordRequest::ModifyDtsJobPasswordRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "ModifyDtsJobPassword")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyDtsJobPasswordRequest::~ModifyDtsJobPasswordRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyDtsJobPasswordRequest::getPassword()const
|
||||
{
|
||||
return password_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobPasswordRequest::setPassword(const std::string& password)
|
||||
{
|
||||
password_ = password;
|
||||
setParameter("Password", password);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobPasswordRequest::getEndpoint()const
|
||||
{
|
||||
return endpoint_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobPasswordRequest::setEndpoint(const std::string& endpoint)
|
||||
{
|
||||
endpoint_ = endpoint;
|
||||
setParameter("Endpoint", endpoint);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobPasswordRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobPasswordRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobPasswordRequest::getUserName()const
|
||||
{
|
||||
return userName_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobPasswordRequest::setUserName(const std::string& userName)
|
||||
{
|
||||
userName_ = userName;
|
||||
setParameter("UserName", userName);
|
||||
}
|
||||
|
||||
86
dts/src/model/ModifyDtsJobPasswordResult.cc
Normal file
86
dts/src/model/ModifyDtsJobPasswordResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/dts/model/ModifyDtsJobPasswordResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
ModifyDtsJobPasswordResult::ModifyDtsJobPasswordResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyDtsJobPasswordResult::ModifyDtsJobPasswordResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyDtsJobPasswordResult::~ModifyDtsJobPasswordResult()
|
||||
{}
|
||||
|
||||
void ModifyDtsJobPasswordResult::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["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int ModifyDtsJobPasswordResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobPasswordResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobPasswordResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobPasswordResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ModifyDtsJobPasswordResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobPasswordResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
95
dts/src/model/ModifyDtsJobRequest.cc
Normal file
95
dts/src/model/ModifyDtsJobRequest.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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/dts/model/ModifyDtsJobRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::ModifyDtsJobRequest;
|
||||
|
||||
ModifyDtsJobRequest::ModifyDtsJobRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "ModifyDtsJob")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyDtsJobRequest::~ModifyDtsJobRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyDtsJobRequest::getDbList()const
|
||||
{
|
||||
return dbList_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobRequest::setDbList(const std::string& dbList)
|
||||
{
|
||||
dbList_ = dbList;
|
||||
setBodyParameter("DbList", dbList);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobRequest::setOwnerId(const std::string& ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", ownerId);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobRequest::getDtsInstanceId()const
|
||||
{
|
||||
return dtsInstanceId_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobRequest::setDtsInstanceId(const std::string& dtsInstanceId)
|
||||
{
|
||||
dtsInstanceId_ = dtsInstanceId;
|
||||
setParameter("DtsInstanceId", dtsInstanceId);
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobRequest::getSynchronizationDirection()const
|
||||
{
|
||||
return synchronizationDirection_;
|
||||
}
|
||||
|
||||
void ModifyDtsJobRequest::setSynchronizationDirection(const std::string& synchronizationDirection)
|
||||
{
|
||||
synchronizationDirection_ = synchronizationDirection;
|
||||
setParameter("SynchronizationDirection", synchronizationDirection);
|
||||
}
|
||||
|
||||
79
dts/src/model/ModifyDtsJobResult.cc
Normal file
79
dts/src/model/ModifyDtsJobResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/dts/model/ModifyDtsJobResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
ModifyDtsJobResult::ModifyDtsJobResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyDtsJobResult::ModifyDtsJobResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyDtsJobResult::~ModifyDtsJobResult()
|
||||
{}
|
||||
|
||||
void ModifyDtsJobResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DtsJobId"].isNull())
|
||||
dtsJobId_ = value["DtsJobId"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString() == "true";
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobResult::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
bool ModifyDtsJobResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool ModifyDtsJobResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string ModifyDtsJobResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
62
dts/src/model/ResetDtsJobRequest.cc
Normal file
62
dts/src/model/ResetDtsJobRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/dts/model/ResetDtsJobRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::ResetDtsJobRequest;
|
||||
|
||||
ResetDtsJobRequest::ResetDtsJobRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "ResetDtsJob")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ResetDtsJobRequest::~ResetDtsJobRequest()
|
||||
{}
|
||||
|
||||
std::string ResetDtsJobRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void ResetDtsJobRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
std::string ResetDtsJobRequest::getDtsInstanceId()const
|
||||
{
|
||||
return dtsInstanceId_;
|
||||
}
|
||||
|
||||
void ResetDtsJobRequest::setDtsInstanceId(const std::string& dtsInstanceId)
|
||||
{
|
||||
dtsInstanceId_ = dtsInstanceId;
|
||||
setParameter("DtsInstanceId", dtsInstanceId);
|
||||
}
|
||||
|
||||
std::string ResetDtsJobRequest::getSynchronizationDirection()const
|
||||
{
|
||||
return synchronizationDirection_;
|
||||
}
|
||||
|
||||
void ResetDtsJobRequest::setSynchronizationDirection(const std::string& synchronizationDirection)
|
||||
{
|
||||
synchronizationDirection_ = synchronizationDirection;
|
||||
setParameter("SynchronizationDirection", synchronizationDirection);
|
||||
}
|
||||
|
||||
86
dts/src/model/ResetDtsJobResult.cc
Normal file
86
dts/src/model/ResetDtsJobResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/dts/model/ResetDtsJobResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
ResetDtsJobResult::ResetDtsJobResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ResetDtsJobResult::ResetDtsJobResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ResetDtsJobResult::~ResetDtsJobResult()
|
||||
{}
|
||||
|
||||
void ResetDtsJobResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int ResetDtsJobResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ResetDtsJobResult::getDynamicCode()const
|
||||
{
|
||||
return dynamicCode_;
|
||||
}
|
||||
|
||||
std::string ResetDtsJobResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string ResetDtsJobResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool ResetDtsJobResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string ResetDtsJobResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
73
dts/src/model/SkipPreCheckRequest.cc
Normal file
73
dts/src/model/SkipPreCheckRequest.cc
Normal 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/dts/model/SkipPreCheckRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::SkipPreCheckRequest;
|
||||
|
||||
SkipPreCheckRequest::SkipPreCheckRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "SkipPreCheck")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SkipPreCheckRequest::~SkipPreCheckRequest()
|
||||
{}
|
||||
|
||||
std::string SkipPreCheckRequest::getSkipPreCheckItems()const
|
||||
{
|
||||
return skipPreCheckItems_;
|
||||
}
|
||||
|
||||
void SkipPreCheckRequest::setSkipPreCheckItems(const std::string& skipPreCheckItems)
|
||||
{
|
||||
skipPreCheckItems_ = skipPreCheckItems;
|
||||
setParameter("SkipPreCheckItems", skipPreCheckItems);
|
||||
}
|
||||
|
||||
bool SkipPreCheckRequest::getSkip()const
|
||||
{
|
||||
return skip_;
|
||||
}
|
||||
|
||||
void SkipPreCheckRequest::setSkip(bool skip)
|
||||
{
|
||||
skip_ = skip;
|
||||
setParameter("Skip", skip ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string SkipPreCheckRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void SkipPreCheckRequest::setJobId(const std::string& jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setParameter("JobId", jobId);
|
||||
}
|
||||
|
||||
std::string SkipPreCheckRequest::getSkipPreCheckNames()const
|
||||
{
|
||||
return skipPreCheckNames_;
|
||||
}
|
||||
|
||||
void SkipPreCheckRequest::setSkipPreCheckNames(const std::string& skipPreCheckNames)
|
||||
{
|
||||
skipPreCheckNames_ = skipPreCheckNames;
|
||||
setParameter("SkipPreCheckNames", skipPreCheckNames);
|
||||
}
|
||||
|
||||
114
dts/src/model/SkipPreCheckResult.cc
Normal file
114
dts/src/model/SkipPreCheckResult.cc
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* 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/dts/model/SkipPreCheckResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
SkipPreCheckResult::SkipPreCheckResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SkipPreCheckResult::SkipPreCheckResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SkipPreCheckResult::~SkipPreCheckResult()
|
||||
{}
|
||||
|
||||
void SkipPreCheckResult::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["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["MigrationJobId"].isNull())
|
||||
migrationJobId_ = value["MigrationJobId"].asString();
|
||||
if(!value["ScheduleJobId"].isNull())
|
||||
scheduleJobId_ = value["ScheduleJobId"].asString();
|
||||
if(!value["SkipItems"].isNull())
|
||||
skipItems_ = value["SkipItems"].asString();
|
||||
if(!value["SkipNames"].isNull())
|
||||
skipNames_ = value["SkipNames"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getSkipItems()const
|
||||
{
|
||||
return skipItems_;
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getScheduleJobId()const
|
||||
{
|
||||
return scheduleJobId_;
|
||||
}
|
||||
|
||||
int SkipPreCheckResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getSkipNames()const
|
||||
{
|
||||
return skipNames_;
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SkipPreCheckResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
std::string SkipPreCheckResult::getMigrationJobId()const
|
||||
{
|
||||
return migrationJobId_;
|
||||
}
|
||||
|
||||
62
dts/src/model/StopDtsJobRequest.cc
Normal file
62
dts/src/model/StopDtsJobRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/dts/model/StopDtsJobRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::StopDtsJobRequest;
|
||||
|
||||
StopDtsJobRequest::StopDtsJobRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "StopDtsJob")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
StopDtsJobRequest::~StopDtsJobRequest()
|
||||
{}
|
||||
|
||||
std::string StopDtsJobRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void StopDtsJobRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
std::string StopDtsJobRequest::getDtsInstanceId()const
|
||||
{
|
||||
return dtsInstanceId_;
|
||||
}
|
||||
|
||||
void StopDtsJobRequest::setDtsInstanceId(const std::string& dtsInstanceId)
|
||||
{
|
||||
dtsInstanceId_ = dtsInstanceId;
|
||||
setParameter("DtsInstanceId", dtsInstanceId);
|
||||
}
|
||||
|
||||
std::string StopDtsJobRequest::getSynchronizationDirection()const
|
||||
{
|
||||
return synchronizationDirection_;
|
||||
}
|
||||
|
||||
void StopDtsJobRequest::setSynchronizationDirection(const std::string& synchronizationDirection)
|
||||
{
|
||||
synchronizationDirection_ = synchronizationDirection;
|
||||
setParameter("SynchronizationDirection", synchronizationDirection);
|
||||
}
|
||||
|
||||
86
dts/src/model/StopDtsJobResult.cc
Normal file
86
dts/src/model/StopDtsJobResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/dts/model/StopDtsJobResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
StopDtsJobResult::StopDtsJobResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
StopDtsJobResult::StopDtsJobResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
StopDtsJobResult::~StopDtsJobResult()
|
||||
{}
|
||||
|
||||
void StopDtsJobResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int StopDtsJobResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string StopDtsJobResult::getDynamicCode()const
|
||||
{
|
||||
return dynamicCode_;
|
||||
}
|
||||
|
||||
std::string StopDtsJobResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string StopDtsJobResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool StopDtsJobResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string StopDtsJobResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
62
dts/src/model/SuspendDtsJobRequest.cc
Normal file
62
dts/src/model/SuspendDtsJobRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/dts/model/SuspendDtsJobRequest.h>
|
||||
|
||||
using AlibabaCloud::Dts::Model::SuspendDtsJobRequest;
|
||||
|
||||
SuspendDtsJobRequest::SuspendDtsJobRequest() :
|
||||
RpcServiceRequest("dts", "2020-01-01", "SuspendDtsJob")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SuspendDtsJobRequest::~SuspendDtsJobRequest()
|
||||
{}
|
||||
|
||||
std::string SuspendDtsJobRequest::getDtsJobId()const
|
||||
{
|
||||
return dtsJobId_;
|
||||
}
|
||||
|
||||
void SuspendDtsJobRequest::setDtsJobId(const std::string& dtsJobId)
|
||||
{
|
||||
dtsJobId_ = dtsJobId;
|
||||
setParameter("DtsJobId", dtsJobId);
|
||||
}
|
||||
|
||||
std::string SuspendDtsJobRequest::getDtsInstanceId()const
|
||||
{
|
||||
return dtsInstanceId_;
|
||||
}
|
||||
|
||||
void SuspendDtsJobRequest::setDtsInstanceId(const std::string& dtsInstanceId)
|
||||
{
|
||||
dtsInstanceId_ = dtsInstanceId;
|
||||
setParameter("DtsInstanceId", dtsInstanceId);
|
||||
}
|
||||
|
||||
std::string SuspendDtsJobRequest::getSynchronizationDirection()const
|
||||
{
|
||||
return synchronizationDirection_;
|
||||
}
|
||||
|
||||
void SuspendDtsJobRequest::setSynchronizationDirection(const std::string& synchronizationDirection)
|
||||
{
|
||||
synchronizationDirection_ = synchronizationDirection;
|
||||
setParameter("SynchronizationDirection", synchronizationDirection);
|
||||
}
|
||||
|
||||
86
dts/src/model/SuspendDtsJobResult.cc
Normal file
86
dts/src/model/SuspendDtsJobResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/dts/model/SuspendDtsJobResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dts;
|
||||
using namespace AlibabaCloud::Dts::Model;
|
||||
|
||||
SuspendDtsJobResult::SuspendDtsJobResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SuspendDtsJobResult::SuspendDtsJobResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SuspendDtsJobResult::~SuspendDtsJobResult()
|
||||
{}
|
||||
|
||||
void SuspendDtsJobResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DynamicCode"].isNull())
|
||||
dynamicCode_ = value["DynamicCode"].asString();
|
||||
if(!value["DynamicMessage"].isNull())
|
||||
dynamicMessage_ = value["DynamicMessage"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMessage"].isNull())
|
||||
errMessage_ = value["ErrMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int SuspendDtsJobResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string SuspendDtsJobResult::getDynamicCode()const
|
||||
{
|
||||
return dynamicCode_;
|
||||
}
|
||||
|
||||
std::string SuspendDtsJobResult::getDynamicMessage()const
|
||||
{
|
||||
return dynamicMessage_;
|
||||
}
|
||||
|
||||
std::string SuspendDtsJobResult::getErrMessage()const
|
||||
{
|
||||
return errMessage_;
|
||||
}
|
||||
|
||||
bool SuspendDtsJobResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string SuspendDtsJobResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user