{-# 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.DirectConnectGatewayState
-- 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.DirectConnectGatewayState
  ( DirectConnectGatewayState
      ( ..,
        DirectConnectGatewayState_Available,
        DirectConnectGatewayState_Deleted,
        DirectConnectGatewayState_Deleting,
        DirectConnectGatewayState_Pending
      ),
  )
where

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

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

pattern DirectConnectGatewayState_Available :: DirectConnectGatewayState
pattern $bDirectConnectGatewayState_Available :: DirectConnectGatewayState
$mDirectConnectGatewayState_Available :: forall r.
DirectConnectGatewayState -> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayState_Available = DirectConnectGatewayState' "available"

pattern DirectConnectGatewayState_Deleted :: DirectConnectGatewayState
pattern $bDirectConnectGatewayState_Deleted :: DirectConnectGatewayState
$mDirectConnectGatewayState_Deleted :: forall r.
DirectConnectGatewayState -> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayState_Deleted = DirectConnectGatewayState' "deleted"

pattern DirectConnectGatewayState_Deleting :: DirectConnectGatewayState
pattern $bDirectConnectGatewayState_Deleting :: DirectConnectGatewayState
$mDirectConnectGatewayState_Deleting :: forall r.
DirectConnectGatewayState -> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayState_Deleting = DirectConnectGatewayState' "deleting"

pattern DirectConnectGatewayState_Pending :: DirectConnectGatewayState
pattern $bDirectConnectGatewayState_Pending :: DirectConnectGatewayState
$mDirectConnectGatewayState_Pending :: forall r.
DirectConnectGatewayState -> (Void# -> r) -> (Void# -> r) -> r
DirectConnectGatewayState_Pending = DirectConnectGatewayState' "pending"

{-# COMPLETE
  DirectConnectGatewayState_Available,
  DirectConnectGatewayState_Deleted,
  DirectConnectGatewayState_Deleting,
  DirectConnectGatewayState_Pending,
  DirectConnectGatewayState'
  #-}