{-# 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 #-}
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
data WorkGroupConfigurationUpdates = WorkGroupConfigurationUpdates'
{
WorkGroupConfigurationUpdates -> Maybe EngineVersion
engineVersion :: Prelude.Maybe EngineVersion,
WorkGroupConfigurationUpdates -> Maybe Bool
requesterPaysEnabled :: Prelude.Maybe Prelude.Bool,
WorkGroupConfigurationUpdates -> Maybe ResultConfigurationUpdates
resultConfigurationUpdates :: Prelude.Maybe ResultConfigurationUpdates,
WorkGroupConfigurationUpdates -> Maybe Natural
bytesScannedCutoffPerQuery :: Prelude.Maybe Prelude.Natural,
WorkGroupConfigurationUpdates -> Maybe Bool
removeBytesScannedCutoffPerQuery :: Prelude.Maybe Prelude.Bool,
WorkGroupConfigurationUpdates -> Maybe Bool
enforceWorkGroupConfiguration :: Prelude.Maybe Prelude.Bool,
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)
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
}
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)
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)
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)
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)
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)
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)
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
]
)