{-# 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.AppStream.Types.SessionConnectionState
-- 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.AppStream.Types.SessionConnectionState
  ( SessionConnectionState
      ( ..,
        SessionConnectionState_CONNECTED,
        SessionConnectionState_NOT_CONNECTED
      ),
  )
where

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

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

pattern SessionConnectionState_CONNECTED :: SessionConnectionState
pattern $bSessionConnectionState_CONNECTED :: SessionConnectionState
$mSessionConnectionState_CONNECTED :: forall r.
SessionConnectionState -> (Void# -> r) -> (Void# -> r) -> r
SessionConnectionState_CONNECTED = SessionConnectionState' "CONNECTED"

pattern SessionConnectionState_NOT_CONNECTED :: SessionConnectionState
pattern $bSessionConnectionState_NOT_CONNECTED :: SessionConnectionState
$mSessionConnectionState_NOT_CONNECTED :: forall r.
SessionConnectionState -> (Void# -> r) -> (Void# -> r) -> r
SessionConnectionState_NOT_CONNECTED = SessionConnectionState' "NOT_CONNECTED"

{-# COMPLETE
  SessionConnectionState_CONNECTED,
  SessionConnectionState_NOT_CONNECTED,
  SessionConnectionState'
  #-}