{-# 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.ElastiCache.Types.SourceType
-- 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.ElastiCache.Types.SourceType
  ( SourceType
      ( ..,
        SourceType_Cache_cluster,
        SourceType_Cache_parameter_group,
        SourceType_Cache_security_group,
        SourceType_Cache_subnet_group,
        SourceType_Replication_group,
        SourceType_User,
        SourceType_User_group
      ),
  )
where

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

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

pattern SourceType_Cache_cluster :: SourceType
pattern $bSourceType_Cache_cluster :: SourceType
$mSourceType_Cache_cluster :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Cache_cluster = SourceType' "cache-cluster"

pattern SourceType_Cache_parameter_group :: SourceType
pattern $bSourceType_Cache_parameter_group :: SourceType
$mSourceType_Cache_parameter_group :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Cache_parameter_group = SourceType' "cache-parameter-group"

pattern SourceType_Cache_security_group :: SourceType
pattern $bSourceType_Cache_security_group :: SourceType
$mSourceType_Cache_security_group :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Cache_security_group = SourceType' "cache-security-group"

pattern SourceType_Cache_subnet_group :: SourceType
pattern $bSourceType_Cache_subnet_group :: SourceType
$mSourceType_Cache_subnet_group :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Cache_subnet_group = SourceType' "cache-subnet-group"

pattern SourceType_Replication_group :: SourceType
pattern $bSourceType_Replication_group :: SourceType
$mSourceType_Replication_group :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Replication_group = SourceType' "replication-group"

pattern SourceType_User :: SourceType
pattern $bSourceType_User :: SourceType
$mSourceType_User :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_User = SourceType' "user"

pattern SourceType_User_group :: SourceType
pattern $bSourceType_User_group :: SourceType
$mSourceType_User_group :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_User_group = SourceType' "user-group"

{-# COMPLETE
  SourceType_Cache_cluster,
  SourceType_Cache_parameter_group,
  SourceType_Cache_security_group,
  SourceType_Cache_subnet_group,
  SourceType_Replication_group,
  SourceType_User,
  SourceType_User_group,
  SourceType'
  #-}