{-# 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.ConnectionAuthorizationType
-- 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.ConnectionAuthorizationType
  ( ConnectionAuthorizationType
      ( ..,
        ConnectionAuthorizationType_API_KEY,
        ConnectionAuthorizationType_BASIC,
        ConnectionAuthorizationType_OAUTH_CLIENT_CREDENTIALS
      ),
  )
where

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

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

pattern ConnectionAuthorizationType_API_KEY :: ConnectionAuthorizationType
pattern $bConnectionAuthorizationType_API_KEY :: ConnectionAuthorizationType
$mConnectionAuthorizationType_API_KEY :: forall r.
ConnectionAuthorizationType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionAuthorizationType_API_KEY = ConnectionAuthorizationType' "API_KEY"

pattern ConnectionAuthorizationType_BASIC :: ConnectionAuthorizationType
pattern $bConnectionAuthorizationType_BASIC :: ConnectionAuthorizationType
$mConnectionAuthorizationType_BASIC :: forall r.
ConnectionAuthorizationType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionAuthorizationType_BASIC = ConnectionAuthorizationType' "BASIC"

pattern ConnectionAuthorizationType_OAUTH_CLIENT_CREDENTIALS :: ConnectionAuthorizationType
pattern $bConnectionAuthorizationType_OAUTH_CLIENT_CREDENTIALS :: ConnectionAuthorizationType
$mConnectionAuthorizationType_OAUTH_CLIENT_CREDENTIALS :: forall r.
ConnectionAuthorizationType -> (Void# -> r) -> (Void# -> r) -> r
ConnectionAuthorizationType_OAUTH_CLIENT_CREDENTIALS = ConnectionAuthorizationType' "OAUTH_CLIENT_CREDENTIALS"

{-# COMPLETE
  ConnectionAuthorizationType_API_KEY,
  ConnectionAuthorizationType_BASIC,
  ConnectionAuthorizationType_OAUTH_CLIENT_CREDENTIALS,
  ConnectionAuthorizationType'
  #-}