{-# 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.KinesisAnalyticsV2.Types.ApplicationSnapshotConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationSnapshotConfiguration = ApplicationSnapshotConfiguration'
{
ApplicationSnapshotConfiguration -> Bool
snapshotsEnabled :: Prelude.Bool
}
deriving (ApplicationSnapshotConfiguration
-> ApplicationSnapshotConfiguration -> Bool
(ApplicationSnapshotConfiguration
-> ApplicationSnapshotConfiguration -> Bool)
-> (ApplicationSnapshotConfiguration
-> ApplicationSnapshotConfiguration -> Bool)
-> Eq ApplicationSnapshotConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationSnapshotConfiguration
-> ApplicationSnapshotConfiguration -> Bool
$c/= :: ApplicationSnapshotConfiguration
-> ApplicationSnapshotConfiguration -> Bool
== :: ApplicationSnapshotConfiguration
-> ApplicationSnapshotConfiguration -> Bool
$c== :: ApplicationSnapshotConfiguration
-> ApplicationSnapshotConfiguration -> Bool
Prelude.Eq, ReadPrec [ApplicationSnapshotConfiguration]
ReadPrec ApplicationSnapshotConfiguration
Int -> ReadS ApplicationSnapshotConfiguration
ReadS [ApplicationSnapshotConfiguration]
(Int -> ReadS ApplicationSnapshotConfiguration)
-> ReadS [ApplicationSnapshotConfiguration]
-> ReadPrec ApplicationSnapshotConfiguration
-> ReadPrec [ApplicationSnapshotConfiguration]
-> Read ApplicationSnapshotConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationSnapshotConfiguration]
$creadListPrec :: ReadPrec [ApplicationSnapshotConfiguration]
readPrec :: ReadPrec ApplicationSnapshotConfiguration
$creadPrec :: ReadPrec ApplicationSnapshotConfiguration
readList :: ReadS [ApplicationSnapshotConfiguration]
$creadList :: ReadS [ApplicationSnapshotConfiguration]
readsPrec :: Int -> ReadS ApplicationSnapshotConfiguration
$creadsPrec :: Int -> ReadS ApplicationSnapshotConfiguration
Prelude.Read, Int -> ApplicationSnapshotConfiguration -> ShowS
[ApplicationSnapshotConfiguration] -> ShowS
ApplicationSnapshotConfiguration -> String
(Int -> ApplicationSnapshotConfiguration -> ShowS)
-> (ApplicationSnapshotConfiguration -> String)
-> ([ApplicationSnapshotConfiguration] -> ShowS)
-> Show ApplicationSnapshotConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationSnapshotConfiguration] -> ShowS
$cshowList :: [ApplicationSnapshotConfiguration] -> ShowS
show :: ApplicationSnapshotConfiguration -> String
$cshow :: ApplicationSnapshotConfiguration -> String
showsPrec :: Int -> ApplicationSnapshotConfiguration -> ShowS
$cshowsPrec :: Int -> ApplicationSnapshotConfiguration -> ShowS
Prelude.Show, (forall x.
ApplicationSnapshotConfiguration
-> Rep ApplicationSnapshotConfiguration x)
-> (forall x.
Rep ApplicationSnapshotConfiguration x
-> ApplicationSnapshotConfiguration)
-> Generic ApplicationSnapshotConfiguration
forall x.
Rep ApplicationSnapshotConfiguration x
-> ApplicationSnapshotConfiguration
forall x.
ApplicationSnapshotConfiguration
-> Rep ApplicationSnapshotConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationSnapshotConfiguration x
-> ApplicationSnapshotConfiguration
$cfrom :: forall x.
ApplicationSnapshotConfiguration
-> Rep ApplicationSnapshotConfiguration x
Prelude.Generic)
newApplicationSnapshotConfiguration ::
Prelude.Bool ->
ApplicationSnapshotConfiguration
newApplicationSnapshotConfiguration :: Bool -> ApplicationSnapshotConfiguration
newApplicationSnapshotConfiguration
Bool
pSnapshotsEnabled_ =
ApplicationSnapshotConfiguration' :: Bool -> ApplicationSnapshotConfiguration
ApplicationSnapshotConfiguration'
{ $sel:snapshotsEnabled:ApplicationSnapshotConfiguration' :: Bool
snapshotsEnabled =
Bool
pSnapshotsEnabled_
}
applicationSnapshotConfiguration_snapshotsEnabled :: Lens.Lens' ApplicationSnapshotConfiguration Prelude.Bool
applicationSnapshotConfiguration_snapshotsEnabled :: (Bool -> f Bool)
-> ApplicationSnapshotConfiguration
-> f ApplicationSnapshotConfiguration
applicationSnapshotConfiguration_snapshotsEnabled = (ApplicationSnapshotConfiguration -> Bool)
-> (ApplicationSnapshotConfiguration
-> Bool -> ApplicationSnapshotConfiguration)
-> Lens
ApplicationSnapshotConfiguration
ApplicationSnapshotConfiguration
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSnapshotConfiguration' {Bool
snapshotsEnabled :: Bool
$sel:snapshotsEnabled:ApplicationSnapshotConfiguration' :: ApplicationSnapshotConfiguration -> Bool
snapshotsEnabled} -> Bool
snapshotsEnabled) (\s :: ApplicationSnapshotConfiguration
s@ApplicationSnapshotConfiguration' {} Bool
a -> ApplicationSnapshotConfiguration
s {$sel:snapshotsEnabled:ApplicationSnapshotConfiguration' :: Bool
snapshotsEnabled = Bool
a} :: ApplicationSnapshotConfiguration)
instance
Prelude.Hashable
ApplicationSnapshotConfiguration
instance
Prelude.NFData
ApplicationSnapshotConfiguration
instance Core.ToJSON ApplicationSnapshotConfiguration where
toJSON :: ApplicationSnapshotConfiguration -> Value
toJSON ApplicationSnapshotConfiguration' {Bool
snapshotsEnabled :: Bool
$sel:snapshotsEnabled:ApplicationSnapshotConfiguration' :: ApplicationSnapshotConfiguration -> Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SnapshotsEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
snapshotsEnabled)
]
)