/** * 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 EMR { namespace Model { StudioSummary::StudioSummary() : m_studioIdHasBeenSet(false), m_nameHasBeenSet(false), m_vpcIdHasBeenSet(false), m_descriptionHasBeenSet(false), m_urlHasBeenSet(false), m_authMode(AuthMode::NOT_SET), m_authModeHasBeenSet(false), m_creationTimeHasBeenSet(false) { } StudioSummary::StudioSummary(JsonView jsonValue) : m_studioIdHasBeenSet(false), m_nameHasBeenSet(false), m_vpcIdHasBeenSet(false), m_descriptionHasBeenSet(false), m_urlHasBeenSet(false), m_authMode(AuthMode::NOT_SET), m_authModeHasBeenSet(false), m_creationTimeHasBeenSet(false) { *this = jsonValue; } StudioSummary& StudioSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("StudioId")) { m_studioId = jsonValue.GetString("StudioId"); m_studioIdHasBeenSet = true; } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("VpcId")) { m_vpcId = jsonValue.GetString("VpcId"); m_vpcIdHasBeenSet = true; } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("Url")) { m_url = jsonValue.GetString("Url"); m_urlHasBeenSet = true; } if(jsonValue.ValueExists("AuthMode")) { m_authMode = AuthModeMapper::GetAuthModeForName(jsonValue.GetString("AuthMode")); m_authModeHasBeenSet = true; } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetDouble("CreationTime"); m_creationTimeHasBeenSet = true; } return *this; } JsonValue StudioSummary::Jsonize() const { JsonValue payload; if(m_studioIdHasBeenSet) { payload.WithString("StudioId", m_studioId); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_vpcIdHasBeenSet) { payload.WithString("VpcId", m_vpcId); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_urlHasBeenSet) { payload.WithString("Url", m_url); } if(m_authModeHasBeenSet) { payload.WithString("AuthMode", AuthModeMapper::GetNameForAuthMode(m_authMode)); } if(m_creationTimeHasBeenSet) { payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace EMR } // namespace Aws