{-# 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.Lens as Lens
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
(ArchiveCreationOutput -> ArchiveCreationOutput -> Bool)
-> (ArchiveCreationOutput -> ArchiveCreationOutput -> Bool)
-> Eq ArchiveCreationOutput
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]
(Int -> ReadS ArchiveCreationOutput)
-> ReadS [ArchiveCreationOutput]
-> ReadPrec ArchiveCreationOutput
-> ReadPrec [ArchiveCreationOutput]
-> Read 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
(Int -> ArchiveCreationOutput -> ShowS)
-> (ArchiveCreationOutput -> String)
-> ([ArchiveCreationOutput] -> ShowS)
-> Show ArchiveCreationOutput
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. ArchiveCreationOutput -> Rep ArchiveCreationOutput x)
-> (forall x. Rep ArchiveCreationOutput x -> ArchiveCreationOutput)
-> Generic ArchiveCreationOutput
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' :: Maybe Text -> Maybe Text -> Maybe Text -> ArchiveCreationOutput
ArchiveCreationOutput'
{ $sel:archiveId:ArchiveCreationOutput' :: Maybe Text
archiveId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:checksum:ArchiveCreationOutput' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:location:ArchiveCreationOutput' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
archiveCreationOutput_archiveId :: Lens.Lens' ArchiveCreationOutput (Prelude.Maybe Prelude.Text)
archiveCreationOutput_archiveId :: (Maybe Text -> f (Maybe Text))
-> ArchiveCreationOutput -> f ArchiveCreationOutput
archiveCreationOutput_archiveId = (ArchiveCreationOutput -> Maybe Text)
-> (ArchiveCreationOutput -> Maybe Text -> ArchiveCreationOutput)
-> Lens
ArchiveCreationOutput
ArchiveCreationOutput
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> ArchiveCreationOutput -> f ArchiveCreationOutput
archiveCreationOutput_checksum = (ArchiveCreationOutput -> Maybe Text)
-> (ArchiveCreationOutput -> Maybe Text -> ArchiveCreationOutput)
-> Lens
ArchiveCreationOutput
ArchiveCreationOutput
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> ArchiveCreationOutput -> f ArchiveCreationOutput
archiveCreationOutput_location = (ArchiveCreationOutput -> Maybe Text)
-> (ArchiveCreationOutput -> Maybe Text -> ArchiveCreationOutput)
-> Lens
ArchiveCreationOutput
ArchiveCreationOutput
(Maybe Text)
(Maybe Text)
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 Core.FromJSON ArchiveCreationOutput where
parseJSON :: Value -> Parser ArchiveCreationOutput
parseJSON =
String
-> (Object -> Parser ArchiveCreationOutput)
-> Value
-> Parser ArchiveCreationOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ArchiveCreationOutput"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ArchiveCreationOutput
ArchiveCreationOutput'
(Maybe Text -> Maybe Text -> Maybe Text -> ArchiveCreationOutput)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ArchiveCreationOutput)
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
"x-amz-archive-id")
Parser (Maybe Text -> Maybe Text -> ArchiveCreationOutput)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ArchiveCreationOutput)
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
"x-amz-sha256-tree-hash")
Parser (Maybe Text -> ArchiveCreationOutput)
-> Parser (Maybe Text) -> Parser ArchiveCreationOutput
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
"Location")
)
instance Prelude.Hashable ArchiveCreationOutput
instance Prelude.NFData ArchiveCreationOutput