Generated 2019-06-10 for et-industry-openapi.

This commit is contained in:
sdk-team
2019-12-12 10:10:42 +08:00
parent 90f78851fa
commit c94e372ec7
10 changed files with 460 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2019-12-12 Version 1.36.211
- Generated 2019-06-10 for `et-industry-openapi`.
2019-12-11 Version 1.36.210
- Supported Sync predict for Image.
- Supported Set Frame Frequency for Stream Predict.

View File

@@ -1 +1 @@
1.36.210
1.36.211

View File

@@ -0,0 +1,86 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(et-industry-openapi_public_header
include/alibabacloud/et-industry-openapi/Et_industry_openapiClient.h
include/alibabacloud/et-industry-openapi/Et_industry_openapiExport.h )
set(et-industry-openapi_public_header_model
include/alibabacloud/et-industry-openapi/model/UploadDeviceDataRequest.h
include/alibabacloud/et-industry-openapi/model/UploadDeviceDataResult.h )
set(et-industry-openapi_src
src/Et-industry-openapiClient.cc
src/model/UploadDeviceDataRequest.cc
src/model/UploadDeviceDataResult.cc )
add_library(et-industry-openapi ${LIB_TYPE}
${et-industry-openapi_public_header}
${et-industry-openapi_public_header_model}
${et-industry-openapi_src})
set_target_properties(et-industry-openapi
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}et-industry-openapi
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(et-industry-openapi
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_ET_INDUSTRY_OPENAPI_LIBRARY)
endif()
target_include_directories(et-industry-openapi
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(et-industry-openapi
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(et-industry-openapi
jsoncpp)
target_include_directories(et-industry-openapi
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(et-industry-openapi
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(et-industry-openapi
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(et-industry-openapi
PRIVATE /usr/include/jsoncpp)
target_link_libraries(et-industry-openapi
jsoncpp)
endif()
install(FILES ${et-industry-openapi_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/et-industry-openapi)
install(FILES ${et-industry-openapi_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/et-industry-openapi/model)
install(TARGETS et-industry-openapi
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPICLIENT_H_
#define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPICLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RoaServiceClient.h>
#include "Et_industry_openapiExport.h"
#include "model/UploadDeviceDataRequest.h"
#include "model/UploadDeviceDataResult.h"
namespace AlibabaCloud
{
namespace Et_industry_openapi
{
class ALIBABACLOUD_ET_INDUSTRY_OPENAPI_EXPORT Et_industry_openapiClient : public RoaServiceClient
{
public:
typedef Outcome<Error, Model::UploadDeviceDataResult> UploadDeviceDataOutcome;
typedef std::future<UploadDeviceDataOutcome> UploadDeviceDataOutcomeCallable;
typedef std::function<void(const Et_industry_openapiClient*, const Model::UploadDeviceDataRequest&, const UploadDeviceDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadDeviceDataAsyncHandler;
Et_industry_openapiClient(const Credentials &credentials, const ClientConfiguration &configuration);
Et_industry_openapiClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
Et_industry_openapiClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~Et_industry_openapiClient();
UploadDeviceDataOutcome uploadDeviceData(const Model::UploadDeviceDataRequest &request)const;
void uploadDeviceDataAsync(const Model::UploadDeviceDataRequest& request, const UploadDeviceDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UploadDeviceDataOutcomeCallable uploadDeviceDataCallable(const Model::UploadDeviceDataRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPICLIENT_H_

View File

@@ -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_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPIEXPORT_H_
#define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPIEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_ET_INDUSTRY_OPENAPI_LIBRARY)
# define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_EXPORT
#endif
#endif // !ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPIEXPORT_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_ET_INDUSTRY_OPENAPI_MODEL_UPLOADDEVICEDATAREQUEST_H_
#define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_MODEL_UPLOADDEVICEDATAREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <alibabacloud/et-industry-openapi/Et_industry_openapiExport.h>
namespace AlibabaCloud
{
namespace Et_industry_openapi
{
namespace Model
{
class ALIBABACLOUD_ET_INDUSTRY_OPENAPI_EXPORT UploadDeviceDataRequest : public RoaServiceRequest
{
public:
UploadDeviceDataRequest();
~UploadDeviceDataRequest();
private:
};
}
}
}
#endif // !ALIBABACLOUD_ET_INDUSTRY_OPENAPI_MODEL_UPLOADDEVICEDATAREQUEST_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_ET_INDUSTRY_OPENAPI_MODEL_UPLOADDEVICEDATARESULT_H_
#define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_MODEL_UPLOADDEVICEDATARESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/et-industry-openapi/Et_industry_openapiExport.h>
namespace AlibabaCloud
{
namespace Et_industry_openapi
{
namespace Model
{
class ALIBABACLOUD_ET_INDUSTRY_OPENAPI_EXPORT UploadDeviceDataResult : public ServiceResult
{
public:
UploadDeviceDataResult();
explicit UploadDeviceDataResult(const std::string &payload);
~UploadDeviceDataResult();
std::string getMessage()const;
std::string getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_ET_INDUSTRY_OPENAPI_MODEL_UPLOADDEVICEDATARESULT_H_

View File

@@ -0,0 +1,89 @@
/*
* 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/et-industry-openapi/Et_industry_openapiClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Et_industry_openapi;
using namespace AlibabaCloud::Et_industry_openapi::Model;
namespace
{
const std::string SERVICE_NAME = "et-industry-openapi";
}
Et_industry_openapiClient::Et_industry_openapiClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RoaServiceClient(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, "");
}
Et_industry_openapiClient::Et_industry_openapiClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
Et_industry_openapiClient::Et_industry_openapiClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RoaServiceClient(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, "");
}
Et_industry_openapiClient::~Et_industry_openapiClient()
{}
Et_industry_openapiClient::UploadDeviceDataOutcome Et_industry_openapiClient::uploadDeviceData(const UploadDeviceDataRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UploadDeviceDataOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UploadDeviceDataOutcome(UploadDeviceDataResult(outcome.result()));
else
return UploadDeviceDataOutcome(outcome.error());
}
void Et_industry_openapiClient::uploadDeviceDataAsync(const UploadDeviceDataRequest& request, const UploadDeviceDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, uploadDeviceData(request), context);
};
asyncExecute(new Runnable(fn));
}
Et_industry_openapiClient::UploadDeviceDataOutcomeCallable Et_industry_openapiClient::uploadDeviceDataCallable(const UploadDeviceDataRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UploadDeviceDataOutcome()>>(
[this, request]()
{
return this->uploadDeviceData(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,30 @@
/*
* 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/et-industry-openapi/model/UploadDeviceDataRequest.h>
using AlibabaCloud::Et_industry_openapi::Model::UploadDeviceDataRequest;
UploadDeviceDataRequest::UploadDeviceDataRequest() :
RoaServiceRequest("et-industry-openapi", "2019-06-10")
{
setResourcePath("/openapi/batch/data/up");
setMethod(HttpRequest::Method::Post);
}
UploadDeviceDataRequest::~UploadDeviceDataRequest()
{}

View File

@@ -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/et-industry-openapi/model/UploadDeviceDataResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Et_industry_openapi;
using namespace AlibabaCloud::Et_industry_openapi::Model;
UploadDeviceDataResult::UploadDeviceDataResult() :
ServiceResult()
{}
UploadDeviceDataResult::UploadDeviceDataResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UploadDeviceDataResult::~UploadDeviceDataResult()
{}
void UploadDeviceDataResult::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();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string UploadDeviceDataResult::getMessage()const
{
return message_;
}
std::string UploadDeviceDataResult::getData()const
{
return data_;
}
std::string UploadDeviceDataResult::getCode()const
{
return code_;
}