1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub struct SynthesizeSpeechOutput {
/// <p>Stream containing the synthesized speech.</p>
pub audio_stream: ::aws_smithy_types::byte_stream::ByteStream,
/// <p>Specifies the type audio stream. This should reflect the <code>OutputFormat</code> parameter in your request.</p>
/// <ul>
/// <li>
/// <p>If you request <code>mp3</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mpeg.</p></li>
/// <li>
/// <p>If you request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>ogg_opus</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>pcm</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.</p></li>
/// <li>
/// <p>If you request <code>mu-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mulaw.</p></li>
/// <li>
/// <p>If you request <code>a-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/alaw.</p></li>
/// <li>
/// <p>If you request <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is application/x-json-stream.</p></li>
/// </ul>
/// <p></p>
pub content_type: ::std::option::Option<::std::string::String>,
/// <p>Number of characters synthesized.</p>
pub request_characters: i32,
_request_id: Option<String>,
}
impl SynthesizeSpeechOutput {
/// <p>Stream containing the synthesized speech.</p>
pub fn audio_stream(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
&self.audio_stream
}
/// <p>Specifies the type audio stream. This should reflect the <code>OutputFormat</code> parameter in your request.</p>
/// <ul>
/// <li>
/// <p>If you request <code>mp3</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mpeg.</p></li>
/// <li>
/// <p>If you request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>ogg_opus</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>pcm</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.</p></li>
/// <li>
/// <p>If you request <code>mu-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mulaw.</p></li>
/// <li>
/// <p>If you request <code>a-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/alaw.</p></li>
/// <li>
/// <p>If you request <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is application/x-json-stream.</p></li>
/// </ul>
/// <p></p>
pub fn content_type(&self) -> ::std::option::Option<&str> {
self.content_type.as_deref()
}
/// <p>Number of characters synthesized.</p>
pub fn request_characters(&self) -> i32 {
self.request_characters
}
}
impl ::aws_types::request_id::RequestId for SynthesizeSpeechOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl SynthesizeSpeechOutput {
/// Creates a new builder-style object to manufacture [`SynthesizeSpeechOutput`](crate::operation::synthesize_speech::SynthesizeSpeechOutput).
pub fn builder() -> crate::operation::synthesize_speech::builders::SynthesizeSpeechOutputBuilder {
crate::operation::synthesize_speech::builders::SynthesizeSpeechOutputBuilder::default()
}
}
/// A builder for [`SynthesizeSpeechOutput`](crate::operation::synthesize_speech::SynthesizeSpeechOutput).
#[derive(::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SynthesizeSpeechOutputBuilder {
pub(crate) audio_stream: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
pub(crate) content_type: ::std::option::Option<::std::string::String>,
pub(crate) request_characters: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl SynthesizeSpeechOutputBuilder {
/// <p>Stream containing the synthesized speech.</p>
pub fn audio_stream(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
self.audio_stream = ::std::option::Option::Some(input);
self
}
/// <p>Stream containing the synthesized speech.</p>
pub fn set_audio_stream(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
self.audio_stream = input;
self
}
/// <p>Stream containing the synthesized speech.</p>
pub fn get_audio_stream(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
&self.audio_stream
}
/// <p>Specifies the type audio stream. This should reflect the <code>OutputFormat</code> parameter in your request.</p>
/// <ul>
/// <li>
/// <p>If you request <code>mp3</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mpeg.</p></li>
/// <li>
/// <p>If you request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>ogg_opus</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>pcm</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.</p></li>
/// <li>
/// <p>If you request <code>mu-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mulaw.</p></li>
/// <li>
/// <p>If you request <code>a-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/alaw.</p></li>
/// <li>
/// <p>If you request <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is application/x-json-stream.</p></li>
/// </ul>
/// <p></p>
pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content_type = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the type audio stream. This should reflect the <code>OutputFormat</code> parameter in your request.</p>
/// <ul>
/// <li>
/// <p>If you request <code>mp3</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mpeg.</p></li>
/// <li>
/// <p>If you request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>ogg_opus</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>pcm</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.</p></li>
/// <li>
/// <p>If you request <code>mu-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mulaw.</p></li>
/// <li>
/// <p>If you request <code>a-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/alaw.</p></li>
/// <li>
/// <p>If you request <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is application/x-json-stream.</p></li>
/// </ul>
/// <p></p>
pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content_type = input;
self
}
/// <p>Specifies the type audio stream. This should reflect the <code>OutputFormat</code> parameter in your request.</p>
/// <ul>
/// <li>
/// <p>If you request <code>mp3</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mpeg.</p></li>
/// <li>
/// <p>If you request <code>ogg_vorbis</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>ogg_opus</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/ogg.</p></li>
/// <li>
/// <p>If you request <code>pcm</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format.</p></li>
/// <li>
/// <p>If you request <code>mu-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/mulaw.</p></li>
/// <li>
/// <p>If you request <code>a-law</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is audio/alaw.</p></li>
/// <li>
/// <p>If you request <code>json</code> as the <code>OutputFormat</code>, the <code>ContentType</code> returned is application/x-json-stream.</p></li>
/// </ul>
/// <p></p>
pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.content_type
}
/// <p>Number of characters synthesized.</p>
pub fn request_characters(mut self, input: i32) -> Self {
self.request_characters = ::std::option::Option::Some(input);
self
}
/// <p>Number of characters synthesized.</p>
pub fn set_request_characters(mut self, input: ::std::option::Option<i32>) -> Self {
self.request_characters = input;
self
}
/// <p>Number of characters synthesized.</p>
pub fn get_request_characters(&self) -> &::std::option::Option<i32> {
&self.request_characters
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`SynthesizeSpeechOutput`](crate::operation::synthesize_speech::SynthesizeSpeechOutput).
pub fn build(self) -> crate::operation::synthesize_speech::SynthesizeSpeechOutput {
crate::operation::synthesize_speech::SynthesizeSpeechOutput {
audio_stream: self.audio_stream.unwrap_or_default(),
content_type: self.content_type,
request_characters: self.request_characters.unwrap_or_default(),
_request_id: self._request_id,
}
}
}