{-# 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.CloudFront.Types.Method
-- 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.CloudFront.Types.Method
  ( Method
      ( ..,
        Method_DELETE,
        Method_GET,
        Method_HEAD,
        Method_OPTIONS,
        Method_PATCH,
        Method_POST,
        Method_PUT
      ),
  )
where

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

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

pattern Method_DELETE :: Method
pattern $bMethod_DELETE :: Method
$mMethod_DELETE :: forall {r}. Method -> ((# #) -> r) -> ((# #) -> r) -> r
Method_DELETE = Method' "DELETE"

pattern Method_GET :: Method
pattern $bMethod_GET :: Method
$mMethod_GET :: forall {r}. Method -> ((# #) -> r) -> ((# #) -> r) -> r
Method_GET = Method' "GET"

pattern Method_HEAD :: Method
pattern $bMethod_HEAD :: Method
$mMethod_HEAD :: forall {r}. Method -> ((# #) -> r) -> ((# #) -> r) -> r
Method_HEAD = Method' "HEAD"

pattern Method_OPTIONS :: Method
pattern $bMethod_OPTIONS :: Method
$mMethod_OPTIONS :: forall {r}. Method -> ((# #) -> r) -> ((# #) -> r) -> r
Method_OPTIONS = Method' "OPTIONS"

pattern Method_PATCH :: Method
pattern $bMethod_PATCH :: Method
$mMethod_PATCH :: forall {r}. Method -> ((# #) -> r) -> ((# #) -> r) -> r
Method_PATCH = Method' "PATCH"

pattern Method_POST :: Method
pattern $bMethod_POST :: Method
$mMethod_POST :: forall {r}. Method -> ((# #) -> r) -> ((# #) -> r) -> r
Method_POST = Method' "POST"

pattern Method_PUT :: Method
pattern $bMethod_PUT :: Method
$mMethod_PUT :: forall {r}. Method -> ((# #) -> r) -> ((# #) -> r) -> r
Method_PUT = Method' "PUT"

{-# COMPLETE
  Method_DELETE,
  Method_GET,
  Method_HEAD,
  Method_OPTIONS,
  Method_PATCH,
  Method_POST,
  Method_PUT,
  Method'
  #-}