{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.StorageGateway.Types.TapeArchive
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.StorageGateway.Types.TapeArchive where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents a virtual tape that is archived in the virtual tape shelf
-- (VTS).
--
-- /See:/ 'newTapeArchive' smart constructor.
data TapeArchive = TapeArchive'
  { -- | The barcode that identifies the archived virtual tape.
    TapeArchive -> Maybe Text
tapeBarcode :: Prelude.Maybe Prelude.Text,
    -- | The current state of the archived virtual tape.
    TapeArchive -> Maybe Text
tapeStatus :: Prelude.Maybe Prelude.Text,
    TapeArchive -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an archived virtual tape.
    TapeArchive -> Maybe Text
tapeARN :: Prelude.Maybe Prelude.Text,
    -- | The size, in bytes, of the archived virtual tape.
    TapeArchive -> Maybe Integer
tapeSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The time that the archiving of the virtual tape was completed.
    --
    -- The default timestamp format is in the ISO8601 extended
    -- YYYY-MM-DD\'T\'HH:MM:SS\'Z\' format.
    TapeArchive -> Maybe POSIX
completionTime :: Prelude.Maybe Core.POSIX,
    -- | The ID of the pool that was used to archive the tape. The tapes in this
    -- pool are archived in the S3 storage class that is associated with the
    -- pool.
    --
    -- Valid Values: @GLACIER@ | @DEEP_ARCHIVE@
    TapeArchive -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
    -- | The size, in bytes, of data stored on the virtual tape.
    --
    -- This value is not available for tapes created prior to May 13, 2015.
    TapeArchive -> Maybe Integer
tapeUsedInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The date the virtual tape was created.
    TapeArchive -> Maybe POSIX
tapeCreatedDate :: Prelude.Maybe Core.POSIX,
    -- | The time that the tape entered the custom tape pool.
    --
    -- The default timestamp format is in the ISO8601 extended
    -- YYYY-MM-DD\'T\'HH:MM:SS\'Z\' format.
    TapeArchive -> Maybe POSIX
poolEntryDate :: Prelude.Maybe Core.POSIX,
    -- | Set to @true@ if the archived tape is stored as write-once-read-many
    -- (WORM).
    TapeArchive -> Maybe Bool
worm :: Prelude.Maybe Prelude.Bool,
    -- | If the archived tape is subject to tape retention lock, the date that
    -- the archived tape started being retained.
    TapeArchive -> Maybe POSIX
retentionStartDate :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the tape gateway that the virtual tape
    -- is being retrieved to.
    --
    -- The virtual tape is retrieved from the virtual tape shelf (VTS).
    TapeArchive -> Maybe Text
retrievedTo :: Prelude.Maybe Prelude.Text
  }
  deriving (TapeArchive -> TapeArchive -> Bool
(TapeArchive -> TapeArchive -> Bool)
-> (TapeArchive -> TapeArchive -> Bool) -> Eq TapeArchive
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TapeArchive -> TapeArchive -> Bool
$c/= :: TapeArchive -> TapeArchive -> Bool
== :: TapeArchive -> TapeArchive -> Bool
$c== :: TapeArchive -> TapeArchive -> Bool
Prelude.Eq, ReadPrec [TapeArchive]
ReadPrec TapeArchive
Int -> ReadS TapeArchive
ReadS [TapeArchive]
(Int -> ReadS TapeArchive)
-> ReadS [TapeArchive]
-> ReadPrec TapeArchive
-> ReadPrec [TapeArchive]
-> Read TapeArchive
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TapeArchive]
$creadListPrec :: ReadPrec [TapeArchive]
readPrec :: ReadPrec TapeArchive
$creadPrec :: ReadPrec TapeArchive
readList :: ReadS [TapeArchive]
$creadList :: ReadS [TapeArchive]
readsPrec :: Int -> ReadS TapeArchive
$creadsPrec :: Int -> ReadS TapeArchive
Prelude.Read, Int -> TapeArchive -> ShowS
[TapeArchive] -> ShowS
TapeArchive -> String
(Int -> TapeArchive -> ShowS)
-> (TapeArchive -> String)
-> ([TapeArchive] -> ShowS)
-> Show TapeArchive
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TapeArchive] -> ShowS
$cshowList :: [TapeArchive] -> ShowS
show :: TapeArchive -> String
$cshow :: TapeArchive -> String
showsPrec :: Int -> TapeArchive -> ShowS
$cshowsPrec :: Int -> TapeArchive -> ShowS
Prelude.Show, (forall x. TapeArchive -> Rep TapeArchive x)
-> (forall x. Rep TapeArchive x -> TapeArchive)
-> Generic TapeArchive
forall x. Rep TapeArchive x -> TapeArchive
forall x. TapeArchive -> Rep TapeArchive x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TapeArchive x -> TapeArchive
$cfrom :: forall x. TapeArchive -> Rep TapeArchive x
Prelude.Generic)

