{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Athena.Types.WorkGroupConfigurationUpdates
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Athena.Types.WorkGroupConfigurationUpdates where

import Amazonka.Athena.Types.EngineVersion
import Amazonka.Athena.Types.ResultConfigurationUpdates
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The configuration information that will be updated for this workgroup,
-- which includes the location in Amazon S3 where query results are stored,
-- the encryption option, if any, used for query results, whether the
-- Amazon CloudWatch Metrics are enabled for the workgroup, whether the
-- workgroup settings override the client-side settings, and the data usage
-- limit for the amount of bytes scanned per query, if it is specified.
--
-- /See:/ 'newWorkGroupConfigurationUpdates' smart constructor.
data WorkGroupConfigurationUpdates = WorkGroupConfigurationUpdates'
  { -- | The engine version requested when a workgroup is updated. After the
    -- update, all queries on the workgroup run on the requested engine
    -- version. If no value was previously set, the default is Auto. Queries on
    -- the @AmazonAthenaPreviewFunctionality@ workgroup run on the preview
    -- engine regardless of this setting.
    WorkGroupConfigurationUpdates -> Maybe EngineVersion
engineVersion :: Prelude.Maybe EngineVersion,
    -- | If set to @true@, allows members assigned to a workgroup to specify
    -- Amazon S3 Requester Pays buckets in queries. If set to @false@,
    -- workgroup members cannot query data from Requester Pays buckets, and
    -- queries that retrieve data from Requester Pays buckets cause an error.
    -- The default is @false@. For more information about Requester Pays
    -- buckets, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html Requester Pays Buckets>
    -- in the /Amazon Simple Storage Service Developer Guide/.
    WorkGroupConfigurationUpdates -> Maybe Bool
requesterPaysEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The result configuration information about the queries in this workgroup
    -- that will be updated. Includes the updated results location and an
    -- updated option for encrypting query results.
    WorkGroupConfigurationUpdates -> Maybe ResultConfigurationUpdates
resultConfigurationUpdates :: Prelude.Maybe ResultConfigurationUpdates,
    -- | The upper limit (cutoff) for the amount of bytes a single query in a
    -- workgroup is allowed to scan.
    WorkGroupConfigurationUpdates -> Maybe Natural
bytesScannedCutoffPerQuery :: Prelude.Maybe Prelude.Natural,
    -- | Indicates that the data usage control limit per query is removed.
    -- WorkGroupConfiguration$BytesScannedCutoffPerQuery
    WorkGroupConfigurationUpdates -> Maybe Bool
removeBytesScannedCutoffPerQuery :: Prelude.Maybe Prelude.Bool,
    -- | If set to \"true\", the settings for the workgroup override client-side
    -- settings. If set to \"false\" client-side settings are used. For more
    -- information, see
    -- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
    WorkGroupConfigurationUpdates -> Maybe Bool
enforceWorkGroupConfiguration :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether this workgroup enables publishing metrics to Amazon
    -- CloudWatch.
    WorkGroupConfigurationUpdates -> Maybe Bool
publishCloudWatchMetricsEnabled :: Prelude.Maybe Prelude.Bool
  }
  deriving (WorkGroupConfigurationUpdates
-> WorkGroupConfigurationUpdates -> Bool
(WorkGroupConfigurationUpdates
 -> WorkGroupConfigurationUpdates -> Bool)
-> (WorkGroupConfigurationUpdates
    -> WorkGroupConfigurationUpdates -> Bool)
-> Eq WorkGroupConfigurationUpdates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkGroupConfigurationUpdates
-> WorkGroupConfigurationUpdates -> Bool
$c/= :: WorkGroupConfigurationUpdates
-> WorkGroupConfigurationUpdates -> Bool
== :: WorkGroupConfigurationUpdates
-> WorkGroupConfigurationUpdates -> Bool
$c== :: WorkGroupConfigurationUpdates
-> WorkGroupConfigurationUpdates -> Bool
Prelude.Eq, ReadPrec [WorkGroupConfigurationUpdates]
ReadPrec WorkGroupConfigurationUpdates
Int -> ReadS WorkGroupConfigurationUpdates
ReadS [WorkGroupConfigurationUpdates]
(Int -> ReadS WorkGroupConfigurationUpdates)
-> ReadS [WorkGroupConfigurationUpdates]
-> ReadPrec WorkGroupConfigurationUpdates
-> ReadPrec [WorkGroupConfigurationUpdates]
-> Read WorkGroupConfigurationUpdates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkGroupConfigurationUpdates]
$creadListPrec :: ReadPrec [WorkGroupConfigurationUpdates]
readPrec :: ReadPrec WorkGroupConfigurationUpdates
$creadPrec :: ReadPrec WorkGroupConfigurationUpdates
readList :: ReadS [WorkGroupConfigurationUpdates]
$creadList :: ReadS [WorkGroupConfigurationUpdates]
readsPrec :: Int -> ReadS WorkGroupConfigurationUpdates
$creadsPrec :: Int -> ReadS WorkGroupConfigurationUpdates
Prelude.Read, Int -> WorkGroupConfigurationUpdates -> ShowS
[WorkGroupConfigurationUpdates] -> ShowS
WorkGroupConfigurationUpdates -> String
(Int -> WorkGroupConfigurationUpdates -> ShowS)
-> (WorkGroupConfigurationUpdates -> String)
-> ([WorkGroupConfigurationUpdates] -> ShowS)
-> Show WorkGroupConfigurationUpdates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkGroupConfigurationUpdates] -> ShowS
$cshowList :: [WorkGroupConfigurationUpdates] -> ShowS
show :: WorkGroupConfigurationUpdates -> String
$cshow :: WorkGroupConfigurationUpdates -> String
showsPrec :: Int -> WorkGroupConfigurationUpdates -> ShowS
$cshowsPrec :: Int -> WorkGroupConfigurationUpdates -> ShowS
Prelude.Show, (forall x.
 WorkGroupConfigurationUpdates
 -> Rep WorkGroupConfigurationUpdates x)
