AWS SDK for C++

AWS SDK for C++ Version 1.11.773

Loading...
Searching...
No Matches
StartSpeechSynthesisStreamRequest.h
1
6#pragma once
7#include <aws/core/utils/event/EventStreamDecoder.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/polly/PollyRequest.h>
11#include <aws/polly/Polly_EXPORTS.h>
12#include <aws/polly/model/Engine.h>
13#include <aws/polly/model/LanguageCode.h>
14#include <aws/polly/model/OutputFormat.h>
15#include <aws/polly/model/StartSpeechSynthesisStreamActionStream.h>
16#include <aws/polly/model/StartSpeechSynthesisStreamHandler.h>
17#include <aws/polly/model/VoiceId.h>
18
19#include <memory>
20#include <utility>
21
22namespace Aws {
23namespace Polly {
24namespace Model {
25
29 public:
30 AWS_POLLY_API StartSpeechSynthesisStreamRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "StartSpeechSynthesisStream"; }
37
38 inline virtual bool IsEventStreamRequest() const override { return true; }
39 inline virtual bool HasEventStreamResponse() const override { return true; }
40 // SerializePayload will not be invoked.
41 // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody()
42 AWS_POLLY_API Aws::String SerializePayload() const override { return {}; }
43 AWS_POLLY_API std::shared_ptr<Aws::IOStream> GetBody() const override;
45
50
55
60 m_handler = value;
61 m_decoder.ResetEventStreamHandler(&m_handler);
62 }
63
69 return *this;
70 }
71
73
79 inline Engine GetEngine() const { return m_engine; }
80 inline bool EngineHasBeenSet() const { return m_engineHasBeenSet; }
81 inline void SetEngine(Engine value) {
82 m_engineHasBeenSet = true;
83 m_engine = value;
84 }
86 SetEngine(value);
87 return *this;
88 }
90
92
98 inline LanguageCode GetLanguageCode() const { return m_languageCode; }
99 inline bool LanguageCodeHasBeenSet() const { return m_languageCodeHasBeenSet; }
100 inline void SetLanguageCode(LanguageCode value) {
101 m_languageCodeHasBeenSet = true;
102 m_languageCode = value;
103 }
105 SetLanguageCode(value);
106 return *this;
107 }
109
111
116 inline const Aws::Vector<Aws::String>& GetLexiconNames() const { return m_lexiconNames; }
117 inline bool LexiconNamesHasBeenSet() const { return m_lexiconNamesHasBeenSet; }
118 template <typename LexiconNamesT = Aws::Vector<Aws::String>>
119 void SetLexiconNames(LexiconNamesT&& value) {
120 m_lexiconNamesHasBeenSet = true;
121 m_lexiconNames = std::forward<LexiconNamesT>(value);
122 }
123 template <typename LexiconNamesT = Aws::Vector<Aws::String>>
125 SetLexiconNames(std::forward<LexiconNamesT>(value));
126 return *this;
127 }
128 template <typename LexiconNamesT = Aws::String>
130 m_lexiconNamesHasBeenSet = true;
131 m_lexiconNames.emplace_back(std::forward<LexiconNamesT>(value));
132 return *this;
133 }
135
137
141 inline OutputFormat GetOutputFormat() const { return m_outputFormat; }
142 inline bool OutputFormatHasBeenSet() const { return m_outputFormatHasBeenSet; }
143 inline void SetOutputFormat(OutputFormat value) {
144 m_outputFormatHasBeenSet = true;
145 m_outputFormat = value;
146 }
148 SetOutputFormat(value);
149 return *this;
150 }
152
154
157 inline const Aws::String& GetSampleRate() const { return m_sampleRate; }
158 inline bool SampleRateHasBeenSet() const { return m_sampleRateHasBeenSet; }
159 template <typename SampleRateT = Aws::String>
160 void SetSampleRate(SampleRateT&& value) {
161 m_sampleRateHasBeenSet = true;
162 m_sampleRate = std::forward<SampleRateT>(value);
163 }
164 template <typename SampleRateT = Aws::String>
166 SetSampleRate(std::forward<SampleRateT>(value));
167 return *this;
168 }
170
172
178 inline VoiceId GetVoiceId() const { return m_voiceId; }
179 inline bool VoiceIdHasBeenSet() const { return m_voiceIdHasBeenSet; }
180 inline void SetVoiceId(VoiceId value) {
181 m_voiceIdHasBeenSet = true;
182 m_voiceId = value;
183 }
185 SetVoiceId(value);
186 return *this;
187 }
189
191
195 AWS_POLLY_API std::shared_ptr<StartSpeechSynthesisStreamActionStream> GetActionStream() const { return m_actionStream; }
196 AWS_POLLY_API void SetActionStream(const std::shared_ptr<StartSpeechSynthesisStreamActionStream>& value) {
197 m_actionStreamHasBeenSet = true;
198 m_actionStream = value;
199 }
200 AWS_POLLY_API StartSpeechSynthesisStreamRequest& WithActionStream(const std::shared_ptr<StartSpeechSynthesisStreamActionStream>& value) {
201 SetActionStream(value);
202 return *this;
203 }
204
206 private:
207 Engine m_engine{Engine::NOT_SET};
208
209 LanguageCode m_languageCode{LanguageCode::NOT_SET};
210
211 Aws::Vector<Aws::String> m_lexiconNames;
212
213 OutputFormat m_outputFormat{OutputFormat::NOT_SET};
214
215 Aws::String m_sampleRate;
216
217 VoiceId m_voiceId{VoiceId::NOT_SET};
218
219 std::shared_ptr<StartSpeechSynthesisStreamActionStream> m_actionStream;
220 StartSpeechSynthesisStreamHandler m_handler;
221 Aws::Utils::Event::EventStreamDecoder m_decoder{Utils::Event::EventStreamDecoder(&m_handler)};
222
223 bool m_engineHasBeenSet = false;
224 bool m_languageCodeHasBeenSet = false;
225 bool m_lexiconNamesHasBeenSet = false;
226 bool m_outputFormatHasBeenSet = false;
227 bool m_sampleRateHasBeenSet = false;
228 bool m_voiceIdHasBeenSet = false;
229 bool m_actionStreamHasBeenSet = false;
230};
231
232} // namespace Model
233} // namespace Polly
234} // namespace Aws
AWS_POLLY_API std::shared_ptr< Aws::IOStream > GetBody() const override
StartSpeechSynthesisStreamRequest & WithEngine(Engine value)
StartSpeechSynthesisStreamRequest & WithVoiceId(VoiceId value)
StartSpeechSynthesisStreamRequest & WithOutputFormat(OutputFormat value)
StartSpeechSynthesisStreamRequest & WithSampleRate(SampleRateT &&value)
AWS_POLLY_API void SetActionStream(const std::shared_ptr< StartSpeechSynthesisStreamActionStream > &value)
StartSpeechSynthesisStreamRequest & WithLanguageCode(LanguageCode value)
StartSpeechSynthesisStreamRequest & WithLexiconNames(LexiconNamesT &&value)
void SetEventStreamHandler(const StartSpeechSynthesisStreamHandler &value)
StartSpeechSynthesisStreamRequest & WithEventStreamHandler(const StartSpeechSynthesisStreamHandler &value)
AWS_POLLY_API StartSpeechSynthesisStreamRequest & WithActionStream(const std::shared_ptr< StartSpeechSynthesisStreamActionStream > &value)
AWS_POLLY_API std::shared_ptr< StartSpeechSynthesisStreamActionStream > GetActionStream() const
AWS_POLLY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
StartSpeechSynthesisStreamRequest & AddLexiconNames(LexiconNamesT &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector