This commit is contained in:
sdk-team
2023-04-04 07:39:28 +00:00
parent ff586b38ea
commit 8cfb9f0b4d
61 changed files with 4612 additions and 1 deletions

557
avatar/src/AvatarClient.cc Normal file
View File

@@ -0,0 +1,557 @@
/*
* 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/avatar/AvatarClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
namespace
{
const std::string SERVICE_NAME = "avatar";
}
AvatarClient::AvatarClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AvatarClient::AvatarClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AvatarClient::AvatarClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AvatarClient::~AvatarClient()
{}
AvatarClient::CancelVideoTaskOutcome AvatarClient::cancelVideoTask(const CancelVideoTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CancelVideoTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CancelVideoTaskOutcome(CancelVideoTaskResult(outcome.result()));
else
return CancelVideoTaskOutcome(outcome.error());
}
void AvatarClient::cancelVideoTaskAsync(const CancelVideoTaskRequest& request, const CancelVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, cancelVideoTask(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::CancelVideoTaskOutcomeCallable AvatarClient::cancelVideoTaskCallable(const CancelVideoTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CancelVideoTaskOutcome()>>(
[this, request]()
{
return this->cancelVideoTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::CloseTimedResetOperateOutcome AvatarClient::closeTimedResetOperate(const CloseTimedResetOperateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CloseTimedResetOperateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CloseTimedResetOperateOutcome(CloseTimedResetOperateResult(outcome.result()));
else
return CloseTimedResetOperateOutcome(outcome.error());
}
void AvatarClient::closeTimedResetOperateAsync(const CloseTimedResetOperateRequest& request, const CloseTimedResetOperateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, closeTimedResetOperate(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::CloseTimedResetOperateOutcomeCallable AvatarClient::closeTimedResetOperateCallable(const CloseTimedResetOperateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CloseTimedResetOperateOutcome()>>(
[this, request]()
{
return this->closeTimedResetOperate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::DuplexDecisionOutcome AvatarClient::duplexDecision(const DuplexDecisionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DuplexDecisionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DuplexDecisionOutcome(DuplexDecisionResult(outcome.result()));
else
return DuplexDecisionOutcome(outcome.error());
}
void AvatarClient::duplexDecisionAsync(const DuplexDecisionRequest& request, const DuplexDecisionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, duplexDecision(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::DuplexDecisionOutcomeCallable AvatarClient::duplexDecisionCallable(const DuplexDecisionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DuplexDecisionOutcome()>>(
[this, request]()
{
return this->duplexDecision(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::GetVideoTaskInfoOutcome AvatarClient::getVideoTaskInfo(const GetVideoTaskInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetVideoTaskInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetVideoTaskInfoOutcome(GetVideoTaskInfoResult(outcome.result()));
else
return GetVideoTaskInfoOutcome(outcome.error());
}
void AvatarClient::getVideoTaskInfoAsync(const GetVideoTaskInfoRequest& request, const GetVideoTaskInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getVideoTaskInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::GetVideoTaskInfoOutcomeCallable AvatarClient::getVideoTaskInfoCallable(const GetVideoTaskInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetVideoTaskInfoOutcome()>>(
[this, request]()
{
return this->getVideoTaskInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::LicenseAuthOutcome AvatarClient::licenseAuth(const LicenseAuthRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return LicenseAuthOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return LicenseAuthOutcome(LicenseAuthResult(outcome.result()));
else
return LicenseAuthOutcome(outcome.error());
}
void AvatarClient::licenseAuthAsync(const LicenseAuthRequest& request, const LicenseAuthAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, licenseAuth(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::LicenseAuthOutcomeCallable AvatarClient::licenseAuthCallable(const LicenseAuthRequest &request) const
{
auto task = std::make_shared<std::packaged_task<LicenseAuthOutcome()>>(
[this, request]()
{
return this->licenseAuth(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::QueryRunningInstanceOutcome AvatarClient::queryRunningInstance(const QueryRunningInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryRunningInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryRunningInstanceOutcome(QueryRunningInstanceResult(outcome.result()));
else
return QueryRunningInstanceOutcome(outcome.error());
}
void AvatarClient::queryRunningInstanceAsync(const QueryRunningInstanceRequest& request, const QueryRunningInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryRunningInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::QueryRunningInstanceOutcomeCallable AvatarClient::queryRunningInstanceCallable(const QueryRunningInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryRunningInstanceOutcome()>>(
[this, request]()
{
return this->queryRunningInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::QueryTimedResetOperateStatusOutcome AvatarClient::queryTimedResetOperateStatus(const QueryTimedResetOperateStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryTimedResetOperateStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryTimedResetOperateStatusOutcome(QueryTimedResetOperateStatusResult(outcome.result()));
else
return QueryTimedResetOperateStatusOutcome(outcome.error());
}
void AvatarClient::queryTimedResetOperateStatusAsync(const QueryTimedResetOperateStatusRequest& request, const QueryTimedResetOperateStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryTimedResetOperateStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::QueryTimedResetOperateStatusOutcomeCallable AvatarClient::queryTimedResetOperateStatusCallable(const QueryTimedResetOperateStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryTimedResetOperateStatusOutcome()>>(
[this, request]()
{
return this->queryTimedResetOperateStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::SendMessageOutcome AvatarClient::sendMessage(const SendMessageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SendMessageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SendMessageOutcome(SendMessageResult(outcome.result()));
else
return SendMessageOutcome(outcome.error());
}
void AvatarClient::sendMessageAsync(const SendMessageRequest& request, const SendMessageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, sendMessage(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::SendMessageOutcomeCallable AvatarClient::sendMessageCallable(const SendMessageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SendMessageOutcome()>>(
[this, request]()
{
return this->sendMessage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::StartInstanceOutcome AvatarClient::startInstance(const StartInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StartInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StartInstanceOutcome(StartInstanceResult(outcome.result()));
else
return StartInstanceOutcome(outcome.error());
}
void AvatarClient::startInstanceAsync(const StartInstanceRequest& request, const StartInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, startInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::StartInstanceOutcomeCallable AvatarClient::startInstanceCallable(const StartInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StartInstanceOutcome()>>(
[this, request]()
{
return this->startInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::StartTimedResetOperateOutcome AvatarClient::startTimedResetOperate(const StartTimedResetOperateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StartTimedResetOperateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StartTimedResetOperateOutcome(StartTimedResetOperateResult(outcome.result()));
else
return StartTimedResetOperateOutcome(outcome.error());
}
void AvatarClient::startTimedResetOperateAsync(const StartTimedResetOperateRequest& request, const StartTimedResetOperateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, startTimedResetOperate(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::StartTimedResetOperateOutcomeCallable AvatarClient::startTimedResetOperateCallable(const StartTimedResetOperateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StartTimedResetOperateOutcome()>>(
[this, request]()
{
return this->startTimedResetOperate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::StopInstanceOutcome AvatarClient::stopInstance(const StopInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StopInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StopInstanceOutcome(StopInstanceResult(outcome.result()));
else
return StopInstanceOutcome(outcome.error());
}
void AvatarClient::stopInstanceAsync(const StopInstanceRequest& request, const StopInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, stopInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::StopInstanceOutcomeCallable AvatarClient::stopInstanceCallable(const StopInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StopInstanceOutcome()>>(
[this, request]()
{
return this->stopInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::SubmitTextTo2DAvatarVideoTaskOutcome AvatarClient::submitTextTo2DAvatarVideoTask(const SubmitTextTo2DAvatarVideoTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SubmitTextTo2DAvatarVideoTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SubmitTextTo2DAvatarVideoTaskOutcome(SubmitTextTo2DAvatarVideoTaskResult(outcome.result()));
else
return SubmitTextTo2DAvatarVideoTaskOutcome(outcome.error());
}
void AvatarClient::submitTextTo2DAvatarVideoTaskAsync(const SubmitTextTo2DAvatarVideoTaskRequest& request, const SubmitTextTo2DAvatarVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, submitTextTo2DAvatarVideoTask(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::SubmitTextTo2DAvatarVideoTaskOutcomeCallable AvatarClient::submitTextTo2DAvatarVideoTaskCallable(const SubmitTextTo2DAvatarVideoTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SubmitTextTo2DAvatarVideoTaskOutcome()>>(
[this, request]()
{
return this->submitTextTo2DAvatarVideoTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::SubmitTextTo3DAvatarVideoTaskOutcome AvatarClient::submitTextTo3DAvatarVideoTask(const SubmitTextTo3DAvatarVideoTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SubmitTextTo3DAvatarVideoTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SubmitTextTo3DAvatarVideoTaskOutcome(SubmitTextTo3DAvatarVideoTaskResult(outcome.result()));
else
return SubmitTextTo3DAvatarVideoTaskOutcome(outcome.error());
}
void AvatarClient::submitTextTo3DAvatarVideoTaskAsync(const SubmitTextTo3DAvatarVideoTaskRequest& request, const SubmitTextTo3DAvatarVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, submitTextTo3DAvatarVideoTask(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::SubmitTextTo3DAvatarVideoTaskOutcomeCallable AvatarClient::submitTextTo3DAvatarVideoTaskCallable(const SubmitTextTo3DAvatarVideoTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SubmitTextTo3DAvatarVideoTaskOutcome()>>(
[this, request]()
{
return this->submitTextTo3DAvatarVideoTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AvatarClient::SubmitTextToSignVideoTaskOutcome AvatarClient::submitTextToSignVideoTask(const SubmitTextToSignVideoTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SubmitTextToSignVideoTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SubmitTextToSignVideoTaskOutcome(SubmitTextToSignVideoTaskResult(outcome.result()));
else
return SubmitTextToSignVideoTaskOutcome(outcome.error());
}
void AvatarClient::submitTextToSignVideoTaskAsync(const SubmitTextToSignVideoTaskRequest& request, const SubmitTextToSignVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, submitTextToSignVideoTask(request), context);
};
asyncExecute(new Runnable(fn));
}
AvatarClient::SubmitTextToSignVideoTaskOutcomeCallable AvatarClient::submitTextToSignVideoTaskCallable(const SubmitTextToSignVideoTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SubmitTextToSignVideoTaskOutcome()>>(
[this, request]()
{
return this->submitTextToSignVideoTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/CancelVideoTaskRequest.h>
using AlibabaCloud::Avatar::Model::CancelVideoTaskRequest;
CancelVideoTaskRequest::CancelVideoTaskRequest()
: RpcServiceRequest("avatar", "2022-01-30", "CancelVideoTask") {
setMethod(HttpRequest::Method::Post);
}
CancelVideoTaskRequest::~CancelVideoTaskRequest() {}
CancelVideoTaskRequest::App CancelVideoTaskRequest::getApp() const {
return app_;
}
void CancelVideoTaskRequest::setApp(const CancelVideoTaskRequest::App &app) {
app_ = app;
setParameter(std::string("App") + ".AppId", app.appId);
}
long CancelVideoTaskRequest::getTenantId() const {
return tenantId_;
}
void CancelVideoTaskRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string CancelVideoTaskRequest::getTaskUuid() const {
return taskUuid_;
}
void CancelVideoTaskRequest::setTaskUuid(const std::string &taskUuid) {
taskUuid_ = taskUuid;
setParameter(std::string("TaskUuid"), taskUuid);
}

View File

@@ -0,0 +1,77 @@
/*
* 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/avatar/model/CancelVideoTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
CancelVideoTaskResult::CancelVideoTaskResult() :
ServiceResult()
{}
CancelVideoTaskResult::CancelVideoTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CancelVideoTaskResult::~CancelVideoTaskResult()
{}
void CancelVideoTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TaskUuid"].isNull())
data_.taskUuid = dataNode["TaskUuid"].asString();
if(!dataNode["IsCancel"].isNull())
data_.isCancel = dataNode["IsCancel"].asString() == "true";
if(!dataNode["FailReason"].isNull())
data_.failReason = dataNode["FailReason"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CancelVideoTaskResult::getMessage()const
{
return message_;
}
CancelVideoTaskResult::Data CancelVideoTaskResult::getData()const
{
return data_;
}
std::string CancelVideoTaskResult::getCode()const
{
return code_;
}
bool CancelVideoTaskResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/CloseTimedResetOperateRequest.h>
using AlibabaCloud::Avatar::Model::CloseTimedResetOperateRequest;
CloseTimedResetOperateRequest::CloseTimedResetOperateRequest()
: RpcServiceRequest("avatar", "2022-01-30", "CloseTimedResetOperate") {
setMethod(HttpRequest::Method::Post);
}
CloseTimedResetOperateRequest::~CloseTimedResetOperateRequest() {}
std::string CloseTimedResetOperateRequest::getInstanceId() const {
return instanceId_;
}
void CloseTimedResetOperateRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}
long CloseTimedResetOperateRequest::getTenantId() const {
return tenantId_;
}
void CloseTimedResetOperateRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}

View File

@@ -0,0 +1,75 @@
/*
* 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/avatar/model/CloseTimedResetOperateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
CloseTimedResetOperateResult::CloseTimedResetOperateResult() :
ServiceResult()
{}
CloseTimedResetOperateResult::CloseTimedResetOperateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CloseTimedResetOperateResult::~CloseTimedResetOperateResult()
{}
void CloseTimedResetOperateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["InstanceId"].isNull())
data_.instanceId = dataNode["InstanceId"].asString();
if(!dataNode["TenantId"].isNull())
data_.tenantId = std::stol(dataNode["TenantId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CloseTimedResetOperateResult::getMessage()const
{
return message_;
}
CloseTimedResetOperateResult::Data CloseTimedResetOperateResult::getData()const
{
return data_;
}
std::string CloseTimedResetOperateResult::getCode()const
{
return code_;
}
bool CloseTimedResetOperateResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,123 @@
/*
* 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/avatar/model/DuplexDecisionRequest.h>
using AlibabaCloud::Avatar::Model::DuplexDecisionRequest;
DuplexDecisionRequest::DuplexDecisionRequest()
: RpcServiceRequest("avatar", "2022-01-30", "DuplexDecision") {
setMethod(HttpRequest::Method::Post);
}
DuplexDecisionRequest::~DuplexDecisionRequest() {}
int DuplexDecisionRequest::getInterruptType() const {
return interruptType_;
}
void DuplexDecisionRequest::setInterruptType(int interruptType) {
interruptType_ = interruptType;
setParameter(std::string("InterruptType"), std::to_string(interruptType));
}
std::vector<DuplexDecisionRequest::std::string> DuplexDecisionRequest::getCustomKeywords() const {
return customKeywords_;
}
void DuplexDecisionRequest::setCustomKeywords(const std::vector<DuplexDecisionRequest::std::string> &customKeywords) {
customKeywords_ = customKeywords;
for(int dep1 = 0; dep1 != customKeywords.size(); dep1++) {
setParameter(std::string("CustomKeywords") + "." + std::to_string(dep1 + 1), customKeywords[dep1]);
}
}
std::string DuplexDecisionRequest::getSessionId() const {
return sessionId_;
}
void DuplexDecisionRequest::setSessionId(const std::string &sessionId) {
sessionId_ = sessionId;
setParameter(std::string("SessionId"), sessionId);
}
std::string DuplexDecisionRequest::getDialogStatus() const {
return dialogStatus_;
}
void DuplexDecisionRequest::setDialogStatus(const std::string &dialogStatus) {
dialogStatus_ = dialogStatus;
setParameter(std::string("DialogStatus"), dialogStatus);
}
DuplexDecisionRequest::DialogContext DuplexDecisionRequest::getDialogContext() const {
return dialogContext_;
}
void DuplexDecisionRequest::setDialogContext(const DuplexDecisionRequest::DialogContext &dialogContext) {
dialogContext_ = dialogContext;
for(int dep1 = 0; dep1 != dialogContext.histories.size(); dep1++) {
setParameter(std::string("DialogContext") + ".Histories." + std::to_string(dep1 + 1) + ".Robot", dialogContext.histories[dep1].robot);
setParameter(std::string("DialogContext") + ".Histories." + std::to_string(dep1 + 1) + ".User", dialogContext.histories[dep1].user);
}
setParameter(std::string("DialogContext") + ".CurUtteranceIdx", std::to_string(dialogContext.curUtteranceIdx));
}
int DuplexDecisionRequest::getCallTime() const {
return callTime_;
}
void DuplexDecisionRequest::setCallTime(int callTime) {
callTime_ = callTime;
setParameter(std::string("CallTime"), std::to_string(callTime));
}
std::string DuplexDecisionRequest::getAppId() const {
return appId_;
}
void DuplexDecisionRequest::setAppId(const std::string &appId) {
appId_ = appId;
setParameter(std::string("AppId"), appId);
}
long DuplexDecisionRequest::getTenantId() const {
return tenantId_;
}
void DuplexDecisionRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string DuplexDecisionRequest::getText() const {
return text_;
}
void DuplexDecisionRequest::setText(const std::string &text) {
text_ = text;
setParameter(std::string("Text"), text);
}
std::string DuplexDecisionRequest::getBizRequestId() const {
return bizRequestId_;
}
void DuplexDecisionRequest::setBizRequestId(const std::string &bizRequestId) {
bizRequestId_ = bizRequestId;
setParameter(std::string("BizRequestId"), bizRequestId);
}

View File

@@ -0,0 +1,77 @@
/*
* 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/avatar/model/DuplexDecisionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
DuplexDecisionResult::DuplexDecisionResult() :
ServiceResult()
{}
DuplexDecisionResult::DuplexDecisionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DuplexDecisionResult::~DuplexDecisionResult()
{}
void DuplexDecisionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ActionType"].isNull())
data_.actionType = dataNode["ActionType"].asString();
if(!dataNode["OutputText"].isNull())
data_.outputText = dataNode["OutputText"].asString();
if(!dataNode["GrabType"].isNull())
data_.grabType = dataNode["GrabType"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
}
std::string DuplexDecisionResult::getMessage()const
{
return message_;
}
DuplexDecisionResult::Data DuplexDecisionResult::getData()const
{
return data_;
}
std::string DuplexDecisionResult::getCode()const
{
return code_;
}
std::string DuplexDecisionResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/GetVideoTaskInfoRequest.h>
using AlibabaCloud::Avatar::Model::GetVideoTaskInfoRequest;
GetVideoTaskInfoRequest::GetVideoTaskInfoRequest()
: RpcServiceRequest("avatar", "2022-01-30", "GetVideoTaskInfo") {
setMethod(HttpRequest::Method::Get);
}
GetVideoTaskInfoRequest::~GetVideoTaskInfoRequest() {}
GetVideoTaskInfoRequest::App GetVideoTaskInfoRequest::getApp() const {
return app_;
}
void GetVideoTaskInfoRequest::setApp(const GetVideoTaskInfoRequest::App &app) {
app_ = app;
setParameter(std::string("App") + ".AppId", app.appId);
}
long GetVideoTaskInfoRequest::getTenantId() const {
return tenantId_;
}
void GetVideoTaskInfoRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string GetVideoTaskInfoRequest::getTaskUuid() const {
return taskUuid_;
}
void GetVideoTaskInfoRequest::setTaskUuid(const std::string &taskUuid) {
taskUuid_ = taskUuid;
setParameter(std::string("TaskUuid"), taskUuid);
}

View File

@@ -0,0 +1,90 @@
/*
* 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/avatar/model/GetVideoTaskInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
GetVideoTaskInfoResult::GetVideoTaskInfoResult() :
ServiceResult()
{}
GetVideoTaskInfoResult::GetVideoTaskInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetVideoTaskInfoResult::~GetVideoTaskInfoResult()
{}
void GetVideoTaskInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TaskUuid"].isNull())
data_.taskUuid = dataNode["TaskUuid"].asString();
if(!dataNode["Type"].isNull())
data_.type = dataNode["Type"].asString();
if(!dataNode["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["Process"].isNull())
data_.process = dataNode["Process"].asString();
auto taskResultNode = dataNode["TaskResult"];
if(!taskResultNode["VideoUrl"].isNull())
data_.taskResult.videoUrl = taskResultNode["VideoUrl"].asString();
if(!taskResultNode["SubtitlesUrl"].isNull())
data_.taskResult.subtitlesUrl = taskResultNode["SubtitlesUrl"].asString();
if(!taskResultNode["WordSubtitlesUrl"].isNull())
data_.taskResult.wordSubtitlesUrl = taskResultNode["WordSubtitlesUrl"].asString();
if(!taskResultNode["FailReason"].isNull())
data_.taskResult.failReason = taskResultNode["FailReason"].asString();
if(!taskResultNode["FailCode"].isNull())
data_.taskResult.failCode = taskResultNode["FailCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetVideoTaskInfoResult::getMessage()const
{
return message_;
}
GetVideoTaskInfoResult::Data GetVideoTaskInfoResult::getData()const
{
return data_;
}
std::string GetVideoTaskInfoResult::getCode()const
{
return code_;
}
bool GetVideoTaskInfoResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/LicenseAuthRequest.h>
using AlibabaCloud::Avatar::Model::LicenseAuthRequest;
LicenseAuthRequest::LicenseAuthRequest()
: RpcServiceRequest("avatar", "2022-01-30", "LicenseAuth") {
setMethod(HttpRequest::Method::Post);
}
LicenseAuthRequest::~LicenseAuthRequest() {}
std::string LicenseAuthRequest::getLicense() const {
return license_;
}
void LicenseAuthRequest::setLicense(const std::string &license) {
license_ = license;
setParameter(std::string("License"), license);
}
std::string LicenseAuthRequest::getAppId() const {
return appId_;
}
void LicenseAuthRequest::setAppId(const std::string &appId) {
appId_ = appId;
setParameter(std::string("AppId"), appId);
}
long LicenseAuthRequest::getTenantId() const {
return tenantId_;
}
void LicenseAuthRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}

View 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/avatar/model/LicenseAuthResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
LicenseAuthResult::LicenseAuthResult() :
ServiceResult()
{}
LicenseAuthResult::LicenseAuthResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
LicenseAuthResult::~LicenseAuthResult()
{}
void LicenseAuthResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Token"].isNull())
data_.token = dataNode["Token"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string LicenseAuthResult::getMessage()const
{
return message_;
}
LicenseAuthResult::Data LicenseAuthResult::getData()const
{
return data_;
}
std::string LicenseAuthResult::getCode()const
{
return code_;
}
bool LicenseAuthResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/QueryRunningInstanceRequest.h>
using AlibabaCloud::Avatar::Model::QueryRunningInstanceRequest;
QueryRunningInstanceRequest::QueryRunningInstanceRequest()
: RpcServiceRequest("avatar", "2022-01-30", "QueryRunningInstance") {
setMethod(HttpRequest::Method::Post);
}
QueryRunningInstanceRequest::~QueryRunningInstanceRequest() {}
QueryRunningInstanceRequest::App QueryRunningInstanceRequest::getApp() const {
return app_;
}
void QueryRunningInstanceRequest::setApp(const QueryRunningInstanceRequest::App &app) {
app_ = app;
setParameter(std::string("App") + ".AppId", app.appId);
}
long QueryRunningInstanceRequest::getTenantId() const {
return tenantId_;
}
void QueryRunningInstanceRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string QueryRunningInstanceRequest::getSessionId() const {
return sessionId_;
}
void QueryRunningInstanceRequest::setSessionId(const std::string &sessionId) {
sessionId_ = sessionId;
setParameter(std::string("SessionId"), sessionId);
}

View File

@@ -0,0 +1,103 @@
/*
* 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/avatar/model/QueryRunningInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
QueryRunningInstanceResult::QueryRunningInstanceResult() :
ServiceResult()
{}
QueryRunningInstanceResult::QueryRunningInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryRunningInstanceResult::~QueryRunningInstanceResult()
{}
void QueryRunningInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["dataItem"];
for (auto valueDatadataItem : allDataNode)
{
DataItem dataObject;
if(!valueDatadataItem["SessionId"].isNull())
dataObject.sessionId = valueDatadataItem["SessionId"].asString();
auto channelNode = value["Channel"];
if(!channelNode["ChannelId"].isNull())
dataObject.channel.channelId = channelNode["ChannelId"].asString();
if(!channelNode["Token"].isNull())
dataObject.channel.token = channelNode["Token"].asString();
if(!channelNode["Type"].isNull())
dataObject.channel.type = channelNode["Type"].asString();
if(!channelNode["ExpiredTime"].isNull())
dataObject.channel.expiredTime = channelNode["ExpiredTime"].asString();
if(!channelNode["Nonce"].isNull())
dataObject.channel.nonce = channelNode["Nonce"].asString();
if(!channelNode["UserId"].isNull())
dataObject.channel.userId = channelNode["UserId"].asString();
if(!channelNode["AppId"].isNull())
dataObject.channel.appId = channelNode["AppId"].asString();
if(!channelNode["UserInfoInChannel"].isNull())
dataObject.channel.userInfoInChannel = channelNode["UserInfoInChannel"].asString();
auto allGslb = channelNode["Gslb"]["gslb"];
for (auto value : allGslb)
dataObject.channel.gslb.push_back(value.asString());
auto userNode = value["User"];
if(!userNode["UserId"].isNull())
dataObject.user.userId = userNode["UserId"].asString();
if(!userNode["UserName"].isNull())
dataObject.user.userName = userNode["UserName"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string QueryRunningInstanceResult::getMessage()const
{
return message_;
}
std::vector<QueryRunningInstanceResult::DataItem> QueryRunningInstanceResult::getData()const
{
return data_;
}
std::string QueryRunningInstanceResult::getCode()const
{
return code_;
}
bool QueryRunningInstanceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/QueryTimedResetOperateStatusRequest.h>
using AlibabaCloud::Avatar::Model::QueryTimedResetOperateStatusRequest;
QueryTimedResetOperateStatusRequest::QueryTimedResetOperateStatusRequest()
: RpcServiceRequest("avatar", "2022-01-30", "QueryTimedResetOperateStatus") {
setMethod(HttpRequest::Method::Post);
}
QueryTimedResetOperateStatusRequest::~QueryTimedResetOperateStatusRequest() {}
std::string QueryTimedResetOperateStatusRequest::getInstanceId() const {
return instanceId_;
}
void QueryTimedResetOperateStatusRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}
long QueryTimedResetOperateStatusRequest::getTenantId() const {
return tenantId_;
}
void QueryTimedResetOperateStatusRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}

View 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/avatar/model/QueryTimedResetOperateStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
QueryTimedResetOperateStatusResult::QueryTimedResetOperateStatusResult() :
ServiceResult()
{}
QueryTimedResetOperateStatusResult::QueryTimedResetOperateStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryTimedResetOperateStatusResult::~QueryTimedResetOperateStatusResult()
{}
void QueryTimedResetOperateStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["InstanceId"].isNull())
data_.instanceId = dataNode["InstanceId"].asString();
if(!dataNode["StatusStr"].isNull())
data_.statusStr = dataNode["StatusStr"].asString();
if(!dataNode["TenantId"].isNull())
data_.tenantId = dataNode["TenantId"].asString();
if(!dataNode["Status"].isNull())
data_.status = std::stol(dataNode["Status"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string QueryTimedResetOperateStatusResult::getMessage()const
{
return message_;
}
QueryTimedResetOperateStatusResult::Data QueryTimedResetOperateStatusResult::getData()const
{
return data_;
}
std::string QueryTimedResetOperateStatusResult::getCode()const
{
return code_;
}
bool QueryTimedResetOperateStatusResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,64 @@
/*
* 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/avatar/model/SendMessageRequest.h>
using AlibabaCloud::Avatar::Model::SendMessageRequest;
SendMessageRequest::SendMessageRequest()
: RpcServiceRequest("avatar", "2022-01-30", "SendMessage") {
setMethod(HttpRequest::Method::Post);
}
SendMessageRequest::~SendMessageRequest() {}
std::string SendMessageRequest::getTextRequest() const {
return textRequest_;
}
void SendMessageRequest::setTextRequest(const std::string &textRequest) {
textRequest_ = textRequest;
setParameter(std::string("TextRequest"), textRequest);
}
long SendMessageRequest::getTenantId() const {
return tenantId_;
}
void SendMessageRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
SendMessageRequest::VAMLRequest SendMessageRequest::getVAMLRequest() const {
return vAMLRequest_;
}
void SendMessageRequest::setVAMLRequest(const SendMessageRequest::VAMLRequest &vAMLRequest) {
vAMLRequest_ = vAMLRequest;
setParameter(std::string("VAMLRequest") + ".Code", vAMLRequest.code);
setParameter(std::string("VAMLRequest") + ".Vaml", vAMLRequest.vaml);
}
std::string SendMessageRequest::getSessionId() const {
return sessionId_;
}
void SendMessageRequest::setSessionId(const std::string &sessionId) {
sessionId_ = sessionId;
setParameter(std::string("SessionId"), sessionId);
}

View File

@@ -0,0 +1,75 @@
/*
* 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/avatar/model/SendMessageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
SendMessageResult::SendMessageResult() :
ServiceResult()
{}
SendMessageResult::SendMessageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SendMessageResult::~SendMessageResult()
{}
void SendMessageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["RequestId"].isNull())
data_.requestId = dataNode["RequestId"].asString();
if(!dataNode["SessionId"].isNull())
data_.sessionId = dataNode["SessionId"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string SendMessageResult::getMessage()const
{
return message_;
}
SendMessageResult::Data SendMessageResult::getData()const
{
return data_;
}
std::string SendMessageResult::getCode()const
{
return code_;
}
bool SendMessageResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,75 @@
/*
* 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/avatar/model/StartInstanceRequest.h>
using AlibabaCloud::Avatar::Model::StartInstanceRequest;
StartInstanceRequest::StartInstanceRequest()
: RpcServiceRequest("avatar", "2022-01-30", "StartInstance") {
setMethod(HttpRequest::Method::Post);
}
StartInstanceRequest::~StartInstanceRequest() {}
std::string StartInstanceRequest::getApp() const {
return app_;
}
void StartInstanceRequest::setApp(const std::string &app) {
app_ = app;
setParameter(std::string("App"), app);
}
long StartInstanceRequest::getTenantId() const {
return tenantId_;
}
void StartInstanceRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
StartInstanceRequest::Channel StartInstanceRequest::getChannel() const {
return channel_;
}
void StartInstanceRequest::setChannel(const StartInstanceRequest::Channel &channel) {
channel_ = channel;
setParameter(std::string("Channel") + ".Type", channel.type);
for(auto const &iter1 : channel.reqConfig) {
setParameter(std::string("Channel") + ".ReqConfig." + iter1.first, iter1.second);
}
}
StartInstanceRequest::CommandRequest StartInstanceRequest::getCommandRequest() const {
return commandRequest_;
}
void StartInstanceRequest::setCommandRequest(const StartInstanceRequest::CommandRequest &commandRequest) {
commandRequest_ = commandRequest;
setParameter(std::string("CommandRequest") + ".AlphaSwitch", commandRequest.alphaSwitch ? "true" : "false");
}
std::string StartInstanceRequest::getUser() const {
return user_;
}
void StartInstanceRequest::setUser(const std::string &user) {
user_ = user;
setParameter(std::string("User"), user);
}

View File

@@ -0,0 +1,97 @@
/*
* 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/avatar/model/StartInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
StartInstanceResult::StartInstanceResult() :
ServiceResult()
{}
StartInstanceResult::StartInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
StartInstanceResult::~StartInstanceResult()
{}
void StartInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["RequestId"].isNull())
data_.requestId = dataNode["RequestId"].asString();
if(!dataNode["SessionId"].isNull())
data_.sessionId = dataNode["SessionId"].asString();
if(!dataNode["Token"].isNull())
data_.token = dataNode["Token"].asString();
auto channelNode = dataNode["Channel"];
if(!channelNode["ChannelId"].isNull())
data_.channel.channelId = channelNode["ChannelId"].asString();
if(!channelNode["Token"].isNull())
data_.channel.token = channelNode["Token"].asString();
if(!channelNode["Type"].isNull())
data_.channel.type = channelNode["Type"].asString();
if(!channelNode["ExpiredTime"].isNull())
data_.channel.expiredTime = channelNode["ExpiredTime"].asString();
if(!channelNode["Nonce"].isNull())
data_.channel.nonce = channelNode["Nonce"].asString();
if(!channelNode["UserId"].isNull())
data_.channel.userId = channelNode["UserId"].asString();
if(!channelNode["AppId"].isNull())
data_.channel.appId = channelNode["AppId"].asString();
if(!channelNode["UserInfoInChannel"].isNull())
data_.channel.userInfoInChannel = channelNode["UserInfoInChannel"].asString();
auto allGslb = channelNode["Gslb"]["gslb"];
for (auto value : allGslb)
data_.channel.gslb.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string StartInstanceResult::getMessage()const
{
return message_;
}
StartInstanceResult::Data StartInstanceResult::getData()const
{
return data_;
}
std::string StartInstanceResult::getCode()const
{
return code_;
}
bool StartInstanceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/StartTimedResetOperateRequest.h>
using AlibabaCloud::Avatar::Model::StartTimedResetOperateRequest;
StartTimedResetOperateRequest::StartTimedResetOperateRequest()
: RpcServiceRequest("avatar", "2022-01-30", "StartTimedResetOperate") {
setMethod(HttpRequest::Method::Post);
}
StartTimedResetOperateRequest::~StartTimedResetOperateRequest() {}
std::string StartTimedResetOperateRequest::getInstanceId() const {
return instanceId_;
}
void StartTimedResetOperateRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}
long StartTimedResetOperateRequest::getTenantId() const {
return tenantId_;
}
void StartTimedResetOperateRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}

View File

@@ -0,0 +1,75 @@
/*
* 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/avatar/model/StartTimedResetOperateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
StartTimedResetOperateResult::StartTimedResetOperateResult() :
ServiceResult()
{}
StartTimedResetOperateResult::StartTimedResetOperateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
StartTimedResetOperateResult::~StartTimedResetOperateResult()
{}
void StartTimedResetOperateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["InstanceId"].isNull())
data_.instanceId = dataNode["InstanceId"].asString();
if(!dataNode["TenantId"].isNull())
data_.tenantId = std::stol(dataNode["TenantId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string StartTimedResetOperateResult::getMessage()const
{
return message_;
}
StartTimedResetOperateResult::Data StartTimedResetOperateResult::getData()const
{
return data_;
}
std::string StartTimedResetOperateResult::getCode()const
{
return code_;
}
bool StartTimedResetOperateResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/avatar/model/StopInstanceRequest.h>
using AlibabaCloud::Avatar::Model::StopInstanceRequest;
StopInstanceRequest::StopInstanceRequest()
: RpcServiceRequest("avatar", "2022-01-30", "StopInstance") {
setMethod(HttpRequest::Method::Post);
}
StopInstanceRequest::~StopInstanceRequest() {}
long StopInstanceRequest::getTenantId() const {
return tenantId_;
}
void StopInstanceRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string StopInstanceRequest::getSessionId() const {
return sessionId_;
}
void StopInstanceRequest::setSessionId(const std::string &sessionId) {
sessionId_ = sessionId;
setParameter(std::string("SessionId"), sessionId);
}

View File

@@ -0,0 +1,75 @@
/*
* 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/avatar/model/StopInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
StopInstanceResult::StopInstanceResult() :
ServiceResult()
{}
StopInstanceResult::StopInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
StopInstanceResult::~StopInstanceResult()
{}
void StopInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["RequestId"].isNull())
data_.requestId = dataNode["RequestId"].asString();
if(!dataNode["SessionId"].isNull())
data_.sessionId = dataNode["SessionId"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string StopInstanceResult::getMessage()const
{
return message_;
}
StopInstanceResult::Data StopInstanceResult::getData()const
{
return data_;
}
std::string StopInstanceResult::getCode()const
{
return code_;
}
bool StopInstanceResult::getSuccess()const
{
return success_;
}

View 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/avatar/model/SubmitTextTo2DAvatarVideoTaskRequest.h>
using AlibabaCloud::Avatar::Model::SubmitTextTo2DAvatarVideoTaskRequest;
SubmitTextTo2DAvatarVideoTaskRequest::SubmitTextTo2DAvatarVideoTaskRequest()
: RpcServiceRequest("avatar", "2022-01-30", "SubmitTextTo2DAvatarVideoTask") {
setMethod(HttpRequest::Method::Post);
}
SubmitTextTo2DAvatarVideoTaskRequest::~SubmitTextTo2DAvatarVideoTaskRequest() {}
SubmitTextTo2DAvatarVideoTaskRequest::App SubmitTextTo2DAvatarVideoTaskRequest::getApp() const {
return app_;
}
void SubmitTextTo2DAvatarVideoTaskRequest::setApp(const SubmitTextTo2DAvatarVideoTaskRequest::App &app) {
app_ = app;
setParameter(std::string("App") + ".AppId", app.appId);
}
SubmitTextTo2DAvatarVideoTaskRequest::VideoInfo SubmitTextTo2DAvatarVideoTaskRequest::getVideoInfo() const {
return videoInfo_;
}
void SubmitTextTo2DAvatarVideoTaskRequest::setVideoInfo(const SubmitTextTo2DAvatarVideoTaskRequest::VideoInfo &videoInfo) {
videoInfo_ = videoInfo;
setParameter(std::string("VideoInfo") + ".IsAlpha", videoInfo.isAlpha ? "true" : "false");
setParameter(std::string("VideoInfo") + ".BackgroundImageUrl", videoInfo.backgroundImageUrl);
setParameter(std::string("VideoInfo") + ".IsSubtitles", videoInfo.isSubtitles ? "true" : "false");
}
SubmitTextTo2DAvatarVideoTaskRequest::AudioInfo SubmitTextTo2DAvatarVideoTaskRequest::getAudioInfo() const {
return audioInfo_;
}
void SubmitTextTo2DAvatarVideoTaskRequest::setAudioInfo(const SubmitTextTo2DAvatarVideoTaskRequest::AudioInfo &audioInfo) {
audioInfo_ = audioInfo;
setParameter(std::string("AudioInfo") + ".Voice", audioInfo.voice);
setParameter(std::string("AudioInfo") + ".Volume", std::to_string(audioInfo.volume));
setParameter(std::string("AudioInfo") + ".SpeechRate", std::to_string(audioInfo.speechRate));
setParameter(std::string("AudioInfo") + ".PitchRate", std::to_string(audioInfo.pitchRate));
}
SubmitTextTo2DAvatarVideoTaskRequest::AvatarInfo SubmitTextTo2DAvatarVideoTaskRequest::getAvatarInfo() const {
return avatarInfo_;
}
void SubmitTextTo2DAvatarVideoTaskRequest::setAvatarInfo(const SubmitTextTo2DAvatarVideoTaskRequest::AvatarInfo &avatarInfo) {
avatarInfo_ = avatarInfo;
setParameter(std::string("AvatarInfo") + ".Code", avatarInfo.code);
}
long SubmitTextTo2DAvatarVideoTaskRequest::getTenantId() const {
return tenantId_;
}
void SubmitTextTo2DAvatarVideoTaskRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string SubmitTextTo2DAvatarVideoTaskRequest::getText() const {
return text_;
}
void SubmitTextTo2DAvatarVideoTaskRequest::setText(const std::string &text) {
text_ = text;
setParameter(std::string("Text"), text);
}
std::string SubmitTextTo2DAvatarVideoTaskRequest::getTitle() const {
return title_;
}
void SubmitTextTo2DAvatarVideoTaskRequest::setTitle(const std::string &title) {
title_ = title;
setParameter(std::string("Title"), title);
}

View 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/avatar/model/SubmitTextTo2DAvatarVideoTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
SubmitTextTo2DAvatarVideoTaskResult::SubmitTextTo2DAvatarVideoTaskResult() :
ServiceResult()
{}
SubmitTextTo2DAvatarVideoTaskResult::SubmitTextTo2DAvatarVideoTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SubmitTextTo2DAvatarVideoTaskResult::~SubmitTextTo2DAvatarVideoTaskResult()
{}
void SubmitTextTo2DAvatarVideoTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TaskUuid"].isNull())
data_.taskUuid = dataNode["TaskUuid"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string SubmitTextTo2DAvatarVideoTaskResult::getMessage()const
{
return message_;
}
SubmitTextTo2DAvatarVideoTaskResult::Data SubmitTextTo2DAvatarVideoTaskResult::getData()const
{
return data_;
}
std::string SubmitTextTo2DAvatarVideoTaskResult::getCode()const
{
return code_;
}
bool SubmitTextTo2DAvatarVideoTaskResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,87 @@
/*
* 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/avatar/model/SubmitTextTo3DAvatarVideoTaskRequest.h>
using AlibabaCloud::Avatar::Model::SubmitTextTo3DAvatarVideoTaskRequest;
SubmitTextTo3DAvatarVideoTaskRequest::SubmitTextTo3DAvatarVideoTaskRequest()
: RpcServiceRequest("avatar", "2022-01-30", "SubmitTextTo3DAvatarVideoTask") {
setMethod(HttpRequest::Method::Post);
}
SubmitTextTo3DAvatarVideoTaskRequest::~SubmitTextTo3DAvatarVideoTaskRequest() {}
SubmitTextTo3DAvatarVideoTaskRequest::App SubmitTextTo3DAvatarVideoTaskRequest::getApp() const {
return app_;
}
void SubmitTextTo3DAvatarVideoTaskRequest::setApp(const SubmitTextTo3DAvatarVideoTaskRequest::App &app) {
app_ = app;
setParameter(std::string("App") + ".AppId", app.appId);
}
SubmitTextTo3DAvatarVideoTaskRequest::VideoInfo SubmitTextTo3DAvatarVideoTaskRequest::getVideoInfo() const {
return videoInfo_;
}
void SubmitTextTo3DAvatarVideoTaskRequest::setVideoInfo(const SubmitTextTo3DAvatarVideoTaskRequest::VideoInfo &videoInfo) {
videoInfo_ = videoInfo;
setParameter(std::string("VideoInfo") + ".IsAlpha", videoInfo.isAlpha ? "true" : "false");
setParameter(std::string("VideoInfo") + ".BackgroundImageUrl", videoInfo.backgroundImageUrl);
setParameter(std::string("VideoInfo") + ".IsSubtitles", videoInfo.isSubtitles ? "true" : "false");
setParameter(std::string("VideoInfo") + ".Resolution", std::to_string(videoInfo.resolution));
setParameter(std::string("VideoInfo") + ".AlphaFormat", std::to_string(videoInfo.alphaFormat));
}
SubmitTextTo3DAvatarVideoTaskRequest::AvatarInfo SubmitTextTo3DAvatarVideoTaskRequest::getAvatarInfo() const {
return avatarInfo_;
}
void SubmitTextTo3DAvatarVideoTaskRequest::setAvatarInfo(const SubmitTextTo3DAvatarVideoTaskRequest::AvatarInfo &avatarInfo) {
avatarInfo_ = avatarInfo;
setParameter(std::string("AvatarInfo") + ".Code", avatarInfo.code);
setParameter(std::string("AvatarInfo") + ".Locate", std::to_string(avatarInfo.locate));
setParameter(std::string("AvatarInfo") + ".Angle", std::to_string(avatarInfo.angle));
}
long SubmitTextTo3DAvatarVideoTaskRequest::getTenantId() const {
return tenantId_;
}
void SubmitTextTo3DAvatarVideoTaskRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string SubmitTextTo3DAvatarVideoTaskRequest::getText() const {
return text_;
}
void SubmitTextTo3DAvatarVideoTaskRequest::setText(const std::string &text) {
text_ = text;
setParameter(std::string("Text"), text);
}
std::string SubmitTextTo3DAvatarVideoTaskRequest::getTitle() const {
return title_;
}
void SubmitTextTo3DAvatarVideoTaskRequest::setTitle(const std::string &title) {
title_ = title;
setParameter(std::string("Title"), title);
}

View 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/avatar/model/SubmitTextTo3DAvatarVideoTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
SubmitTextTo3DAvatarVideoTaskResult::SubmitTextTo3DAvatarVideoTaskResult() :
ServiceResult()
{}
SubmitTextTo3DAvatarVideoTaskResult::SubmitTextTo3DAvatarVideoTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SubmitTextTo3DAvatarVideoTaskResult::~SubmitTextTo3DAvatarVideoTaskResult()
{}
void SubmitTextTo3DAvatarVideoTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TaskUuid"].isNull())
data_.taskUuid = dataNode["TaskUuid"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string SubmitTextTo3DAvatarVideoTaskResult::getMessage()const
{
return message_;
}
SubmitTextTo3DAvatarVideoTaskResult::Data SubmitTextTo3DAvatarVideoTaskResult::getData()const
{
return data_;
}
std::string SubmitTextTo3DAvatarVideoTaskResult::getCode()const
{
return code_;
}
bool SubmitTextTo3DAvatarVideoTaskResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,74 @@
/*
* 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/avatar/model/SubmitTextToSignVideoTaskRequest.h>
using AlibabaCloud::Avatar::Model::SubmitTextToSignVideoTaskRequest;
SubmitTextToSignVideoTaskRequest::SubmitTextToSignVideoTaskRequest()
: RpcServiceRequest("avatar", "2022-01-30", "SubmitTextToSignVideoTask") {
setMethod(HttpRequest::Method::Post);
}
SubmitTextToSignVideoTaskRequest::~SubmitTextToSignVideoTaskRequest() {}
SubmitTextToSignVideoTaskRequest::App SubmitTextToSignVideoTaskRequest::getApp() const {
return app_;
}
void SubmitTextToSignVideoTaskRequest::setApp(const SubmitTextToSignVideoTaskRequest::App &app) {
app_ = app;
setParameter(std::string("App") + ".AppId", app.appId);
}
SubmitTextToSignVideoTaskRequest::VideoInfo SubmitTextToSignVideoTaskRequest::getVideoInfo() const {
return videoInfo_;
}
void SubmitTextToSignVideoTaskRequest::setVideoInfo(const SubmitTextToSignVideoTaskRequest::VideoInfo &videoInfo) {
videoInfo_ = videoInfo;
setParameter(std::string("VideoInfo") + ".IsAlpha", videoInfo.isAlpha ? "true" : "false");
setParameter(std::string("VideoInfo") + ".IsSubtitles", videoInfo.isSubtitles ? "true" : "false");
setParameter(std::string("VideoInfo") + ".Resolution", std::to_string(videoInfo.resolution));
}
long SubmitTextToSignVideoTaskRequest::getTenantId() const {
return tenantId_;
}
void SubmitTextToSignVideoTaskRequest::setTenantId(long tenantId) {
tenantId_ = tenantId;
setParameter(std::string("TenantId"), std::to_string(tenantId));
}
std::string SubmitTextToSignVideoTaskRequest::getText() const {
return text_;
}
void SubmitTextToSignVideoTaskRequest::setText(const std::string &text) {
text_ = text;
setParameter(std::string("Text"), text);
}
std::string SubmitTextToSignVideoTaskRequest::getTitle() const {
return title_;
}
void SubmitTextToSignVideoTaskRequest::setTitle(const std::string &title) {
title_ = title;
setParameter(std::string("Title"), title);
}

View 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/avatar/model/SubmitTextToSignVideoTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Avatar;
using namespace AlibabaCloud::Avatar::Model;
SubmitTextToSignVideoTaskResult::SubmitTextToSignVideoTaskResult() :
ServiceResult()
{}
SubmitTextToSignVideoTaskResult::SubmitTextToSignVideoTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SubmitTextToSignVideoTaskResult::~SubmitTextToSignVideoTaskResult()
{}
void SubmitTextToSignVideoTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TaskUuid"].isNull())
data_.taskUuid = dataNode["TaskUuid"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString();
}
std::string SubmitTextToSignVideoTaskResult::getMessage()const
{
return message_;
}
SubmitTextToSignVideoTaskResult::Data SubmitTextToSignVideoTaskResult::getData()const
{
return data_;
}
std::string SubmitTextToSignVideoTaskResult::getCode()const
{
return code_;
}
std::string SubmitTextToSignVideoTaskResult::getSuccess()const
{
return success_;
}