{-# 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.DirectConnect.Types.BGPStatus
-- 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.DirectConnect.Types.BGPStatus
  ( BGPStatus
      ( ..,
        BGPStatus_Down,
        BGPStatus_Unknown,
        BGPStatus_Up
      ),
  )
where

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

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

pattern BGPStatus_Down :: BGPStatus
pattern $bBGPStatus_Down :: BGPStatus
$mBGPStatus_Down :: forall r. BGPStatus -> (Void# -> r) -> (Void# -> r) -> r
BGPStatus_Down = BGPStatus' "down"

pattern BGPStatus_Unknown :: BGPStatus
pattern $bBGPStatus_Unknown :: BGPStatus
$mBGPStatus_Unknown :: forall r. BGPStatus -> (Void# -> r) -> (Void# -> r) -> r
BGPStatus_Unknown = BGPStatus' "unknown"

pattern BGPStatus_Up :: BGPStatus
pattern $bBGPStatus_Up :: BGPStatus
$mBGPStatus_Up :: forall r. BGPStatus -> (Void# -> r) -> (Void# -> r) -> r
BGPStatus_Up = BGPStatus' "up"

{-# COMPLETE
  BGPStatus_Down,
  BGPStatus_Unknown,
  BGPStatus_Up,
  BGPStatus'
  #-}