{-# 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.CompletedPart where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
data CompletedPart = CompletedPart'
{
CompletedPart -> Int
partNumber :: Prelude.Int,
CompletedPart -> ETag
eTag :: ETag
}
deriving (CompletedPart -> CompletedPart -> Bool
(CompletedPart -> CompletedPart -> Bool)
-> (CompletedPart -> CompletedPart -> Bool) -> Eq CompletedPart
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompletedPart -> CompletedPart -> Bool
$c/= :: CompletedPart -> CompletedPart -> Bool
== :: CompletedPart -> CompletedPart -> Bool
$c== :: CompletedPart -> CompletedPart -> Bool
Prelude.Eq, ReadPrec [CompletedPart]
ReadPrec CompletedPart
Int -> ReadS CompletedPart
ReadS [CompletedPart]
(Int -> ReadS CompletedPart)
-> ReadS [CompletedPart]
-> ReadPrec CompletedPart
-> ReadPrec [CompletedPart]
-> Read CompletedPart
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CompletedPart]
$creadListPrec :: ReadPrec [CompletedPart]
readPrec :: ReadPrec CompletedPart
$creadPrec :: ReadPrec CompletedPart
readList :: ReadS [CompletedPart]
$creadList :: ReadS [CompletedPart]
readsPrec :: Int -> ReadS CompletedPart
$creadsPrec :: Int -> ReadS CompletedPart
Prelude.Read, Int -> CompletedPart -> ShowS
[CompletedPart] -> ShowS
CompletedPart -> String
(Int -> CompletedPart -> ShowS)
-> (CompletedPart -> String)
-> ([CompletedPart] -> ShowS)
-> Show CompletedPart
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CompletedPart] -> ShowS
$cshowList :: [CompletedPart] -> ShowS
show :: CompletedPart -> String
$cshow :: CompletedPart -> String
showsPrec :: Int -> CompletedPart -> ShowS
$cshowsPrec :: Int -> CompletedPart -> ShowS
Prelude.Show, (forall x. CompletedPart -> Rep CompletedPart x)
-> (forall x. Rep CompletedPart x -> CompletedPart)
-> Generic CompletedPart
forall x. Rep CompletedPart x -> CompletedPart
forall x. CompletedPart -> Rep CompletedPart x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CompletedPart x -> CompletedPart
$cfrom :: forall x. CompletedPart -> Rep CompletedPart x
Prelude.Generic)
newCompletedPart ::
Prelude.Int ->
ETag ->
CompletedPart
newCompletedPart :: Int -> ETag -> CompletedPart
newCompletedPart Int
pPartNumber_ ETag
pETag_ =
CompletedPart' :: Int -> ETag -> CompletedPart
CompletedPart'
{ $sel:partNumber:CompletedPart' :: Int
partNumber = Int
pPartNumber_,
$sel:eTag:CompletedPart' :: ETag
eTag = ETag
pETag_
}
completedPart_partNumber :: Lens.Lens' CompletedPart Prelude.Int
completedPart_partNumber :: (Int -> f Int) -> CompletedPart -> f CompletedPart
completedPart_partNumber = (CompletedPart -> Int)
-> (CompletedPart -> Int -> CompletedPart)
-> Lens CompletedPart CompletedPart Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CompletedPart' {Int
partNumber :: Int
$sel:partNumber:CompletedPart' :: CompletedPart -> Int
partNumber} -> Int
partNumber) (\s :: CompletedPart
s@CompletedPart' {} Int
a -> CompletedPart
s {$sel:partNumber:CompletedPart' :: Int
partNumber = Int
a} :: CompletedPart)
completedPart_eTag :: Lens.Lens' CompletedPart ETag
completedPart_eTag :: (ETag -> f ETag) -> CompletedPart -> f CompletedPart
completedPart_eTag = (CompletedPart -> ETag)
-> (CompletedPart -> ETag -> CompletedPart)
-> Lens CompletedPart CompletedPart ETag ETag
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CompletedPart' {ETag
eTag :: ETag
$sel:eTag:CompletedPart' :: CompletedPart -> ETag
eTag} -> ETag
eTag) (\s :: CompletedPart
s@CompletedPart' {} ETag
a -> CompletedPart
s {$sel:eTag:CompletedPart' :: ETag
eTag = ETag
a} :: CompletedPart)
instance Prelude.Hashable CompletedPart
instance Prelude.NFData CompletedPart
instance Core.ToXML CompletedPart where
toXML :: CompletedPart -> XML
toXML CompletedPart' {Int
ETag
eTag :: ETag
partNumber :: Int
$sel:eTag:CompletedPart' :: CompletedPart -> ETag
$sel:partNumber:CompletedPart' :: CompletedPart -> Int
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"PartNumber" Name -> Int -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Int
partNumber,
Name
"ETag" Name -> ETag -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= ETag
eTag
]