/** * 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 CodeDeploy { namespace Model { LastDeploymentInfo::LastDeploymentInfo() : m_deploymentIdHasBeenSet(false), m_status(DeploymentStatus::NOT_SET), m_statusHasBeenSet(false), m_endTimeHasBeenSet(false), m_createTimeHasBeenSet(false) { } LastDeploymentInfo::LastDeploymentInfo(JsonView jsonValue) : m_deploymentIdHasBeenSet(false), m_status(DeploymentStatus::NOT_SET), m_statusHasBeenSet(false), m_endTimeHasBeenSet(false), m_createTimeHasBeenSet(false) { *this = jsonValue; } LastDeploymentInfo& LastDeploymentInfo::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("deploymentId")) { m_deploymentId = jsonValue.GetString("deploymentId"); m_deploymentIdHasBeenSet = true; } if(jsonValue.ValueExists("status")) { m_status = DeploymentStatusMapper::GetDeploymentStatusForName(jsonValue.GetString("status")); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("endTime")) { m_endTime = jsonValue.GetDouble("endTime"); m_endTimeHasBeenSet = true; } if(jsonValue.ValueExists("createTime")) { m_createTime = jsonValue.GetDouble("createTime"); m_createTimeHasBeenSet = true; } return *this; } JsonValue LastDeploymentInfo::Jsonize() const { JsonValue payload; if(m_deploymentIdHasBeenSet) { payload.WithString("deploymentId", m_deploymentId); } if(m_statusHasBeenSet) { payload.WithString("status", DeploymentStatusMapper::GetNameForDeploymentStatus(m_status)); } if(m_endTimeHasBeenSet) { payload.WithDouble("endTime", m_endTime.SecondsWithMSPrecision()); } if(m_createTimeHasBeenSet) { payload.WithDouble("createTime", m_createTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace CodeDeploy } // namespace Aws