{-# 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.ScanRange where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
data ScanRange = ScanRange'
{
ScanRange -> Maybe Integer
start :: Prelude.Maybe Prelude.Integer,
ScanRange -> Maybe Integer
end :: Prelude.Maybe Prelude.Integer
}
deriving (ScanRange -> ScanRange -> Bool
(ScanRange -> ScanRange -> Bool)
-> (ScanRange -> ScanRange -> Bool) -> Eq ScanRange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScanRange -> ScanRange -> Bool
$c/= :: ScanRange -> ScanRange -> Bool
== :: ScanRange -> ScanRange -> Bool
$c== :: ScanRange -> ScanRange -> Bool
Prelude.Eq, ReadPrec [ScanRange]
ReadPrec ScanRange
Int -> ReadS ScanRange
ReadS [ScanRange]
(Int -> ReadS ScanRange)
-> ReadS [ScanRange]
-> ReadPrec ScanRange
-> ReadPrec [ScanRange]
-> Read ScanRange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScanRange]
$creadListPrec :: ReadPrec [ScanRange]
readPrec :: ReadPrec ScanRange
$creadPrec :: ReadPrec ScanRange
readList :: ReadS [ScanRange]
$creadList :: ReadS [ScanRange]
readsPrec :: Int -> ReadS ScanRange
$creadsPrec :: Int -> ReadS ScanRange
Prelude.Read, Int -> ScanRange -> ShowS
[ScanRange] -> ShowS
ScanRange -> String
(Int -> ScanRange -> ShowS)
-> (ScanRange -> String)
-> ([ScanRange] -> ShowS)
-> Show ScanRange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScanRange] -> ShowS
$cshowList :: [ScanRange] -> ShowS
show :: ScanRange -> String
$cshow :: ScanRange -> String
showsPrec :: Int -> ScanRange -> ShowS
$cshowsPrec :: Int -> ScanRange -> ShowS
Prelude.Show, (forall x. ScanRange -> Rep ScanRange x)
-> (forall x. Rep ScanRange x -> ScanRange) -> Generic ScanRange
forall x. Rep ScanRange x -> ScanRange
forall x. ScanRange -> Rep ScanRange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScanRange x -> ScanRange
$cfrom :: forall x. ScanRange -> Rep ScanRange x
Prelude.Generic)
newScanRange ::
ScanRange
newScanRange :: ScanRange
newScanRange =
ScanRange' :: Maybe Integer -> Maybe Integer -> ScanRange
ScanRange'
{ $sel:start:ScanRange' :: Maybe Integer
start = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:end:ScanRange' :: Maybe Integer
end = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
scanRange_start :: Lens.Lens' ScanRange (Prelude.Maybe Prelude.Integer)
scanRange_start :: (Maybe Integer -> f (Maybe Integer)) -> ScanRange -> f ScanRange
scanRange_start = (ScanRange -> Maybe Integer)
-> (ScanRange -> Maybe Integer -> ScanRange)
-> Lens ScanRange ScanRange (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScanRange' {Maybe Integer
start :: Maybe Integer
$sel:start:ScanRange' :: ScanRange -> Maybe Integer
start} -> Maybe Integer
start) (\s :: ScanRange
s@ScanRange' {} Maybe Integer
a -> ScanRange
s {$sel:start:ScanRange' :: Maybe Integer
start = Maybe Integer
a} :: ScanRange)
scanRange_end :: Lens.Lens' ScanRange (Prelude.Maybe Prelude.Integer)
scanRange_end :: (Maybe Integer -> f (Maybe Integer)) -> ScanRange -> f ScanRange
scanRange_end = (ScanRange -> Maybe Integer)
-> (ScanRange -> Maybe Integer -> ScanRange)
-> Lens ScanRange ScanRange (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScanRange' {Maybe Integer
end :: Maybe Integer
$sel:end:ScanRange' :: ScanRange -> Maybe Integer
end} -> Maybe Integer
end) (\s :: ScanRange
s@ScanRange' {} Maybe Integer
a -> ScanRange
s {$sel:end:ScanRange' :: Maybe Integer
end = Maybe Integer
a} :: ScanRange)
instance Prelude.Hashable ScanRange
instance Prelude.NFData ScanRange
instance Core.ToXML ScanRange where
toXML :: ScanRange -> XML
toXML ScanRange' {Maybe Integer
end :: Maybe Integer
start :: Maybe Integer
$sel:end:ScanRange' :: ScanRange -> Maybe Integer
$sel:start:ScanRange' :: ScanRange -> Maybe Integer
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[Name
"Start" Name -> Maybe Integer -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Integer
start, Name
"End" Name -> Maybe Integer -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Integer
end]