{-# 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.InterconnectState
-- 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.InterconnectState
  ( InterconnectState
      ( ..,
        InterconnectState_Available,
        InterconnectState_Deleted,
        InterconnectState_Deleting,
        InterconnectState_Down,
        InterconnectState_Pending,
        InterconnectState_Requested,
        InterconnectState_Unknown
      ),
  )
where

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

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

pattern InterconnectState_Available :: InterconnectState
pattern $bInterconnectState_Available :: InterconnectState
$mInterconnectState_Available :: forall r. InterconnectState -> (Void# -> r) -> (Void# -> r) -> r
InterconnectState_Available = InterconnectState' "available"

pattern InterconnectState_Deleted :: InterconnectState
pattern $bInterconnectState_Deleted :: InterconnectState
$mInterconnectState_Deleted :: forall r. InterconnectState -> (Void# -> r) -> (Void# -> r) -> r
InterconnectState_Deleted = InterconnectState' "deleted"

pattern InterconnectState_Deleting :: InterconnectState
pattern $bInterconnectState_Deleting :: InterconnectState
$mInterconnectState_Deleting :: forall r. InterconnectState -> (Void# -> r) -> (Void# -> r) -> r
InterconnectState_Deleting = InterconnectState' "deleting"

pattern InterconnectState_Down :: InterconnectState
pattern $bInterconnectState_Down :: InterconnectState
$mInterconnectState_Down :: forall r. InterconnectState -> (Void# -> r) -> (Void# -> r) -> r
InterconnectState_Down = InterconnectState' "down"

pattern InterconnectState_Pending :: InterconnectState
pattern $bInterconnectState_Pending :: InterconnectState
$mInterconnectState_Pending :: forall r. InterconnectState -> (Void# -> r) -> (Void# -> r) -> r
InterconnectState_Pending = InterconnectState' "pending"

pattern InterconnectState_Requested :: InterconnectState
pattern $bInterconnectState_Requested :: InterconnectState
$mInterconnectState_Requested :: forall r. InterconnectState -> (Void# -> r) -> (Void# -> r) -> r
InterconnectState_Requested = InterconnectState' "requested"

pattern InterconnectState_Unknown :: InterconnectState
pattern $bInterconnectState_Unknown :: InterconnectState
$mInterconnectState_Unknown :: forall r. InterconnectState -> (Void# -> r) -> (Void# -> r) -> r
InterconnectState_Unknown = InterconnectState' "unknown"

{-# COMPLETE
  InterconnectState_Available,
  InterconnectState_Deleted,
  InterconnectState_Deleting,
  InterconnectState_Down,
  InterconnectState_Pending,
  InterconnectState_Requested,
  InterconnectState_Unknown,
  InterconnectState'
  #-}