/** * 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 { InferenceExperimentSummary::InferenceExperimentSummary() : m_nameHasBeenSet(false), m_type(InferenceExperimentType::NOT_SET), m_typeHasBeenSet(false), m_scheduleHasBeenSet(false), m_status(InferenceExperimentStatus::NOT_SET), m_statusHasBeenSet(false), m_statusReasonHasBeenSet(false), m_descriptionHasBeenSet(false), m_creationTimeHasBeenSet(false), m_completionTimeHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false), m_roleArnHasBeenSet(false) { } InferenceExperimentSummary::InferenceExperimentSummary(JsonView jsonValue) : m_nameHasBeenSet(false), m_type(InferenceExperimentType::NOT_SET), m_typeHasBeenSet(false), m_scheduleHasBeenSet(false), m_status(InferenceExperimentStatus::NOT_SET), m_statusHasBeenSet(false), m_statusReasonHasBeenSet(false), m_descriptionHasBeenSet(false), m_creationTimeHasBeenSet(false), m_completionTimeHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false), m_roleArnHasBeenSet(false) { *this = jsonValue; } InferenceExperimentSummary& InferenceExperimentSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("Type")) { m_type = InferenceExperimentTypeMapper::GetInferenceExperimentTypeForName(jsonValue.GetString("Type")); m_typeHasBeenSet = true; } if(jsonValue.ValueExists("Schedule")) { m_schedule = jsonValue.GetObject("Schedule"); m_scheduleHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = InferenceExperimentStatusMapper::GetInferenceExperimentStatusForName(jsonValue.GetString("Status")); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("StatusReason")) { m_statusReason = jsonValue.GetString("StatusReason"); m_statusReasonHasBeenSet = true; } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetDouble("CreationTime"); m_creationTimeHasBeenSet = true; } if(jsonValue.ValueExists("CompletionTime")) { m_completionTime = jsonValue.GetDouble("CompletionTime"); m_completionTimeHasBeenSet = true; } if(jsonValue.ValueExists("LastModifiedTime")) { m_lastModifiedTime = jsonValue.GetDouble("LastModifiedTime"); m_lastModifiedTimeHasBeenSet = true; } if(jsonValue.ValueExists("RoleArn")) { m_roleArn = jsonValue.GetString("RoleArn"); m_roleArnHasBeenSet = true; } return *this; } JsonValue InferenceExperimentSummary::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_typeHasBeenSet) { payload.WithString("Type", InferenceExperimentTypeMapper::GetNameForInferenceExperimentType(m_type)); } if(m_scheduleHasBeenSet) { payload.WithObject("Schedule", m_schedule.Jsonize()); } if(m_statusHasBeenSet) { payload.WithString("Status", InferenceExperimentStatusMapper::GetNameForInferenceExperimentStatus(m_status)); } if(m_statusReasonHasBeenSet) { payload.WithString("StatusReason", m_statusReason); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_creationTimeHasBeenSet) { payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision()); } if(m_completionTimeHasBeenSet) { payload.WithDouble("CompletionTime", m_completionTime.SecondsWithMSPrecision()); } if(m_lastModifiedTimeHasBeenSet) { payload.WithDouble("LastModifiedTime", m_lastModifiedTime.SecondsWithMSPrecision()); } if(m_roleArnHasBeenSet) { payload.WithString("RoleArn", m_roleArn); } return payload; } } // namespace Model } // namespace SageMaker } // namespace Aws