/** * 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 { TrialComponentSummary::TrialComponentSummary() : m_trialComponentNameHasBeenSet(false), m_trialComponentArnHasBeenSet(false), m_displayNameHasBeenSet(false), m_trialComponentSourceHasBeenSet(false), m_statusHasBeenSet(false), m_startTimeHasBeenSet(false), m_endTimeHasBeenSet(false), m_creationTimeHasBeenSet(false), m_createdByHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false), m_lastModifiedByHasBeenSet(false) { } TrialComponentSummary::TrialComponentSummary(JsonView jsonValue) : m_trialComponentNameHasBeenSet(false), m_trialComponentArnHasBeenSet(false), m_displayNameHasBeenSet(false), m_trialComponentSourceHasBeenSet(false), m_statusHasBeenSet(false), m_startTimeHasBeenSet(false), m_endTimeHasBeenSet(false), m_creationTimeHasBeenSet(false), m_createdByHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false), m_lastModifiedByHasBeenSet(false) { *this = jsonValue; } TrialComponentSummary& TrialComponentSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("TrialComponentName")) { m_trialComponentName = jsonValue.GetString("TrialComponentName"); m_trialComponentNameHasBeenSet = true; } if(jsonValue.ValueExists("TrialComponentArn")) { m_trialComponentArn = jsonValue.GetString("TrialComponentArn"); m_trialComponentArnHasBeenSet = true; } if(jsonValue.ValueExists("DisplayName")) { m_displayName = jsonValue.GetString("DisplayName"); m_displayNameHasBeenSet = true; } if(jsonValue.ValueExists("TrialComponentSource")) { m_trialComponentSource = jsonValue.GetObject("TrialComponentSource"); m_trialComponentSourceHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = jsonValue.GetObject("Status"); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("StartTime")) { m_startTime = jsonValue.GetDouble("StartTime"); m_startTimeHasBeenSet = true; } if(jsonValue.ValueExists("EndTime")) { m_endTime = jsonValue.GetDouble("EndTime"); m_endTimeHasBeenSet = true; } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetDouble("CreationTime"); m_creationTimeHasBeenSet = true; } if(jsonValue.ValueExists("CreatedBy")) { m_createdBy = jsonValue.GetObject("CreatedBy"); m_createdByHasBeenSet = true; } if(jsonValue.ValueExists("LastModifiedTime")) { m_lastModifiedTime = jsonValue.GetDouble("LastModifiedTime"); m_lastModifiedTimeHasBeenSet = true; } if(jsonValue.ValueExists("LastModifiedBy")) { m_lastModifiedBy = jsonValue.GetObject("LastModifiedBy"); m_lastModifiedByHasBeenSet = true; } return *this; } JsonValue TrialComponentSummary::Jsonize() const { JsonValue payload; if(m_trialComponentNameHasBeenSet) { payload.WithString("TrialComponentName", m_trialComponentName); } if(m_trialComponentArnHasBeenSet) { payload.WithString("TrialComponentArn", m_trialComponentArn); } if(m_displayNameHasBeenSet) { payload.WithString("DisplayName", m_displayName); } if(m_trialComponentSourceHasBeenSet) { payload.WithObject("TrialComponentSource", m_trialComponentSource.Jsonize()); } if(m_statusHasBeenSet) { payload.WithObject("Status", m_status.Jsonize()); } if(m_startTimeHasBeenSet) { payload.WithDouble("StartTime", m_startTime.SecondsWithMSPrecision()); } if(m_endTimeHasBeenSet) { payload.WithDouble("EndTime", m_endTime.SecondsWithMSPrecision()); } if(m_creationTimeHasBeenSet) { payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision()); } if(m_createdByHasBeenSet) { payload.WithObject("CreatedBy", m_createdBy.Jsonize()); } if(m_lastModifiedTimeHasBeenSet) { payload.WithDouble("LastModifiedTime", m_lastModifiedTime.SecondsWithMSPrecision()); } if(m_lastModifiedByHasBeenSet) { payload.WithObject("LastModifiedBy", m_lastModifiedBy.Jsonize()); } return payload; } } // namespace Model } // namespace SageMaker } // namespace Aws