{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.S3.Types.RequestCharged
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.S3.Types.RequestCharged
  ( RequestCharged
      ( ..,
        RequestCharged_Requester
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal

-- | If present, indicates that the requester was successfully charged for
-- the request.
newtype RequestCharged = RequestCharged'
  { RequestCharged -> Text
fromRequestCharged ::
      Core.Text
  }
  deriving stock
    ( Int -> RequestCharged -> ShowS
[RequestCharged] -> ShowS
RequestCharged -> String
(Int -> RequestCharged -> ShowS)
-> (RequestCharged -> String)
-> ([RequestCharged] -> ShowS)
-> Show RequestCharged
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestCharged] -> ShowS
$cshowList :: [RequestCharged] -> ShowS
show :: RequestCharged -> String
$cshow :: RequestCharged -> String
showsPrec :: Int -> RequestCharged -> ShowS
$cshowsPrec :: Int -> RequestCharged -> ShowS
Prelude.Show,
      ReadPrec [RequestCharged]
ReadPrec RequestCharged
Int -> ReadS RequestCharged
ReadS [RequestCharged]
(Int -> ReadS RequestCharged)
-> ReadS [RequestCharged]
-> ReadPrec RequestCharged
-> ReadPrec [RequestCharged]
-> Read RequestCharged
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestCharged]
$creadListPrec :: ReadPrec [RequestCharged]
readPrec :: ReadPrec RequestCharged
$creadPrec :: ReadPrec RequestCharged
readList :: ReadS [RequestCharged]
$creadList :: ReadS [RequestCharged]
readsPrec :: Int -> ReadS RequestCharged
$creadsPrec :: Int -> ReadS RequestCharged
Prelude.Read,
      RequestCharged -> RequestCharged -> Bool
(RequestCharged -> RequestCharged -> Bool)
-> (RequestCharged -> RequestCharged -> Bool) -> Eq RequestCharged
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestCharged -> RequestCharged -> Bool
$c/= :: RequestCharged -> RequestCharged -> Bool
== :: RequestCharged -> RequestCharged -> Bool
$c== :: RequestCharged -> RequestCharged -> Bool
Prelude.Eq,
      Eq RequestCharged
Eq RequestCharged
-> (RequestCharged -> RequestCharged -> Ordering)
-> (RequestCharged -> RequestCharged -> Bool)
-> (RequestCharged -> RequestCharged -> Bool)
-> (RequestCharged -> RequestCharged -> Bool)
-> (RequestCharged -> RequestCharged -> Bool)
-> (RequestCharged -> RequestCharged -> RequestCharged)
-> (RequestCharged -> RequestCharged -> RequestCharged)
-> Ord RequestCharged
RequestCharged -> RequestCharged -> Bool
RequestCharged -> RequestCharged -> Ordering
RequestCharged -> RequestCharged -> RequestCharged
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: RequestCharged -> RequestCharged -> RequestCharged
$cmin :: RequestCharged -> RequestCharged -> RequestCharged
max :: RequestCharged -> RequestCharged -> RequestCharged
$cmax :: RequestCharged -> RequestCharged -> RequestCharged
>= :: RequestCharged -> RequestCharged -> Bool
$c>= :: RequestCharged -> RequestCharged -> Bool
> :: RequestCharged -> RequestCharged -> Bool
$c> :: RequestCharged -> RequestCharged -> Bool
<= :: RequestCharged -> RequestCharged -> Bool
$c<= :: RequestCharged -> RequestCharged -> Bool
< :: RequestCharged -> RequestCharged -> Bool
$c< :: RequestCharged -> RequestCharged -> Bool
compare :: RequestCharged -> RequestCharged -> Ordering
$ccompare :: RequestCharged -> RequestCharged -> Ordering
$cp1Ord :: Eq RequestCharged
Prelude.Ord,
      (forall x. RequestCharged -> Rep RequestCharged x)
-> (forall x. Rep RequestCharged x -> RequestCharged)
-> Generic RequestCharged
forall x. Rep RequestCharged x -> RequestCharged
forall x. RequestCharged -> Rep RequestCharged x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RequestCharged x -> RequestCharged
$cfrom :: forall x. RequestCharged -> Rep RequestCharged x
Prelude.Generic
    )
  deriving newtype
    ( Int -> RequestCharged -> Int
RequestCharged -> Int
(Int -> RequestCharged -> Int)
-> (RequestCharged -> Int) -> Hashable RequestCharged
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: RequestCharged -> Int
$chash :: RequestCharged -> Int
hashWithSalt :: Int -> RequestCharged -> Int
$chashWithSalt :: Int -> RequestCharged -> Int
Prelude.Hashable,
      RequestCharged -> ()
(RequestCharged -> ()) -> NFData RequestCharged
forall a. (a -> ()) -> NFData a
rnf :: RequestCharged -> ()
$crnf :: RequestCharged -> ()
Prelude.NFData,
      Text -> Either String RequestCharged
(Text -> Either String RequestCharged) -> FromText RequestCharged
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String RequestCharged
$cfromText :: Text -> Either String RequestCharged
Core.FromText,
      RequestCharged -> Text
(RequestCharged -> Text) -> ToText RequestCharged
forall a. (a -> Text) -> ToText a
toText :: RequestCharged -> Text
$ctoText :: RequestCharged -> Text
Core.ToText,
      RequestCharged -> ByteString
(RequestCharged -> ByteString) -> ToByteString RequestCharged
forall a. (a -> ByteString) -> ToByteString a
toBS :: RequestCharged -> ByteString
$ctoBS :: RequestCharged -> ByteString
Core.ToByteString,
      RequestCharged -> ByteStringBuilder
(RequestCharged -> ByteStringBuilder) -> ToLog RequestCharged
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: RequestCharged -> ByteStringBuilder
$cbuild :: RequestCharged -> ByteStringBuilder
Core.ToLog,
      HeaderName -> RequestCharged -> [Header]
(HeaderName -> RequestCharged -> [Header])
-> ToHeader RequestCharged
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> RequestCharged -> [Header]
$ctoHeader :: HeaderName -> RequestCharged -> [Header]
Core.ToHeader,
      RequestCharged -> QueryString
(RequestCharged -> QueryString) -> ToQuery RequestCharged
forall a. (a -> QueryString) -> ToQuery a
toQuery :: RequestCharged -> QueryString
$ctoQuery :: RequestCharged -> QueryString
Core.ToQuery,
      Value -> Parser [RequestCharged]
Value -> Parser RequestCharged
(Value -> Parser RequestCharged)
-> (Value -> Parser [RequestCharged]) -> FromJSON RequestCharged
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [RequestCharged]
$cparseJSONList :: Value -> Parser [RequestCharged]
parseJSON :: Value -> Parser RequestCharged
$cparseJSON :: Value -> Parser RequestCharged
Core.FromJSON,
      FromJSONKeyFunction [RequestCharged]
FromJSONKeyFunction RequestCharged
FromJSONKeyFunction RequestCharged
-> FromJSONKeyFunction [RequestCharged]
-> FromJSONKey RequestCharged
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [RequestCharged]
$cfromJSONKeyList :: FromJSONKeyFunction [RequestCharged]
fromJSONKey :: FromJSONKeyFunction RequestCharged
$cfromJSONKey :: FromJSONKeyFunction RequestCharged
Core.FromJSONKey,
      [RequestCharged] -> Encoding
[RequestCharged] -> Value
RequestCharged -> Encoding
RequestCharged -> Value
(RequestCharged -> Value)
-> (RequestCharged -> Encoding)
-> ([RequestCharged] -> Value)
-> ([RequestCharged] -> Encoding)
-> ToJSON RequestCharged
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [RequestCharged] -> Encoding
$ctoEncodingList :: [RequestCharged] -> Encoding
toJSONList :: [RequestCharged] -> Value
$ctoJSONList :: [RequestCharged] -> Value
toEncoding :: RequestCharged -> Encoding
$ctoEncoding :: RequestCharged -> Encoding
toJSON :: RequestCharged -> Value
$ctoJSON :: RequestCharged -> Value
Core.ToJSON,
      ToJSONKeyFunction [RequestCharged]
ToJSONKeyFunction RequestCharged
ToJSONKeyFunction RequestCharged
-> ToJSONKeyFunction [RequestCharged] -> ToJSONKey RequestCharged
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [RequestCharged]
$ctoJSONKeyList :: ToJSONKeyFunction [RequestCharged]
toJSONKey :: ToJSONKeyFunction RequestCharged
$ctoJSONKey :: ToJSONKeyFunction RequestCharged
Core.ToJSONKey,
      [Node] -> Either String RequestCharged
([Node] -> Either String RequestCharged) -> FromXML RequestCharged
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String RequestCharged
$cparseXML :: [Node] -> Either String RequestCharged
Core.FromXML,
      RequestCharged -> XML
(RequestCharged -> XML) -> ToXML RequestCharged
forall a. (a -> XML) -> ToXML a
toXML :: RequestCharged -> XML
$ctoXML :: RequestCharged -> XML
Core.ToXML
    )

pattern RequestCharged_Requester :: RequestCharged
pattern $bRequestCharged_Requester :: RequestCharged
$mRequestCharged_Requester :: forall r. RequestCharged -> (Void# -> r) -> (Void# -> r) -> r
RequestCharged_Requester = RequestCharged' "requester"

{-# COMPLETE
  RequestCharged_Requester,
  RequestCharged'
  #-}