{-# 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.ResultReuseConfiguration where
import Amazonka.Athena.Types.ResultReuseByAgeConfiguration
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ResultReuseConfiguration = ResultReuseConfiguration'
{
ResultReuseConfiguration -> Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration :: Prelude.Maybe ResultReuseByAgeConfiguration
}
deriving (ResultReuseConfiguration -> ResultReuseConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResultReuseConfiguration -> ResultReuseConfiguration -> Bool
$c/= :: ResultReuseConfiguration -> ResultReuseConfiguration -> Bool
== :: ResultReuseConfiguration -> ResultReuseConfiguration -> Bool
$c== :: ResultReuseConfiguration -> ResultReuseConfiguration -> Bool
Prelude.Eq, ReadPrec [ResultReuseConfiguration]
ReadPrec ResultReuseConfiguration
Int -> ReadS ResultReuseConfiguration
ReadS [ResultReuseConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResultReuseConfiguration]
$creadListPrec :: ReadPrec [ResultReuseConfiguration]
readPrec :: ReadPrec ResultReuseConfiguration
$creadPrec :: ReadPrec ResultReuseConfiguration
readList :: ReadS [ResultReuseConfiguration]
$creadList :: ReadS [ResultReuseConfiguration]
readsPrec :: Int -> ReadS ResultReuseConfiguration
$creadsPrec :: Int -> ReadS ResultReuseConfiguration
Prelude.Read, Int -> ResultReuseConfiguration -> ShowS
[ResultReuseConfiguration] -> ShowS
ResultReuseConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResultReuseConfiguration] -> ShowS
$cshowList :: [ResultReuseConfiguration] -> ShowS
show :: ResultReuseConfiguration -> String
$cshow :: ResultReuseConfiguration -> String
showsPrec :: Int -> ResultReuseConfiguration -> ShowS
$cshowsPrec :: Int -> ResultReuseConfiguration -> ShowS
Prelude.Show, forall x.
Rep ResultReuseConfiguration x -> ResultReuseConfiguration
forall x.
ResultReuseConfiguration -> Rep ResultReuseConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResultReuseConfiguration x -> ResultReuseConfiguration
$cfrom :: forall x.
ResultReuseConfiguration -> Rep ResultReuseConfiguration x
Prelude.Generic)
newResultReuseConfiguration ::
ResultReuseConfiguration
newResultReuseConfiguration :: ResultReuseConfiguration
newResultReuseConfiguration =
ResultReuseConfiguration'
{ $sel:resultReuseByAgeConfiguration:ResultReuseConfiguration' :: Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration =
forall a. Maybe a
Prelude.Nothing
}
resultReuseConfiguration_resultReuseByAgeConfiguration :: Lens.Lens' ResultReuseConfiguration (Prelude.Maybe ResultReuseByAgeConfiguration)
resultReuseConfiguration_resultReuseByAgeConfiguration :: Lens'
ResultReuseConfiguration (Maybe ResultReuseByAgeConfiguration)
resultReuseConfiguration_resultReuseByAgeConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultReuseConfiguration' {Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration :: Maybe ResultReuseByAgeConfiguration
$sel:resultReuseByAgeConfiguration:ResultReuseConfiguration' :: ResultReuseConfiguration -> Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration} -> Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration) (\s :: ResultReuseConfiguration
s@ResultReuseConfiguration' {} Maybe ResultReuseByAgeConfiguration
a -> ResultReuseConfiguration
s {$sel:resultReuseByAgeConfiguration:ResultReuseConfiguration' :: Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration = Maybe ResultReuseByAgeConfiguration
a} :: ResultReuseConfiguration)
instance Data.FromJSON ResultReuseConfiguration where
parseJSON :: Value -> Parser ResultReuseConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ResultReuseConfiguration"
( \Object
x ->
Maybe ResultReuseByAgeConfiguration -> ResultReuseConfiguration
ResultReuseConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResultReuseByAgeConfiguration")
)
instance Prelude.Hashable ResultReuseConfiguration where
hashWithSalt :: Int -> ResultReuseConfiguration -> Int
hashWithSalt Int
_salt ResultReuseConfiguration' {Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration :: Maybe ResultReuseByAgeConfiguration
$sel:resultReuseByAgeConfiguration:ResultReuseConfiguration' :: ResultReuseConfiguration -> Maybe ResultReuseByAgeConfiguration
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration
instance Prelude.NFData ResultReuseConfiguration where
rnf :: ResultReuseConfiguration -> ()
rnf ResultReuseConfiguration' {Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration :: Maybe ResultReuseByAgeConfiguration
$sel:resultReuseByAgeConfiguration:ResultReuseConfiguration' :: ResultReuseConfiguration -> Maybe ResultReuseByAgeConfiguration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration
instance Data.ToJSON ResultReuseConfiguration where
toJSON :: ResultReuseConfiguration -> Value
toJSON ResultReuseConfiguration' {Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration :: Maybe ResultReuseByAgeConfiguration
$sel:resultReuseByAgeConfiguration:ResultReuseConfiguration' :: ResultReuseConfiguration -> Maybe ResultReuseByAgeConfiguration
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ResultReuseByAgeConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResultReuseByAgeConfiguration
resultReuseByAgeConfiguration
]
)