{-# 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.TargetState
-- 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.TargetState
  ( TargetState
      ( ..,
        TargetState_AVAILABLE,
        TargetState_REGISTERING,
        TargetState_UNAVAILABLE
      ),
  )
where

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

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

pattern TargetState_AVAILABLE :: TargetState
pattern $bTargetState_AVAILABLE :: TargetState
$mTargetState_AVAILABLE :: forall r. TargetState -> (Void# -> r) -> (Void# -> r) -> r
TargetState_AVAILABLE = TargetState' "AVAILABLE"

pattern TargetState_REGISTERING :: TargetState
pattern $bTargetState_REGISTERING :: TargetState
$mTargetState_REGISTERING :: forall r. TargetState -> (Void# -> r) -> (Void# -> r) -> r
TargetState_REGISTERING = TargetState' "REGISTERING"

pattern TargetState_UNAVAILABLE :: TargetState
pattern $bTargetState_UNAVAILABLE :: TargetState
$mTargetState_UNAVAILABLE :: forall r. TargetState -> (Void# -> r) -> (Void# -> r) -> r
TargetState_UNAVAILABLE = TargetState' "UNAVAILABLE"

{-# COMPLETE
  TargetState_AVAILABLE,
  TargetState_REGISTERING,
  TargetState_UNAVAILABLE,
  TargetState'
  #-}