{-# 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.ArchiveCreationOutput 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 ArchiveCreationOutput = ArchiveCreationOutput'
{
ArchiveCreationOutput -> Maybe Text
archiveId :: Prelude.Maybe Prelude.Text,
ArchiveCreationOutput -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
ArchiveCreationOutput -> Maybe Text
location :: Prelude.Maybe Prelude.Text
}
deriving (ArchiveCreationOutput -> ArchiveCreationOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArchiveCreationOutput -> ArchiveCreationOutput -> Bool
$c/= :: ArchiveCreationOutput -> ArchiveCreationOutput -> Bool
== :: ArchiveCreationOutput -> ArchiveCreationOutput -> Bool
$c== :: ArchiveCreationOutput -> ArchiveCreationOutput -> Bool
Prelude.Eq, ReadPrec [ArchiveCreationOutput]
ReadPrec ArchiveCreationOutput
Int -> ReadS ArchiveCreationOutput
ReadS [ArchiveCreationOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ArchiveCreationOutput]
$creadListPrec :: ReadPrec [ArchiveCreationOutput]
readPrec :: ReadPrec ArchiveCreationOutput
$creadPrec :: ReadPrec ArchiveCreationOutput
readList :: ReadS [ArchiveCreationOutput]
$creadList :: ReadS [ArchiveCreationOutput]
readsPrec :: Int -> ReadS ArchiveCreationOutput
$creadsPrec :: Int -> ReadS ArchiveCreationOutput
Prelude.Read, Int -> ArchiveCreationOutput -> ShowS
[ArchiveCreationOutput] -> ShowS
ArchiveCreationOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArchiveCreationOutput] -> ShowS
$cshowList :: [ArchiveCreationOutput] -> ShowS
show :: ArchiveCreationOutput -> String
$cshow :: ArchiveCreationOutput -> String
showsPrec :: Int -> ArchiveCreationOutput -> ShowS
$cshowsPrec :: Int -> ArchiveCreationOutput -> ShowS
Prelude.Show, forall x. Rep ArchiveCreationOutput x -> ArchiveCreationOutput
forall x. ArchiveCreationOutput -> Rep ArchiveCreationOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArchiveCreationOutput x -> ArchiveCreationOutput
$cfrom :: forall x. ArchiveCreationOutput -> Rep ArchiveCreationOutput x
Prelude.Generic)
newArchiveCreationOutput ::
ArchiveCreationOutput
newArchiveCreationOutput :: ArchiveCreationOutput
newArchiveCreationOutput =
ArchiveCreationOutput'
{ $sel:archiveId:ArchiveCreationOutput' :: Maybe Text
archiveId = forall a. Maybe a
Prelude.Nothing,
$sel:checksum:ArchiveCreationOutput' :: Maybe Text
checksum = forall a. Maybe a
Prelude.Nothing,
$sel:location:ArchiveCreationOutput' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing
}
archiveCreationOutput_archiveId :: Lens.Lens' ArchiveCreationOutput (Prelude.Maybe Prelude.Text)
archiveCreationOutput_archiveId :: Lens' ArchiveCreationOutput (Maybe Text)
archiveCreationOutput_archiveId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArchiveCreationOutput' {Maybe Text
archiveId :: Maybe Text
$sel:archiveId:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
archiveId} -> Maybe Text
archiveId) (\s :: ArchiveCreationOutput
s@ArchiveCreationOutput' {} Maybe Text
a -> ArchiveCreationOutput
s {$sel:archiveId:ArchiveCreationOutput' :: Maybe Text
archiveId = Maybe Text
a} :: ArchiveCreationOutput)
archiveCreationOutput_checksum :: Lens.Lens' ArchiveCreationOutput (Prelude.Maybe Prelude.Text)
archiveCreationOutput_checksum :: Lens' ArchiveCreationOutput (Maybe Text)
archiveCreationOutput_checksum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArchiveCreationOutput' {Maybe Text
checksum :: Maybe Text
$sel:checksum:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: ArchiveCreationOutput
s@ArchiveCreationOutput' {} Maybe Text
a -> ArchiveCreationOutput
s {$sel:checksum:ArchiveCreationOutput' :: Maybe Text
checksum = Maybe Text
a} :: ArchiveCreationOutput)
archiveCreationOutput_location :: Lens.Lens' ArchiveCreationOutput (Prelude.Maybe Prelude.Text)
archiveCreationOutput_location :: Lens' ArchiveCreationOutput (Maybe Text)
archiveCreationOutput_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArchiveCreationOutput' {Maybe Text
location :: Maybe Text
$sel:location:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
location} -> Maybe Text
location) (\s :: ArchiveCreationOutput
s@ArchiveCreationOutput' {} Maybe Text
a -> ArchiveCreationOutput
s {$sel:location:ArchiveCreationOutput' :: Maybe Text
location = Maybe Text
a} :: ArchiveCreationOutput)
instance Data.FromJSON ArchiveCreationOutput where
parseJSON :: Value -> Parser ArchiveCreationOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ArchiveCreationOutput"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ArchiveCreationOutput
ArchiveCreationOutput'
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
"x-amz-archive-id")
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
"x-amz-sha256-tree-hash")
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
"Location")
)
instance Prelude.Hashable ArchiveCreationOutput where
hashWithSalt :: Int -> ArchiveCreationOutput -> Int
hashWithSalt Int
_salt ArchiveCreationOutput' {Maybe Text
location :: Maybe Text
checksum :: Maybe Text
archiveId :: Maybe Text
$sel:location:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
$sel:checksum:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
$sel:archiveId:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
archiveId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksum
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
instance Prelude.NFData ArchiveCreationOutput where
rnf :: ArchiveCreationOutput -> ()
rnf ArchiveCreationOutput' {Maybe Text
location :: Maybe Text
checksum :: Maybe Text
archiveId :: Maybe Text
$sel:location:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
$sel:checksum:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
$sel:archiveId:ArchiveCreationOutput' :: ArchiveCreationOutput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
archiveId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksum
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location