-> (forall x.
    Rep WorkGroupConfigurationUpdates x
    -> WorkGroupConfigurationUpdates)
-> Generic WorkGroupConfigurationUpdates
forall x.
Rep WorkGroupConfigurationUpdates x
-> WorkGroupConfigurationUpdates
forall x.
WorkGroupConfigurationUpdates
-> Rep WorkGroupConfigurationUpdates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkGroupConfigurationUpdates x
-> WorkGroupConfigurationUpdates
$cfrom :: forall x.
WorkGroupConfigurationUpdates
-> Rep WorkGroupConfigurationUpdates x
Prelude.Generic)

-- |
-- Create a value of 'WorkGroupConfigurationUpdates' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'engineVersion', 'workGroupConfigurationUpdates_engineVersion' - The engine version requested when a workgroup is updated. After the
-- update, all queries on the workgroup run on the requested engine
-- version. If no value was previously set, the default is Auto. Queries on
-- the @AmazonAthenaPreviewFunctionality@ workgroup run on the preview
-- engine regardless of this setting.
--
-- 'requesterPaysEnabled', 'workGroupConfigurationUpdates_requesterPaysEnabled' - If set to @true@, allows members assigned to a workgroup to specify
-- Amazon S3 Requester Pays buckets in queries. If set to @false@,
-- workgroup members cannot query data from Requester Pays buckets, and
-- queries that retrieve data from Requester Pays buckets cause an error.
-- The default is @false@. For more information about Requester Pays
-- buckets, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html Requester Pays Buckets>
-- in the /Amazon Simple Storage Service Developer Guide/.
--
-- 'resultConfigurationUpdates', 'workGroupConfigurationUpdates_resultConfigurationUpdates' - The result configuration information about the queries in this workgroup
-- that will be updated. Includes the updated results location and an
-- updated option for encrypting query results.
--
-- 'bytesScannedCutoffPerQuery', 'workGroupConfigurationUpdates_bytesScannedCutoffPerQuery' - The upper limit (cutoff) for the amount of bytes a single query in a
-- workgroup is allowed to scan.
--
-- 'removeBytesScannedCutoffPerQuery', 'workGroupConfigurationUpdates_removeBytesScannedCutoffPerQuery' - Indicates that the data usage control limit per query is removed.
-- WorkGroupConfiguration$BytesScannedCutoffPerQuery
--
-- 'enforceWorkGroupConfiguration', 'workGroupConfigurationUpdates_enforceWorkGroupConfiguration' - If set to \"true\", the settings for the workgroup override client-side
-- settings. If set to \"false\" client-side settings are used. For more
-- information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
--
-- 'publishCloudWatchMetricsEnabled', 'workGroupConfigurationUpdates_publishCloudWatchMetricsEnabled' - Indicates whether this workgroup enables publishing metrics to Amazon
-- CloudWatch.
newWorkGroupConfigurationUpdates ::
  WorkGroupConfigurationUpdates
