{-# 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.APIGateway.Types.ApiKeySourceType
-- 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.APIGateway.Types.ApiKeySourceType
  ( ApiKeySourceType
      ( ..,
        ApiKeySourceType_AUTHORIZER,
        ApiKeySourceType_HEADER
      ),
  )
where

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

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

pattern ApiKeySourceType_AUTHORIZER :: ApiKeySourceType
pattern $bApiKeySourceType_AUTHORIZER :: ApiKeySourceType
$mApiKeySourceType_AUTHORIZER :: forall r. ApiKeySourceType -> (Void# -> r) -> (Void# -> r) -> r
ApiKeySourceType_AUTHORIZER = ApiKeySourceType' "AUTHORIZER"

pattern ApiKeySourceType_HEADER :: ApiKeySourceType
pattern $bApiKeySourceType_HEADER :: ApiKeySourceType
$mApiKeySourceType_HEADER :: forall r. ApiKeySourceType -> (Void# -> r) -> (Void# -> r) -> r
ApiKeySourceType_HEADER = ApiKeySourceType' "HEADER"

{-# COMPLETE
  ApiKeySourceType_AUTHORIZER,
  ApiKeySourceType_HEADER,
  ApiKeySourceType'
  #-}