{-# 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.StorageGateway.Types.TapeInfo 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 TapeInfo = TapeInfo'
{
TapeInfo -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
TapeInfo -> Maybe POSIX
poolEntryDate :: Prelude.Maybe Data.POSIX,
TapeInfo -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
TapeInfo -> Maybe POSIX
retentionStartDate :: Prelude.Maybe Data.POSIX,
TapeInfo -> Maybe Text
tapeARN :: Prelude.Maybe Prelude.Text,
TapeInfo -> Maybe Text
tapeBarcode :: Prelude.Maybe Prelude.Text,
TapeInfo -> Maybe Integer
tapeSizeInBytes :: Prelude.Maybe Prelude.Integer,
TapeInfo -> Maybe Text
tapeStatus :: Prelude.Maybe Prelude.Text
}
deriving (TapeInfo -> TapeInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TapeInfo -> TapeInfo -> Bool
$c/= :: TapeInfo -> TapeInfo -> Bool
== :: TapeInfo -> TapeInfo -> Bool
$c== :: TapeInfo -> TapeInfo -> Bool
Prelude.Eq, ReadPrec [TapeInfo]
ReadPrec TapeInfo
Int -> ReadS TapeInfo
ReadS [TapeInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TapeInfo]
$creadListPrec :: ReadPrec [TapeInfo]
readPrec :: ReadPrec TapeInfo
$creadPrec :: ReadPrec TapeInfo
readList :: ReadS [TapeInfo]
$creadList :: ReadS [TapeInfo]
readsPrec :: Int -> ReadS TapeInfo
$creadsPrec :: Int -> ReadS TapeInfo
Prelude.Read, Int -> TapeInfo -> ShowS
[TapeInfo] -> ShowS
TapeInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TapeInfo] -> ShowS
$cshowList :: [TapeInfo] -> ShowS
show :: TapeInfo -> String
$cshow :: TapeInfo -> String
showsPrec :: Int -> TapeInfo -> ShowS
$cshowsPrec :: Int -> TapeInfo -> ShowS
Prelude.Show, forall x. Rep TapeInfo x -> TapeInfo
forall x. TapeInfo -> Rep TapeInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TapeInfo x -> TapeInfo
$cfrom :: forall x. TapeInfo -> Rep TapeInfo x
Prelude.Generic)
newTapeInfo ::
TapeInfo
newTapeInfo :: TapeInfo
newTapeInfo =
TapeInfo'
{ $sel:gatewayARN:TapeInfo' :: Maybe Text
gatewayARN = forall a. Maybe a
Prelude.Nothing,
$sel:poolEntryDate:TapeInfo' :: Maybe POSIX
poolEntryDate = forall a. Maybe a
Prelude.Nothing,
$sel:poolId:TapeInfo' :: Maybe Text
poolId = forall a. Maybe a
Prelude.Nothing,
$sel:retentionStartDate:TapeInfo' :: Maybe POSIX
retentionStartDate = forall a. Maybe a
Prelude.Nothing,
$sel:tapeARN:TapeInfo' :: Maybe Text
tapeARN = forall a. Maybe a
Prelude.Nothing,
$sel:tapeBarcode:TapeInfo' :: Maybe Text
tapeBarcode = forall a. Maybe a
Prelude.Nothing,
$sel:tapeSizeInBytes:TapeInfo' :: Maybe Integer
tapeSizeInBytes = forall a. Maybe a
Prelude.Nothing,
$sel:tapeStatus:TapeInfo' :: Maybe Text
tapeStatus = forall a. Maybe a
Prelude.Nothing
}
tapeInfo_gatewayARN :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.Text)
tapeInfo_gatewayARN :: Lens' TapeInfo (Maybe Text)
tapeInfo_gatewayARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:TapeInfo' :: TapeInfo -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: TapeInfo
s@TapeInfo' {} Maybe Text
a -> TapeInfo
s {$sel:gatewayARN:TapeInfo' :: Maybe Text
gatewayARN = Maybe Text
a} :: TapeInfo)
tapeInfo_poolEntryDate :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.UTCTime)
tapeInfo_poolEntryDate :: Lens' TapeInfo (Maybe UTCTime)
tapeInfo_poolEntryDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe POSIX
poolEntryDate :: Maybe POSIX
$sel:poolEntryDate:TapeInfo' :: TapeInfo -> Maybe POSIX
poolEntryDate} -> Maybe POSIX
poolEntryDate) (\s :: TapeInfo
s@TapeInfo' {} Maybe POSIX
a -> TapeInfo
s {$sel:poolEntryDate:TapeInfo' :: Maybe POSIX
poolEntryDate = Maybe POSIX
a} :: TapeInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
tapeInfo_poolId :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.Text)
tapeInfo_poolId :: Lens' TapeInfo (Maybe Text)
tapeInfo_poolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe Text
poolId :: Maybe Text
$sel:poolId:TapeInfo' :: TapeInfo -> Maybe Text
poolId} -> Maybe Text
poolId) (\s :: TapeInfo
s@TapeInfo' {} Maybe Text
a -> TapeInfo
s {$sel:poolId:TapeInfo' :: Maybe Text
poolId = Maybe Text
a} :: TapeInfo)
tapeInfo_retentionStartDate :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.UTCTime)
tapeInfo_retentionStartDate :: Lens' TapeInfo (Maybe UTCTime)
tapeInfo_retentionStartDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe POSIX
retentionStartDate :: Maybe POSIX
$sel:retentionStartDate:TapeInfo' :: TapeInfo -> Maybe POSIX
retentionStartDate} -> Maybe POSIX
retentionStartDate) (\s :: TapeInfo
s@TapeInfo' {} Maybe POSIX
a -> TapeInfo
s {$sel:retentionStartDate:TapeInfo' :: Maybe POSIX
retentionStartDate = Maybe POSIX
a} :: TapeInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
tapeInfo_tapeARN :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.Text)
tapeInfo_tapeARN :: Lens' TapeInfo (Maybe Text)
tapeInfo_tapeARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe Text
tapeARN :: Maybe Text
$sel:tapeARN:TapeInfo' :: TapeInfo -> Maybe Text
tapeARN} -> Maybe Text
tapeARN) (\s :: TapeInfo
s@TapeInfo' {} Maybe Text
a -> TapeInfo
s {$sel:tapeARN:TapeInfo' :: Maybe Text
tapeARN = Maybe Text
a} :: TapeInfo)
tapeInfo_tapeBarcode :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.Text)
tapeInfo_tapeBarcode :: Lens' TapeInfo (Maybe Text)
tapeInfo_tapeBarcode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe Text
tapeBarcode :: Maybe Text
$sel:tapeBarcode:TapeInfo' :: TapeInfo -> Maybe Text
tapeBarcode} -> Maybe Text
tapeBarcode) (\s :: TapeInfo
s@TapeInfo' {} Maybe Text
a -> TapeInfo
s {$sel:tapeBarcode:TapeInfo' :: Maybe Text
tapeBarcode = Maybe Text
a} :: TapeInfo)
tapeInfo_tapeSizeInBytes :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.Integer)
tapeInfo_tapeSizeInBytes :: Lens' TapeInfo (Maybe Integer)
tapeInfo_tapeSizeInBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe Integer
tapeSizeInBytes :: Maybe Integer
$sel:tapeSizeInBytes:TapeInfo' :: TapeInfo -> Maybe Integer
tapeSizeInBytes} -> Maybe Integer
tapeSizeInBytes) (\s :: TapeInfo
s@TapeInfo' {} Maybe Integer
a -> TapeInfo
s {$sel:tapeSizeInBytes:TapeInfo' :: Maybe Integer
tapeSizeInBytes = Maybe Integer
a} :: TapeInfo)
tapeInfo_tapeStatus :: Lens.Lens' TapeInfo (Prelude.Maybe Prelude.Text)
tapeInfo_tapeStatus :: Lens' TapeInfo (Maybe Text)
tapeInfo_tapeStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeInfo' {Maybe Text
tapeStatus :: Maybe Text
$sel:tapeStatus:TapeInfo' :: TapeInfo -> Maybe Text
tapeStatus} -> Maybe Text
tapeStatus) (\s :: TapeInfo
s@TapeInfo' {} Maybe Text
a -> TapeInfo
s {$sel:tapeStatus:TapeInfo' :: Maybe Text
tapeStatus = Maybe Text
a} :: TapeInfo)
instance Data.FromJSON TapeInfo where
parseJSON :: Value -> Parser TapeInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TapeInfo"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> TapeInfo
TapeInfo'
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
"GatewayARN")
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
"PoolEntryDate")
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
"PoolId")
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
"RetentionStartDate")
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
"TapeARN")
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
"TapeBarcode")
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
"TapeSizeInBytes")
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
"TapeStatus")
)
instance Prelude.Hashable TapeInfo where
hashWithSalt :: Int -> TapeInfo -> Int
hashWithSalt Int
_salt TapeInfo' {Maybe Integer
Maybe Text
Maybe POSIX
tapeStatus :: Maybe Text
tapeSizeInBytes :: Maybe Integer
tapeBarcode :: Maybe Text
tapeARN :: Maybe Text
retentionStartDate :: Maybe POSIX
poolId :: Maybe Text
poolEntryDate :: Maybe POSIX
gatewayARN :: Maybe Text
$sel:tapeStatus:TapeInfo' :: TapeInfo -> Maybe Text
$sel:tapeSizeInBytes:TapeInfo' :: TapeInfo -> Maybe Integer
$sel:tapeBarcode:TapeInfo' :: TapeInfo -> Maybe Text
$sel:tapeARN:TapeInfo' :: TapeInfo -> Maybe Text
$sel:retentionStartDate:TapeInfo' :: TapeInfo -> Maybe POSIX
$sel:poolId:TapeInfo' :: TapeInfo -> Maybe Text
$sel:poolEntryDate:TapeInfo' :: TapeInfo -> Maybe POSIX
$sel:gatewayARN:TapeInfo' :: TapeInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
poolEntryDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
poolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
retentionStartDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tapeARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tapeBarcode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
tapeSizeInBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tapeStatus
instance Prelude.NFData TapeInfo where
rnf :: TapeInfo -> ()
rnf TapeInfo' {Maybe Integer
Maybe Text
Maybe POSIX
tapeStatus :: Maybe Text
tapeSizeInBytes :: Maybe Integer
tapeBarcode :: Maybe Text
tapeARN :: Maybe Text
retentionStartDate :: Maybe POSIX
poolId :: Maybe Text
poolEntryDate :: Maybe POSIX
gatewayARN :: Maybe Text
$sel:tapeStatus:TapeInfo' :: TapeInfo -> Maybe Text
$sel:tapeSizeInBytes:TapeInfo' :: TapeInfo -> Maybe Integer
$sel:tapeBarcode:TapeInfo' :: TapeInfo -> Maybe Text
$sel:tapeARN:TapeInfo' :: TapeInfo -> Maybe Text
$sel:retentionStartDate:TapeInfo' :: TapeInfo -> Maybe POSIX
$sel:poolId:TapeInfo' :: TapeInfo -> Maybe Text
$sel:poolEntryDate:TapeInfo' :: TapeInfo -> Maybe POSIX
$sel:gatewayARN:TapeInfo' :: TapeInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
poolEntryDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
poolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
retentionStartDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tapeARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tapeBarcode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
tapeSizeInBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tapeStatus