newWorkGroupConfigurationUpdates :: WorkGroupConfigurationUpdates
newWorkGroupConfigurationUpdates =
  WorkGroupConfigurationUpdates' :: Maybe EngineVersion
-> Maybe Bool
-> Maybe ResultConfigurationUpdates
-> Maybe Natural
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> WorkGroupConfigurationUpdates
WorkGroupConfigurationUpdates'
    { $sel:engineVersion:WorkGroupConfigurationUpdates' :: Maybe EngineVersion
engineVersion =
        Maybe EngineVersion
forall a. Maybe a
Prelude.Nothing,
      $sel:requesterPaysEnabled:WorkGroupConfigurationUpdates' :: Maybe Bool
requesterPaysEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:resultConfigurationUpdates:WorkGroupConfigurationUpdates' :: Maybe ResultConfigurationUpdates
resultConfigurationUpdates = Maybe ResultConfigurationUpdates
forall a. Maybe a
Prelude.Nothing,
      $sel:bytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: Maybe Natural
bytesScannedCutoffPerQuery = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:removeBytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: Maybe Bool
removeBytesScannedCutoffPerQuery =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:enforceWorkGroupConfiguration:WorkGroupConfigurationUpdates' :: Maybe Bool
enforceWorkGroupConfiguration =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:publishCloudWatchMetricsEnabled:WorkGroupConfigurationUpdates' :: Maybe Bool
publishCloudWatchMetricsEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The engine version requested when a workgroup is updated. After the
-- update, all queries on the workgroup run on the requested engine
-- version. If no value was previously set, the default is Auto. Queries on
-- the @AmazonAthenaPreviewFunctionality@ workgroup run on the preview
-- engine regardless of this setting.
workGroupConfigurationUpdates_engineVersion :: Lens.Lens' WorkGroupConfigurationUpdates (Prelude.Maybe EngineVersion)
workGroupConfigurationUpdates_engineVersion :: (Maybe EngineVersion -> f (Maybe EngineVersion))
-> WorkGroupConfigurationUpdates -> f WorkGroupConfigurationUpdates
workGroupConfigurationUpdates_engineVersion = (WorkGroupConfigurationUpdates -> Maybe EngineVersion)
-> (WorkGroupConfigurationUpdates
    -> Maybe EngineVersion -> WorkGroupConfigurationUpdates)
-> Lens
     WorkGroupConfigurationUpdates
     WorkGroupConfigurationUpdates
     (Maybe EngineVersion)
     (Maybe EngineVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkGroupConfigurationUpdates' {Maybe EngineVersion
engineVersion :: Maybe EngineVersion
$sel:engineVersion:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe EngineVersion
engineVersion} -> Maybe EngineVersion
engineVersion) (\s :: WorkGroupConfigurationUpdates
s@WorkGroupConfigurationUpdates' {} Maybe EngineVersion
a -> WorkGroupConfigurationUpdates
s {$sel:engineVersion:WorkGroupConfigurationUpdates' :: Maybe EngineVersion
engineVersion = Maybe EngineVersion
a} :: WorkGroupConfigurationUpdates)

