/** * 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 SageMaker { namespace Model { ProductionVariantStatus::ProductionVariantStatus() : m_status(VariantStatus::NOT_SET), m_statusHasBeenSet(false), m_statusMessageHasBeenSet(false), m_startTimeHasBeenSet(false) { } ProductionVariantStatus::ProductionVariantStatus(JsonView jsonValue) : m_status(VariantStatus::NOT_SET), m_statusHasBeenSet(false), m_statusMessageHasBeenSet(false), m_startTimeHasBeenSet(false) { *this = jsonValue; } ProductionVariantStatus& ProductionVariantStatus::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Status")) { m_status = VariantStatusMapper::GetVariantStatusForName(jsonValue.GetString("Status")); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("StatusMessage")) { m_statusMessage = jsonValue.GetString("StatusMessage"); m_statusMessageHasBeenSet = true; } if(jsonValue.ValueExists("StartTime")) { m_startTime = jsonValue.GetDouble("StartTime"); m_startTimeHasBeenSet = true; } return *this; } JsonValue ProductionVariantStatus::Jsonize() const { JsonValue payload; if(m_statusHasBeenSet) { payload.WithString("Status", VariantStatusMapper::GetNameForVariantStatus(m_status)); } if(m_statusMessageHasBeenSet) { payload.WithString("StatusMessage", m_statusMessage); } if(m_startTimeHasBeenSet) { payload.WithDouble("StartTime", m_startTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace SageMaker } // namespace Aws