{-# 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.Firehose.Types.AmazonopensearchserviceBufferingHints where
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 AmazonopensearchserviceBufferingHints = AmazonopensearchserviceBufferingHints'
{
AmazonopensearchserviceBufferingHints -> Maybe Natural
intervalInSeconds :: Prelude.Maybe Prelude.Natural,
AmazonopensearchserviceBufferingHints -> Maybe Natural
sizeInMBs :: Prelude.Maybe Prelude.Natural
}
deriving (AmazonopensearchserviceBufferingHints
-> AmazonopensearchserviceBufferingHints -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AmazonopensearchserviceBufferingHints
-> AmazonopensearchserviceBufferingHints -> Bool
$c/= :: AmazonopensearchserviceBufferingHints
-> AmazonopensearchserviceBufferingHints -> Bool
== :: AmazonopensearchserviceBufferingHints
-> AmazonopensearchserviceBufferingHints -> Bool
$c== :: AmazonopensearchserviceBufferingHints
-> AmazonopensearchserviceBufferingHints -> Bool
Prelude.Eq, ReadPrec [AmazonopensearchserviceBufferingHints]
ReadPrec AmazonopensearchserviceBufferingHints
Int -> ReadS AmazonopensearchserviceBufferingHints
ReadS [AmazonopensearchserviceBufferingHints]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AmazonopensearchserviceBufferingHints]
$creadListPrec :: ReadPrec [AmazonopensearchserviceBufferingHints]
readPrec :: ReadPrec AmazonopensearchserviceBufferingHints
$creadPrec :: ReadPrec AmazonopensearchserviceBufferingHints
readList :: ReadS [AmazonopensearchserviceBufferingHints]
$creadList :: ReadS [AmazonopensearchserviceBufferingHints]
readsPrec :: Int -> ReadS AmazonopensearchserviceBufferingHints
$creadsPrec :: Int -> ReadS AmazonopensearchserviceBufferingHints
Prelude.Read, Int -> AmazonopensearchserviceBufferingHints -> ShowS
[AmazonopensearchserviceBufferingHints] -> ShowS
AmazonopensearchserviceBufferingHints -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AmazonopensearchserviceBufferingHints] -> ShowS
$cshowList :: [AmazonopensearchserviceBufferingHints] -> ShowS
show :: AmazonopensearchserviceBufferingHints -> String
$cshow :: AmazonopensearchserviceBufferingHints -> String
showsPrec :: Int -> AmazonopensearchserviceBufferingHints -> ShowS
$cshowsPrec :: Int -> AmazonopensearchserviceBufferingHints -> ShowS
Prelude.Show, forall x.
Rep AmazonopensearchserviceBufferingHints x
-> AmazonopensearchserviceBufferingHints
forall x.
AmazonopensearchserviceBufferingHints
-> Rep AmazonopensearchserviceBufferingHints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AmazonopensearchserviceBufferingHints x
-> AmazonopensearchserviceBufferingHints
$cfrom :: forall x.
AmazonopensearchserviceBufferingHints
-> Rep AmazonopensearchserviceBufferingHints x
Prelude.Generic)
newAmazonopensearchserviceBufferingHints ::
AmazonopensearchserviceBufferingHints
newAmazonopensearchserviceBufferingHints :: AmazonopensearchserviceBufferingHints
newAmazonopensearchserviceBufferingHints =
AmazonopensearchserviceBufferingHints'
{ $sel:intervalInSeconds:AmazonopensearchserviceBufferingHints' :: Maybe Natural
intervalInSeconds =
forall a. Maybe a
Prelude.Nothing,
$sel:sizeInMBs:AmazonopensearchserviceBufferingHints' :: Maybe Natural
sizeInMBs = forall a. Maybe a
Prelude.Nothing
}
amazonopensearchserviceBufferingHints_intervalInSeconds :: Lens.Lens' AmazonopensearchserviceBufferingHints (Prelude.Maybe Prelude.Natural)
amazonopensearchserviceBufferingHints_intervalInSeconds :: Lens' AmazonopensearchserviceBufferingHints (Maybe Natural)
amazonopensearchserviceBufferingHints_intervalInSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceBufferingHints' {Maybe Natural
intervalInSeconds :: Maybe Natural
$sel:intervalInSeconds:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
intervalInSeconds} -> Maybe Natural
intervalInSeconds) (\s :: AmazonopensearchserviceBufferingHints
s@AmazonopensearchserviceBufferingHints' {} Maybe Natural
a -> AmazonopensearchserviceBufferingHints
s {$sel:intervalInSeconds:AmazonopensearchserviceBufferingHints' :: Maybe Natural
intervalInSeconds = Maybe Natural
a} :: AmazonopensearchserviceBufferingHints)
amazonopensearchserviceBufferingHints_sizeInMBs :: Lens.Lens' AmazonopensearchserviceBufferingHints (Prelude.Maybe Prelude.Natural)
amazonopensearchserviceBufferingHints_sizeInMBs :: Lens' AmazonopensearchserviceBufferingHints (Maybe Natural)
amazonopensearchserviceBufferingHints_sizeInMBs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AmazonopensearchserviceBufferingHints' {Maybe Natural
sizeInMBs :: Maybe Natural
$sel:sizeInMBs:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
sizeInMBs} -> Maybe Natural
sizeInMBs) (\s :: AmazonopensearchserviceBufferingHints
s@AmazonopensearchserviceBufferingHints' {} Maybe Natural
a -> AmazonopensearchserviceBufferingHints
s {$sel:sizeInMBs:AmazonopensearchserviceBufferingHints' :: Maybe Natural
sizeInMBs = Maybe Natural
a} :: AmazonopensearchserviceBufferingHints)
instance
Data.FromJSON
AmazonopensearchserviceBufferingHints
where
parseJSON :: Value -> Parser AmazonopensearchserviceBufferingHints
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AmazonopensearchserviceBufferingHints"
( \Object
x ->
Maybe Natural
-> Maybe Natural -> AmazonopensearchserviceBufferingHints
AmazonopensearchserviceBufferingHints'
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
"IntervalInSeconds")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SizeInMBs")
)
instance
Prelude.Hashable
AmazonopensearchserviceBufferingHints
where
hashWithSalt :: Int -> AmazonopensearchserviceBufferingHints -> Int
hashWithSalt
Int
_salt
AmazonopensearchserviceBufferingHints' {Maybe Natural
sizeInMBs :: Maybe Natural
intervalInSeconds :: Maybe Natural
$sel:sizeInMBs:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
$sel:intervalInSeconds:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
intervalInSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
sizeInMBs
instance
Prelude.NFData
AmazonopensearchserviceBufferingHints
where
rnf :: AmazonopensearchserviceBufferingHints -> ()
rnf AmazonopensearchserviceBufferingHints' {Maybe Natural
sizeInMBs :: Maybe Natural
intervalInSeconds :: Maybe Natural
$sel:sizeInMBs:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
$sel:intervalInSeconds:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
intervalInSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
sizeInMBs
instance
Data.ToJSON
AmazonopensearchserviceBufferingHints
where
toJSON :: AmazonopensearchserviceBufferingHints -> Value
toJSON AmazonopensearchserviceBufferingHints' {Maybe Natural
sizeInMBs :: Maybe Natural
intervalInSeconds :: Maybe Natural
$sel:sizeInMBs:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
$sel:intervalInSeconds:AmazonopensearchserviceBufferingHints' :: AmazonopensearchserviceBufferingHints -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"IntervalInSeconds" 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 Natural
intervalInSeconds,
(Key
"SizeInMBs" 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 Natural
sizeInMBs
]
)