-- |
-- Create a value of 'TapeArchive' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'tapeBarcode', 'tapeArchive_tapeBarcode' - The barcode that identifies the archived virtual tape.
--
-- 'tapeStatus', 'tapeArchive_tapeStatus' - The current state of the archived virtual tape.
--
-- 'kmsKey', 'tapeArchive_kmsKey' - Undocumented member.
--
-- 'tapeARN', 'tapeArchive_tapeARN' - The Amazon Resource Name (ARN) of an archived virtual tape.
--
-- 'tapeSizeInBytes', 'tapeArchive_tapeSizeInBytes' - The size, in bytes, of the archived virtual tape.
--
-- 'completionTime', 'tapeArchive_completionTime' - The time that the archiving of the virtual tape was completed.
--
-- The default timestamp format is in the ISO8601 extended
-- YYYY-MM-DD\'T\'HH:MM:SS\'Z\' format.
--
-- 'poolId', 'tapeArchive_poolId' - The ID of the pool that was used to archive the tape. The tapes in this
-- pool are archived in the S3 storage class that is associated with the
-- pool.
--
-- Valid Values: @GLACIER@ | @DEEP_ARCHIVE@
--
-- 'tapeUsedInBytes', 'tapeArchive_tapeUsedInBytes' - The size, in bytes, of data stored on the virtual tape.
--
-- This value is not available for tapes created prior to May 13, 2015.
--
-- 'tapeCreatedDate', 'tapeArchive_tapeCreatedDate' - The date the virtual tape was created.
--
-- 'poolEntryDate', 'tapeArchive_poolEntryDate' - The time that the tape entered the custom tape pool.
--
-- The default timestamp format is in the ISO8601 extended
-- YYYY-MM-DD\'T\'HH:MM:SS\'Z\' format.
--
-- 'worm', 'tapeArchive_worm' - Set to @true@ if the archived tape is stored as write-once-read-many
-- (WORM).
--
-- 'retentionStartDate', 'tapeArchive_retentionStartDate' - If the archived tape is subject to tape retention lock, the date that
-- the archived tape started being retained.
--
-- 'retrievedTo', 'tapeArchive_retrievedTo' - The Amazon Resource Name (ARN) of the tape gateway that the virtual tape
-- is being retrieved to.
--
-- The virtual tape is retrieved from the virtual tape shelf (VTS).
newTapeArchive ::
  TapeArchive
newTapeArchive :: TapeArchive
newTapeArchive =
  TapeArchive' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> TapeArchive
TapeArchive'
    { $sel:tapeBarcode:TapeArchive' :: Maybe Text
tapeBarcode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tapeStatus:TapeArchive' :: Maybe Text
tapeStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKey:TapeArchive' :: Maybe Text
kmsKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tapeARN:TapeArchive' :: Maybe Text
tapeARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tapeSizeInBytes:TapeArchive' :: Maybe Integer
tapeSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:completionTime:TapeArchive' :: Maybe POSIX
completionTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:poolId:TapeArchive' :: Maybe Text
poolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tapeUsedInBytes:TapeArchive' :: Maybe Integer
tapeUsedInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:tapeCreatedDate:TapeArchive' :: Maybe POSIX
tapeCreatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:poolEntryDate:TapeArchive' :: Maybe POSIX
poolEntryDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:worm:TapeArchive' :: Maybe Bool
worm = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:retentionStartDate:TapeArchive' :: Maybe POSIX
retentionStartDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:retrievedTo:TapeArchive' :: Maybe Text
retrievedTo = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The barcode that identifies the archived virtual tape.
tapeArchive_tapeBarcode :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Text)
tapeArchive_tapeBarcode :: (Maybe Text -> f (Maybe Text)) -> TapeArchive -> f TapeArchive
tapeArchive_tapeBarcode = (TapeArchive -> Maybe Text)
-> (TapeArchive -> Maybe Text -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Text
tapeBarcode :: Maybe Text
$sel:tapeBarcode:TapeArchive' :: TapeArchive -> Maybe Text
tapeBarcode} -> Maybe Text
tapeBarcode) (\s :: TapeArchive
s@TapeArchive' {} Maybe Text
a -> TapeArchive
s {$sel:tapeBarcode:TapeArchive' :: Maybe Text
tapeBarcode = Maybe Text
a} :: TapeArchive)

