OpenanalyticsClient.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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_OPENANALYTICS_OPENANALYTICSCLIENT_H_
  17. #define ALIBABACLOUD_OPENANALYTICS_OPENANALYTICSCLIENT_H_
  18. #include <future>
  19. #include <alibabacloud/core/AsyncCallerContext.h>
  20. #include <alibabacloud/core/EndpointProvider.h>
  21. #include <alibabacloud/core/RpcServiceClient.h>
  22. #include "OpenanalyticsExport.h"
  23. #include "model/SetAllowIPRequest.h"
  24. #include "model/SetAllowIPResult.h"
  25. #include "model/GetRegionStatusRequest.h"
  26. #include "model/GetRegionStatusResult.h"
  27. #include "model/DescribeRegionListRequest.h"
  28. #include "model/DescribeRegionListResult.h"
  29. #include "model/OpenProductAccountRequest.h"
  30. #include "model/OpenProductAccountResult.h"
  31. #include "model/CloseProductAccountRequest.h"
  32. #include "model/CloseProductAccountResult.h"
  33. #include "model/GetEndPointByDomainRequest.h"
  34. #include "model/GetEndPointByDomainResult.h"
  35. #include "model/GetAllowIPRequest.h"
  36. #include "model/GetAllowIPResult.h"
  37. #include "model/GetProductStatusRequest.h"
  38. #include "model/GetProductStatusResult.h"
  39. #include "model/QueryEndPointListRequest.h"
  40. #include "model/QueryEndPointListResult.h"
  41. namespace AlibabaCloud
  42. {
  43. namespace Openanalytics
  44. {
  45. class ALIBABACLOUD_OPENANALYTICS_EXPORT OpenanalyticsClient : public RpcServiceClient
  46. {
  47. public:
  48. typedef Outcome<Error, Model::SetAllowIPResult> SetAllowIPOutcome;
  49. typedef std::future<SetAllowIPOutcome> SetAllowIPOutcomeCallable;
  50. typedef std::function<void(const OpenanalyticsClient*, const Model::SetAllowIPRequest&, const SetAllowIPOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetAllowIPAsyncHandler;
  51. typedef Outcome<Error, Model::GetRegionStatusResult> GetRegionStatusOutcome;
  52. typedef std::future<GetRegionStatusOutcome> GetRegionStatusOutcomeCallable;
  53. typedef std::function<void(const OpenanalyticsClient*, const Model::GetRegionStatusRequest&, const GetRegionStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetRegionStatusAsyncHandler;
  54. typedef Outcome<Error, Model::DescribeRegionListResult> DescribeRegionListOutcome;
  55. typedef std::future<DescribeRegionListOutcome> DescribeRegionListOutcomeCallable;
  56. typedef std::function<void(const OpenanalyticsClient*, const Model::DescribeRegionListRequest&, const DescribeRegionListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRegionListAsyncHandler;
  57. typedef Outcome<Error, Model::OpenProductAccountResult> OpenProductAccountOutcome;
  58. typedef std::future<OpenProductAccountOutcome> OpenProductAccountOutcomeCallable;
  59. typedef std::function<void(const OpenanalyticsClient*, const Model::OpenProductAccountRequest&, const OpenProductAccountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> OpenProductAccountAsyncHandler;
  60. typedef Outcome<Error, Model::CloseProductAccountResult> CloseProductAccountOutcome;
  61. typedef std::future<CloseProductAccountOutcome> CloseProductAccountOutcomeCallable;
  62. typedef std::function<void(const OpenanalyticsClient*, const Model::CloseProductAccountRequest&, const CloseProductAccountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CloseProductAccountAsyncHandler;
  63. typedef Outcome<Error, Model::GetEndPointByDomainResult> GetEndPointByDomainOutcome;
  64. typedef std::future<GetEndPointByDomainOutcome> GetEndPointByDomainOutcomeCallable;
  65. typedef std::function<void(const OpenanalyticsClient*, const Model::GetEndPointByDomainRequest&, const GetEndPointByDomainOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetEndPointByDomainAsyncHandler;
  66. typedef Outcome<Error, Model::GetAllowIPResult> GetAllowIPOutcome;
  67. typedef std::future<GetAllowIPOutcome> GetAllowIPOutcomeCallable;
  68. typedef std::function<void(const OpenanalyticsClient*, const Model::GetAllowIPRequest&, const GetAllowIPOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAllowIPAsyncHandler;
  69. typedef Outcome<Error, Model::GetProductStatusResult> GetProductStatusOutcome;
  70. typedef std::future<GetProductStatusOutcome> GetProductStatusOutcomeCallable;
  71. typedef std::function<void(const OpenanalyticsClient*, const Model::GetProductStatusRequest&, const GetProductStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProductStatusAsyncHandler;
  72. typedef Outcome<Error, Model::QueryEndPointListResult> QueryEndPointListOutcome;
  73. typedef std::future<QueryEndPointListOutcome> QueryEndPointListOutcomeCallable;
  74. typedef std::function<void(const OpenanalyticsClient*, const Model::QueryEndPointListRequest&, const QueryEndPointListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryEndPointListAsyncHandler;
  75. OpenanalyticsClient(const Credentials &credentials, const ClientConfiguration &configuration);
  76. OpenanalyticsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
  77. OpenanalyticsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
  78. ~OpenanalyticsClient();
  79. SetAllowIPOutcome setAllowIP(const Model::SetAllowIPRequest &request)const;
  80. void setAllowIPAsync(const Model::SetAllowIPRequest& request, const SetAllowIPAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  81. SetAllowIPOutcomeCallable setAllowIPCallable(const Model::SetAllowIPRequest& request) const;
  82. GetRegionStatusOutcome getRegionStatus(const Model::GetRegionStatusRequest &request)const;
  83. void getRegionStatusAsync(const Model::GetRegionStatusRequest& request, const GetRegionStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  84. GetRegionStatusOutcomeCallable getRegionStatusCallable(const Model::GetRegionStatusRequest& request) const;
  85. DescribeRegionListOutcome describeRegionList(const Model::DescribeRegionListRequest &request)const;
  86. void describeRegionListAsync(const Model::DescribeRegionListRequest& request, const DescribeRegionListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  87. DescribeRegionListOutcomeCallable describeRegionListCallable(const Model::DescribeRegionListRequest& request) const;
  88. OpenProductAccountOutcome openProductAccount(const Model::OpenProductAccountRequest &request)const;
  89. void openProductAccountAsync(const Model::OpenProductAccountRequest& request, const OpenProductAccountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  90. OpenProductAccountOutcomeCallable openProductAccountCallable(const Model::OpenProductAccountRequest& request) const;
  91. CloseProductAccountOutcome closeProductAccount(const Model::CloseProductAccountRequest &request)const;
  92. void closeProductAccountAsync(const Model::CloseProductAccountRequest& request, const CloseProductAccountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  93. CloseProductAccountOutcomeCallable closeProductAccountCallable(const Model::CloseProductAccountRequest& request) const;
  94. GetEndPointByDomainOutcome getEndPointByDomain(const Model::GetEndPointByDomainRequest &request)const;
  95. void getEndPointByDomainAsync(const Model::GetEndPointByDomainRequest& request, const GetEndPointByDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  96. GetEndPointByDomainOutcomeCallable getEndPointByDomainCallable(const Model::GetEndPointByDomainRequest& request) const;
  97. GetAllowIPOutcome getAllowIP(const Model::GetAllowIPRequest &request)const;
  98. void getAllowIPAsync(const Model::GetAllowIPRequest& request, const GetAllowIPAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  99. GetAllowIPOutcomeCallable getAllowIPCallable(const Model::GetAllowIPRequest& request) const;
  100. GetProductStatusOutcome getProductStatus(const Model::GetProductStatusRequest &request)const;
  101. void getProductStatusAsync(const Model::GetProductStatusRequest& request, const GetProductStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  102. GetProductStatusOutcomeCallable getProductStatusCallable(const Model::GetProductStatusRequest& request) const;
  103. QueryEndPointListOutcome queryEndPointList(const Model::QueryEndPointListRequest &request)const;
  104. void queryEndPointListAsync(const Model::QueryEndPointListRequest& request, const QueryEndPointListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  105. QueryEndPointListOutcomeCallable queryEndPointListCallable(const Model::QueryEndPointListRequest& request) const;
  106. private:
  107. std::shared_ptr<EndpointProvider> endpointProvider_;
  108. };
  109. }
  110. }
  111. #endif // !ALIBABACLOUD_OPENANALYTICS_OPENANALYTICSCLIENT_H_