{-# 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.SSM.Types.SessionState
-- 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.SSM.Types.SessionState
  ( SessionState
      ( ..,
        SessionState_Active,
        SessionState_History
      ),
  )
where

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

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

pattern SessionState_Active :: SessionState
pattern $bSessionState_Active :: SessionState
$mSessionState_Active :: forall r. SessionState -> (Void# -> r) -> (Void# -> r) -> r
SessionState_Active = SessionState' "Active"

pattern SessionState_History :: SessionState
pattern $bSessionState_History :: SessionState
$mSessionState_History :: forall r. SessionState -> (Void# -> r) -> (Void# -> r) -> r
SessionState_History = SessionState' "History"

{-# COMPLETE
  SessionState_Active,
  SessionState_History,
  SessionState'
  #-}