-- | The current state of the archived virtual tape.
tapeArchive_tapeStatus :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Text)
tapeArchive_tapeStatus :: (Maybe Text -> f (Maybe Text)) -> TapeArchive -> f TapeArchive
tapeArchive_tapeStatus = (TapeArchive -> Maybe Text)
-> (TapeArchive -> Maybe Text -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Text
tapeStatus :: Maybe Text
$sel:tapeStatus:TapeArchive' :: TapeArchive -> Maybe Text
tapeStatus} -> Maybe Text
tapeStatus) (\s :: TapeArchive
s@TapeArchive' {} Maybe Text
a -> TapeArchive
s {$sel:tapeStatus:TapeArchive' :: Maybe Text
tapeStatus = Maybe Text
a} :: TapeArchive)

-- | Undocumented member.
tapeArchive_kmsKey :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Text)
tapeArchive_kmsKey :: (Maybe Text -> f (Maybe Text)) -> TapeArchive -> f TapeArchive
tapeArchive_kmsKey = (TapeArchive -> Maybe Text)
-> (TapeArchive -> Maybe Text -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:TapeArchive' :: TapeArchive -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: TapeArchive
s@TapeArchive' {} Maybe Text
a -> TapeArchive
s {$sel:kmsKey:TapeArchive' :: Maybe Text
kmsKey = Maybe Text
a} :: TapeArchive)

-- | The Amazon Resource Name (ARN) of an archived virtual tape.
tapeArchive_tapeARN :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Text)
tapeArchive_tapeARN :: (Maybe Text -> f (Maybe Text)) -> TapeArchive -> f TapeArchive
tapeArchive_tapeARN = (TapeArchive -> Maybe Text)
-> (TapeArchive -> Maybe Text -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Text
tapeARN :: Maybe Text
$sel:tapeARN:TapeArchive' :: TapeArchive -> Maybe Text
tapeARN} -> Maybe Text
tapeARN) (\s :: TapeArchive
s@TapeArchive' {} Maybe Text
a -> TapeArchive
s {$sel:tapeARN:TapeArchive' :: Maybe Text
tapeARN = Maybe Text
a} :: TapeArchive)

-- | The size, in bytes, of the archived virtual tape.
tapeArchive_tapeSizeInBytes :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Integer)
tapeArchive_tapeSizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> TapeArchive -> f TapeArchive
tapeArchive_tapeSizeInBytes = (TapeArchive -> Maybe Integer)
-> (TapeArchive -> Maybe Integer -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Integer
tapeSizeInBytes :: Maybe Integer
$sel:tapeSizeInBytes:TapeArchive' :: TapeArchive -> Maybe Integer
tapeSizeInBytes} -> Maybe Integer
tapeSizeInBytes) (\s :: TapeArchive
s@TapeArchive' {} Maybe Integer
a -> TapeArchive
s {$sel:tapeSizeInBytes:TapeArchive' :: Maybe Integer
tapeSizeInBytes = Maybe Integer
a} :: TapeArchive)

-- | The time that the archiving of the virtual tape was completed.
--
-- The default timestamp format is in the ISO8601 extended
-- YYYY-MM-DD\'T\'HH:MM:SS\'Z\' format.
tapeArchive_completionTime :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.UTCTime)
tapeArchive_completionTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive -> f TapeArchive
tapeArchive_completionTime = (TapeArchive -> Maybe POSIX)
-> (TapeArchive -> Maybe POSIX -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe POSIX
completionTime :: Maybe POSIX
$sel:completionTime:TapeArchive' :: TapeArchive -> Maybe POSIX
completionTime} -> Maybe POSIX
completionTime) (\s :: TapeArchive
s@TapeArchive' {} Maybe POSIX
a -> TapeArchive
s {$sel:completionTime:TapeArchive' :: Maybe POSIX
completionTime = Maybe POSIX
a} :: TapeArchive) ((Maybe POSIX -> f (Maybe POSIX)) -> TapeArchive -> f TapeArchive)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive
-> f TapeArchive
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

