{-# 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.ResultConfigurationUpdates where
import Amazonka.Athena.Types.EncryptionConfiguration
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResultConfigurationUpdates = ResultConfigurationUpdates'
{
ResultConfigurationUpdates -> Maybe Bool
removeOutputLocation :: Prelude.Maybe Prelude.Bool,
ResultConfigurationUpdates -> Maybe Bool
removeEncryptionConfiguration :: Prelude.Maybe Prelude.Bool,
ResultConfigurationUpdates -> Maybe EncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe EncryptionConfiguration,
ResultConfigurationUpdates -> Maybe Text
outputLocation :: Prelude.Maybe Prelude.Text
}
deriving (ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
(ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool)
-> (ResultConfigurationUpdates
-> ResultConfigurationUpdates -> Bool)
-> Eq ResultConfigurationUpdates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
$c/= :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
== :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
$c== :: ResultConfigurationUpdates -> ResultConfigurationUpdates -> Bool
Prelude.Eq, ReadPrec [ResultConfigurationUpdates]
ReadPrec ResultConfigurationUpdates
Int -> ReadS ResultConfigurationUpdates
ReadS [ResultConfigurationUpdates]
(Int -> ReadS ResultConfigurationUpdates)
-> ReadS [ResultConfigurationUpdates]
-> ReadPrec ResultConfigurationUpdates
-> ReadPrec [ResultConfigurationUpdates]
-> Read ResultConfigurationUpdates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResultConfigurationUpdates]
$creadListPrec :: ReadPrec [ResultConfigurationUpdates]
readPrec :: ReadPrec ResultConfigurationUpdates
$creadPrec :: ReadPrec ResultConfigurationUpdates
readList :: ReadS [ResultConfigurationUpdates]
$creadList :: ReadS [ResultConfigurationUpdates]
readsPrec :: Int -> ReadS ResultConfigurationUpdates
$creadsPrec :: Int -> ReadS ResultConfigurationUpdates
Prelude.Read, Int -> ResultConfigurationUpdates -> ShowS
[ResultConfigurationUpdates] -> ShowS
ResultConfigurationUpdates -> String
(Int -> ResultConfigurationUpdates -> ShowS)
-> (ResultConfigurationUpdates -> String)
-> ([ResultConfigurationUpdates] -> ShowS)
-> Show ResultConfigurationUpdates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResultConfigurationUpdates] -> ShowS
$cshowList :: [ResultConfigurationUpdates] -> ShowS
show :: ResultConfigurationUpdates -> String
$cshow :: ResultConfigurationUpdates -> String
showsPrec :: Int -> ResultConfigurationUpdates -> ShowS
$cshowsPrec :: Int -> ResultConfigurationUpdates -> ShowS
Prelude.Show, (forall x.
ResultConfigurationUpdates -> Rep ResultConfigurationUpdates x)
-> (forall x.
Rep ResultConfigurationUpdates x -> ResultConfigurationUpdates)
-> Generic ResultConfigurationUpdates
forall x.
Rep ResultConfigurationUpdates x -> ResultConfigurationUpdates
forall x.
ResultConfigurationUpdates -> Rep ResultConfigurationUpdates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResultConfigurationUpdates x -> ResultConfigurationUpdates
$cfrom :: forall x.
ResultConfigurationUpdates -> Rep ResultConfigurationUpdates x
Prelude.Generic)
newResultConfigurationUpdates ::
ResultConfigurationUpdates
newResultConfigurationUpdates :: ResultConfigurationUpdates
newResultConfigurationUpdates =
ResultConfigurationUpdates' :: Maybe Bool
-> Maybe Bool
-> Maybe EncryptionConfiguration
-> Maybe Text
-> ResultConfigurationUpdates
ResultConfigurationUpdates'
{ $sel:removeOutputLocation:ResultConfigurationUpdates' :: Maybe Bool
removeOutputLocation =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: Maybe Bool
removeEncryptionConfiguration = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionConfiguration:ResultConfigurationUpdates' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:outputLocation:ResultConfigurationUpdates' :: Maybe Text
outputLocation = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
resultConfigurationUpdates_removeOutputLocation :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Bool)
resultConfigurationUpdates_removeOutputLocation :: (Maybe Bool -> f (Maybe Bool))
-> ResultConfigurationUpdates -> f ResultConfigurationUpdates
resultConfigurationUpdates_removeOutputLocation = (ResultConfigurationUpdates -> Maybe Bool)
-> (ResultConfigurationUpdates
-> Maybe Bool -> ResultConfigurationUpdates)
-> Lens
ResultConfigurationUpdates
ResultConfigurationUpdates
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Bool
removeOutputLocation :: Maybe Bool
$sel:removeOutputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
removeOutputLocation} -> Maybe Bool
removeOutputLocation) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Bool
a -> ResultConfigurationUpdates
s {$sel:removeOutputLocation:ResultConfigurationUpdates' :: Maybe Bool
removeOutputLocation = Maybe Bool
a} :: ResultConfigurationUpdates)
resultConfigurationUpdates_removeEncryptionConfiguration :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Bool)
resultConfigurationUpdates_removeEncryptionConfiguration :: (Maybe Bool -> f (Maybe Bool))
-> ResultConfigurationUpdates -> f ResultConfigurationUpdates
resultConfigurationUpdates_removeEncryptionConfiguration = (ResultConfigurationUpdates -> Maybe Bool)
-> (ResultConfigurationUpdates
-> Maybe Bool -> ResultConfigurationUpdates)
-> Lens
ResultConfigurationUpdates
ResultConfigurationUpdates
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Bool
removeEncryptionConfiguration :: Maybe Bool
$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
removeEncryptionConfiguration} -> Maybe Bool
removeEncryptionConfiguration) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Bool
a -> ResultConfigurationUpdates
s {$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: Maybe Bool
removeEncryptionConfiguration = Maybe Bool
a} :: ResultConfigurationUpdates)
resultConfigurationUpdates_encryptionConfiguration :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe EncryptionConfiguration)
resultConfigurationUpdates_encryptionConfiguration :: (Maybe EncryptionConfiguration
-> f (Maybe EncryptionConfiguration))
-> ResultConfigurationUpdates -> f ResultConfigurationUpdates
resultConfigurationUpdates_encryptionConfiguration = (ResultConfigurationUpdates -> Maybe EncryptionConfiguration)
-> (ResultConfigurationUpdates
-> Maybe EncryptionConfiguration -> ResultConfigurationUpdates)
-> Lens
ResultConfigurationUpdates
ResultConfigurationUpdates
(Maybe EncryptionConfiguration)
(Maybe EncryptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe EncryptionConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
$sel:encryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe EncryptionConfiguration
encryptionConfiguration} -> Maybe EncryptionConfiguration
encryptionConfiguration) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe EncryptionConfiguration
a -> ResultConfigurationUpdates
s {$sel:encryptionConfiguration:ResultConfigurationUpdates' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
a} :: ResultConfigurationUpdates)
resultConfigurationUpdates_outputLocation :: Lens.Lens' ResultConfigurationUpdates (Prelude.Maybe Prelude.Text)
resultConfigurationUpdates_outputLocation :: (Maybe Text -> f (Maybe Text))
-> ResultConfigurationUpdates -> f ResultConfigurationUpdates
resultConfigurationUpdates_outputLocation = (ResultConfigurationUpdates -> Maybe Text)
-> (ResultConfigurationUpdates
-> Maybe Text -> ResultConfigurationUpdates)
-> Lens
ResultConfigurationUpdates
ResultConfigurationUpdates
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultConfigurationUpdates' {Maybe Text
outputLocation :: Maybe Text
$sel:outputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
outputLocation} -> Maybe Text
outputLocation) (\s :: ResultConfigurationUpdates
s@ResultConfigurationUpdates' {} Maybe Text
a -> ResultConfigurationUpdates
s {$sel:outputLocation:ResultConfigurationUpdates' :: Maybe Text
outputLocation = Maybe Text
a} :: ResultConfigurationUpdates)
instance Prelude.Hashable ResultConfigurationUpdates
instance Prelude.NFData ResultConfigurationUpdates
instance Core.ToJSON ResultConfigurationUpdates where
toJSON :: ResultConfigurationUpdates -> Value
toJSON ResultConfigurationUpdates' {Maybe Bool
Maybe Text
Maybe EncryptionConfiguration
outputLocation :: Maybe Text
encryptionConfiguration :: Maybe EncryptionConfiguration
removeEncryptionConfiguration :: Maybe Bool
removeOutputLocation :: Maybe Bool
$sel:outputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Text
$sel:encryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe EncryptionConfiguration
$sel:removeEncryptionConfiguration:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
$sel:removeOutputLocation:ResultConfigurationUpdates' :: ResultConfigurationUpdates -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RemoveOutputLocation" 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
removeOutputLocation,
(Text
"RemoveEncryptionConfiguration" 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
removeEncryptionConfiguration,
(Text
"EncryptionConfiguration" Text -> EncryptionConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EncryptionConfiguration -> Pair)
-> Maybe EncryptionConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionConfiguration
encryptionConfiguration,
(Text
"OutputLocation" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
outputLocation
]
)