{-# 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.RDS.Types.TargetRole
-- 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.RDS.Types.TargetRole
  ( TargetRole
      ( ..,
        TargetRole_READ_ONLY,
        TargetRole_READ_WRITE,
        TargetRole_UNKNOWN
      ),
  )
where

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

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

pattern TargetRole_READ_ONLY :: TargetRole
pattern $bTargetRole_READ_ONLY :: TargetRole
$mTargetRole_READ_ONLY :: forall r. TargetRole -> (Void# -> r) -> (Void# -> r) -> r
TargetRole_READ_ONLY = TargetRole' "READ_ONLY"

pattern TargetRole_READ_WRITE :: TargetRole
pattern $bTargetRole_READ_WRITE :: TargetRole
$mTargetRole_READ_WRITE :: forall r. TargetRole -> (Void# -> r) -> (Void# -> r) -> r
TargetRole_READ_WRITE = TargetRole' "READ_WRITE"

pattern TargetRole_UNKNOWN :: TargetRole
pattern $bTargetRole_UNKNOWN :: TargetRole
$mTargetRole_UNKNOWN :: forall r. TargetRole -> (Void# -> r) -> (Void# -> r) -> r
TargetRole_UNKNOWN = TargetRole' "UNKNOWN"

{-# COMPLETE
  TargetRole_READ_ONLY,
  TargetRole_READ_WRITE,
  TargetRole_UNKNOWN,
  TargetRole'
  #-}