SnsuapiClient.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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_SNSUAPI_SNSUAPICLIENT_H_
  17. #define ALIBABACLOUD_SNSUAPI_SNSUAPICLIENT_H_
  18. #include <future>
  19. #include <alibabacloud/core/AsyncCallerContext.h>
  20. #include <alibabacloud/core/EndpointProvider.h>
  21. #include <alibabacloud/core/RpcServiceClient.h>
  22. #include "SnsuapiExport.h"
  23. #include "model/BandOfferOrderRequest.h"
  24. #include "model/BandOfferOrderResult.h"
  25. #include "model/BandPrecheckRequest.h"
  26. #include "model/BandPrecheckResult.h"
  27. #include "model/BandStartSpeedUpRequest.h"
  28. #include "model/BandStartSpeedUpResult.h"
  29. #include "model/BandStatusQueryRequest.h"
  30. #include "model/BandStatusQueryResult.h"
  31. #include "model/BandStopSpeedUpRequest.h"
  32. #include "model/BandStopSpeedUpResult.h"
  33. #include "model/MobileStartSpeedUpRequest.h"
  34. #include "model/MobileStartSpeedUpResult.h"
  35. #include "model/MobileStatusQueryRequest.h"
  36. #include "model/MobileStatusQueryResult.h"
  37. #include "model/MobileStopSpeedUpRequest.h"
  38. #include "model/MobileStopSpeedUpResult.h"
  39. namespace AlibabaCloud
  40. {
  41. namespace Snsuapi
  42. {
  43. class ALIBABACLOUD_SNSUAPI_EXPORT SnsuapiClient : public RpcServiceClient
  44. {
  45. public:
  46. typedef Outcome<Error, Model::BandOfferOrderResult> BandOfferOrderOutcome;
  47. typedef std::future<BandOfferOrderOutcome> BandOfferOrderOutcomeCallable;
  48. typedef std::function<void(const SnsuapiClient*, const Model::BandOfferOrderRequest&, const BandOfferOrderOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BandOfferOrderAsyncHandler;
  49. typedef Outcome<Error, Model::BandPrecheckResult> BandPrecheckOutcome;
  50. typedef std::future<BandPrecheckOutcome> BandPrecheckOutcomeCallable;
  51. typedef std::function<void(const SnsuapiClient*, const Model::BandPrecheckRequest&, const BandPrecheckOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BandPrecheckAsyncHandler;
  52. typedef Outcome<Error, Model::BandStartSpeedUpResult> BandStartSpeedUpOutcome;
  53. typedef std::future<BandStartSpeedUpOutcome> BandStartSpeedUpOutcomeCallable;
  54. typedef std::function<void(const SnsuapiClient*, const Model::BandStartSpeedUpRequest&, const BandStartSpeedUpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BandStartSpeedUpAsyncHandler;
  55. typedef Outcome<Error, Model::BandStatusQueryResult> BandStatusQueryOutcome;
  56. typedef std::future<BandStatusQueryOutcome> BandStatusQueryOutcomeCallable;
  57. typedef std::function<void(const SnsuapiClient*, const Model::BandStatusQueryRequest&, const BandStatusQueryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BandStatusQueryAsyncHandler;
  58. typedef Outcome<Error, Model::BandStopSpeedUpResult> BandStopSpeedUpOutcome;
  59. typedef std::future<BandStopSpeedUpOutcome> BandStopSpeedUpOutcomeCallable;
  60. typedef std::function<void(const SnsuapiClient*, const Model::BandStopSpeedUpRequest&, const BandStopSpeedUpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BandStopSpeedUpAsyncHandler;
  61. typedef Outcome<Error, Model::MobileStartSpeedUpResult> MobileStartSpeedUpOutcome;
  62. typedef std::future<MobileStartSpeedUpOutcome> MobileStartSpeedUpOutcomeCallable;
  63. typedef std::function<void(const SnsuapiClient*, const Model::MobileStartSpeedUpRequest&, const MobileStartSpeedUpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MobileStartSpeedUpAsyncHandler;
  64. typedef Outcome<Error, Model::MobileStatusQueryResult> MobileStatusQueryOutcome;
  65. typedef std::future<MobileStatusQueryOutcome> MobileStatusQueryOutcomeCallable;
  66. typedef std::function<void(const SnsuapiClient*, const Model::MobileStatusQueryRequest&, const MobileStatusQueryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MobileStatusQueryAsyncHandler;
  67. typedef Outcome<Error, Model::MobileStopSpeedUpResult> MobileStopSpeedUpOutcome;
  68. typedef std::future<MobileStopSpeedUpOutcome> MobileStopSpeedUpOutcomeCallable;
  69. typedef std::function<void(const SnsuapiClient*, const Model::MobileStopSpeedUpRequest&, const MobileStopSpeedUpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MobileStopSpeedUpAsyncHandler;
  70. SnsuapiClient(const Credentials &credentials, const ClientConfiguration &configuration);
  71. SnsuapiClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
  72. SnsuapiClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
  73. ~SnsuapiClient();
  74. BandOfferOrderOutcome bandOfferOrder(const Model::BandOfferOrderRequest &request)const;
  75. void bandOfferOrderAsync(const Model::BandOfferOrderRequest& request, const BandOfferOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  76. BandOfferOrderOutcomeCallable bandOfferOrderCallable(const Model::BandOfferOrderRequest& request) const;
  77. BandPrecheckOutcome bandPrecheck(const Model::BandPrecheckRequest &request)const;
  78. void bandPrecheckAsync(const Model::BandPrecheckRequest& request, const BandPrecheckAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  79. BandPrecheckOutcomeCallable bandPrecheckCallable(const Model::BandPrecheckRequest& request) const;
  80. BandStartSpeedUpOutcome bandStartSpeedUp(const Model::BandStartSpeedUpRequest &request)const;
  81. void bandStartSpeedUpAsync(const Model::BandStartSpeedUpRequest& request, const BandStartSpeedUpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  82. BandStartSpeedUpOutcomeCallable bandStartSpeedUpCallable(const Model::BandStartSpeedUpRequest& request) const;
  83. BandStatusQueryOutcome bandStatusQuery(const Model::BandStatusQueryRequest &request)const;
  84. void bandStatusQueryAsync(const Model::BandStatusQueryRequest& request, const BandStatusQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  85. BandStatusQueryOutcomeCallable bandStatusQueryCallable(const Model::BandStatusQueryRequest& request) const;
  86. BandStopSpeedUpOutcome bandStopSpeedUp(const Model::BandStopSpeedUpRequest &request)const;
  87. void bandStopSpeedUpAsync(const Model::BandStopSpeedUpRequest& request, const BandStopSpeedUpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  88. BandStopSpeedUpOutcomeCallable bandStopSpeedUpCallable(const Model::BandStopSpeedUpRequest& request) const;
  89. MobileStartSpeedUpOutcome mobileStartSpeedUp(const Model::MobileStartSpeedUpRequest &request)const;
  90. void mobileStartSpeedUpAsync(const Model::MobileStartSpeedUpRequest& request, const MobileStartSpeedUpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  91. MobileStartSpeedUpOutcomeCallable mobileStartSpeedUpCallable(const Model::MobileStartSpeedUpRequest& request) const;
  92. MobileStatusQueryOutcome mobileStatusQuery(const Model::MobileStatusQueryRequest &request)const;
  93. void mobileStatusQueryAsync(const Model::MobileStatusQueryRequest& request, const MobileStatusQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  94. MobileStatusQueryOutcomeCallable mobileStatusQueryCallable(const Model::MobileStatusQueryRequest& request) const;
  95. MobileStopSpeedUpOutcome mobileStopSpeedUp(const Model::MobileStopSpeedUpRequest &request)const;
  96. void mobileStopSpeedUpAsync(const Model::MobileStopSpeedUpRequest& request, const MobileStopSpeedUpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  97. MobileStopSpeedUpOutcomeCallable mobileStopSpeedUpCallable(const Model::MobileStopSpeedUpRequest& request) const;
  98. private:
  99. std::shared_ptr<EndpointProvider> endpointProvider_;
  100. };
  101. }
  102. }
  103. #endif // !ALIBABACLOUD_SNSUAPI_SNSUAPICLIENT_H_