Browse Source

add client SDK api

sdk-team 3 years ago
parent
commit
a3c08aa6f7

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1763
+1.36.1764

+ 12 - 0
avatar/CMakeLists.txt

@@ -23,6 +23,10 @@ set(avatar_public_header
 set(avatar_public_header_model 
 	include/alibabacloud/avatar/model/CancelVideoTaskRequest.h
 	include/alibabacloud/avatar/model/CancelVideoTaskResult.h
+	include/alibabacloud/avatar/model/ClientAuthRequest.h
+	include/alibabacloud/avatar/model/ClientAuthResult.h
+	include/alibabacloud/avatar/model/ClientStartRequest.h
+	include/alibabacloud/avatar/model/ClientStartResult.h
 	include/alibabacloud/avatar/model/CloseTimedResetOperateRequest.h
 	include/alibabacloud/avatar/model/CloseTimedResetOperateResult.h
 	include/alibabacloud/avatar/model/Create2dAvatarRequest.h
@@ -45,6 +49,8 @@ set(avatar_public_header_model
 	include/alibabacloud/avatar/model/QueryTimedResetOperateStatusResult.h
 	include/alibabacloud/avatar/model/QueryVideoTaskInfoRequest.h
 	include/alibabacloud/avatar/model/QueryVideoTaskInfoResult.h
+	include/alibabacloud/avatar/model/Render3dAvatarRequest.h
+	include/alibabacloud/avatar/model/Render3dAvatarResult.h
 	include/alibabacloud/avatar/model/SendCommandRequest.h
 	include/alibabacloud/avatar/model/SendCommandResult.h
 	include/alibabacloud/avatar/model/SendMessageRequest.h
@@ -74,6 +80,10 @@ set(avatar_src
 	src/AvatarClient.cc
 	src/model/CancelVideoTaskRequest.cc
 	src/model/CancelVideoTaskResult.cc
+	src/model/ClientAuthRequest.cc
+	src/model/ClientAuthResult.cc
+	src/model/ClientStartRequest.cc
+	src/model/ClientStartResult.cc
 	src/model/CloseTimedResetOperateRequest.cc
 	src/model/CloseTimedResetOperateResult.cc
 	src/model/Create2dAvatarRequest.cc
@@ -96,6 +106,8 @@ set(avatar_src
 	src/model/QueryTimedResetOperateStatusResult.cc
 	src/model/QueryVideoTaskInfoRequest.cc
 	src/model/QueryVideoTaskInfoResult.cc
+	src/model/Render3dAvatarRequest.cc
+	src/model/Render3dAvatarResult.cc
 	src/model/SendCommandRequest.cc
 	src/model/SendCommandResult.cc
 	src/model/SendMessageRequest.cc

+ 24 - 0
avatar/include/alibabacloud/avatar/AvatarClient.h

@@ -24,6 +24,10 @@
 #include "AvatarExport.h"
 #include "model/CancelVideoTaskRequest.h"
 #include "model/CancelVideoTaskResult.h"
+#include "model/ClientAuthRequest.h"
+#include "model/ClientAuthResult.h"
+#include "model/ClientStartRequest.h"
+#include "model/ClientStartResult.h"
 #include "model/CloseTimedResetOperateRequest.h"
 #include "model/CloseTimedResetOperateResult.h"
 #include "model/Create2dAvatarRequest.h"
@@ -46,6 +50,8 @@
 #include "model/QueryTimedResetOperateStatusResult.h"
 #include "model/QueryVideoTaskInfoRequest.h"
 #include "model/QueryVideoTaskInfoResult.h"
+#include "model/Render3dAvatarRequest.h"
+#include "model/Render3dAvatarResult.h"
 #include "model/SendCommandRequest.h"
 #include "model/SendCommandResult.h"
 #include "model/SendMessageRequest.h"
@@ -82,6 +88,12 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::CancelVideoTaskResult> CancelVideoTaskOutcome;
 			typedef std::future<CancelVideoTaskOutcome> CancelVideoTaskOutcomeCallable;
 			typedef std::function<void(const AvatarClient*, const Model::CancelVideoTaskRequest&, const CancelVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelVideoTaskAsyncHandler;
+			typedef Outcome<Error, Model::ClientAuthResult> ClientAuthOutcome;
+			typedef std::future<ClientAuthOutcome> ClientAuthOutcomeCallable;
+			typedef std::function<void(const AvatarClient*, const Model::ClientAuthRequest&, const ClientAuthOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClientAuthAsyncHandler;
+			typedef Outcome<Error, Model::ClientStartResult> ClientStartOutcome;
+			typedef std::future<ClientStartOutcome> ClientStartOutcomeCallable;
+			typedef std::function<void(const AvatarClient*, const Model::ClientStartRequest&, const ClientStartOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClientStartAsyncHandler;
 			typedef Outcome<Error, Model::CloseTimedResetOperateResult> CloseTimedResetOperateOutcome;
 			typedef std::future<CloseTimedResetOperateOutcome> CloseTimedResetOperateOutcomeCallable;
 			typedef std::function<void(const AvatarClient*, const Model::CloseTimedResetOperateRequest&, const CloseTimedResetOperateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CloseTimedResetOperateAsyncHandler;
@@ -115,6 +127,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::QueryVideoTaskInfoResult> QueryVideoTaskInfoOutcome;
 			typedef std::future<QueryVideoTaskInfoOutcome> QueryVideoTaskInfoOutcomeCallable;
 			typedef std::function<void(const AvatarClient*, const Model::QueryVideoTaskInfoRequest&, const QueryVideoTaskInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryVideoTaskInfoAsyncHandler;
+			typedef Outcome<Error, Model::Render3dAvatarResult> Render3dAvatarOutcome;
+			typedef std::future<Render3dAvatarOutcome> Render3dAvatarOutcomeCallable;
+			typedef std::function<void(const AvatarClient*, const Model::Render3dAvatarRequest&, const Render3dAvatarOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> Render3dAvatarAsyncHandler;
 			typedef Outcome<Error, Model::SendCommandResult> SendCommandOutcome;
 			typedef std::future<SendCommandOutcome> SendCommandOutcomeCallable;
 			typedef std::function<void(const AvatarClient*, const Model::SendCommandRequest&, const SendCommandOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SendCommandAsyncHandler;
@@ -159,6 +174,12 @@ namespace AlibabaCloud
 			CancelVideoTaskOutcome cancelVideoTask(const Model::CancelVideoTaskRequest &request)const;
 			void cancelVideoTaskAsync(const Model::CancelVideoTaskRequest& request, const CancelVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			CancelVideoTaskOutcomeCallable cancelVideoTaskCallable(const Model::CancelVideoTaskRequest& request) const;
+			ClientAuthOutcome clientAuth(const Model::ClientAuthRequest &request)const;
+			void clientAuthAsync(const Model::ClientAuthRequest& request, const ClientAuthAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			ClientAuthOutcomeCallable clientAuthCallable(const Model::ClientAuthRequest& request) const;
+			ClientStartOutcome clientStart(const Model::ClientStartRequest &request)const;
+			void clientStartAsync(const Model::ClientStartRequest& request, const ClientStartAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			ClientStartOutcomeCallable clientStartCallable(const Model::ClientStartRequest& request) const;
 			CloseTimedResetOperateOutcome closeTimedResetOperate(const Model::CloseTimedResetOperateRequest &request)const;
 			void closeTimedResetOperateAsync(const Model::CloseTimedResetOperateRequest& request, const CloseTimedResetOperateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			CloseTimedResetOperateOutcomeCallable closeTimedResetOperateCallable(const Model::CloseTimedResetOperateRequest& request) const;
@@ -192,6 +213,9 @@ namespace AlibabaCloud
 			QueryVideoTaskInfoOutcome queryVideoTaskInfo(const Model::QueryVideoTaskInfoRequest &request)const;
 			void queryVideoTaskInfoAsync(const Model::QueryVideoTaskInfoRequest& request, const QueryVideoTaskInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			QueryVideoTaskInfoOutcomeCallable queryVideoTaskInfoCallable(const Model::QueryVideoTaskInfoRequest& request) const;
+			Render3dAvatarOutcome render3dAvatar(const Model::Render3dAvatarRequest &request)const;
+			void render3dAvatarAsync(const Model::Render3dAvatarRequest& request, const Render3dAvatarAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			Render3dAvatarOutcomeCallable render3dAvatarCallable(const Model::Render3dAvatarRequest& request) const;
 			SendCommandOutcome sendCommand(const Model::SendCommandRequest &request)const;
 			void sendCommandAsync(const Model::SendCommandRequest& request, const SendCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			SendCommandOutcomeCallable sendCommandCallable(const Model::SendCommandRequest& request) const;

+ 57 - 0
avatar/include/alibabacloud/avatar/model/ClientAuthRequest.h

@@ -0,0 +1,57 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_AVATAR_MODEL_CLIENTAUTHREQUEST_H_
+#define ALIBABACLOUD_AVATAR_MODEL_CLIENTAUTHREQUEST_H_
+
+#include <alibabacloud/avatar/AvatarExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Avatar {
+namespace Model {
+class ALIBABACLOUD_AVATAR_EXPORT ClientAuthRequest : public RpcServiceRequest {
+public:
+	ClientAuthRequest();
+	~ClientAuthRequest();
+	std::string getDeviceId() const;
+	void setDeviceId(const std::string &deviceId);
+	std::string getDeviceType() const;
+	void setDeviceType(const std::string &deviceType);
+	std::string getLicense() const;
+	void setLicense(const std::string &license);
+	std::string getAppId() const;
+	void setAppId(const std::string &appId);
+	long getTenantId() const;
+	void setTenantId(long tenantId);
+	std::string getDeviceInfo() const;
+	void setDeviceInfo(const std::string &deviceInfo);
+
+private:
+	std::string deviceId_;
+	std::string deviceType_;
+	std::string license_;
+	std::string appId_;
+	long tenantId_;
+	std::string deviceInfo_;
+};
+} // namespace Model
+} // namespace Avatar
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_AVATAR_MODEL_CLIENTAUTHREQUEST_H_

+ 55 - 0
avatar/include/alibabacloud/avatar/model/ClientAuthResult.h

@@ -0,0 +1,55 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_AVATAR_MODEL_CLIENTAUTHRESULT_H_
+#define ALIBABACLOUD_AVATAR_MODEL_CLIENTAUTHRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/avatar/AvatarExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Avatar
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_AVATAR_EXPORT ClientAuthResult : public ServiceResult
+			{
+			public:
+
+
+				ClientAuthResult();
+				explicit ClientAuthResult(const std::string &payload);
+				~ClientAuthResult();
+				std::string getMessage()const;
+				std::string getCode()const;
+				bool getSuccess()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string message_;
+				std::string code_;
+				bool success_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_AVATAR_MODEL_CLIENTAUTHRESULT_H_

+ 45 - 0
avatar/include/alibabacloud/avatar/model/ClientStartRequest.h

@@ -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.
+ */
+
+#ifndef ALIBABACLOUD_AVATAR_MODEL_CLIENTSTARTREQUEST_H_
+#define ALIBABACLOUD_AVATAR_MODEL_CLIENTSTARTREQUEST_H_
+
+#include <alibabacloud/avatar/AvatarExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Avatar {
+namespace Model {
+class ALIBABACLOUD_AVATAR_EXPORT ClientStartRequest : public RpcServiceRequest {
+public:
+	ClientStartRequest();
+	~ClientStartRequest();
+	std::string getAppId() const;
+	void setAppId(const std::string &appId);
+	long getTenantId() const;
+	void setTenantId(long tenantId);
+
+private:
+	std::string appId_;
+	long tenantId_;
+};
+} // namespace Model
+} // namespace Avatar
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_AVATAR_MODEL_CLIENTSTARTREQUEST_H_

+ 61 - 0
avatar/include/alibabacloud/avatar/model/ClientStartResult.h

@@ -0,0 +1,61 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_AVATAR_MODEL_CLIENTSTARTRESULT_H_
+#define ALIBABACLOUD_AVATAR_MODEL_CLIENTSTARTRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/avatar/AvatarExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Avatar
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_AVATAR_EXPORT ClientStartResult : public ServiceResult
+			{
+			public:
+				struct Data
+				{
+					std::string imToken;
+				};
+
+
+				ClientStartResult();
+				explicit ClientStartResult(const std::string &payload);
+				~ClientStartResult();
+				std::string getMessage()const;
+				Data getData()const;
+				std::string getCode()const;
+				bool getSuccess()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string message_;
+				Data data_;
+				std::string code_;
+				bool success_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_AVATAR_MODEL_CLIENTSTARTRESULT_H_

+ 48 - 0
avatar/include/alibabacloud/avatar/model/Render3dAvatarRequest.h

@@ -0,0 +1,48 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_AVATAR_MODEL_RENDER3DAVATARREQUEST_H_
+#define ALIBABACLOUD_AVATAR_MODEL_RENDER3DAVATARREQUEST_H_
+
+#include <alibabacloud/avatar/AvatarExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Avatar {
+namespace Model {
+class ALIBABACLOUD_AVATAR_EXPORT Render3dAvatarRequest : public RpcServiceRequest {
+public:
+	Render3dAvatarRequest();
+	~Render3dAvatarRequest();
+	std::string getCode() const;
+	void setCode(const std::string &code);
+	std::string getAppId() const;
+	void setAppId(const std::string &appId);
+	long getTenantId() const;
+	void setTenantId(long tenantId);
+
+private:
+	std::string code_;
+	std::string appId_;
+	long tenantId_;
+};
+} // namespace Model
+} // namespace Avatar
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_AVATAR_MODEL_RENDER3DAVATARREQUEST_H_

+ 61 - 0
avatar/include/alibabacloud/avatar/model/Render3dAvatarResult.h

@@ -0,0 +1,61 @@
+/*
+ * Copyright 2009-2017 Alibaba Cloud All rights reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ALIBABACLOUD_AVATAR_MODEL_RENDER3DAVATARRESULT_H_
+#define ALIBABACLOUD_AVATAR_MODEL_RENDER3DAVATARRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/avatar/AvatarExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Avatar
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_AVATAR_EXPORT Render3dAvatarResult : public ServiceResult
+			{
+			public:
+				struct Data
+				{
+					std::string renderData;
+				};
+
+
+				Render3dAvatarResult();
+				explicit Render3dAvatarResult(const std::string &payload);
+				~Render3dAvatarResult();
+				std::string getMessage()const;
+				Data getData()const;
+				std::string getCode()const;
+				bool getSuccess()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				std::string message_;
+				Data data_;
+				std::string code_;
+				bool success_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_AVATAR_MODEL_RENDER3DAVATARRESULT_H_

+ 108 - 0
avatar/src/AvatarClient.cc

@@ -87,6 +87,78 @@ AvatarClient::CancelVideoTaskOutcomeCallable AvatarClient::cancelVideoTaskCallab
 	return task->get_future();
 }
 
+AvatarClient::ClientAuthOutcome AvatarClient::clientAuth(const ClientAuthRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return ClientAuthOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return ClientAuthOutcome(ClientAuthResult(outcome.result()));
+	else
+		return ClientAuthOutcome(outcome.error());
+}
+
+void AvatarClient::clientAuthAsync(const ClientAuthRequest& request, const ClientAuthAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, clientAuth(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+AvatarClient::ClientAuthOutcomeCallable AvatarClient::clientAuthCallable(const ClientAuthRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<ClientAuthOutcome()>>(
+			[this, request]()
+			{
+			return this->clientAuth(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
+AvatarClient::ClientStartOutcome AvatarClient::clientStart(const ClientStartRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return ClientStartOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return ClientStartOutcome(ClientStartResult(outcome.result()));
+	else
+		return ClientStartOutcome(outcome.error());
+}
+
+void AvatarClient::clientStartAsync(const ClientStartRequest& request, const ClientStartAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, clientStart(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+AvatarClient::ClientStartOutcomeCallable AvatarClient::clientStartCallable(const ClientStartRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<ClientStartOutcome()>>(
+			[this, request]()
+			{
+			return this->clientStart(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 AvatarClient::CloseTimedResetOperateOutcome AvatarClient::closeTimedResetOperate(const CloseTimedResetOperateRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -483,6 +555,42 @@ AvatarClient::QueryVideoTaskInfoOutcomeCallable AvatarClient::queryVideoTaskInfo
 	return task->get_future();
 }
 
+AvatarClient::Render3dAvatarOutcome AvatarClient::render3dAvatar(const Render3dAvatarRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return Render3dAvatarOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return Render3dAvatarOutcome(Render3dAvatarResult(outcome.result()));
+	else
+		return Render3dAvatarOutcome(outcome.error());
+}
+
+void AvatarClient::render3dAvatarAsync(const Render3dAvatarRequest& request, const Render3dAvatarAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, render3dAvatar(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+AvatarClient::Render3dAvatarOutcomeCallable AvatarClient::render3dAvatarCallable(const Render3dAvatarRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<Render3dAvatarOutcome()>>(
+			[this, request]()
+			{
+			return this->render3dAvatar(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 AvatarClient::SendCommandOutcome AvatarClient::sendCommand(const SendCommandRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 81 - 0
avatar/src/model/ClientAuthRequest.cc

@@ -0,0 +1,81 @@
+/*
+ * 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/ClientAuthRequest.h>
+
+using AlibabaCloud::Avatar::Model::ClientAuthRequest;
+
+ClientAuthRequest::ClientAuthRequest()
+    : RpcServiceRequest("avatar", "2022-01-30", "ClientAuth") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+ClientAuthRequest::~ClientAuthRequest() {}
+
+std::string ClientAuthRequest::getDeviceId() const {
+  return deviceId_;
+}
+
+void ClientAuthRequest::setDeviceId(const std::string &deviceId) {
+  deviceId_ = deviceId;
+  setParameter(std::string("DeviceId"), deviceId);
+}
+
+std::string ClientAuthRequest::getDeviceType() const {
+  return deviceType_;
+}
+
+void ClientAuthRequest::setDeviceType(const std::string &deviceType) {
+  deviceType_ = deviceType;
+  setParameter(std::string("DeviceType"), deviceType);
+}
+
+std::string ClientAuthRequest::getLicense() const {
+  return license_;
+}
+
+void ClientAuthRequest::setLicense(const std::string &license) {
+  license_ = license;
+  setParameter(std::string("License"), license);
+}
+
+std::string ClientAuthRequest::getAppId() const {
+  return appId_;
+}
+
+void ClientAuthRequest::setAppId(const std::string &appId) {
+  appId_ = appId;
+  setParameter(std::string("AppId"), appId);
+}
+
+long ClientAuthRequest::getTenantId() const {
+  return tenantId_;
+}
+
+void ClientAuthRequest::setTenantId(long tenantId) {
+  tenantId_ = tenantId;
+  setParameter(std::string("TenantId"), std::to_string(tenantId));
+}
+
+std::string ClientAuthRequest::getDeviceInfo() const {
+  return deviceInfo_;
+}
+
+void ClientAuthRequest::setDeviceInfo(const std::string &deviceInfo) {
+  deviceInfo_ = deviceInfo;
+  setParameter(std::string("DeviceInfo"), deviceInfo);
+}
+

+ 65 - 0
avatar/src/model/ClientAuthResult.cc

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

+ 45 - 0
avatar/src/model/ClientStartRequest.cc

@@ -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/ClientStartRequest.h>
+
+using AlibabaCloud::Avatar::Model::ClientStartRequest;
+
+ClientStartRequest::ClientStartRequest()
+    : RpcServiceRequest("avatar", "2022-01-30", "ClientStart") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+ClientStartRequest::~ClientStartRequest() {}
+
+std::string ClientStartRequest::getAppId() const {
+  return appId_;
+}
+
+void ClientStartRequest::setAppId(const std::string &appId) {
+  appId_ = appId;
+  setParameter(std::string("AppId"), appId);
+}
+
+long ClientStartRequest::getTenantId() const {
+  return tenantId_;
+}
+
+void ClientStartRequest::setTenantId(long tenantId) {
+  tenantId_ = tenantId;
+  setParameter(std::string("TenantId"), std::to_string(tenantId));
+}
+

+ 73 - 0
avatar/src/model/ClientStartResult.cc

@@ -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/ClientStartResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Avatar;
+using namespace AlibabaCloud::Avatar::Model;
+
+ClientStartResult::ClientStartResult() :
+	ServiceResult()
+{}
+
+ClientStartResult::ClientStartResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+ClientStartResult::~ClientStartResult()
+{}
+
+void ClientStartResult::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["ImToken"].isNull())
+		data_.imToken = dataNode["ImToken"].asString();
+	if(!value["Success"].isNull())
+		success_ = value["Success"].asString() == "true";
+	if(!value["Code"].isNull())
+		code_ = value["Code"].asString();
+	if(!value["Message"].isNull())
+		message_ = value["Message"].asString();
+
+}
+
+std::string ClientStartResult::getMessage()const
+{
+	return message_;
+}
+
+ClientStartResult::Data ClientStartResult::getData()const
+{
+	return data_;
+}
+
+std::string ClientStartResult::getCode()const
+{
+	return code_;
+}
+
+bool ClientStartResult::getSuccess()const
+{
+	return success_;
+}
+

+ 54 - 0
avatar/src/model/Render3dAvatarRequest.cc

@@ -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/Render3dAvatarRequest.h>
+
+using AlibabaCloud::Avatar::Model::Render3dAvatarRequest;
+
+Render3dAvatarRequest::Render3dAvatarRequest()
+    : RpcServiceRequest("avatar", "2022-01-30", "Render3dAvatar") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+Render3dAvatarRequest::~Render3dAvatarRequest() {}
+
+std::string Render3dAvatarRequest::getCode() const {
+  return code_;
+}
+
+void Render3dAvatarRequest::setCode(const std::string &code) {
+  code_ = code;
+  setParameter(std::string("Code"), code);
+}
+
+std::string Render3dAvatarRequest::getAppId() const {
+  return appId_;
+}
+
+void Render3dAvatarRequest::setAppId(const std::string &appId) {
+  appId_ = appId;
+  setParameter(std::string("AppId"), appId);
+}
+
+long Render3dAvatarRequest::getTenantId() const {
+  return tenantId_;
+}
+
+void Render3dAvatarRequest::setTenantId(long tenantId) {
+  tenantId_ = tenantId;
+  setParameter(std::string("TenantId"), std::to_string(tenantId));
+}
+

+ 73 - 0
avatar/src/model/Render3dAvatarResult.cc

@@ -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/Render3dAvatarResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Avatar;
+using namespace AlibabaCloud::Avatar::Model;
+
+Render3dAvatarResult::Render3dAvatarResult() :
+	ServiceResult()
+{}
+
+Render3dAvatarResult::Render3dAvatarResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+Render3dAvatarResult::~Render3dAvatarResult()
+{}
+
+void Render3dAvatarResult::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["RenderData"].isNull())
+		data_.renderData = dataNode["RenderData"].asString();
+	if(!value["Success"].isNull())
+		success_ = value["Success"].asString() == "true";
+	if(!value["Code"].isNull())
+		code_ = value["Code"].asString();
+	if(!value["Message"].isNull())
+		message_ = value["Message"].asString();
+
+}
+
+std::string Render3dAvatarResult::getMessage()const
+{
+	return message_;
+}
+
+Render3dAvatarResult::Data Render3dAvatarResult::getData()const
+{
+	return data_;
+}
+
+std::string Render3dAvatarResult::getCode()const
+{
+	return code_;
+}
+
+bool Render3dAvatarResult::getSuccess()const
+{
+	return success_;
+}
+