This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-transcribestreaming/source/model/Transcript.cpp

68 lines
1.4 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/transcribestreaming/model/Transcript.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace TranscribeStreamingService
{
namespace Model
{
Transcript::Transcript() :
m_resultsHasBeenSet(false)
{
}
Transcript::Transcript(JsonView jsonValue) :
m_resultsHasBeenSet(false)
{
*this = jsonValue;
}
Transcript& Transcript::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Results"))
{
Array<JsonView> resultsJsonList = jsonValue.GetArray("Results");
for(unsigned resultsIndex = 0; resultsIndex < resultsJsonList.GetLength(); ++resultsIndex)
{
m_results.push_back(resultsJsonList[resultsIndex].AsObject());
}
m_resultsHasBeenSet = true;
}
return *this;
}
JsonValue Transcript::Jsonize() const
{
JsonValue payload;
if(m_resultsHasBeenSet)
{
Array<JsonValue> resultsJsonList(m_results.size());
for(unsigned resultsIndex = 0; resultsIndex < resultsJsonList.GetLength(); ++resultsIndex)
{
resultsJsonList[resultsIndex].AsObject(m_results[resultsIndex].Jsonize());
}
payload.WithArray("Results", std::move(resultsJsonList));
}
return payload;
}
} // namespace Model
} // namespace TranscribeStreamingService
} // namespace Aws