{-# 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.MigrationHubReFactorSpaces.Types.HttpMethod
-- 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.MigrationHubReFactorSpaces.Types.HttpMethod
  ( HttpMethod
      ( ..,
        HttpMethod_DELETE,
        HttpMethod_GET,
        HttpMethod_HEAD,
        HttpMethod_OPTIONS,
        HttpMethod_PATCH,
        HttpMethod_POST,
        HttpMethod_PUT
      ),
  )
where

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

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

pattern HttpMethod_DELETE :: HttpMethod
pattern $bHttpMethod_DELETE :: HttpMethod
$mHttpMethod_DELETE :: forall {r}. HttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
HttpMethod_DELETE = HttpMethod' "DELETE"

pattern HttpMethod_GET :: HttpMethod
pattern $bHttpMethod_GET :: HttpMethod
$mHttpMethod_GET :: forall {r}. HttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
HttpMethod_GET = HttpMethod' "GET"

pattern HttpMethod_HEAD :: HttpMethod
pattern $bHttpMethod_HEAD :: HttpMethod
$mHttpMethod_HEAD :: forall {r}. HttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
HttpMethod_HEAD = HttpMethod' "HEAD"

pattern HttpMethod_OPTIONS :: HttpMethod
pattern $bHttpMethod_OPTIONS :: HttpMethod
$mHttpMethod_OPTIONS :: forall {r}. HttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
HttpMethod_OPTIONS = HttpMethod' "OPTIONS"

pattern HttpMethod_PATCH :: HttpMethod
pattern $bHttpMethod_PATCH :: HttpMethod
$mHttpMethod_PATCH :: forall {r}. HttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
HttpMethod_PATCH = HttpMethod' "PATCH"

pattern HttpMethod_POST :: HttpMethod
pattern $bHttpMethod_POST :: HttpMethod
$mHttpMethod_POST :: forall {r}. HttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
HttpMethod_POST = HttpMethod' "POST"

pattern HttpMethod_PUT :: HttpMethod
pattern $bHttpMethod_PUT :: HttpMethod
$mHttpMethod_PUT :: forall {r}. HttpMethod -> ((# #) -> r) -> ((# #) -> r) -> r
HttpMethod_PUT = HttpMethod' "PUT"

{-# COMPLETE
  HttpMethod_DELETE,
  HttpMethod_GET,
  HttpMethod_HEAD,
  HttpMethod_OPTIONS,
  HttpMethod_PATCH,
  HttpMethod_POST,
  HttpMethod_PUT,
  HttpMethod'
  #-}