{-# 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.BGPPeerState
-- 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.BGPPeerState
  ( BGPPeerState
      ( ..,
        BGPPeerState_Available,
        BGPPeerState_Deleted,
        BGPPeerState_Deleting,
        BGPPeerState_Pending,
        BGPPeerState_Verifying
      ),
  )
where

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

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

pattern BGPPeerState_Available :: BGPPeerState
pattern $bBGPPeerState_Available :: BGPPeerState
$mBGPPeerState_Available :: forall r. BGPPeerState -> (Void# -> r) -> (Void# -> r) -> r
BGPPeerState_Available = BGPPeerState' "available"

pattern BGPPeerState_Deleted :: BGPPeerState
pattern $bBGPPeerState_Deleted :: BGPPeerState
$mBGPPeerState_Deleted :: forall r. BGPPeerState -> (Void# -> r) -> (Void# -> r) -> r
BGPPeerState_Deleted = BGPPeerState' "deleted"

pattern BGPPeerState_Deleting :: BGPPeerState
pattern $bBGPPeerState_Deleting :: BGPPeerState
$mBGPPeerState_Deleting :: forall r. BGPPeerState -> (Void# -> r) -> (Void# -> r) -> r
BGPPeerState_Deleting = BGPPeerState' "deleting"

pattern BGPPeerState_Pending :: BGPPeerState
pattern $bBGPPeerState_Pending :: BGPPeerState
$mBGPPeerState_Pending :: forall r. BGPPeerState -> (Void# -> r) -> (Void# -> r) -> r
BGPPeerState_Pending = BGPPeerState' "pending"

pattern BGPPeerState_Verifying :: BGPPeerState
pattern $bBGPPeerState_Verifying :: BGPPeerState
$mBGPPeerState_Verifying :: forall r. BGPPeerState -> (Void# -> r) -> (Void# -> r) -> r
BGPPeerState_Verifying = BGPPeerState' "verifying"

{-# COMPLETE
  BGPPeerState_Available,
  BGPPeerState_Deleted,
  BGPPeerState_Deleting,
  BGPPeerState_Pending,
  BGPPeerState_Verifying,
  BGPPeerState'
  #-}