{-# 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.MemoryDb.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.MemoryDb.Types.SourceType
  ( SourceType
      ( ..,
        SourceType_Acl,
        SourceType_Cluster,
        SourceType_Node,
        SourceType_Parameter_group,
        SourceType_Subnet_group,
        SourceType_User
      ),
  )
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_Acl :: SourceType
pattern $bSourceType_Acl :: SourceType
$mSourceType_Acl :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Acl = SourceType' "acl"

pattern SourceType_Cluster :: SourceType
pattern $bSourceType_Cluster :: SourceType
$mSourceType_Cluster :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Cluster = SourceType' "cluster"

pattern SourceType_Node :: SourceType
pattern $bSourceType_Node :: SourceType
$mSourceType_Node :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Node = SourceType' "node"

pattern SourceType_Parameter_group :: SourceType
pattern $bSourceType_Parameter_group :: SourceType
$mSourceType_Parameter_group :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Parameter_group = SourceType' "parameter-group"

pattern SourceType_Subnet_group :: SourceType
pattern $bSourceType_Subnet_group :: SourceType
$mSourceType_Subnet_group :: forall r. SourceType -> (Void# -> r) -> (Void# -> r) -> r
SourceType_Subnet_group = SourceType' "subnet-group"

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

{-# COMPLETE
  SourceType_Acl,
  SourceType_Cluster,
  SourceType_Node,
  SourceType_Parameter_group,
  SourceType_Subnet_group,
  SourceType_User,
  SourceType'
  #-}