{-# 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.Payer
-- 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.Payer
  ( Payer
      ( ..,
        Payer_BucketOwner,
        Payer_Requester
      ),
  )
where

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

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

pattern Payer_BucketOwner :: Payer
pattern $bPayer_BucketOwner :: Payer
$mPayer_BucketOwner :: forall r. Payer -> (Void# -> r) -> (Void# -> r) -> r
Payer_BucketOwner = Payer' "BucketOwner"

pattern Payer_Requester :: Payer
pattern $bPayer_Requester :: Payer
$mPayer_Requester :: forall r. Payer -> (Void# -> r) -> (Void# -> r) -> r
Payer_Requester = Payer' "Requester"

{-# COMPLETE
  Payer_BucketOwner,
  Payer_Requester,
  Payer'
  #-}