{-# 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.DirectConnectGatewayAttachmentState
-- 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.DirectConnectGatewayAttachmentState
  ( DirectConnectGatewayAttachmentState
      ( ..,
        DirectConnectGatewayAttachmentState_Attached,
        DirectConnectGatewayAttachmentState_Attaching,
        DirectConnectGatewayAttachmentState_Detached,
        DirectConnectGatewayAttachmentState_Detaching
      ),
  )
where

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

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

pattern DirectConnectGatewayAttachmentState_Attached :: DirectConnectGatewayAttachmentState
pattern $bDirectConnectGatewayAttachmentState_Attached :: DirectConnectGatewayAttachmentState
$mDirectConnectGatewayAttachmentState_Attached :: forall r.
DirectConnectGatewayAttachmentState
-> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayAttachmentState_Attached = DirectConnectGatewayAttachmentState' "attached"

pattern DirectConnectGatewayAttachmentState_Attaching :: DirectConnectGatewayAttachmentState
pattern $bDirectConnectGatewayAttachmentState_Attaching :: DirectConnectGatewayAttachmentState
$mDirectConnectGatewayAttachmentState_Attaching :: forall r.
DirectConnectGatewayAttachmentState
-> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayAttachmentState_Attaching = DirectConnectGatewayAttachmentState' "attaching"

pattern DirectConnectGatewayAttachmentState_Detached :: DirectConnectGatewayAttachmentState
pattern $bDirectConnectGatewayAttachmentState_Detached :: DirectConnectGatewayAttachmentState
$mDirectConnectGatewayAttachmentState_Detached :: forall r.
DirectConnectGatewayAttachmentState
-> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayAttachmentState_Detached = DirectConnectGatewayAttachmentState' "detached"

pattern DirectConnectGatewayAttachmentState_Detaching :: DirectConnectGatewayAttachmentState
pattern $bDirectConnectGatewayAttachmentState_Detaching :: DirectConnectGatewayAttachmentState
$mDirectConnectGatewayAttachmentState_Detaching :: forall r.
DirectConnectGatewayAttachmentState
-> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayAttachmentState_Detaching = DirectConnectGatewayAttachmentState' "detaching"

{-# COMPLETE
  DirectConnectGatewayAttachmentState_Attached,
  DirectConnectGatewayAttachmentState_Attaching,
  DirectConnectGatewayAttachmentState_Detached,
  DirectConnectGatewayAttachmentState_Detaching,
  DirectConnectGatewayAttachmentState'
  #-}