{-# 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.ConnectionState
-- 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.ConnectionState
  ( ConnectionState
      ( ..,
        ConnectionState_Available,
        ConnectionState_Deleted,
        ConnectionState_Deleting,
        ConnectionState_Down,
        ConnectionState_Ordering,
        ConnectionState_Pending,
        ConnectionState_Rejected,
        ConnectionState_Requested,
        ConnectionState_Unknown
      ),
  )
where

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

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

pattern ConnectionState_Available :: ConnectionState
pattern $bConnectionState_Available :: ConnectionState
$mConnectionState_Available :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Available = ConnectionState' "available"

pattern ConnectionState_Deleted :: ConnectionState
pattern $bConnectionState_Deleted :: ConnectionState
$mConnectionState_Deleted :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Deleted = ConnectionState' "deleted"

pattern ConnectionState_Deleting :: ConnectionState
pattern $bConnectionState_Deleting :: ConnectionState
$mConnectionState_Deleting :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Deleting = ConnectionState' "deleting"

pattern ConnectionState_Down :: ConnectionState
pattern $bConnectionState_Down :: ConnectionState
$mConnectionState_Down :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Down = ConnectionState' "down"

pattern ConnectionState_Ordering :: ConnectionState
pattern $bConnectionState_Ordering :: ConnectionState
$mConnectionState_Ordering :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Ordering = ConnectionState' "ordering"

pattern ConnectionState_Pending :: ConnectionState
pattern $bConnectionState_Pending :: ConnectionState
$mConnectionState_Pending :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Pending = ConnectionState' "pending"

pattern ConnectionState_Rejected :: ConnectionState
pattern $bConnectionState_Rejected :: ConnectionState
$mConnectionState_Rejected :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Rejected = ConnectionState' "rejected"

pattern ConnectionState_Requested :: ConnectionState
pattern $bConnectionState_Requested :: ConnectionState
$mConnectionState_Requested :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Requested = ConnectionState' "requested"

pattern ConnectionState_Unknown :: ConnectionState
pattern $bConnectionState_Unknown :: ConnectionState
$mConnectionState_Unknown :: forall r. ConnectionState -> (Void# -> r) -> (Void# -> r) -> r
ConnectionState_Unknown = ConnectionState' "unknown"

{-# COMPLETE
  ConnectionState_Available,
  ConnectionState_Deleted,
  ConnectionState_Deleting,
  ConnectionState_Down,
  ConnectionState_Ordering,
  ConnectionState_Pending,
  ConnectionState_Rejected,
  ConnectionState_Requested,
  ConnectionState_Unknown,
  ConnectionState'
  #-}