/** * 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 SageMakerFeatureStoreRuntime { namespace Model { TtlDuration::TtlDuration() : m_unit(TtlDurationUnit::NOT_SET), m_unitHasBeenSet(false), m_value(0), m_valueHasBeenSet(false) { } TtlDuration::TtlDuration(JsonView jsonValue) : m_unit(TtlDurationUnit::NOT_SET), m_unitHasBeenSet(false), m_value(0), m_valueHasBeenSet(false) { *this = jsonValue; } TtlDuration& TtlDuration::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Unit")) { m_unit = TtlDurationUnitMapper::GetTtlDurationUnitForName(jsonValue.GetString("Unit")); m_unitHasBeenSet = true; } if(jsonValue.ValueExists("Value")) { m_value = jsonValue.GetInteger("Value"); m_valueHasBeenSet = true; } return *this; } JsonValue TtlDuration::Jsonize() const { JsonValue payload; if(m_unitHasBeenSet) { payload.WithString("Unit", TtlDurationUnitMapper::GetNameForTtlDurationUnit(m_unit)); } if(m_valueHasBeenSet) { payload.WithInteger("Value", m_value); } return payload; } } // namespace Model } // namespace SageMakerFeatureStoreRuntime } // namespace Aws