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