/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include 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