{-# 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.ApiDestinationHttpMethod
-- 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.ApiDestinationHttpMethod
  ( ApiDestinationHttpMethod
      ( ..,
        ApiDestinationHttpMethod_DELETE,
        ApiDestinationHttpMethod_GET,
        ApiDestinationHttpMethod_HEAD,
        ApiDestinationHttpMethod_OPTIONS,
        ApiDestinationHttpMethod_PATCH,
        ApiDestinationHttpMethod_POST,
        ApiDestinationHttpMethod_PUT
      ),
  )
where

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

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

pattern ApiDestinationHttpMethod_DELETE :: ApiDestinationHttpMethod
pattern $bApiDestinationHttpMethod_DELETE :: ApiDestinationHttpMethod
$mApiDestinationHttpMethod_DELETE :: forall {r}.
ApiDestinationHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationHttpMethod_DELETE = ApiDestinationHttpMethod' "DELETE"

pattern ApiDestinationHttpMethod_GET :: ApiDestinationHttpMethod
pattern $bApiDestinationHttpMethod_GET :: ApiDestinationHttpMethod
$mApiDestinationHttpMethod_GET :: forall {r}.
ApiDestinationHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationHttpMethod_GET = ApiDestinationHttpMethod' "GET"

pattern ApiDestinationHttpMethod_HEAD :: ApiDestinationHttpMethod
pattern $bApiDestinationHttpMethod_HEAD :: ApiDestinationHttpMethod
$mApiDestinationHttpMethod_HEAD :: forall {r}.
ApiDestinationHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationHttpMethod_HEAD = ApiDestinationHttpMethod' "HEAD"

pattern ApiDestinationHttpMethod_OPTIONS :: ApiDestinationHttpMethod
pattern $bApiDestinationHttpMethod_OPTIONS :: ApiDestinationHttpMethod
$mApiDestinationHttpMethod_OPTIONS :: forall {r}.
ApiDestinationHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationHttpMethod_OPTIONS = ApiDestinationHttpMethod' "OPTIONS"

pattern ApiDestinationHttpMethod_PATCH :: ApiDestinationHttpMethod
pattern $bApiDestinationHttpMethod_PATCH :: ApiDestinationHttpMethod
$mApiDestinationHttpMethod_PATCH :: forall {r}.
ApiDestinationHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationHttpMethod_PATCH = ApiDestinationHttpMethod' "PATCH"

pattern ApiDestinationHttpMethod_POST :: ApiDestinationHttpMethod
pattern $bApiDestinationHttpMethod_POST :: ApiDestinationHttpMethod
$mApiDestinationHttpMethod_POST :: forall {r}.
ApiDestinationHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationHttpMethod_POST = ApiDestinationHttpMethod' "POST"

pattern ApiDestinationHttpMethod_PUT :: ApiDestinationHttpMethod
pattern $bApiDestinationHttpMethod_PUT :: ApiDestinationHttpMethod
$mApiDestinationHttpMethod_PUT :: forall {r}.
ApiDestinationHttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
ApiDestinationHttpMethod_PUT = ApiDestinationHttpMethod' "PUT"

{-# COMPLETE
  ApiDestinationHttpMethod_DELETE,
  ApiDestinationHttpMethod_GET,
  ApiDestinationHttpMethod_HEAD,
  ApiDestinationHttpMethod_OPTIONS,
  ApiDestinationHttpMethod_PATCH,
  ApiDestinationHttpMethod_POST,
  ApiDestinationHttpMethod_PUT,
  ApiDestinationHttpMethod'
  #-}