/** * 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 Athena { namespace Model { WorkGroupConfiguration::WorkGroupConfiguration() : m_resultConfigurationHasBeenSet(false), m_enforceWorkGroupConfiguration(false), m_enforceWorkGroupConfigurationHasBeenSet(false), m_publishCloudWatchMetricsEnabled(false), m_publishCloudWatchMetricsEnabledHasBeenSet(false), m_bytesScannedCutoffPerQuery(0), m_bytesScannedCutoffPerQueryHasBeenSet(false), m_requesterPaysEnabled(false), m_requesterPaysEnabledHasBeenSet(false) { } WorkGroupConfiguration::WorkGroupConfiguration(JsonView jsonValue) : m_resultConfigurationHasBeenSet(false), m_enforceWorkGroupConfiguration(false), m_enforceWorkGroupConfigurationHasBeenSet(false), m_publishCloudWatchMetricsEnabled(false), m_publishCloudWatchMetricsEnabledHasBeenSet(false), m_bytesScannedCutoffPerQuery(0), m_bytesScannedCutoffPerQueryHasBeenSet(false), m_requesterPaysEnabled(false), m_requesterPaysEnabledHasBeenSet(false) { *this = jsonValue; } WorkGroupConfiguration& WorkGroupConfiguration::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("ResultConfiguration")) { m_resultConfiguration = jsonValue.GetObject("ResultConfiguration"); m_resultConfigurationHasBeenSet = true; } if(jsonValue.ValueExists("EnforceWorkGroupConfiguration")) { m_enforceWorkGroupConfiguration = jsonValue.GetBool("EnforceWorkGroupConfiguration"); m_enforceWorkGroupConfigurationHasBeenSet = true; } if(jsonValue.ValueExists("PublishCloudWatchMetricsEnabled")) { m_publishCloudWatchMetricsEnabled = jsonValue.GetBool("PublishCloudWatchMetricsEnabled"); m_publishCloudWatchMetricsEnabledHasBeenSet = true; } if(jsonValue.ValueExists("BytesScannedCutoffPerQuery")) { m_bytesScannedCutoffPerQuery = jsonValue.GetInt64("BytesScannedCutoffPerQuery"); m_bytesScannedCutoffPerQueryHasBeenSet = true; } if(jsonValue.ValueExists("RequesterPaysEnabled")) { m_requesterPaysEnabled = jsonValue.GetBool("RequesterPaysEnabled"); m_requesterPaysEnabledHasBeenSet = true; } return *this; } JsonValue WorkGroupConfiguration::Jsonize() const { JsonValue payload; if(m_resultConfigurationHasBeenSet) { payload.WithObject("ResultConfiguration", m_resultConfiguration.Jsonize()); } if(m_enforceWorkGroupConfigurationHasBeenSet) { payload.WithBool("EnforceWorkGroupConfiguration", m_enforceWorkGroupConfiguration); } if(m_publishCloudWatchMetricsEnabledHasBeenSet) { payload.WithBool("PublishCloudWatchMetricsEnabled", m_publishCloudWatchMetricsEnabled); } if(m_bytesScannedCutoffPerQueryHasBeenSet) { payload.WithInt64("BytesScannedCutoffPerQuery", m_bytesScannedCutoffPerQuery); } if(m_requesterPaysEnabledHasBeenSet) { payload.WithBool("RequesterPaysEnabled", m_requesterPaysEnabled); } return payload; } } // namespace Model } // namespace Athena } // namespace Aws