{-# 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.Glacier.Types.DescribeVaultOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DescribeVaultOutput = DescribeVaultOutput'
{
DescribeVaultOutput -> Maybe Text
vaultName :: Prelude.Maybe Prelude.Text,
DescribeVaultOutput -> Maybe Integer
sizeInBytes :: Prelude.Maybe Prelude.Integer,
DescribeVaultOutput -> Maybe Text
lastInventoryDate :: Prelude.Maybe Prelude.Text,
DescribeVaultOutput -> Maybe Text
vaultARN :: Prelude.Maybe Prelude.Text,
DescribeVaultOutput -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
DescribeVaultOutput -> Maybe Integer
numberOfArchives :: Prelude.Maybe Prelude.Integer
}
deriving (DescribeVaultOutput -> DescribeVaultOutput -> Bool
(DescribeVaultOutput -> DescribeVaultOutput -> Bool)
-> (DescribeVaultOutput -> DescribeVaultOutput -> Bool)
-> Eq DescribeVaultOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVaultOutput -> DescribeVaultOutput -> Bool
$c/= :: DescribeVaultOutput -> DescribeVaultOutput -> Bool
== :: DescribeVaultOutput -> DescribeVaultOutput -> Bool
$c== :: DescribeVaultOutput -> DescribeVaultOutput -> Bool
Prelude.Eq, ReadPrec [DescribeVaultOutput]
ReadPrec DescribeVaultOutput
Int -> ReadS DescribeVaultOutput
ReadS [DescribeVaultOutput]
(Int -> ReadS DescribeVaultOutput)
-> ReadS [DescribeVaultOutput]
-> ReadPrec DescribeVaultOutput
-> ReadPrec [DescribeVaultOutput]
-> Read DescribeVaultOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVaultOutput]
$creadListPrec :: ReadPrec [DescribeVaultOutput]
readPrec :: ReadPrec DescribeVaultOutput
$creadPrec :: ReadPrec DescribeVaultOutput
readList :: ReadS [DescribeVaultOutput]
$creadList :: ReadS [DescribeVaultOutput]
readsPrec :: Int -> ReadS DescribeVaultOutput
$creadsPrec :: Int -> ReadS DescribeVaultOutput
Prelude.Read, Int -> DescribeVaultOutput -> ShowS
[DescribeVaultOutput] -> ShowS
DescribeVaultOutput -> String
(Int -> DescribeVaultOutput -> ShowS)
-> (DescribeVaultOutput -> String)
-> ([DescribeVaultOutput] -> ShowS)
-> Show DescribeVaultOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVaultOutput] -> ShowS
$cshowList :: [DescribeVaultOutput] -> ShowS
show :: DescribeVaultOutput -> String
$cshow :: DescribeVaultOutput -> String
showsPrec :: Int -> DescribeVaultOutput -> ShowS
$cshowsPrec :: Int -> DescribeVaultOutput -> ShowS
Prelude.Show, (forall x. DescribeVaultOutput -> Rep DescribeVaultOutput x)
-> (forall x. Rep DescribeVaultOutput x -> DescribeVaultOutput)
-> Generic DescribeVaultOutput
forall x. Rep DescribeVaultOutput x -> DescribeVaultOutput
forall x. DescribeVaultOutput -> Rep DescribeVaultOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeVaultOutput x -> DescribeVaultOutput
$cfrom :: forall x. DescribeVaultOutput -> Rep DescribeVaultOutput x
Prelude.Generic)
newDescribeVaultOutput ::
DescribeVaultOutput
newDescribeVaultOutput :: DescribeVaultOutput
newDescribeVaultOutput =
DescribeVaultOutput' :: Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> DescribeVaultOutput
DescribeVaultOutput'
{ $sel:vaultName:DescribeVaultOutput' :: Maybe Text
vaultName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sizeInBytes:DescribeVaultOutput' :: Maybe Integer
sizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:lastInventoryDate:DescribeVaultOutput' :: Maybe Text
lastInventoryDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vaultARN:DescribeVaultOutput' :: Maybe Text
vaultARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:DescribeVaultOutput' :: Maybe Text
creationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfArchives:DescribeVaultOutput' :: Maybe Integer
numberOfArchives = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
describeVaultOutput_vaultName :: Lens.Lens' DescribeVaultOutput (Prelude.Maybe Prelude.Text)
describeVaultOutput_vaultName :: (Maybe Text -> f (Maybe Text))
-> DescribeVaultOutput -> f DescribeVaultOutput
describeVaultOutput_vaultName = (DescribeVaultOutput -> Maybe Text)
-> (DescribeVaultOutput -> Maybe Text -> DescribeVaultOutput)
-> Lens
DescribeVaultOutput DescribeVaultOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVaultOutput' {Maybe Text
vaultName :: Maybe Text
$sel:vaultName:DescribeVaultOutput' :: DescribeVaultOutput -> Maybe Text
vaultName} -> Maybe Text
vaultName) (\s :: DescribeVaultOutput
s@DescribeVaultOutput' {} Maybe Text
a -> DescribeVaultOutput
s {$sel:vaultName:DescribeVaultOutput' :: Maybe Text
vaultName = Maybe Text
a} :: DescribeVaultOutput)
describeVaultOutput_sizeInBytes :: Lens.Lens' DescribeVaultOutput (Prelude.Maybe Prelude.Integer)
describeVaultOutput_sizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> DescribeVaultOutput -> f DescribeVaultOutput
describeVaultOutput_sizeInBytes = (DescribeVaultOutput -> Maybe Integer)
-> (DescribeVaultOutput -> Maybe Integer -> DescribeVaultOutput)
-> Lens
DescribeVaultOutput
DescribeVaultOutput
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVaultOutput' {Maybe Integer
sizeInBytes :: Maybe Integer
$sel:sizeInBytes:DescribeVaultOutput' :: DescribeVaultOutput -> Maybe Integer
sizeInBytes} -> Maybe Integer
sizeInBytes) (\s :: DescribeVaultOutput
s@DescribeVaultOutput' {} Maybe Integer
a -> DescribeVaultOutput
s {$sel:sizeInBytes:DescribeVaultOutput' :: Maybe Integer
sizeInBytes = Maybe Integer
a} :: DescribeVaultOutput)
describeVaultOutput_lastInventoryDate :: Lens.Lens' DescribeVaultOutput (Prelude.Maybe Prelude.Text)
describeVaultOutput_lastInventoryDate :: (Maybe Text -> f (Maybe Text))
-> DescribeVaultOutput -> f DescribeVaultOutput
describeVaultOutput_lastInventoryDate = (DescribeVaultOutput -> Maybe Text)
-> (DescribeVaultOutput -> Maybe Text -> DescribeVaultOutput)
-> Lens
DescribeVaultOutput DescribeVaultOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVaultOutput' {Maybe Text
lastInventoryDate :: Maybe Text
$sel:lastInventoryDate:DescribeVaultOutput' :: DescribeVaultOutput -> Maybe Text
lastInventoryDate} -> Maybe Text
lastInventoryDate) (\s :: DescribeVaultOutput
s@DescribeVaultOutput' {} Maybe Text
a -> DescribeVaultOutput
s {$sel:lastInventoryDate:DescribeVaultOutput' :: Maybe Text
lastInventoryDate = Maybe Text
a} :: DescribeVaultOutput)
describeVaultOutput_vaultARN :: Lens.Lens' DescribeVaultOutput (Prelude.Maybe Prelude.Text)
describeVaultOutput_vaultARN :: (Maybe Text -> f (Maybe Text))
-> DescribeVaultOutput -> f DescribeVaultOutput
describeVaultOutput_vaultARN = (DescribeVaultOutput -> Maybe Text)
-> (DescribeVaultOutput -> Maybe Text -> DescribeVaultOutput)
-> Lens
DescribeVaultOutput DescribeVaultOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVaultOutput' {Maybe Text
vaultARN :: Maybe Text
$sel:vaultARN:DescribeVaultOutput' :: DescribeVaultOutput -> Maybe Text
vaultARN} -> Maybe Text
vaultARN) (\s :: DescribeVaultOutput
s@DescribeVaultOutput' {} Maybe Text
a -> DescribeVaultOutput
s {$sel:vaultARN:DescribeVaultOutput' :: Maybe Text
vaultARN = Maybe Text
a} :: DescribeVaultOutput)
describeVaultOutput_creationDate :: Lens.Lens' DescribeVaultOutput (Prelude.Maybe Prelude.Text)
describeVaultOutput_creationDate :: (Maybe Text -> f (Maybe Text))
-> DescribeVaultOutput -> f DescribeVaultOutput
describeVaultOutput_creationDate = (DescribeVaultOutput -> Maybe Text)
-> (DescribeVaultOutput -> Maybe Text -> DescribeVaultOutput)
-> Lens
DescribeVaultOutput DescribeVaultOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVaultOutput' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:DescribeVaultOutput' :: DescribeVaultOutput -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: DescribeVaultOutput
s@DescribeVaultOutput' {} Maybe Text
a -> DescribeVaultOutput
s {$sel:creationDate:DescribeVaultOutput' :: Maybe Text
creationDate = Maybe Text
a} :: DescribeVaultOutput)
describeVaultOutput_numberOfArchives :: Lens.Lens' DescribeVaultOutput (Prelude.Maybe Prelude.Integer)
describeVaultOutput_numberOfArchives :: (Maybe Integer -> f (Maybe Integer))
-> DescribeVaultOutput -> f DescribeVaultOutput
describeVaultOutput_numberOfArchives = (DescribeVaultOutput -> Maybe Integer)
-> (DescribeVaultOutput -> Maybe Integer -> DescribeVaultOutput)
-> Lens
DescribeVaultOutput
DescribeVaultOutput
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVaultOutput' {Maybe Integer
numberOfArchives :: Maybe Integer
$sel:numberOfArchives:DescribeVaultOutput' :: DescribeVaultOutput -> Maybe Integer
numberOfArchives} -> Maybe Integer
numberOfArchives) (\s :: DescribeVaultOutput
s@DescribeVaultOutput' {} Maybe Integer
a -> DescribeVaultOutput
s {$sel:numberOfArchives:DescribeVaultOutput' :: Maybe Integer
numberOfArchives = Maybe Integer
a} :: DescribeVaultOutput)
instance Core.FromJSON DescribeVaultOutput where
parseJSON :: Value -> Parser DescribeVaultOutput
parseJSON =
String
-> (Object -> Parser DescribeVaultOutput)
-> Value
-> Parser DescribeVaultOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DescribeVaultOutput"
( \Object
x ->
Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> DescribeVaultOutput
DescribeVaultOutput'
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> DescribeVaultOutput)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> DescribeVaultOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VaultName")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> DescribeVaultOutput)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> DescribeVaultOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SizeInBytes")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> DescribeVaultOutput)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Integer -> DescribeVaultOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastInventoryDate")
Parser
(Maybe Text -> Maybe Text -> Maybe Integer -> DescribeVaultOutput)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Integer -> DescribeVaultOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VaultARN")
Parser (Maybe Text -> Maybe Integer -> DescribeVaultOutput)
-> Parser (Maybe Text)
-> Parser (Maybe Integer -> DescribeVaultOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDate")
Parser (Maybe Integer -> DescribeVaultOutput)
-> Parser (Maybe Integer) -> Parser DescribeVaultOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfArchives")
)
instance Prelude.Hashable DescribeVaultOutput
instance Prelude.NFData DescribeVaultOutput