/** * 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 { ActionSummary::ActionSummary() : m_actionArnHasBeenSet(false), m_actionNameHasBeenSet(false), m_sourceHasBeenSet(false), m_actionTypeHasBeenSet(false), m_status(ActionStatus::NOT_SET), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false) { } ActionSummary::ActionSummary(JsonView jsonValue) : m_actionArnHasBeenSet(false), m_actionNameHasBeenSet(false), m_sourceHasBeenSet(false), m_actionTypeHasBeenSet(false), m_status(ActionStatus::NOT_SET), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false) { *this = jsonValue; } ActionSummary& ActionSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("ActionArn")) { m_actionArn = jsonValue.GetString("ActionArn"); m_actionArnHasBeenSet = true; } if(jsonValue.ValueExists("ActionName")) { m_actionName = jsonValue.GetString("ActionName"); m_actionNameHasBeenSet = true; } if(jsonValue.ValueExists("Source")) { m_source = jsonValue.GetObject("Source"); m_sourceHasBeenSet = true; } if(jsonValue.ValueExists("ActionType")) { m_actionType = jsonValue.GetString("ActionType"); m_actionTypeHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = ActionStatusMapper::GetActionStatusForName(jsonValue.GetString("Status")); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetDouble("CreationTime"); m_creationTimeHasBeenSet = true; } if(jsonValue.ValueExists("LastModifiedTime")) { m_lastModifiedTime = jsonValue.GetDouble("LastModifiedTime"); m_lastModifiedTimeHasBeenSet = true; } return *this; } JsonValue ActionSummary::Jsonize() const { JsonValue payload; if(m_actionArnHasBeenSet) { payload.WithString("ActionArn", m_actionArn); } if(m_actionNameHasBeenSet) { payload.WithString("ActionName", m_actionName); } if(m_sourceHasBeenSet) { payload.WithObject("Source", m_source.Jsonize()); } if(m_actionTypeHasBeenSet) { payload.WithString("ActionType", m_actionType); } if(m_statusHasBeenSet) { payload.WithString("Status", ActionStatusMapper::GetNameForActionStatus(m_status)); } if(m_creationTimeHasBeenSet) { payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision()); } if(m_lastModifiedTimeHasBeenSet) { payload.WithDouble("LastModifiedTime", m_lastModifiedTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace SageMaker } // namespace Aws