-- | If set to @true@, allows members assigned to a workgroup to specify
-- Amazon S3 Requester Pays buckets in queries. If set to @false@,
-- workgroup members cannot query data from Requester Pays buckets, and
-- queries that retrieve data from Requester Pays buckets cause an error.
-- The default is @false@. For more information about Requester Pays
-- buckets, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html Requester Pays Buckets>
-- in the /Amazon Simple Storage Service Developer Guide/.
workGroupConfigurationUpdates_requesterPaysEnabled :: Lens.Lens' WorkGroupConfigurationUpdates (Prelude.Maybe Prelude.Bool)
workGroupConfigurationUpdates_requesterPaysEnabled :: (Maybe Bool -> f (Maybe Bool))
-> WorkGroupConfigurationUpdates -> f WorkGroupConfigurationUpdates
workGroupConfigurationUpdates_requesterPaysEnabled = (WorkGroupConfigurationUpdates -> Maybe Bool)
-> (WorkGroupConfigurationUpdates
    -> Maybe Bool -> WorkGroupConfigurationUpdates)
-> Lens
     WorkGroupConfigurationUpdates
     WorkGroupConfigurationUpdates
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkGroupConfigurationUpdates' {Maybe Bool
requesterPaysEnabled :: Maybe Bool
$sel:requesterPaysEnabled:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
requesterPaysEnabled} -> Maybe Bool
requesterPaysEnabled) (\s :: WorkGroupConfigurationUpdates
s@WorkGroupConfigurationUpdates' {} Maybe Bool
a -> WorkGroupConfigurationUpdates
s {$sel:requesterPaysEnabled:WorkGroupConfigurationUpdates' :: Maybe Bool
requesterPaysEnabled = Maybe Bool
a} :: WorkGroupConfigurationUpdates)

-- | The result configuration information about the queries in this workgroup
-- that will be updated. Includes the updated results location and an
-- updated option for encrypting query results.
workGroupConfigurationUpdates_resultConfigurationUpdates :: Lens.Lens' WorkGroupConfigurationUpdates (Prelude.Maybe ResultConfigurationUpdates)
workGroupConfigurationUpdates_resultConfigurationUpdates :: (Maybe ResultConfigurationUpdates
 -> f (Maybe ResultConfigurationUpdates))
-> WorkGroupConfigurationUpdates -> f WorkGroupConfigurationUpdates
workGroupConfigurationUpdates_resultConfigurationUpdates = (WorkGroupConfigurationUpdates -> Maybe ResultConfigurationUpdates)
-> (WorkGroupConfigurationUpdates
    -> Maybe ResultConfigurationUpdates
    -> WorkGroupConfigurationUpdates)
-> Lens
     WorkGroupConfigurationUpdates
     WorkGroupConfigurationUpdates
     (Maybe ResultConfigurationUpdates)
     (Maybe ResultConfigurationUpdates)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkGroupConfigurationUpdates' {Maybe ResultConfigurationUpdates
resultConfigurationUpdates :: Maybe ResultConfigurationUpdates
$sel:resultConfigurationUpdates:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe ResultConfigurationUpdates
resultConfigurationUpdates} -> Maybe ResultConfigurationUpdates
resultConfigurationUpdates) (\s :: WorkGroupConfigurationUpdates
s@WorkGroupConfigurationUpdates' {} Maybe ResultConfigurationUpdates
a -> WorkGroupConfigurationUpdates
s {$sel:resultConfigurationUpdates:WorkGroupConfigurationUpdates' :: Maybe ResultConfigurationUpdates
resultConfigurationUpdates = Maybe ResultConfigurationUpdates
a} :: WorkGroupConfigurationUpdates)

