{-# 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.CloudWatchEvents.Types.ConnectionOAuthHttpMethod
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CloudWatchEvents.Types.ConnectionOAuthHttpMethod
  ( ConnectionOAuthHttpMethod
      ( ..,
        ConnectionOAuthHttpMethod_GET,
        ConnectionOAuthHttpMethod_POST,
        ConnectionOAuthHttpMethod_PUT
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

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

pattern ConnectionOAuthHttpMethod_GET :: ConnectionOAuthHttpMethod
pattern $bConnectionOAuthHttpMethod_GET :: ConnectionOAuthHttpMethod
$mConnectionOAuthHttpMethod_GET :: forall {r}.
ConnectionOAuthHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionOAuthHttpMethod_GET = ConnectionOAuthHttpMethod' "GET"

pattern ConnectionOAuthHttpMethod_POST :: ConnectionOAuthHttpMethod
pattern $bConnectionOAuthHttpMethod_POST :: ConnectionOAuthHttpMethod
$mConnectionOAuthHttpMethod_POST :: forall {r}.
ConnectionOAuthHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionOAuthHttpMethod_POST = ConnectionOAuthHttpMethod' "POST"

pattern ConnectionOAuthHttpMethod_PUT :: ConnectionOAuthHttpMethod
pattern $bConnectionOAuthHttpMethod_PUT :: ConnectionOAuthHttpMethod
$mConnectionOAuthHttpMethod_PUT :: forall {r}.
ConnectionOAuthHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ConnectionOAuthHttpMethod_PUT = ConnectionOAuthHttpMethod' "PUT"

{-# COMPLETE
  ConnectionOAuthHttpMethod_GET,
  ConnectionOAuthHttpMethod_POST,
  ConnectionOAuthHttpMethod_PUT,
  ConnectionOAuthHttpMethod'
  #-}