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-mediapackage/source/model/MssPackage.cpp

109 lines
2.2 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediapackage/model/MssPackage.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace MediaPackage
{
namespace Model
{
MssPackage::MssPackage() :
m_encryptionHasBeenSet(false),
m_manifestWindowSeconds(0),
m_manifestWindowSecondsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
}
MssPackage::MssPackage(JsonView jsonValue) :
m_encryptionHasBeenSet(false),
m_manifestWindowSeconds(0),
m_manifestWindowSecondsHasBeenSet(false),
m_segmentDurationSeconds(0),
m_segmentDurationSecondsHasBeenSet(false),
m_streamSelectionHasBeenSet(false)
{
*this = jsonValue;
}
MssPackage& MssPackage::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("encryption"))
{
m_encryption = jsonValue.GetObject("encryption");
m_encryptionHasBeenSet = true;
}
if(jsonValue.ValueExists("manifestWindowSeconds"))
{
m_manifestWindowSeconds = jsonValue.GetInteger("manifestWindowSeconds");
m_manifestWindowSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("segmentDurationSeconds"))
{
m_segmentDurationSeconds = jsonValue.GetInteger("segmentDurationSeconds");
m_segmentDurationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("streamSelection"))
{
m_streamSelection = jsonValue.GetObject("streamSelection");
m_streamSelectionHasBeenSet = true;
}
return *this;
}
JsonValue MssPackage::Jsonize() const
{
JsonValue payload;
if(m_encryptionHasBeenSet)
{
payload.WithObject("encryption", m_encryption.Jsonize());
}
if(m_manifestWindowSecondsHasBeenSet)
{
payload.WithInteger("manifestWindowSeconds", m_manifestWindowSeconds);
}
if(m_segmentDurationSecondsHasBeenSet)
{
payload.WithInteger("segmentDurationSeconds", m_segmentDurationSeconds);
}
if(m_streamSelectionHasBeenSet)
{
payload.WithObject("streamSelection", m_streamSelection.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace MediaPackage
} // namespace Aws