{-# 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.IoTSecureTunneling.Types.TunnelStatus
-- 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.IoTSecureTunneling.Types.TunnelStatus
  ( TunnelStatus
      ( ..,
        TunnelStatus_CLOSED,
        TunnelStatus_OPEN
      ),
  )
where

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

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

pattern TunnelStatus_CLOSED :: TunnelStatus
pattern $bTunnelStatus_CLOSED :: TunnelStatus
$mTunnelStatus_CLOSED :: forall r. TunnelStatus -> (Void# -> r) -> (Void# -> r) -> r
TunnelStatus_CLOSED = TunnelStatus' "CLOSED"

pattern TunnelStatus_OPEN :: TunnelStatus
pattern $bTunnelStatus_OPEN :: TunnelStatus
$mTunnelStatus_OPEN :: forall r. TunnelStatus -> (Void# -> r) -> (Void# -> r) -> r
TunnelStatus_OPEN = TunnelStatus' "OPEN"

{-# COMPLETE
  TunnelStatus_CLOSED,
  TunnelStatus_OPEN,
  TunnelStatus'
  #-}