-- | The upper limit (cutoff) for the amount of bytes a single query in a
-- workgroup is allowed to scan.
workGroupConfigurationUpdates_bytesScannedCutoffPerQuery :: Lens.Lens' WorkGroupConfigurationUpdates (Prelude.Maybe Prelude.Natural)
workGroupConfigurationUpdates_bytesScannedCutoffPerQuery :: (Maybe Natural -> f (Maybe Natural))
-> WorkGroupConfigurationUpdates -> f WorkGroupConfigurationUpdates
workGroupConfigurationUpdates_bytesScannedCutoffPerQuery = (WorkGroupConfigurationUpdates -> Maybe Natural)
-> (WorkGroupConfigurationUpdates
    -> Maybe Natural -> WorkGroupConfigurationUpdates)
-> Lens
     WorkGroupConfigurationUpdates
     WorkGroupConfigurationUpdates
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkGroupConfigurationUpdates' {Maybe Natural
bytesScannedCutoffPerQuery :: Maybe Natural
$sel:bytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Natural
bytesScannedCutoffPerQuery} -> Maybe Natural
bytesScannedCutoffPerQuery) (\s :: WorkGroupConfigurationUpdates
s@WorkGroupConfigurationUpdates' {} Maybe Natural
a -> WorkGroupConfigurationUpdates
s {$sel:bytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: Maybe Natural
bytesScannedCutoffPerQuery = Maybe Natural
a} :: WorkGroupConfigurationUpdates)

-- | Indicates that the data usage control limit per query is removed.
-- WorkGroupConfiguration$BytesScannedCutoffPerQuery
workGroupConfigurationUpdates_removeBytesScannedCutoffPerQuery :: Lens.Lens' WorkGroupConfigurationUpdates (Prelude.Maybe Prelude.Bool)
workGroupConfigurationUpdates_removeBytesScannedCutoffPerQuery :: (Maybe Bool -> f (Maybe Bool))
-> WorkGroupConfigurationUpdates -> f WorkGroupConfigurationUpdates
workGroupConfigurationUpdates_removeBytesScannedCutoffPerQuery = (WorkGroupConfigurationUpdates -> Maybe Bool)
-> (WorkGroupConfigurationUpdates
    -> Maybe Bool -> WorkGroupConfigurationUpdates)
-> Lens
     WorkGroupConfigurationUpdates
     WorkGroupConfigurationUpdates
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkGroupConfigurationUpdates' {Maybe Bool
removeBytesScannedCutoffPerQuery :: Maybe Bool
$sel:removeBytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
removeBytesScannedCutoffPerQuery} -> Maybe Bool
removeBytesScannedCutoffPerQuery) (\s :: WorkGroupConfigurationUpdates
s@WorkGroupConfigurationUpdates' {} Maybe Bool
a -> WorkGroupConfigurationUpdates
s {$sel:removeBytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: Maybe Bool
removeBytesScannedCutoffPerQuery = Maybe Bool
a} :: WorkGroupConfigurationUpdates)

-- | If set to \"true\", the settings for the workgroup override client-side
-- settings. If set to \"false\" client-side settings are used. For more
-- information, see
-- <https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html Workgroup Settings Override Client-Side Settings>.
workGroupConfigurationUpdates_enforceWorkGroupConfiguration :: Lens.Lens' WorkGroupConfigurationUpdates (Prelude.Maybe Prelude.Bool)
workGroupConfigurationUpdates_enforceWorkGroupConfiguration :: (Maybe Bool -> f (Maybe Bool))
-> WorkGroupConfigurationUpdates -> f WorkGroupConfigurationUpdates
workGroupConfigurationUpdates_enforceWorkGroupConfiguration = (WorkGroupConfigurationUpdates -> Maybe Bool)
-> (WorkGroupConfigurationUpdates
    -> Maybe Bool -> WorkGroupConfigurationUpdates)
-> Lens
     WorkGroupConfigurationUpdates
     WorkGroupConfigurationUpdates
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkGroupConfigurationUpdates' {Maybe Bool
enforceWorkGroupConfiguration :: Maybe Bool
$sel:enforceWorkGroupConfiguration:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
enforceWorkGroupConfiguration} -> Maybe Bool
enforceWorkGroupConfiguration) (\s :: WorkGroupConfigurationUpdates
s@WorkGroupConfigurationUpdates' {} Maybe Bool
a -> WorkGroupConfigurationUpdates
s {$sel:enforceWorkGroupConfiguration:WorkGroupConfigurationUpdates' :: Maybe Bool
enforceWorkGroupConfiguration = Maybe Bool
a} :: WorkGroupConfigurationUpdates)

