/** * 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 WorkLink { namespace Model { DomainSummary::DomainSummary() : m_domainNameHasBeenSet(false), m_displayNameHasBeenSet(false), m_createdTimeHasBeenSet(false), m_domainStatus(DomainStatus::NOT_SET), m_domainStatusHasBeenSet(false) { } DomainSummary::DomainSummary(JsonView jsonValue) : m_domainNameHasBeenSet(false), m_displayNameHasBeenSet(false), m_createdTimeHasBeenSet(false), m_domainStatus(DomainStatus::NOT_SET), m_domainStatusHasBeenSet(false) { *this = jsonValue; } DomainSummary& DomainSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("DomainName")) { m_domainName = jsonValue.GetString("DomainName"); m_domainNameHasBeenSet = true; } if(jsonValue.ValueExists("DisplayName")) { m_displayName = jsonValue.GetString("DisplayName"); m_displayNameHasBeenSet = true; } if(jsonValue.ValueExists("CreatedTime")) { m_createdTime = jsonValue.GetDouble("CreatedTime"); m_createdTimeHasBeenSet = true; } if(jsonValue.ValueExists("DomainStatus")) { m_domainStatus = DomainStatusMapper::GetDomainStatusForName(jsonValue.GetString("DomainStatus")); m_domainStatusHasBeenSet = true; } return *this; } JsonValue DomainSummary::Jsonize() const { JsonValue payload; if(m_domainNameHasBeenSet) { payload.WithString("DomainName", m_domainName); } if(m_displayNameHasBeenSet) { payload.WithString("DisplayName", m_displayName); } if(m_createdTimeHasBeenSet) { payload.WithDouble("CreatedTime", m_createdTime.SecondsWithMSPrecision()); } if(m_domainStatusHasBeenSet) { payload.WithString("DomainStatus", DomainStatusMapper::GetNameForDomainStatus(m_domainStatus)); } return payload; } } // namespace Model } // namespace WorkLink } // namespace Aws