{-# 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-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.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.Prelude as Prelude

newtype ApiDestinationHttpMethod = ApiDestinationHttpMethod'
  { ApiDestinationHttpMethod -> Text
fromApiDestinationHttpMethod ::
      Core.Text
  }
  deriving stock
    ( Int -> ApiDestinationHttpMethod -> ShowS
[ApiDestinationHttpMethod] -> ShowS
ApiDestinationHttpMethod -> String
(Int -> ApiDestinationHttpMethod -> ShowS)
-> (ApiDestinationHttpMethod -> String)
-> ([ApiDestinationHttpMethod] -> ShowS)
-> Show ApiDestinationHttpMethod
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]
(Int -> ReadS ApiDestinationHttpMethod)
-> ReadS [ApiDestinationHttpMethod]
-> ReadPrec ApiDestinationHttpMethod
-> ReadPrec [ApiDestinationHttpMethod]
-> Read 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
(ApiDestinationHttpMethod -> ApiDestinationHttpMethod -> Bool)
-> (ApiDestinationHttpMethod -> ApiDestinationHttpMethod -> Bool)
-> Eq ApiDestinationHttpMethod
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
Eq ApiDestinationHttpMethod
-> (ApiDestinationHttpMethod
    -> ApiDestinationHttpMethod -> Ordering)
-> (ApiDestinationHttpMethod -> ApiDestinationHttpMethod -> Bool)
-> (ApiDestinationHttpMethod -> ApiDestinationHttpMethod -> Bool)
-> (ApiDestinationHttpMethod -> ApiDestinationHttpMethod -> Bool)
-> (ApiDestinationHttpMethod -> ApiDestinationHttpMethod -> Bool)
-> (ApiDestinationHttpMethod
    -> ApiDestinationHttpMethod -> ApiDestinationHttpMethod)
-> (ApiDestinationHttpMethod
    -> ApiDestinationHttpMethod -> ApiDestinationHttpMethod)
-> Ord 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
$cp1Ord :: Eq ApiDestinationHttpMethod
Prelude.Ord,
      (forall x.
 ApiDestinationHttpMethod -> Rep ApiDestinationHttpMethod x)
-> (forall x.
    Rep ApiDestinationHttpMethod x -> ApiDestinationHttpMethod)
-> Generic ApiDestinationHttpMethod
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
    ( Int -> ApiDestinationHttpMethod -> Int
ApiDestinationHttpMethod -> Int
(Int -> ApiDestinationHttpMethod -> Int)
-> (ApiDestinationHttpMethod -> Int)
-> Hashable ApiDestinationHttpMethod
forall 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 -> ()
(ApiDestinationHttpMethod -> ()) -> NFData ApiDestinationHttpMethod
forall a. (a -> ()) -> NFData a
rnf :: ApiDestinationHttpMethod -> ()
$crnf :: ApiDestinationHttpMethod -> ()
Prelude.NFData,
      Text -> Either String ApiDestinationHttpMethod
(Text -> Either String ApiDestinationHttpMethod)
-> FromText ApiDestinationHttpMethod
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ApiDestinationHttpMethod
$cfromText :: Text -> Either String ApiDestinationHttpMethod
Core.FromText,
      ApiDestinationHttpMethod -> Text
(ApiDestinationHttpMethod -> Text)
-> ToText ApiDestinationHttpMethod
forall a. (a -> Text) -> ToText a
toText :: ApiDestinationHttpMethod -> Text
$ctoText :: ApiDestinationHttpMethod -> Text
Core.ToText,
      ApiDestinationHttpMethod -> ByteString
(ApiDestinationHttpMethod -> ByteString)
-> ToByteString ApiDestinationHttpMethod
forall a. (a -> ByteString) -> ToByteString a
toBS :: ApiDestinationHttpMethod -> ByteString
$ctoBS :: ApiDestinationHttpMethod -> ByteString
Core.ToByteString,
      ApiDestinationHttpMethod -> ByteStringBuilder
(ApiDestinationHttpMethod -> ByteStringBuilder)
-> ToLog ApiDestinationHttpMethod
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ApiDestinationHttpMethod -> ByteStringBuilder
$cbuild :: ApiDestinationHttpMethod -> ByteStringBuilder
Core.ToLog,
      HeaderName -> ApiDestinationHttpMethod -> [Header]
(HeaderName -> ApiDestinationHttpMethod -> [Header])
-> ToHeader ApiDestinationHttpMethod
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ApiDestinationHttpMethod -> [Header]
$ctoHeader :: HeaderName -> ApiDestinationHttpMethod -> [Header]
Core.ToHeader,
      ApiDestinationHttpMethod -> QueryString
(ApiDestinationHttpMethod -> QueryString)
-> ToQuery ApiDestinationHttpMethod
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ApiDestinationHttpMethod -> QueryString
$ctoQuery :: ApiDestinationHttpMethod -> QueryString
Core.ToQuery,
      Value -> Parser [ApiDestinationHttpMethod]
Value -> Parser ApiDestinationHttpMethod
(Value -> Parser ApiDestinationHttpMethod)
-> (Value -> Parser [ApiDestinationHttpMethod])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [ApiDestinationHttpMethod]
FromJSONKeyFunction ApiDestinationHttpMethod
FromJSONKeyFunction ApiDestinationHttpMethod
-> FromJSONKeyFunction [ApiDestinationHttpMethod]
-> FromJSONKey ApiDestinationHttpMethod
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ApiDestinationHttpMethod]
$cfromJSONKeyList :: FromJSONKeyFunction [ApiDestinationHttpMethod]
fromJSONKey :: FromJSONKeyFunction ApiDestinationHttpMethod
$cfromJSONKey :: FromJSONKeyFunction ApiDestinationHttpMethod
Core.FromJSONKey,
      [ApiDestinationHttpMethod] -> Encoding
[ApiDestinationHttpMethod] -> Value
ApiDestinationHttpMethod -> Encoding
ApiDestinationHttpMethod -> Value
(ApiDestinationHttpMethod -> Value)
-> (ApiDestinationHttpMethod -> Encoding)
-> ([ApiDestinationHttpMethod] -> Value)
-> ([ApiDestinationHttpMethod] -> Encoding)
-> ToJSON ApiDestinationHttpMethod
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
Core.ToJSON,
      ToJSONKeyFunction [ApiDestinationHttpMethod]
ToJSONKeyFunction ApiDestinationHttpMethod
ToJSONKeyFunction ApiDestinationHttpMethod
-> ToJSONKeyFunction [ApiDestinationHttpMethod]
-> ToJSONKey ApiDestinationHttpMethod
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ApiDestinationHttpMethod]
$ctoJSONKeyList :: ToJSONKeyFunction [ApiDestinationHttpMethod]
toJSONKey :: ToJSONKeyFunction ApiDestinationHttpMethod
$ctoJSONKey :: ToJSONKeyFunction ApiDestinationHttpMethod
Core.ToJSONKey,
      [Node] -> Either String ApiDestinationHttpMethod
([Node] -> Either String ApiDestinationHttpMethod)
-> FromXML ApiDestinationHttpMethod
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ApiDestinationHttpMethod
$cparseXML :: [Node] -> Either String ApiDestinationHttpMethod
Core.FromXML,
      ApiDestinationHttpMethod -> XML
(ApiDestinationHttpMethod -> XML) -> ToXML ApiDestinationHttpMethod
forall a. (a -> XML) -> ToXML a
toXML :: ApiDestinationHttpMethod -> XML
$ctoXML :: ApiDestinationHttpMethod -> XML
Core.ToXML
    )

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

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

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

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

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

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

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

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