-- | Indicates whether this workgroup enables publishing metrics to Amazon
-- CloudWatch.
workGroupConfigurationUpdates_publishCloudWatchMetricsEnabled :: Lens.Lens' WorkGroupConfigurationUpdates (Prelude.Maybe Prelude.Bool)
workGroupConfigurationUpdates_publishCloudWatchMetricsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> WorkGroupConfigurationUpdates -> f WorkGroupConfigurationUpdates
workGroupConfigurationUpdates_publishCloudWatchMetricsEnabled = (WorkGroupConfigurationUpdates -> Maybe Bool)
-> (WorkGroupConfigurationUpdates
    -> Maybe Bool -> WorkGroupConfigurationUpdates)
-> Lens
     WorkGroupConfigurationUpdates
     WorkGroupConfigurationUpdates
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkGroupConfigurationUpdates' {Maybe Bool
publishCloudWatchMetricsEnabled :: Maybe Bool
$sel:publishCloudWatchMetricsEnabled:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
publishCloudWatchMetricsEnabled} -> Maybe Bool
publishCloudWatchMetricsEnabled) (\s :: WorkGroupConfigurationUpdates
s@WorkGroupConfigurationUpdates' {} Maybe Bool
a -> WorkGroupConfigurationUpdates
s {$sel:publishCloudWatchMetricsEnabled:WorkGroupConfigurationUpdates' :: Maybe Bool
publishCloudWatchMetricsEnabled = Maybe Bool
a} :: WorkGroupConfigurationUpdates)

instance
  Prelude.Hashable
    WorkGroupConfigurationUpdates

instance Prelude.NFData WorkGroupConfigurationUpdates

instance Core.ToJSON WorkGroupConfigurationUpdates where
  toJSON :: WorkGroupConfigurationUpdates -> Value
toJSON WorkGroupConfigurationUpdates' {Maybe Bool
Maybe Natural
Maybe EngineVersion
Maybe ResultConfigurationUpdates
publishCloudWatchMetricsEnabled :: Maybe Bool
enforceWorkGroupConfiguration :: Maybe Bool
removeBytesScannedCutoffPerQuery :: Maybe Bool
bytesScannedCutoffPerQuery :: Maybe Natural
resultConfigurationUpdates :: Maybe ResultConfigurationUpdates
requesterPaysEnabled :: Maybe Bool
engineVersion :: Maybe EngineVersion
$sel:publishCloudWatchMetricsEnabled:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
$sel:enforceWorkGroupConfiguration:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
$sel:removeBytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
$sel:bytesScannedCutoffPerQuery:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Natural
$sel:resultConfigurationUpdates:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe ResultConfigurationUpdates
$sel:requesterPaysEnabled:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe Bool
$sel:engineVersion:WorkGroupConfigurationUpdates' :: WorkGroupConfigurationUpdates -> Maybe EngineVersion
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EngineVersion" Text -> EngineVersion -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EngineVersion -> Pair) -> Maybe EngineVersion -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EngineVersion
engineVersion,
            (Text
"RequesterPaysEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
requesterPaysEnabled,
            (Text
"ResultConfigurationUpdates" Text -> ResultConfigurationUpdates -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ResultConfigurationUpdates -> Pair)
-> Maybe ResultConfigurationUpdates -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResultConfigurationUpdates
resultConfigurationUpdates,
            (Text
"BytesScannedCutoffPerQuery" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
bytesScannedCutoffPerQuery,
            (Text
"RemoveBytesScannedCutoffPerQuery" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
removeBytesScannedCutoffPerQuery,
            (Text
"EnforceWorkGroupConfiguration" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enforceWorkGroupConfiguration,
            (Text
"PublishCloudWatchMetricsEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
publishCloudWatchMetricsEnabled
          ]
      )