ApsClient.h 2.3 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_APS_APSCLIENT_H_
  17. #define ALIBABACLOUD_APS_APSCLIENT_H_
  18. #include <future>
  19. #include <alibabacloud/core/AsyncCallerContext.h>
  20. #include <alibabacloud/core/EndpointProvider.h>
  21. #include <alibabacloud/core/RpcServiceClient.h>
  22. #include "ApsExport.h"
  23. #include "model/GetFxCustomerTypeRequest.h"
  24. #include "model/GetFxCustomerTypeResult.h"
  25. namespace AlibabaCloud
  26. {
  27. namespace Aps
  28. {
  29. class ALIBABACLOUD_APS_EXPORT ApsClient : public RpcServiceClient
  30. {
  31. public:
  32. typedef Outcome<Error, Model::GetFxCustomerTypeResult> GetFxCustomerTypeOutcome;
  33. typedef std::future<GetFxCustomerTypeOutcome> GetFxCustomerTypeOutcomeCallable;
  34. typedef std::function<void(const ApsClient*, const Model::GetFxCustomerTypeRequest&, const GetFxCustomerTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFxCustomerTypeAsyncHandler;
  35. ApsClient(const Credentials &credentials, const ClientConfiguration &configuration);
  36. ApsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
  37. ApsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
  38. ~ApsClient();
  39. GetFxCustomerTypeOutcome getFxCustomerType(const Model::GetFxCustomerTypeRequest &request)const;
  40. void getFxCustomerTypeAsync(const Model::GetFxCustomerTypeRequest& request, const GetFxCustomerTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  41. GetFxCustomerTypeOutcomeCallable getFxCustomerTypeCallable(const Model::GetFxCustomerTypeRequest& request) const;
  42. private:
  43. std::shared_ptr<EndpointProvider> endpointProvider_;
  44. };
  45. }
  46. }
  47. #endif // !ALIBABACLOUD_APS_APSCLIENT_H_