{-# 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.S3.Types.CopyObjectResult 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
import Amazonka.S3.Internal
data CopyObjectResult = CopyObjectResult'
{
CopyObjectResult -> Maybe Text
checksumCRC32 :: Prelude.Maybe Prelude.Text,
CopyObjectResult -> Maybe Text
checksumCRC32C :: Prelude.Maybe Prelude.Text,
CopyObjectResult -> Maybe Text
checksumSHA1 :: Prelude.Maybe Prelude.Text,
CopyObjectResult -> Maybe Text
checksumSHA256 :: Prelude.Maybe Prelude.Text,
CopyObjectResult -> Maybe ETag
eTag :: Prelude.Maybe ETag,
CopyObjectResult -> Maybe RFC822
lastModified :: Prelude.Maybe Data.RFC822
}
deriving (CopyObjectResult -> CopyObjectResult -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyObjectResult -> CopyObjectResult -> Bool
$c/= :: CopyObjectResult -> CopyObjectResult -> Bool
== :: CopyObjectResult -> CopyObjectResult -> Bool
$c== :: CopyObjectResult -> CopyObjectResult -> Bool
Prelude.Eq, ReadPrec [CopyObjectResult]
ReadPrec CopyObjectResult
Int -> ReadS CopyObjectResult
ReadS [CopyObjectResult]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyObjectResult]
$creadListPrec :: ReadPrec [CopyObjectResult]
readPrec :: ReadPrec CopyObjectResult
$creadPrec :: ReadPrec CopyObjectResult
readList :: ReadS [CopyObjectResult]
$creadList :: ReadS [CopyObjectResult]
readsPrec :: Int -> ReadS CopyObjectResult
$creadsPrec :: Int -> ReadS CopyObjectResult
Prelude.Read, Int -> CopyObjectResult -> ShowS
[CopyObjectResult] -> ShowS
CopyObjectResult -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyObjectResult] -> ShowS
$cshowList :: [CopyObjectResult] -> ShowS
show :: CopyObjectResult -> String
$cshow :: CopyObjectResult -> String
showsPrec :: Int -> CopyObjectResult -> ShowS
$cshowsPrec :: Int -> CopyObjectResult -> ShowS
Prelude.Show, forall x. Rep CopyObjectResult x -> CopyObjectResult
forall x. CopyObjectResult -> Rep CopyObjectResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyObjectResult x -> CopyObjectResult
$cfrom :: forall x. CopyObjectResult -> Rep CopyObjectResult x
Prelude.Generic)
newCopyObjectResult ::
CopyObjectResult
newCopyObjectResult :: CopyObjectResult
newCopyObjectResult =
CopyObjectResult'
{ $sel:checksumCRC32:CopyObjectResult' :: Maybe Text
checksumCRC32 = forall a. Maybe a
Prelude.Nothing,
$sel:checksumCRC32C:CopyObjectResult' :: Maybe Text
checksumCRC32C = forall a. Maybe a
Prelude.Nothing,
$sel:checksumSHA1:CopyObjectResult' :: Maybe Text
checksumSHA1 = forall a. Maybe a
Prelude.Nothing,
$sel:checksumSHA256:CopyObjectResult' :: Maybe Text
checksumSHA256 = forall a. Maybe a
Prelude.Nothing,
$sel:eTag:CopyObjectResult' :: Maybe ETag
eTag = forall a. Maybe a
Prelude.Nothing,
$sel:lastModified:CopyObjectResult' :: Maybe RFC822
lastModified = forall a. Maybe a
Prelude.Nothing
}
copyObjectResult_checksumCRC32 :: Lens.Lens' CopyObjectResult (Prelude.Maybe Prelude.Text)
copyObjectResult_checksumCRC32 :: Lens' CopyObjectResult (Maybe Text)
copyObjectResult_checksumCRC32 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResult' {Maybe Text
checksumCRC32 :: Maybe Text
$sel:checksumCRC32:CopyObjectResult' :: CopyObjectResult -> Maybe Text
checksumCRC32} -> Maybe Text
checksumCRC32) (\s :: CopyObjectResult
s@CopyObjectResult' {} Maybe Text
a -> CopyObjectResult
s {$sel:checksumCRC32:CopyObjectResult' :: Maybe Text
checksumCRC32 = Maybe Text
a} :: CopyObjectResult)
copyObjectResult_checksumCRC32C :: Lens.Lens' CopyObjectResult (Prelude.Maybe Prelude.Text)
copyObjectResult_checksumCRC32C :: Lens' CopyObjectResult (Maybe Text)
copyObjectResult_checksumCRC32C = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResult' {Maybe Text
checksumCRC32C :: Maybe Text
$sel:checksumCRC32C:CopyObjectResult' :: CopyObjectResult -> Maybe Text
checksumCRC32C} -> Maybe Text
checksumCRC32C) (\s :: CopyObjectResult
s@CopyObjectResult' {} Maybe Text
a -> CopyObjectResult
s {$sel:checksumCRC32C:CopyObjectResult' :: Maybe Text
checksumCRC32C = Maybe Text
a} :: CopyObjectResult)
copyObjectResult_checksumSHA1 :: Lens.Lens' CopyObjectResult (Prelude.Maybe Prelude.Text)
copyObjectResult_checksumSHA1 :: Lens' CopyObjectResult (Maybe Text)
copyObjectResult_checksumSHA1 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResult' {Maybe Text
checksumSHA1 :: Maybe Text
$sel:checksumSHA1:CopyObjectResult' :: CopyObjectResult -> Maybe Text
checksumSHA1} -> Maybe Text
checksumSHA1) (\s :: CopyObjectResult
s@CopyObjectResult' {} Maybe Text
a -> CopyObjectResult
s {$sel:checksumSHA1:CopyObjectResult' :: Maybe Text
checksumSHA1 = Maybe Text
a} :: CopyObjectResult)
copyObjectResult_checksumSHA256 :: Lens.Lens' CopyObjectResult (Prelude.Maybe Prelude.Text)
copyObjectResult_checksumSHA256 :: Lens' CopyObjectResult (Maybe Text)
copyObjectResult_checksumSHA256 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResult' {Maybe Text
checksumSHA256 :: Maybe Text
$sel:checksumSHA256:CopyObjectResult' :: CopyObjectResult -> Maybe Text
checksumSHA256} -> Maybe Text
checksumSHA256) (\s :: CopyObjectResult
s@CopyObjectResult' {} Maybe Text
a -> CopyObjectResult
s {$sel:checksumSHA256:CopyObjectResult' :: Maybe Text
checksumSHA256 = Maybe Text
a} :: CopyObjectResult)
copyObjectResult_eTag :: Lens.Lens' CopyObjectResult (Prelude.Maybe ETag)
copyObjectResult_eTag :: Lens' CopyObjectResult (Maybe ETag)
copyObjectResult_eTag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResult' {Maybe ETag
eTag :: Maybe ETag
$sel:eTag:CopyObjectResult' :: CopyObjectResult -> Maybe ETag
eTag} -> Maybe ETag
eTag) (\s :: CopyObjectResult
s@CopyObjectResult' {} Maybe ETag
a -> CopyObjectResult
s {$sel:eTag:CopyObjectResult' :: Maybe ETag
eTag = Maybe ETag
a} :: CopyObjectResult)
copyObjectResult_lastModified :: Lens.Lens' CopyObjectResult (Prelude.Maybe Prelude.UTCTime)
copyObjectResult_lastModified :: Lens' CopyObjectResult (Maybe UTCTime)
copyObjectResult_lastModified = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyObjectResult' {Maybe RFC822
lastModified :: Maybe RFC822
$sel:lastModified:CopyObjectResult' :: CopyObjectResult -> Maybe RFC822
lastModified} -> Maybe RFC822
lastModified) (\s :: CopyObjectResult
s@CopyObjectResult' {} Maybe RFC822
a -> CopyObjectResult
s {$sel:lastModified:CopyObjectResult' :: Maybe RFC822
lastModified = Maybe RFC822
a} :: CopyObjectResult) 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
instance Data.FromXML CopyObjectResult where
parseXML :: [Node] -> Either String CopyObjectResult
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ETag
-> Maybe RFC822
-> CopyObjectResult
CopyObjectResult'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ChecksumCRC32")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ChecksumCRC32C")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ChecksumSHA1")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ChecksumSHA256")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ETag")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"LastModified")
instance Prelude.Hashable CopyObjectResult where
hashWithSalt :: Int -> CopyObjectResult -> Int
hashWithSalt Int
_salt CopyObjectResult' {Maybe Text
Maybe RFC822
Maybe ETag
lastModified :: Maybe RFC822
eTag :: Maybe ETag
checksumSHA256 :: Maybe Text
checksumSHA1 :: Maybe Text
checksumCRC32C :: Maybe Text
checksumCRC32 :: Maybe Text
$sel:lastModified:CopyObjectResult' :: CopyObjectResult -> Maybe RFC822
$sel:eTag:CopyObjectResult' :: CopyObjectResult -> Maybe ETag
$sel:checksumSHA256:CopyObjectResult' :: CopyObjectResult -> Maybe Text
$sel:checksumSHA1:CopyObjectResult' :: CopyObjectResult -> Maybe Text
$sel:checksumCRC32C:CopyObjectResult' :: CopyObjectResult -> Maybe Text
$sel:checksumCRC32:CopyObjectResult' :: CopyObjectResult -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksumCRC32
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksumCRC32C
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksumSHA1
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
checksumSHA256
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ETag
eTag
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RFC822
lastModified
instance Prelude.NFData CopyObjectResult where
rnf :: CopyObjectResult -> ()
rnf CopyObjectResult' {Maybe Text
Maybe RFC822
Maybe ETag
lastModified :: Maybe RFC822
eTag :: Maybe ETag
checksumSHA256 :: Maybe Text
checksumSHA1 :: Maybe Text
checksumCRC32C :: Maybe Text
checksumCRC32 :: Maybe Text
$sel:lastModified:CopyObjectResult' :: CopyObjectResult -> Maybe RFC822
$sel:eTag:CopyObjectResult' :: CopyObjectResult -> Maybe ETag
$sel:checksumSHA256:CopyObjectResult' :: CopyObjectResult -> Maybe Text
$sel:checksumSHA1:CopyObjectResult' :: CopyObjectResult -> Maybe Text
$sel:checksumCRC32C:CopyObjectResult' :: CopyObjectResult -> Maybe Text
$sel:checksumCRC32:CopyObjectResult' :: CopyObjectResult -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksumCRC32
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksumCRC32C
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksumSHA1
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
checksumSHA256
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ETag
eTag
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RFC822
lastModified