/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Polly { namespace Model { class SynthesizeSpeechResult { public: AWS_POLLY_API SynthesizeSpeechResult(); //We have to define these because Microsoft doesn't auto generate them AWS_POLLY_API SynthesizeSpeechResult(SynthesizeSpeechResult&&); AWS_POLLY_API SynthesizeSpeechResult& operator=(SynthesizeSpeechResult&&); //we delete these because Microsoft doesn't handle move generation correctly //and we therefore don't trust them to get it right here either. SynthesizeSpeechResult(const SynthesizeSpeechResult&) = delete; SynthesizeSpeechResult& operator=(const SynthesizeSpeechResult&) = delete; AWS_POLLY_API SynthesizeSpeechResult(Aws::AmazonWebServiceResult&& result); AWS_POLLY_API SynthesizeSpeechResult& operator=(Aws::AmazonWebServiceResult&& result); /** *

Stream containing the synthesized speech.

*/ inline Aws::IOStream& GetAudioStream() const { return m_audioStream.GetUnderlyingStream(); } /** *

Stream containing the synthesized speech.

*/ inline void ReplaceBody(Aws::IOStream* body) { m_audioStream = Aws::Utils::Stream::ResponseStream(body); } /** *

Specifies the type audio stream. This should reflect the * OutputFormat parameter in your request.

  • If you * request mp3 as the OutputFormat, the * ContentType returned is audio/mpeg.

  • If you * request ogg_vorbis as the OutputFormat, the * ContentType returned is audio/ogg.

  • If you * request pcm as the OutputFormat, the * ContentType returned is audio/pcm in a signed 16-bit, 1 channel * (mono), little-endian format.

  • If you request * json as the OutputFormat, the ContentType * returned is application/x-json-stream.

*/ inline const Aws::String& GetContentType() const{ return m_contentType; } /** *

Specifies the type audio stream. This should reflect the * OutputFormat parameter in your request.

  • If you * request mp3 as the OutputFormat, the * ContentType returned is audio/mpeg.

  • If you * request ogg_vorbis as the OutputFormat, the * ContentType returned is audio/ogg.

  • If you * request pcm as the OutputFormat, the * ContentType returned is audio/pcm in a signed 16-bit, 1 channel * (mono), little-endian format.

  • If you request * json as the OutputFormat, the ContentType * returned is application/x-json-stream.

*/ inline void SetContentType(const Aws::String& value) { m_contentType = value; } /** *

Specifies the type audio stream. This should reflect the * OutputFormat parameter in your request.

  • If you * request mp3 as the OutputFormat, the * ContentType returned is audio/mpeg.

  • If you * request ogg_vorbis as the OutputFormat, the * ContentType returned is audio/ogg.

  • If you * request pcm as the OutputFormat, the * ContentType returned is audio/pcm in a signed 16-bit, 1 channel * (mono), little-endian format.

  • If you request * json as the OutputFormat, the ContentType * returned is application/x-json-stream.

*/ inline void SetContentType(Aws::String&& value) { m_contentType = std::move(value); } /** *

Specifies the type audio stream. This should reflect the * OutputFormat parameter in your request.

  • If you * request mp3 as the OutputFormat, the * ContentType returned is audio/mpeg.

  • If you * request ogg_vorbis as the OutputFormat, the * ContentType returned is audio/ogg.

  • If you * request pcm as the OutputFormat, the * ContentType returned is audio/pcm in a signed 16-bit, 1 channel * (mono), little-endian format.

  • If you request * json as the OutputFormat, the ContentType * returned is application/x-json-stream.

*/ inline void SetContentType(const char* value) { m_contentType.assign(value); } /** *

Specifies the type audio stream. This should reflect the * OutputFormat parameter in your request.

  • If you * request mp3 as the OutputFormat, the * ContentType returned is audio/mpeg.

  • If you * request ogg_vorbis as the OutputFormat, the * ContentType returned is audio/ogg.

  • If you * request pcm as the OutputFormat, the * ContentType returned is audio/pcm in a signed 16-bit, 1 channel * (mono), little-endian format.

  • If you request * json as the OutputFormat, the ContentType * returned is application/x-json-stream.

*/ inline SynthesizeSpeechResult& WithContentType(const Aws::String& value) { SetContentType(value); return *this;} /** *

Specifies the type audio stream. This should reflect the * OutputFormat parameter in your request.

  • If you * request mp3 as the OutputFormat, the * ContentType returned is audio/mpeg.

  • If you * request ogg_vorbis as the OutputFormat, the * ContentType returned is audio/ogg.

  • If you * request pcm as the OutputFormat, the * ContentType returned is audio/pcm in a signed 16-bit, 1 channel * (mono), little-endian format.

  • If you request * json as the OutputFormat, the ContentType * returned is application/x-json-stream.

*/ inline SynthesizeSpeechResult& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;} /** *

Specifies the type audio stream. This should reflect the * OutputFormat parameter in your request.

  • If you * request mp3 as the OutputFormat, the * ContentType returned is audio/mpeg.

  • If you * request ogg_vorbis as the OutputFormat, the * ContentType returned is audio/ogg.

  • If you * request pcm as the OutputFormat, the * ContentType returned is audio/pcm in a signed 16-bit, 1 channel * (mono), little-endian format.

  • If you request * json as the OutputFormat, the ContentType * returned is application/x-json-stream.

*/ inline SynthesizeSpeechResult& WithContentType(const char* value) { SetContentType(value); return *this;} /** *

Number of characters synthesized.

*/ inline int GetRequestCharacters() const{ return m_requestCharacters; } /** *

Number of characters synthesized.

*/ inline void SetRequestCharacters(int value) { m_requestCharacters = value; } /** *

Number of characters synthesized.

*/ inline SynthesizeSpeechResult& WithRequestCharacters(int value) { SetRequestCharacters(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline SynthesizeSpeechResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline SynthesizeSpeechResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline SynthesizeSpeechResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Utils::Stream::ResponseStream m_audioStream; Aws::String m_contentType; int m_requestCharacters; Aws::String m_requestId; }; } // namespace Model } // namespace Polly } // namespace Aws