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