{-# 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.ReplicaMode
-- 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.ReplicaMode
  ( ReplicaMode
      ( ..,
        ReplicaMode_Mounted,
        ReplicaMode_Open_read_only
      ),
  )
where

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

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

pattern ReplicaMode_Mounted :: ReplicaMode
pattern $bReplicaMode_Mounted :: ReplicaMode
$mReplicaMode_Mounted :: forall r. ReplicaMode -> (Void# -> r) -> (Void# -> r) -> r
ReplicaMode_Mounted = ReplicaMode' "mounted"

pattern ReplicaMode_Open_read_only :: ReplicaMode
pattern $bReplicaMode_Open_read_only :: ReplicaMode
$mReplicaMode_Open_read_only :: forall r. ReplicaMode -> (Void# -> r) -> (Void# -> r) -> r
ReplicaMode_Open_read_only = ReplicaMode' "open-read-only"

{-# COMPLETE
  ReplicaMode_Mounted,
  ReplicaMode_Open_read_only,
  ReplicaMode'
  #-}