/** * 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 { LabelOptions::LabelOptions() : m_visibility(Visibility::NOT_SET), m_visibilityHasBeenSet(false), m_fontConfigurationHasBeenSet(false), m_customLabelHasBeenSet(false) { } LabelOptions::LabelOptions(JsonView jsonValue) : m_visibility(Visibility::NOT_SET), m_visibilityHasBeenSet(false), m_fontConfigurationHasBeenSet(false), m_customLabelHasBeenSet(false) { *this = jsonValue; } LabelOptions& LabelOptions::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Visibility")) { m_visibility = VisibilityMapper::GetVisibilityForName(jsonValue.GetString("Visibility")); m_visibilityHasBeenSet = true; } if(jsonValue.ValueExists("FontConfiguration")) { m_fontConfiguration = jsonValue.GetObject("FontConfiguration"); m_fontConfigurationHasBeenSet = true; } if(jsonValue.ValueExists("CustomLabel")) { m_customLabel = jsonValue.GetString("CustomLabel"); m_customLabelHasBeenSet = true; } return *this; } JsonValue LabelOptions::Jsonize() const { JsonValue payload; if(m_visibilityHasBeenSet) { payload.WithString("Visibility", VisibilityMapper::GetNameForVisibility(m_visibility)); } if(m_fontConfigurationHasBeenSet) { payload.WithObject("FontConfiguration", m_fontConfiguration.Jsonize()); } if(m_customLabelHasBeenSet) { payload.WithString("CustomLabel", m_customLabel); } return payload; } } // namespace Model } // namespace QuickSight } // namespace Aws