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