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