/** * 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 QuickSight { namespace Model { LinkSharingConfiguration::LinkSharingConfiguration() : m_permissionsHasBeenSet(false) { } LinkSharingConfiguration::LinkSharingConfiguration(JsonView jsonValue) : m_permissionsHasBeenSet(false) { *this = jsonValue; } LinkSharingConfiguration& LinkSharingConfiguration::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Permissions")) { Aws::Utils::Array permissionsJsonList = jsonValue.GetArray("Permissions"); for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex) { m_permissions.push_back(permissionsJsonList[permissionsIndex].AsObject()); } m_permissionsHasBeenSet = true; } return *this; } JsonValue LinkSharingConfiguration::Jsonize() const { JsonValue payload; if(m_permissionsHasBeenSet) { Aws::Utils::Array permissionsJsonList(m_permissions.size()); for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex) { permissionsJsonList[permissionsIndex].AsObject(m_permissions[permissionsIndex].Jsonize()); } payload.WithArray("Permissions", std::move(permissionsJsonList)); } return payload; } } // namespace Model } // namespace QuickSight } // namespace Aws