add client SDK api

This commit is contained in:
sdk-team
2023-09-18 07:27:26 +00:00
parent df9aacc5a5
commit a3c08aa6f7
16 changed files with 863 additions and 1 deletions

View File

@@ -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;

View File

@@ -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_

View File

@@ -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_

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.
*/
#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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_