{-# 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.GetObjectAttributesParts 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
import Amazonka.S3.Types.ObjectPart
data GetObjectAttributesParts = GetObjectAttributesParts'
{
GetObjectAttributesParts -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
GetObjectAttributesParts -> Maybe Int
maxParts :: Prelude.Maybe Prelude.Int,
GetObjectAttributesParts -> Maybe Int
nextPartNumberMarker :: Prelude.Maybe Prelude.Int,
GetObjectAttributesParts -> Maybe Int
partNumberMarker :: Prelude.Maybe Prelude.Int,
GetObjectAttributesParts -> Maybe [ObjectPart]
parts :: Prelude.Maybe [ObjectPart],
GetObjectAttributesParts -> Maybe Int
totalPartsCount :: Prelude.Maybe Prelude.Int
}
deriving (GetObjectAttributesParts -> GetObjectAttributesParts -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetObjectAttributesParts -> GetObjectAttributesParts -> Bool
$c/= :: GetObjectAttributesParts -> GetObjectAttributesParts -> Bool
== :: GetObjectAttributesParts -> GetObjectAttributesParts -> Bool
$c== :: GetObjectAttributesParts -> GetObjectAttributesParts -> Bool
Prelude.Eq, ReadPrec [GetObjectAttributesParts]
ReadPrec GetObjectAttributesParts
Int -> ReadS GetObjectAttributesParts
ReadS [GetObjectAttributesParts]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetObjectAttributesParts]
$creadListPrec :: ReadPrec [GetObjectAttributesParts]
readPrec :: ReadPrec GetObjectAttributesParts
$creadPrec :: ReadPrec GetObjectAttributesParts
readList :: ReadS [GetObjectAttributesParts]
$creadList :: ReadS [GetObjectAttributesParts]
readsPrec :: Int -> ReadS GetObjectAttributesParts
$creadsPrec :: Int -> ReadS GetObjectAttributesParts
Prelude.Read, Int -> GetObjectAttributesParts -> ShowS
[GetObjectAttributesParts] -> ShowS
GetObjectAttributesParts -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetObjectAttributesParts] -> ShowS
$cshowList :: [GetObjectAttributesParts] -> ShowS
show :: GetObjectAttributesParts -> String
$cshow :: GetObjectAttributesParts -> String
showsPrec :: Int -> GetObjectAttributesParts -> ShowS
$cshowsPrec :: Int -> GetObjectAttributesParts -> ShowS
Prelude.Show, forall x.
Rep GetObjectAttributesParts x -> GetObjectAttributesParts
forall x.
GetObjectAttributesParts -> Rep GetObjectAttributesParts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetObjectAttributesParts x -> GetObjectAttributesParts
$cfrom :: forall x.
GetObjectAttributesParts -> Rep GetObjectAttributesParts x
Prelude.Generic)
newGetObjectAttributesParts ::
GetObjectAttributesParts
newGetObjectAttributesParts :: GetObjectAttributesParts
newGetObjectAttributesParts =
GetObjectAttributesParts'
{ $sel:isTruncated:GetObjectAttributesParts' :: Maybe Bool
isTruncated =
forall a. Maybe a
Prelude.Nothing,
$sel:maxParts:GetObjectAttributesParts' :: Maybe Int
maxParts = forall a. Maybe a
Prelude.Nothing,
$sel:nextPartNumberMarker:GetObjectAttributesParts' :: Maybe Int
nextPartNumberMarker = forall a. Maybe a
Prelude.Nothing,
$sel:partNumberMarker:GetObjectAttributesParts' :: Maybe Int
partNumberMarker = forall a. Maybe a
Prelude.Nothing,
$sel:parts:GetObjectAttributesParts' :: Maybe [ObjectPart]
parts = forall a. Maybe a
Prelude.Nothing,
$sel:totalPartsCount:GetObjectAttributesParts' :: Maybe Int
totalPartsCount = forall a. Maybe a
Prelude.Nothing
}
getObjectAttributesParts_isTruncated :: Lens.Lens' GetObjectAttributesParts (Prelude.Maybe Prelude.Bool)
getObjectAttributesParts_isTruncated :: Lens' GetObjectAttributesParts (Maybe Bool)
getObjectAttributesParts_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectAttributesParts' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: GetObjectAttributesParts
s@GetObjectAttributesParts' {} Maybe Bool
a -> GetObjectAttributesParts
s {$sel:isTruncated:GetObjectAttributesParts' :: Maybe Bool
isTruncated = Maybe Bool
a} :: GetObjectAttributesParts)
getObjectAttributesParts_maxParts :: Lens.Lens' GetObjectAttributesParts (Prelude.Maybe Prelude.Int)
getObjectAttributesParts_maxParts :: Lens' GetObjectAttributesParts (Maybe Int)
getObjectAttributesParts_maxParts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectAttributesParts' {Maybe Int
maxParts :: Maybe Int
$sel:maxParts:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
maxParts} -> Maybe Int
maxParts) (\s :: GetObjectAttributesParts
s@GetObjectAttributesParts' {} Maybe Int
a -> GetObjectAttributesParts
s {$sel:maxParts:GetObjectAttributesParts' :: Maybe Int
maxParts = Maybe Int
a} :: GetObjectAttributesParts)
getObjectAttributesParts_nextPartNumberMarker :: Lens.Lens' GetObjectAttributesParts (Prelude.Maybe Prelude.Int)
getObjectAttributesParts_nextPartNumberMarker :: Lens' GetObjectAttributesParts (Maybe Int)
getObjectAttributesParts_nextPartNumberMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectAttributesParts' {Maybe Int
nextPartNumberMarker :: Maybe Int
$sel:nextPartNumberMarker:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
nextPartNumberMarker} -> Maybe Int
nextPartNumberMarker) (\s :: GetObjectAttributesParts
s@GetObjectAttributesParts' {} Maybe Int
a -> GetObjectAttributesParts
s {$sel:nextPartNumberMarker:GetObjectAttributesParts' :: Maybe Int
nextPartNumberMarker = Maybe Int
a} :: GetObjectAttributesParts)
getObjectAttributesParts_partNumberMarker :: Lens.Lens' GetObjectAttributesParts (Prelude.Maybe Prelude.Int)
getObjectAttributesParts_partNumberMarker :: Lens' GetObjectAttributesParts (Maybe Int)
getObjectAttributesParts_partNumberMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectAttributesParts' {Maybe Int
partNumberMarker :: Maybe Int
$sel:partNumberMarker:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
partNumberMarker} -> Maybe Int
partNumberMarker) (\s :: GetObjectAttributesParts
s@GetObjectAttributesParts' {} Maybe Int
a -> GetObjectAttributesParts
s {$sel:partNumberMarker:GetObjectAttributesParts' :: Maybe Int
partNumberMarker = Maybe Int
a} :: GetObjectAttributesParts)
getObjectAttributesParts_parts :: Lens.Lens' GetObjectAttributesParts (Prelude.Maybe [ObjectPart])
getObjectAttributesParts_parts :: Lens' GetObjectAttributesParts (Maybe [ObjectPart])
getObjectAttributesParts_parts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectAttributesParts' {Maybe [ObjectPart]
parts :: Maybe [ObjectPart]
$sel:parts:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe [ObjectPart]
parts} -> Maybe [ObjectPart]
parts) (\s :: GetObjectAttributesParts
s@GetObjectAttributesParts' {} Maybe [ObjectPart]
a -> GetObjectAttributesParts
s {$sel:parts:GetObjectAttributesParts' :: Maybe [ObjectPart]
parts = Maybe [ObjectPart]
a} :: GetObjectAttributesParts) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getObjectAttributesParts_totalPartsCount :: Lens.Lens' GetObjectAttributesParts (Prelude.Maybe Prelude.Int)
getObjectAttributesParts_totalPartsCount :: Lens' GetObjectAttributesParts (Maybe Int)
getObjectAttributesParts_totalPartsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetObjectAttributesParts' {Maybe Int
totalPartsCount :: Maybe Int
$sel:totalPartsCount:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
totalPartsCount} -> Maybe Int
totalPartsCount) (\s :: GetObjectAttributesParts
s@GetObjectAttributesParts' {} Maybe Int
a -> GetObjectAttributesParts
s {$sel:totalPartsCount:GetObjectAttributesParts' :: Maybe Int
totalPartsCount = Maybe Int
a} :: GetObjectAttributesParts)
instance Data.FromXML GetObjectAttributesParts where
parseXML :: [Node] -> Either String GetObjectAttributesParts
parseXML [Node]
x =
Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [ObjectPart]
-> Maybe Int
-> GetObjectAttributesParts
GetObjectAttributesParts'
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
"IsTruncated")
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
"MaxParts")
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
"NextPartNumberMarker")
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
"PartNumberMarker")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"Part") [Node]
x)
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
"PartsCount")
instance Prelude.Hashable GetObjectAttributesParts where
hashWithSalt :: Int -> GetObjectAttributesParts -> Int
hashWithSalt Int
_salt GetObjectAttributesParts' {Maybe Bool
Maybe Int
Maybe [ObjectPart]
totalPartsCount :: Maybe Int
parts :: Maybe [ObjectPart]
partNumberMarker :: Maybe Int
nextPartNumberMarker :: Maybe Int
maxParts :: Maybe Int
isTruncated :: Maybe Bool
$sel:totalPartsCount:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:parts:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe [ObjectPart]
$sel:partNumberMarker:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:nextPartNumberMarker:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:maxParts:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:isTruncated:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isTruncated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxParts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
nextPartNumberMarker
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
partNumberMarker
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ObjectPart]
parts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
totalPartsCount
instance Prelude.NFData GetObjectAttributesParts where
rnf :: GetObjectAttributesParts -> ()
rnf GetObjectAttributesParts' {Maybe Bool
Maybe Int
Maybe [ObjectPart]
totalPartsCount :: Maybe Int
parts :: Maybe [ObjectPart]
partNumberMarker :: Maybe Int
nextPartNumberMarker :: Maybe Int
maxParts :: Maybe Int
isTruncated :: Maybe Bool
$sel:totalPartsCount:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:parts:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe [ObjectPart]
$sel:partNumberMarker:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:nextPartNumberMarker:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:maxParts:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Int
$sel:isTruncated:GetObjectAttributesParts' :: GetObjectAttributesParts -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxParts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
nextPartNumberMarker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
partNumberMarker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ObjectPart]
parts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
totalPartsCount