{-# 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.Lambda.Types.SourceAccessType
-- 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.Lambda.Types.SourceAccessType
  ( SourceAccessType
      ( ..,
        SourceAccessType_BASIC_AUTH,
        SourceAccessType_SASL_SCRAM_256_AUTH,
        SourceAccessType_SASL_SCRAM_512_AUTH,
        SourceAccessType_VIRTUAL_HOST,
        SourceAccessType_VPC_SECURITY_GROUP,
        SourceAccessType_VPC_SUBNET
      ),
  )
where

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

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

pattern SourceAccessType_BASIC_AUTH :: SourceAccessType
pattern $bSourceAccessType_BASIC_AUTH :: SourceAccessType
$mSourceAccessType_BASIC_AUTH :: forall r. SourceAccessType -> (Void# -> r) -> (Void# -> r) -> r
SourceAccessType_BASIC_AUTH = SourceAccessType' "BASIC_AUTH"

pattern SourceAccessType_SASL_SCRAM_256_AUTH :: SourceAccessType
pattern $bSourceAccessType_SASL_SCRAM_256_AUTH :: SourceAccessType
$mSourceAccessType_SASL_SCRAM_256_AUTH :: forall r. SourceAccessType -> (Void# -> r) -> (Void# -> r) -> r
SourceAccessType_SASL_SCRAM_256_AUTH = SourceAccessType' "SASL_SCRAM_256_AUTH"

pattern SourceAccessType_SASL_SCRAM_512_AUTH :: SourceAccessType
pattern $bSourceAccessType_SASL_SCRAM_512_AUTH :: SourceAccessType
$mSourceAccessType_SASL_SCRAM_512_AUTH :: forall r. SourceAccessType -> (Void# -> r) -> (Void# -> r) -> r
SourceAccessType_SASL_SCRAM_512_AUTH = SourceAccessType' "SASL_SCRAM_512_AUTH"

pattern SourceAccessType_VIRTUAL_HOST :: SourceAccessType
pattern $bSourceAccessType_VIRTUAL_HOST :: SourceAccessType
$mSourceAccessType_VIRTUAL_HOST :: forall r. SourceAccessType -> (Void# -> r) -> (Void# -> r) -> r
SourceAccessType_VIRTUAL_HOST = SourceAccessType' "VIRTUAL_HOST"

pattern SourceAccessType_VPC_SECURITY_GROUP :: SourceAccessType
pattern $bSourceAccessType_VPC_SECURITY_GROUP :: SourceAccessType
$mSourceAccessType_VPC_SECURITY_GROUP :: forall r. SourceAccessType -> (Void# -> r) -> (Void# -> r) -> r
SourceAccessType_VPC_SECURITY_GROUP = SourceAccessType' "VPC_SECURITY_GROUP"

pattern SourceAccessType_VPC_SUBNET :: SourceAccessType
pattern $bSourceAccessType_VPC_SUBNET :: SourceAccessType
$mSourceAccessType_VPC_SUBNET :: forall r. SourceAccessType -> (Void# -> r) -> (Void# -> r) -> r
SourceAccessType_VPC_SUBNET = SourceAccessType' "VPC_SUBNET"

{-# COMPLETE
  SourceAccessType_BASIC_AUTH,
  SourceAccessType_SASL_SCRAM_256_AUTH,
  SourceAccessType_SASL_SCRAM_512_AUTH,
  SourceAccessType_VIRTUAL_HOST,
  SourceAccessType_VPC_SECURITY_GROUP,
  SourceAccessType_VPC_SUBNET,
  SourceAccessType'
  #-}