-- | The ID of the pool that was used to archive the tape. The tapes in this
-- pool are archived in the S3 storage class that is associated with the
-- pool.
--
-- Valid Values: @GLACIER@ | @DEEP_ARCHIVE@
tapeArchive_poolId :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Text)
tapeArchive_poolId :: (Maybe Text -> f (Maybe Text)) -> TapeArchive -> f TapeArchive
tapeArchive_poolId = (TapeArchive -> Maybe Text)
-> (TapeArchive -> Maybe Text -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Text
poolId :: Maybe Text
$sel:poolId:TapeArchive' :: TapeArchive -> Maybe Text
poolId} -> Maybe Text
poolId) (\s :: TapeArchive
s@TapeArchive' {} Maybe Text
a -> TapeArchive
s {$sel:poolId:TapeArchive' :: Maybe Text
poolId = Maybe Text
a} :: TapeArchive)

-- | The size, in bytes, of data stored on the virtual tape.
--
-- This value is not available for tapes created prior to May 13, 2015.
tapeArchive_tapeUsedInBytes :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Integer)
tapeArchive_tapeUsedInBytes :: (Maybe Integer -> f (Maybe Integer))
-> TapeArchive -> f TapeArchive
tapeArchive_tapeUsedInBytes = (TapeArchive -> Maybe Integer)
-> (TapeArchive -> Maybe Integer -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Integer
tapeUsedInBytes :: Maybe Integer
$sel:tapeUsedInBytes:TapeArchive' :: TapeArchive -> Maybe Integer
tapeUsedInBytes} -> Maybe Integer
tapeUsedInBytes) (\s :: TapeArchive
s@TapeArchive' {} Maybe Integer
a -> TapeArchive
s {$sel:tapeUsedInBytes:TapeArchive' :: Maybe Integer
tapeUsedInBytes = Maybe Integer
a} :: TapeArchive)

-- | The date the virtual tape was created.
tapeArchive_tapeCreatedDate :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.UTCTime)
tapeArchive_tapeCreatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive -> f TapeArchive
tapeArchive_tapeCreatedDate = (TapeArchive -> Maybe POSIX)
-> (TapeArchive -> Maybe POSIX -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe POSIX
tapeCreatedDate :: Maybe POSIX
$sel:tapeCreatedDate:TapeArchive' :: TapeArchive -> Maybe POSIX
tapeCreatedDate} -> Maybe POSIX
tapeCreatedDate) (\s :: TapeArchive
s@TapeArchive' {} Maybe POSIX
a -> TapeArchive
s {$sel:tapeCreatedDate:TapeArchive' :: Maybe POSIX
tapeCreatedDate = Maybe POSIX
a} :: TapeArchive) ((Maybe POSIX -> f (Maybe POSIX)) -> TapeArchive -> f TapeArchive)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive
-> f TapeArchive
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

-- | The time that the tape entered the custom tape pool.
--
-- The default timestamp format is in the ISO8601 extended
-- YYYY-MM-DD\'T\'HH:MM:SS\'Z\' format.
tapeArchive_poolEntryDate :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.UTCTime)
tapeArchive_poolEntryDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive -> f TapeArchive
tapeArchive_poolEntryDate = (TapeArchive -> Maybe POSIX)
-> (TapeArchive -> Maybe POSIX -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe POSIX
poolEntryDate :: Maybe POSIX
$sel:poolEntryDate:TapeArchive' :: TapeArchive -> Maybe POSIX
poolEntryDate} -> Maybe POSIX
poolEntryDate) (\s :: TapeArchive
s@TapeArchive' {} Maybe POSIX
a -> TapeArchive
s {$sel:poolEntryDate:TapeArchive' :: Maybe POSIX
poolEntryDate = Maybe POSIX
a} :: TapeArchive) ((Maybe POSIX -> f (Maybe POSIX)) -> TapeArchive -> f TapeArchive)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive
-> f TapeArchive
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

