AWS SDK for C++  1.8.95
AWS SDK for C++
LexRuntimeServiceClient.h
Go to the documentation of this file.
1 
6 #pragma once
21 #include <future>
22 #include <functional>
23 
24 namespace Aws
25 {
26 
27 namespace Http
28 {
29  class HttpClient;
30  class HttpClientFactory;
31 } // namespace Http
32 
33 namespace Utils
34 {
35  template< typename R, typename E> class Outcome;
36 namespace Threading
37 {
38  class Executor;
39 } // namespace Threading
40 } // namespace Utils
41 
42 namespace Auth
43 {
44  class AWSCredentials;
45  class AWSCredentialsProvider;
46 } // namespace Auth
47 
48 namespace Client
49 {
50  class RetryStrategy;
51 } // namespace Client
52 
53 namespace LexRuntimeService
54 {
55 
56 namespace Model
57 {
59  class GetSessionRequest;
60  class PostContentRequest;
61  class PostTextRequest;
63 
69 
70  typedef std::future<DeleteSessionOutcome> DeleteSessionOutcomeCallable;
71  typedef std::future<GetSessionOutcome> GetSessionOutcomeCallable;
72  typedef std::future<PostContentOutcome> PostContentOutcomeCallable;
73  typedef std::future<PostTextOutcome> PostTextOutcomeCallable;
74  typedef std::future<PutSessionOutcome> PutSessionOutcomeCallable;
75 } // namespace Model
76 
78 
79  typedef std::function<void(const LexRuntimeServiceClient*, const Model::DeleteSessionRequest&, const Model::DeleteSessionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteSessionResponseReceivedHandler;
80  typedef std::function<void(const LexRuntimeServiceClient*, const Model::GetSessionRequest&, const Model::GetSessionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetSessionResponseReceivedHandler;
81  typedef std::function<void(const LexRuntimeServiceClient*, const Model::PostContentRequest&, Model::PostContentOutcome, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PostContentResponseReceivedHandler;
82  typedef std::function<void(const LexRuntimeServiceClient*, const Model::PostTextRequest&, const Model::PostTextOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PostTextResponseReceivedHandler;
83  typedef std::function<void(const LexRuntimeServiceClient*, const Model::PutSessionRequest&, Model::PutSessionOutcome, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutSessionResponseReceivedHandler;
84 
99  {
100  public:
102 
108 
114 
119  LexRuntimeServiceClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
121 
122  virtual ~LexRuntimeServiceClient();
123 
124 
131  virtual Model::DeleteSessionOutcome DeleteSession(const Model::DeleteSessionRequest& request) const;
132 
141  virtual Model::DeleteSessionOutcomeCallable DeleteSessionCallable(const Model::DeleteSessionRequest& request) const;
142 
151  virtual void DeleteSessionAsync(const Model::DeleteSessionRequest& request, const DeleteSessionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
152 
159  virtual Model::GetSessionOutcome GetSession(const Model::GetSessionRequest& request) const;
160 
169  virtual Model::GetSessionOutcomeCallable GetSessionCallable(const Model::GetSessionRequest& request) const;
170 
179  virtual void GetSessionAsync(const Model::GetSessionRequest& request, const GetSessionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
180 
224  virtual Model::PostContentOutcome PostContent(const Model::PostContentRequest& request) const;
225 
271  virtual Model::PostContentOutcomeCallable PostContentCallable(const Model::PostContentRequest& request) const;
272 
318  virtual void PostContentAsync(const Model::PostContentRequest& request, const PostContentResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
319 
360  virtual Model::PostTextOutcome PostText(const Model::PostTextRequest& request) const;
361 
404  virtual Model::PostTextOutcomeCallable PostTextCallable(const Model::PostTextRequest& request) const;
405 
448  virtual void PostTextAsync(const Model::PostTextRequest& request, const PostTextResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
449 
459  virtual Model::PutSessionOutcome PutSession(const Model::PutSessionRequest& request) const;
460 
472  virtual Model::PutSessionOutcomeCallable PutSessionCallable(const Model::PutSessionRequest& request) const;
473 
485  virtual void PutSessionAsync(const Model::PutSessionRequest& request, const PutSessionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
486 
487 
488  void OverrideEndpoint(const Aws::String& endpoint);
489  private:
490  void init(const Aws::Client::ClientConfiguration& clientConfiguration);
491  void DeleteSessionAsyncHelper(const Model::DeleteSessionRequest& request, const DeleteSessionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
492  void GetSessionAsyncHelper(const Model::GetSessionRequest& request, const GetSessionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
493  void PostContentAsyncHelper(const Model::PostContentRequest& request, const PostContentResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
494  void PostTextAsyncHelper(const Model::PostTextRequest& request, const PostTextResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
495  void PutSessionAsyncHelper(const Model::PutSessionRequest& request, const PutSessionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
496 
497  Aws::String m_uri;
498  Aws::String m_configScheme;
499  std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
500  };
501 
502 } // namespace LexRuntimeService
503 } // namespace Aws
#define AWS_LEXRUNTIMESERVICE_API
std::future< GetSessionOutcome > GetSessionOutcomeCallable
Aws::Utils::Outcome< PostContentResult, LexRuntimeServiceError > PostContentOutcome
std::function< void(const LexRuntimeServiceClient *, const Model::PutSessionRequest &, Model::PutSessionOutcome, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > PutSessionResponseReceivedHandler
std::future< PostContentOutcome > PostContentOutcomeCallable
std::future< DeleteSessionOutcome > DeleteSessionOutcomeCallable
Aws::Utils::Outcome< DeleteSessionResult, LexRuntimeServiceError > DeleteSessionOutcome
Aws::Utils::Outcome< PutSessionResult, LexRuntimeServiceError > PutSessionOutcome
std::function< void(const LexRuntimeServiceClient *, const Model::DeleteSessionRequest &, const Model::DeleteSessionOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DeleteSessionResponseReceivedHandler
std::function< void(const LexRuntimeServiceClient *, const Model::GetSessionRequest &, const Model::GetSessionOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > GetSessionResponseReceivedHandler
std::future< PutSessionOutcome > PutSessionOutcomeCallable
std::function< void(const LexRuntimeServiceClient *, const Model::PostTextRequest &, const Model::PostTextOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > PostTextResponseReceivedHandler
std::function< void(const LexRuntimeServiceClient *, const Model::PostContentRequest &, Model::PostContentOutcome, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > PostContentResponseReceivedHandler
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
std::future< PostTextOutcome > PostTextOutcomeCallable
Aws::Utils::Outcome< PostTextResult, LexRuntimeServiceError > PostTextOutcome
Aws::Utils::Outcome< GetSessionResult, LexRuntimeServiceError > GetSessionOutcome