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

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

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

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

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

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

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

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

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

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