-- | Set to @true@ if the archived tape is stored as write-once-read-many
-- (WORM).
tapeArchive_worm :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Bool)
tapeArchive_worm :: (Maybe Bool -> f (Maybe Bool)) -> TapeArchive -> f TapeArchive
tapeArchive_worm = (TapeArchive -> Maybe Bool)
-> (TapeArchive -> Maybe Bool -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Bool
worm :: Maybe Bool
$sel:worm:TapeArchive' :: TapeArchive -> Maybe Bool
worm} -> Maybe Bool
worm) (\s :: TapeArchive
s@TapeArchive' {} Maybe Bool
a -> TapeArchive
s {$sel:worm:TapeArchive' :: Maybe Bool
worm = Maybe Bool
a} :: TapeArchive)

-- | If the archived tape is subject to tape retention lock, the date that
-- the archived tape started being retained.
tapeArchive_retentionStartDate :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.UTCTime)
tapeArchive_retentionStartDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive -> f TapeArchive
tapeArchive_retentionStartDate = (TapeArchive -> Maybe POSIX)
-> (TapeArchive -> Maybe POSIX -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe POSIX
retentionStartDate :: Maybe POSIX
$sel:retentionStartDate:TapeArchive' :: TapeArchive -> Maybe POSIX
retentionStartDate} -> Maybe POSIX
retentionStartDate) (\s :: TapeArchive
s@TapeArchive' {} Maybe POSIX
a -> TapeArchive
s {$sel:retentionStartDate:TapeArchive' :: Maybe POSIX
retentionStartDate = Maybe POSIX
a} :: TapeArchive) ((Maybe POSIX -> f (Maybe POSIX)) -> TapeArchive -> f TapeArchive)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TapeArchive
-> f TapeArchive
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

-- | The Amazon Resource Name (ARN) of the tape gateway that the virtual tape
-- is being retrieved to.
--
-- The virtual tape is retrieved from the virtual tape shelf (VTS).
tapeArchive_retrievedTo :: Lens.Lens' TapeArchive (Prelude.Maybe Prelude.Text)
tapeArchive_retrievedTo :: (Maybe Text -> f (Maybe Text)) -> TapeArchive -> f TapeArchive
tapeArchive_retrievedTo = (TapeArchive -> Maybe Text)
-> (TapeArchive -> Maybe Text -> TapeArchive)
-> Lens TapeArchive TapeArchive (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TapeArchive' {Maybe Text
retrievedTo :: Maybe Text
$sel:retrievedTo:TapeArchive' :: TapeArchive -> Maybe Text
retrievedTo} -> Maybe Text
retrievedTo) (\s :: TapeArchive
s@TapeArchive' {} Maybe Text
a -> TapeArchive
s {$sel:retrievedTo:TapeArchive' :: Maybe Text
retrievedTo = Maybe Text
a} :: TapeArchive)

instance Core.FromJSON TapeArchive where
  parseJSON :: Value -> Parser TapeArchive
parseJSON =
    String
-> (Object -> Parser TapeArchive) -> Value -> Parser TapeArchive
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TapeArchive"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> TapeArchive
TapeArchive'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe Text
 -> TapeArchive)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"TapeBarcode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"TapeStatus")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"KMSKey")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"TapeARN")
            Parser
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"TapeSizeInBytes")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"CompletionTime")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"PoolId")
            Parser
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> TapeArchive)
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
"TapeUsedInBytes")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> TapeArchive)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Bool -> Maybe POSIX -> Maybe Text -> TapeArchive)
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
"TapeCreatedDate")
            Parser
  (Maybe POSIX
   -> Maybe Bool -> Maybe POSIX -> Maybe Text -> TapeArchive)
-> Parser (Maybe POSIX)
-> Parser (Maybe Bool -> Maybe POSIX -> Maybe Text -> TapeArchive)
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
"PoolEntryDate")
            Parser (Maybe Bool -> Maybe POSIX -> Maybe Text -> TapeArchive)
-> Parser (Maybe Bool)
-> Parser (Maybe POSIX -> Maybe Text -> TapeArchive)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Worm")
            Parser (Maybe POSIX -> Maybe Text -> TapeArchive)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> TapeArchive)
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
"RetentionStartDate")
            Parser (Maybe Text -> TapeArchive)
-> Parser (Maybe Text) -> Parser TapeArchive
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
"RetrievedTo")
      )

instance Prelude.Hashable TapeArchive

instance Prelude.NFData TapeArchive