Et_industry_openapiClient.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPICLIENT_H_
  17. #define ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPICLIENT_H_
  18. #include <future>
  19. #include <alibabacloud/core/AsyncCallerContext.h>
  20. #include <alibabacloud/core/EndpointProvider.h>
  21. #include <alibabacloud/core/RoaServiceClient.h>
  22. #include "Et_industry_openapiExport.h"
  23. #include "model/UploadDeviceDataRequest.h"
  24. #include "model/UploadDeviceDataResult.h"
  25. namespace AlibabaCloud
  26. {
  27. namespace Et_industry_openapi
  28. {
  29. class ALIBABACLOUD_ET_INDUSTRY_OPENAPI_EXPORT Et_industry_openapiClient : public RoaServiceClient
  30. {
  31. public:
  32. typedef Outcome<Error, Model::UploadDeviceDataResult> UploadDeviceDataOutcome;
  33. typedef std::future<UploadDeviceDataOutcome> UploadDeviceDataOutcomeCallable;
  34. typedef std::function<void(const Et_industry_openapiClient*, const Model::UploadDeviceDataRequest&, const UploadDeviceDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadDeviceDataAsyncHandler;
  35. Et_industry_openapiClient(const Credentials &credentials, const ClientConfiguration &configuration);
  36. Et_industry_openapiClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
  37. Et_industry_openapiClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
  38. ~Et_industry_openapiClient();
  39. UploadDeviceDataOutcome uploadDeviceData(const Model::UploadDeviceDataRequest &request)const;
  40. void uploadDeviceDataAsync(const Model::UploadDeviceDataRequest& request, const UploadDeviceDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  41. UploadDeviceDataOutcomeCallable uploadDeviceDataCallable(const Model::UploadDeviceDataRequest& request) const;
  42. private:
  43. std::shared_ptr<EndpointProvider> endpointProvider_;
  44. };
  45. }
  46. }
  47. #endif // !ALIBABACLOUD_ET_INDUSTRY_OPENAPI_ET_INDUSTRY_OPENAPICLIENT_H_