{-# 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.EFS.Types.FileSystemSize where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FileSystemSize = FileSystemSize'
{
FileSystemSize -> Maybe Natural
valueInIA :: Prelude.Maybe Prelude.Natural,
FileSystemSize -> Maybe Natural
valueInStandard :: Prelude.Maybe Prelude.Natural,
FileSystemSize -> Maybe POSIX
timestamp :: Prelude.Maybe Core.POSIX,
FileSystemSize -> Natural
value :: Prelude.Natural
}
deriving (FileSystemSize -> FileSystemSize -> Bool
(FileSystemSize -> FileSystemSize -> Bool)
-> (FileSystemSize -> FileSystemSize -> Bool) -> Eq FileSystemSize
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileSystemSize -> FileSystemSize -> Bool
$c/= :: FileSystemSize -> FileSystemSize -> Bool
== :: FileSystemSize -> FileSystemSize -> Bool
$c== :: FileSystemSize -> FileSystemSize -> Bool
Prelude.Eq, ReadPrec [FileSystemSize]
ReadPrec FileSystemSize
Int -> ReadS FileSystemSize
ReadS [FileSystemSize]
(Int -> ReadS FileSystemSize)
-> ReadS [FileSystemSize]
-> ReadPrec FileSystemSize
-> ReadPrec [FileSystemSize]
-> Read FileSystemSize
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileSystemSize]
$creadListPrec :: ReadPrec [FileSystemSize]
readPrec :: ReadPrec FileSystemSize
$creadPrec :: ReadPrec FileSystemSize
readList :: ReadS [FileSystemSize]
$creadList :: ReadS [FileSystemSize]
readsPrec :: Int -> ReadS FileSystemSize
$creadsPrec :: Int -> ReadS FileSystemSize
Prelude.Read, Int -> FileSystemSize -> ShowS
[FileSystemSize] -> ShowS
FileSystemSize -> String
(Int -> FileSystemSize -> ShowS)
-> (FileSystemSize -> String)
-> ([FileSystemSize] -> ShowS)
-> Show FileSystemSize
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileSystemSize] -> ShowS
$cshowList :: [FileSystemSize] -> ShowS
show :: FileSystemSize -> String
$cshow :: FileSystemSize -> String
showsPrec :: Int -> FileSystemSize -> ShowS
$cshowsPrec :: Int -> FileSystemSize -> ShowS
Prelude.Show, (forall x. FileSystemSize -> Rep FileSystemSize x)
-> (forall x. Rep FileSystemSize x -> FileSystemSize)
-> Generic FileSystemSize
forall x. Rep FileSystemSize x -> FileSystemSize
forall x. FileSystemSize -> Rep FileSystemSize x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileSystemSize x -> FileSystemSize
$cfrom :: forall x. FileSystemSize -> Rep FileSystemSize x
Prelude.Generic)
newFileSystemSize ::
Prelude.Natural ->
FileSystemSize
newFileSystemSize :: Natural -> FileSystemSize
newFileSystemSize Natural
pValue_ =
FileSystemSize' :: Maybe Natural
-> Maybe Natural -> Maybe POSIX -> Natural -> FileSystemSize
FileSystemSize'
{ $sel:valueInIA:FileSystemSize' :: Maybe Natural
valueInIA = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:valueInStandard:FileSystemSize' :: Maybe Natural
valueInStandard = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:timestamp:FileSystemSize' :: Maybe POSIX
timestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:value:FileSystemSize' :: Natural
value = Natural
pValue_
}
fileSystemSize_valueInIA :: Lens.Lens' FileSystemSize (Prelude.Maybe Prelude.Natural)
fileSystemSize_valueInIA :: (Maybe Natural -> f (Maybe Natural))
-> FileSystemSize -> f FileSystemSize
fileSystemSize_valueInIA = (FileSystemSize -> Maybe Natural)
-> (FileSystemSize -> Maybe Natural -> FileSystemSize)
-> Lens
FileSystemSize FileSystemSize (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemSize' {Maybe Natural
valueInIA :: Maybe Natural
$sel:valueInIA:FileSystemSize' :: FileSystemSize -> Maybe Natural
valueInIA} -> Maybe Natural
valueInIA) (\s :: FileSystemSize
s@FileSystemSize' {} Maybe Natural
a -> FileSystemSize
s {$sel:valueInIA:FileSystemSize' :: Maybe Natural
valueInIA = Maybe Natural
a} :: FileSystemSize)
fileSystemSize_valueInStandard :: Lens.Lens' FileSystemSize (Prelude.Maybe Prelude.Natural)
fileSystemSize_valueInStandard :: (Maybe Natural -> f (Maybe Natural))
-> FileSystemSize -> f FileSystemSize
fileSystemSize_valueInStandard = (FileSystemSize -> Maybe Natural)
-> (FileSystemSize -> Maybe Natural -> FileSystemSize)
-> Lens
FileSystemSize FileSystemSize (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemSize' {Maybe Natural
valueInStandard :: Maybe Natural
$sel:valueInStandard:FileSystemSize' :: FileSystemSize -> Maybe Natural
valueInStandard} -> Maybe Natural
valueInStandard) (\s :: FileSystemSize
s@FileSystemSize' {} Maybe Natural
a -> FileSystemSize
s {$sel:valueInStandard:FileSystemSize' :: Maybe Natural
valueInStandard = Maybe Natural
a} :: FileSystemSize)
fileSystemSize_timestamp :: Lens.Lens' FileSystemSize (Prelude.Maybe Prelude.UTCTime)
fileSystemSize_timestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> FileSystemSize -> f FileSystemSize
fileSystemSize_timestamp = (FileSystemSize -> Maybe POSIX)
-> (FileSystemSize -> Maybe POSIX -> FileSystemSize)
-> Lens FileSystemSize FileSystemSize (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemSize' {Maybe POSIX
timestamp :: Maybe POSIX
$sel:timestamp:FileSystemSize' :: FileSystemSize -> Maybe POSIX
timestamp} -> Maybe POSIX
timestamp) (\s :: FileSystemSize
s@FileSystemSize' {} Maybe POSIX
a -> FileSystemSize
s {$sel:timestamp:FileSystemSize' :: Maybe POSIX
timestamp = Maybe POSIX
a} :: FileSystemSize) ((Maybe POSIX -> f (Maybe POSIX))
-> FileSystemSize -> f FileSystemSize)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> FileSystemSize
-> f FileSystemSize
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
fileSystemSize_value :: Lens.Lens' FileSystemSize Prelude.Natural
fileSystemSize_value :: (Natural -> f Natural) -> FileSystemSize -> f FileSystemSize
fileSystemSize_value = (FileSystemSize -> Natural)
-> (FileSystemSize -> Natural -> FileSystemSize)
-> Lens FileSystemSize FileSystemSize Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemSize' {Natural
value :: Natural
$sel:value:FileSystemSize' :: FileSystemSize -> Natural
value} -> Natural
value) (\s :: FileSystemSize
s@FileSystemSize' {} Natural
a -> FileSystemSize
s {$sel:value:FileSystemSize' :: Natural
value = Natural
a} :: FileSystemSize)
instance Core.FromJSON FileSystemSize where
parseJSON :: Value -> Parser FileSystemSize
parseJSON =
String
-> (Object -> Parser FileSystemSize)
-> Value
-> Parser FileSystemSize
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FileSystemSize"
( \Object
x ->
Maybe Natural
-> Maybe Natural -> Maybe POSIX -> Natural -> FileSystemSize
FileSystemSize'
(Maybe Natural
-> Maybe Natural -> Maybe POSIX -> Natural -> FileSystemSize)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural -> Maybe POSIX -> Natural -> FileSystemSize)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ValueInIA")
Parser (Maybe Natural -> Maybe POSIX -> Natural -> FileSystemSize)
-> Parser (Maybe Natural)
-> Parser (Maybe POSIX -> Natural -> FileSystemSize)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ValueInStandard")
Parser (Maybe POSIX -> Natural -> FileSystemSize)
-> Parser (Maybe POSIX) -> Parser (Natural -> FileSystemSize)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Timestamp")
Parser (Natural -> FileSystemSize)
-> Parser Natural -> Parser FileSystemSize
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Value")
)
instance Prelude.Hashable FileSystemSize
instance Prelude.NFData FileSystemSize