{-# 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.Route53RecoveryCluster.Types.RoutingControlState
-- 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.Route53RecoveryCluster.Types.RoutingControlState
  ( RoutingControlState
      ( ..,
        RoutingControlState_Off,
        RoutingControlState_On
      ),
  )
where

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

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

pattern RoutingControlState_Off :: RoutingControlState
pattern $bRoutingControlState_Off :: RoutingControlState
$mRoutingControlState_Off :: forall r. RoutingControlState -> (Void# -> r) -> (Void# -> r) -> r
RoutingControlState_Off = RoutingControlState' "Off"

pattern RoutingControlState_On :: RoutingControlState
pattern $bRoutingControlState_On :: RoutingControlState
$mRoutingControlState_On :: forall r. RoutingControlState -> (Void# -> r) -> (Void# -> r) -> r
RoutingControlState_On = RoutingControlState' "On"

{-# COMPLETE
  RoutingControlState_Off,
  RoutingControlState_On,
  RoutingControlState'
  #-}