VideoSearch deploy SDK.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-05-09 Version: 1.36.400
|
||||
- VideoSearch deploy SDK.
|
||||
|
||||
2020-05-08 Version: 1.36.399
|
||||
- Support sg for region.
|
||||
|
||||
|
||||
98
videosearch/CMakeLists.txt
Normal file
98
videosearch/CMakeLists.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
set(videosearch_public_header
|
||||
include/alibabacloud/videosearch/VideosearchClient.h
|
||||
include/alibabacloud/videosearch/VideosearchExport.h )
|
||||
|
||||
set(videosearch_public_header_model
|
||||
include/alibabacloud/videosearch/model/AddDeletionVideoTaskRequest.h
|
||||
include/alibabacloud/videosearch/model/AddDeletionVideoTaskResult.h
|
||||
include/alibabacloud/videosearch/model/AddSearchVideoTaskRequest.h
|
||||
include/alibabacloud/videosearch/model/AddSearchVideoTaskResult.h
|
||||
include/alibabacloud/videosearch/model/AddStorageVideoTaskRequest.h
|
||||
include/alibabacloud/videosearch/model/AddStorageVideoTaskResult.h
|
||||
include/alibabacloud/videosearch/model/GetTaskStatusRequest.h
|
||||
include/alibabacloud/videosearch/model/GetTaskStatusResult.h )
|
||||
|
||||
set(videosearch_src
|
||||
src/VideosearchClient.cc
|
||||
src/model/AddDeletionVideoTaskRequest.cc
|
||||
src/model/AddDeletionVideoTaskResult.cc
|
||||
src/model/AddSearchVideoTaskRequest.cc
|
||||
src/model/AddSearchVideoTaskResult.cc
|
||||
src/model/AddStorageVideoTaskRequest.cc
|
||||
src/model/AddStorageVideoTaskResult.cc
|
||||
src/model/GetTaskStatusRequest.cc
|
||||
src/model/GetTaskStatusResult.cc )
|
||||
|
||||
add_library(videosearch ${LIB_TYPE}
|
||||
${videosearch_public_header}
|
||||
${videosearch_public_header_model}
|
||||
${videosearch_src})
|
||||
|
||||
set_target_properties(videosearch
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}videosearch
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(videosearch
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_VIDEOSEARCH_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(videosearch
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(videosearch
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(videosearch
|
||||
jsoncpp)
|
||||
target_include_directories(videosearch
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(videosearch
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(videosearch
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(videosearch
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(videosearch
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${videosearch_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/videosearch)
|
||||
install(FILES ${videosearch_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/videosearch/model)
|
||||
install(TARGETS videosearch
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "VideosearchExport.h"
|
||||
#include "model/AddDeletionVideoTaskRequest.h"
|
||||
#include "model/AddDeletionVideoTaskResult.h"
|
||||
#include "model/AddSearchVideoTaskRequest.h"
|
||||
#include "model/AddSearchVideoTaskResult.h"
|
||||
#include "model/AddStorageVideoTaskRequest.h"
|
||||
#include "model/AddStorageVideoTaskResult.h"
|
||||
#include "model/GetTaskStatusRequest.h"
|
||||
#include "model/GetTaskStatusResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT VideosearchClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::AddDeletionVideoTaskResult> AddDeletionVideoTaskOutcome;
|
||||
typedef std::future<AddDeletionVideoTaskOutcome> AddDeletionVideoTaskOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::AddDeletionVideoTaskRequest&, const AddDeletionVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddDeletionVideoTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::AddSearchVideoTaskResult> AddSearchVideoTaskOutcome;
|
||||
typedef std::future<AddSearchVideoTaskOutcome> AddSearchVideoTaskOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::AddSearchVideoTaskRequest&, const AddSearchVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddSearchVideoTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::AddStorageVideoTaskResult> AddStorageVideoTaskOutcome;
|
||||
typedef std::future<AddStorageVideoTaskOutcome> AddStorageVideoTaskOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::AddStorageVideoTaskRequest&, const AddStorageVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddStorageVideoTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetTaskStatusResult> GetTaskStatusOutcome;
|
||||
typedef std::future<GetTaskStatusOutcome> GetTaskStatusOutcomeCallable;
|
||||
typedef std::function<void(const VideosearchClient*, const Model::GetTaskStatusRequest&, const GetTaskStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTaskStatusAsyncHandler;
|
||||
|
||||
VideosearchClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
VideosearchClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
VideosearchClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~VideosearchClient();
|
||||
AddDeletionVideoTaskOutcome addDeletionVideoTask(const Model::AddDeletionVideoTaskRequest &request)const;
|
||||
void addDeletionVideoTaskAsync(const Model::AddDeletionVideoTaskRequest& request, const AddDeletionVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddDeletionVideoTaskOutcomeCallable addDeletionVideoTaskCallable(const Model::AddDeletionVideoTaskRequest& request) const;
|
||||
AddSearchVideoTaskOutcome addSearchVideoTask(const Model::AddSearchVideoTaskRequest &request)const;
|
||||
void addSearchVideoTaskAsync(const Model::AddSearchVideoTaskRequest& request, const AddSearchVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddSearchVideoTaskOutcomeCallable addSearchVideoTaskCallable(const Model::AddSearchVideoTaskRequest& request) const;
|
||||
AddStorageVideoTaskOutcome addStorageVideoTask(const Model::AddStorageVideoTaskRequest &request)const;
|
||||
void addStorageVideoTaskAsync(const Model::AddStorageVideoTaskRequest& request, const AddStorageVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AddStorageVideoTaskOutcomeCallable addStorageVideoTaskCallable(const Model::AddStorageVideoTaskRequest& request) const;
|
||||
GetTaskStatusOutcome getTaskStatus(const Model::GetTaskStatusRequest &request)const;
|
||||
void getTaskStatusAsync(const Model::GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetTaskStatusOutcomeCallable getTaskStatusCallable(const Model::GetTaskStatusRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_VIDEOSEARCHEXPORT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_VIDEOSEARCH_LIBRARY)
|
||||
# define ALIBABACLOUD_VIDEOSEARCH_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_VIDEOSEARCH_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_VIDEOSEARCH_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHEXPORT_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_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddDeletionVideoTaskRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddDeletionVideoTaskRequest();
|
||||
~AddDeletionVideoTaskRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
std::string getVideoId()const;
|
||||
void setVideoId(const std::string& videoId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
std::string videoId_;
|
||||
std::string instanceId_;
|
||||
std::string regionId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddDeletionVideoTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AddDeletionVideoTaskResult();
|
||||
explicit AddDeletionVideoTaskResult(const std::string &payload);
|
||||
~AddDeletionVideoTaskResult();
|
||||
bool getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
bool data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKRESULT_H_
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddSearchVideoTaskRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddSearchVideoTaskRequest();
|
||||
~AddSearchVideoTaskRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
int getStorageType()const;
|
||||
void setStorageType(int storageType);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getVideoTags()const;
|
||||
void setVideoTags(const std::string& videoTags);
|
||||
int getReturnVideoNumber()const;
|
||||
void setReturnVideoNumber(int returnVideoNumber);
|
||||
std::string getVideoId()const;
|
||||
void setVideoId(const std::string& videoId);
|
||||
float getReplaceStorageThreshold()const;
|
||||
void setReplaceStorageThreshold(float replaceStorageThreshold);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getVideoUrl()const;
|
||||
void setVideoUrl(const std::string& videoUrl);
|
||||
std::string getQueryTags()const;
|
||||
void setQueryTags(const std::string& queryTags);
|
||||
std::string getCallbackUrl()const;
|
||||
void setCallbackUrl(const std::string& callbackUrl);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
int storageType_;
|
||||
std::string regionId_;
|
||||
std::string videoTags_;
|
||||
int returnVideoNumber_;
|
||||
std::string videoId_;
|
||||
float replaceStorageThreshold_;
|
||||
std::string instanceId_;
|
||||
std::string videoUrl_;
|
||||
std::string queryTags_;
|
||||
std::string callbackUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_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_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddSearchVideoTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
AddSearchVideoTaskResult();
|
||||
explicit AddSearchVideoTaskResult(const std::string &payload);
|
||||
~AddSearchVideoTaskResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKRESULT_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddStorageVideoTaskRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
AddStorageVideoTaskRequest();
|
||||
~AddStorageVideoTaskRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getVideoTags()const;
|
||||
void setVideoTags(const std::string& videoTags);
|
||||
std::string getVideoId()const;
|
||||
void setVideoId(const std::string& videoId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getVideoUrl()const;
|
||||
void setVideoUrl(const std::string& videoUrl);
|
||||
std::string getCallbackUrl()const;
|
||||
void setCallbackUrl(const std::string& callbackUrl);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
std::string regionId_;
|
||||
std::string videoTags_;
|
||||
std::string videoId_;
|
||||
std::string instanceId_;
|
||||
std::string videoUrl_;
|
||||
std::string callbackUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_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_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddStorageVideoTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
AddStorageVideoTaskResult();
|
||||
explicit AddStorageVideoTaskResult(const std::string &payload);
|
||||
~AddStorageVideoTaskResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKRESULT_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_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT GetTaskStatusRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetTaskStatusRequest();
|
||||
~GetTaskStatusRequest();
|
||||
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getTaskId()const;
|
||||
void setTaskId(const std::string& taskId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
std::string instanceId_;
|
||||
std::string regionId_;
|
||||
std::string taskId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSRESULT_H_
|
||||
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/videosearch/VideosearchExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Videosearch
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT GetTaskStatusResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GetTaskStatusResult();
|
||||
explicit GetTaskStatusResult(const std::string &payload);
|
||||
~GetTaskStatusResult();
|
||||
int getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSRESULT_H_
|
||||
197
videosearch/src/VideosearchClient.cc
Normal file
197
videosearch/src/VideosearchClient.cc
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
* 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/videosearch/VideosearchClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "videosearch";
|
||||
}
|
||||
|
||||
VideosearchClient::VideosearchClient(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, "");
|
||||
}
|
||||
|
||||
VideosearchClient::VideosearchClient(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, "");
|
||||
}
|
||||
|
||||
VideosearchClient::VideosearchClient(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, "");
|
||||
}
|
||||
|
||||
VideosearchClient::~VideosearchClient()
|
||||
{}
|
||||
|
||||
VideosearchClient::AddDeletionVideoTaskOutcome VideosearchClient::addDeletionVideoTask(const AddDeletionVideoTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddDeletionVideoTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddDeletionVideoTaskOutcome(AddDeletionVideoTaskResult(outcome.result()));
|
||||
else
|
||||
return AddDeletionVideoTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::addDeletionVideoTaskAsync(const AddDeletionVideoTaskRequest& request, const AddDeletionVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addDeletionVideoTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::AddDeletionVideoTaskOutcomeCallable VideosearchClient::addDeletionVideoTaskCallable(const AddDeletionVideoTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddDeletionVideoTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addDeletionVideoTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideosearchClient::AddSearchVideoTaskOutcome VideosearchClient::addSearchVideoTask(const AddSearchVideoTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddSearchVideoTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddSearchVideoTaskOutcome(AddSearchVideoTaskResult(outcome.result()));
|
||||
else
|
||||
return AddSearchVideoTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::addSearchVideoTaskAsync(const AddSearchVideoTaskRequest& request, const AddSearchVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addSearchVideoTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::AddSearchVideoTaskOutcomeCallable VideosearchClient::addSearchVideoTaskCallable(const AddSearchVideoTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddSearchVideoTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addSearchVideoTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideosearchClient::AddStorageVideoTaskOutcome VideosearchClient::addStorageVideoTask(const AddStorageVideoTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddStorageVideoTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddStorageVideoTaskOutcome(AddStorageVideoTaskResult(outcome.result()));
|
||||
else
|
||||
return AddStorageVideoTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::addStorageVideoTaskAsync(const AddStorageVideoTaskRequest& request, const AddStorageVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addStorageVideoTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::AddStorageVideoTaskOutcomeCallable VideosearchClient::addStorageVideoTaskCallable(const AddStorageVideoTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddStorageVideoTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addStorageVideoTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VideosearchClient::GetTaskStatusOutcome VideosearchClient::getTaskStatus(const GetTaskStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetTaskStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetTaskStatusOutcome(GetTaskStatusResult(outcome.result()));
|
||||
else
|
||||
return GetTaskStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VideosearchClient::getTaskStatusAsync(const GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getTaskStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VideosearchClient::GetTaskStatusOutcomeCallable VideosearchClient::getTaskStatusCallable(const GetTaskStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetTaskStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getTaskStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
73
videosearch/src/model/AddDeletionVideoTaskRequest.cc
Normal file
73
videosearch/src/model/AddDeletionVideoTaskRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videosearch/model/AddDeletionVideoTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::AddDeletionVideoTaskRequest;
|
||||
|
||||
AddDeletionVideoTaskRequest::AddDeletionVideoTaskRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "AddDeletionVideoTask")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddDeletionVideoTaskRequest::~AddDeletionVideoTaskRequest()
|
||||
{}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getVideoId()const
|
||||
{
|
||||
return videoId_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setVideoId(const std::string& videoId)
|
||||
{
|
||||
videoId_ = videoId;
|
||||
setBodyParameter("VideoId", videoId);
|
||||
}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string AddDeletionVideoTaskRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddDeletionVideoTaskRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
51
videosearch/src/model/AddDeletionVideoTaskResult.cc
Normal file
51
videosearch/src/model/AddDeletionVideoTaskResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videosearch/model/AddDeletionVideoTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
AddDeletionVideoTaskResult::AddDeletionVideoTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddDeletionVideoTaskResult::AddDeletionVideoTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddDeletionVideoTaskResult::~AddDeletionVideoTaskResult()
|
||||
{}
|
||||
|
||||
void AddDeletionVideoTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool AddDeletionVideoTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
150
videosearch/src/model/AddSearchVideoTaskRequest.cc
Normal file
150
videosearch/src/model/AddSearchVideoTaskRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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/videosearch/model/AddSearchVideoTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::AddSearchVideoTaskRequest;
|
||||
|
||||
AddSearchVideoTaskRequest::AddSearchVideoTaskRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "AddSearchVideoTask")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddSearchVideoTaskRequest::~AddSearchVideoTaskRequest()
|
||||
{}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
int AddSearchVideoTaskRequest::getStorageType()const
|
||||
{
|
||||
return storageType_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setStorageType(int storageType)
|
||||
{
|
||||
storageType_ = storageType;
|
||||
setBodyParameter("StorageType", std::to_string(storageType));
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getVideoTags()const
|
||||
{
|
||||
return videoTags_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setVideoTags(const std::string& videoTags)
|
||||
{
|
||||
videoTags_ = videoTags;
|
||||
setBodyParameter("VideoTags", videoTags);
|
||||
}
|
||||
|
||||
int AddSearchVideoTaskRequest::getReturnVideoNumber()const
|
||||
{
|
||||
return returnVideoNumber_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setReturnVideoNumber(int returnVideoNumber)
|
||||
{
|
||||
returnVideoNumber_ = returnVideoNumber;
|
||||
setBodyParameter("ReturnVideoNumber", std::to_string(returnVideoNumber));
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getVideoId()const
|
||||
{
|
||||
return videoId_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setVideoId(const std::string& videoId)
|
||||
{
|
||||
videoId_ = videoId;
|
||||
setBodyParameter("VideoId", videoId);
|
||||
}
|
||||
|
||||
float AddSearchVideoTaskRequest::getReplaceStorageThreshold()const
|
||||
{
|
||||
return replaceStorageThreshold_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setReplaceStorageThreshold(float replaceStorageThreshold)
|
||||
{
|
||||
replaceStorageThreshold_ = replaceStorageThreshold;
|
||||
setBodyParameter("ReplaceStorageThreshold", std::to_string(replaceStorageThreshold));
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getVideoUrl()const
|
||||
{
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setVideoUrl(const std::string& videoUrl)
|
||||
{
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter("VideoUrl", videoUrl);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getQueryTags()const
|
||||
{
|
||||
return queryTags_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setQueryTags(const std::string& queryTags)
|
||||
{
|
||||
queryTags_ = queryTags;
|
||||
setBodyParameter("QueryTags", queryTags);
|
||||
}
|
||||
|
||||
std::string AddSearchVideoTaskRequest::getCallbackUrl()const
|
||||
{
|
||||
return callbackUrl_;
|
||||
}
|
||||
|
||||
void AddSearchVideoTaskRequest::setCallbackUrl(const std::string& callbackUrl)
|
||||
{
|
||||
callbackUrl_ = callbackUrl;
|
||||
setBodyParameter("CallbackUrl", callbackUrl);
|
||||
}
|
||||
|
||||
52
videosearch/src/model/AddSearchVideoTaskResult.cc
Normal file
52
videosearch/src/model/AddSearchVideoTaskResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/videosearch/model/AddSearchVideoTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
AddSearchVideoTaskResult::AddSearchVideoTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddSearchVideoTaskResult::AddSearchVideoTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddSearchVideoTaskResult::~AddSearchVideoTaskResult()
|
||||
{}
|
||||
|
||||
void AddSearchVideoTaskResult::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["TaskId"].isNull())
|
||||
data_.taskId = dataNode["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
AddSearchVideoTaskResult::Data AddSearchVideoTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
106
videosearch/src/model/AddStorageVideoTaskRequest.cc
Normal file
106
videosearch/src/model/AddStorageVideoTaskRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/videosearch/model/AddStorageVideoTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::AddStorageVideoTaskRequest;
|
||||
|
||||
AddStorageVideoTaskRequest::AddStorageVideoTaskRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "AddStorageVideoTask")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddStorageVideoTaskRequest::~AddStorageVideoTaskRequest()
|
||||
{}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getVideoTags()const
|
||||
{
|
||||
return videoTags_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setVideoTags(const std::string& videoTags)
|
||||
{
|
||||
videoTags_ = videoTags;
|
||||
setBodyParameter("VideoTags", videoTags);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getVideoId()const
|
||||
{
|
||||
return videoId_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setVideoId(const std::string& videoId)
|
||||
{
|
||||
videoId_ = videoId;
|
||||
setBodyParameter("VideoId", videoId);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getVideoUrl()const
|
||||
{
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setVideoUrl(const std::string& videoUrl)
|
||||
{
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter("VideoUrl", videoUrl);
|
||||
}
|
||||
|
||||
std::string AddStorageVideoTaskRequest::getCallbackUrl()const
|
||||
{
|
||||
return callbackUrl_;
|
||||
}
|
||||
|
||||
void AddStorageVideoTaskRequest::setCallbackUrl(const std::string& callbackUrl)
|
||||
{
|
||||
callbackUrl_ = callbackUrl;
|
||||
setBodyParameter("CallbackUrl", callbackUrl);
|
||||
}
|
||||
|
||||
52
videosearch/src/model/AddStorageVideoTaskResult.cc
Normal file
52
videosearch/src/model/AddStorageVideoTaskResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/videosearch/model/AddStorageVideoTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
AddStorageVideoTaskResult::AddStorageVideoTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddStorageVideoTaskResult::AddStorageVideoTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddStorageVideoTaskResult::~AddStorageVideoTaskResult()
|
||||
{}
|
||||
|
||||
void AddStorageVideoTaskResult::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["TaskId"].isNull())
|
||||
data_.taskId = dataNode["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
AddStorageVideoTaskResult::Data AddStorageVideoTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
73
videosearch/src/model/GetTaskStatusRequest.cc
Normal file
73
videosearch/src/model/GetTaskStatusRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videosearch/model/GetTaskStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Videosearch::Model::GetTaskStatusRequest;
|
||||
|
||||
GetTaskStatusRequest::GetTaskStatusRequest() :
|
||||
RpcServiceRequest("videosearch", "2020-02-25", "GetTaskStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetTaskStatusRequest::~GetTaskStatusRequest()
|
||||
{}
|
||||
|
||||
std::string GetTaskStatusRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string GetTaskStatusRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setBodyParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string GetTaskStatusRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string GetTaskStatusRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetTaskStatusRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setBodyParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
51
videosearch/src/model/GetTaskStatusResult.cc
Normal file
51
videosearch/src/model/GetTaskStatusResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/videosearch/model/GetTaskStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Videosearch;
|
||||
using namespace AlibabaCloud::Videosearch::Model;
|
||||
|
||||
GetTaskStatusResult::GetTaskStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetTaskStatusResult::GetTaskStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetTaskStatusResult::~GetTaskStatusResult()
|
||||
{}
|
||||
|
||||
void GetTaskStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = std::stoi(value["Data"].asString());
|
||||
|
||||
}
|
||||
|
||||
int GetTaskStatusResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user