/** * 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 { UserProfileDetails::UserProfileDetails() : m_domainIdHasBeenSet(false), m_userProfileNameHasBeenSet(false), m_status(UserProfileStatus::NOT_SET), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false) { } UserProfileDetails::UserProfileDetails(JsonView jsonValue) : m_domainIdHasBeenSet(false), m_userProfileNameHasBeenSet(false), m_status(UserProfileStatus::NOT_SET), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModifiedTimeHasBeenSet(false) { *this = jsonValue; } UserProfileDetails& UserProfileDetails::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("DomainId")) { m_domainId = jsonValue.GetString("DomainId"); m_domainIdHasBeenSet = true; } if(jsonValue.ValueExists("UserProfileName")) { m_userProfileName = jsonValue.GetString("UserProfileName"); m_userProfileNameHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = UserProfileStatusMapper::GetUserProfileStatusForName(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 UserProfileDetails::Jsonize() const { JsonValue payload; if(m_domainIdHasBeenSet) { payload.WithString("DomainId", m_domainId); } if(m_userProfileNameHasBeenSet) { payload.WithString("UserProfileName", m_userProfileName); } if(m_statusHasBeenSet) { payload.WithString("Status", UserProfileStatusMapper::GetNameForUserProfileStatus(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