{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppStream.Types.Session
-- 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.Session where

import Amazonka.AppStream.Types.AuthenticationType
import Amazonka.AppStream.Types.NetworkAccessConfiguration
import Amazonka.AppStream.Types.SessionConnectionState
import Amazonka.AppStream.Types.SessionState
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a streaming session.
--
-- /See:/ 'newSession' smart constructor.
data Session = Session'
  { -- | The network details for the streaming session.
    Session -> Maybe NetworkAccessConfiguration
networkAccessConfiguration :: Prelude.Maybe NetworkAccessConfiguration,
    -- | The time when the streaming session is set to expire. This time is based
    -- on the @MaxUserDurationinSeconds@ value, which determines the maximum
    -- length of time that a streaming session can run. A streaming session
    -- might end earlier than the time specified in @SessionMaxExpirationTime@,
    -- when the @DisconnectTimeOutInSeconds@ elapses or the user chooses to end
    -- his or her session. If the @DisconnectTimeOutInSeconds@ elapses, or the
    -- user chooses to end his or her session, the streaming instance is
    -- terminated and the streaming session ends.
    Session -> Maybe POSIX
maxExpirationTime :: Prelude.Maybe Core.POSIX,
    -- | The time when a streaming instance is dedicated for the user.
    Session -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | The authentication method. The user is authenticated using a streaming
    -- URL (@API@) or SAML 2.0 federation (@SAML@).
    Session -> Maybe AuthenticationType
authenticationType :: Prelude.Maybe AuthenticationType,
    -- | Specifies whether a user is connected to the streaming session.
    Session -> Maybe SessionConnectionState
connectionState :: Prelude.Maybe SessionConnectionState,
    -- | The identifier of the streaming session.
    Session -> Text
id :: Prelude.Text,
    -- | The identifier of the user for whom the session was created.
    Session -> Text
userId :: Prelude.Text,
    -- | The name of the stack for the streaming session.
    Session -> Text
stackName :: Prelude.Text,
    -- | The name of the fleet for the streaming session.
    Session -> Text
fleetName :: Prelude.Text,
    -- | The current state of the streaming session.
    Session -> SessionState
state :: SessionState
  }
  deriving (Session -> Session -> Bool
(Session -> Session -> Bool)
-> (Session -> Session -> Bool) -> Eq Session
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Session -> Session -> Bool
$c/= :: Session -> Session -> Bool
== :: Session -> Session -> Bool
$c== :: Session -> Session -> Bool
Prelude.Eq, ReadPrec [Session]
ReadPrec Session
Int -> ReadS Session
ReadS [Session]
(Int -> ReadS Session)
-> ReadS [Session]
-> ReadPrec Session
-> ReadPrec [Session]
-> Read Session
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Session]
$creadListPrec :: ReadPrec [Session]
readPrec :: ReadPrec Session
$creadPrec :: ReadPrec Session
readList :: ReadS [Session]
$creadList :: ReadS [Session]
readsPrec :: Int -> ReadS Session
$creadsPrec :: Int -> ReadS Session
Prelude.Read, Int -> Session -> ShowS
[Session] -> ShowS
Session -> String
(Int -> Session -> ShowS)
-> (Session -> String) -> ([Session] -> ShowS) -> Show Session
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Session] -> ShowS
$cshowList :: [Session] -> ShowS
show :: Session -> String
$cshow :: Session -> String
showsPrec :: Int -> Session -> ShowS
$cshowsPrec :: Int -> Session -> ShowS
Prelude.Show, (forall x. Session -> Rep Session x)
-> (forall x. Rep Session x -> Session) -> Generic Session
forall x. Rep Session x -> Session
forall x. Session -> Rep Session x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Session x -> Session
$cfrom :: forall x. Session -> Rep Session x
Prelude.Generic)

-- |
-- Create a value of 'Session' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'networkAccessConfiguration', 'session_networkAccessConfiguration' - The network details for the streaming session.
--
-- 'maxExpirationTime', 'session_maxExpirationTime' - The time when the streaming session is set to expire. This time is based
-- on the @MaxUserDurationinSeconds@ value, which determines the maximum
-- length of time that a streaming session can run. A streaming session
-- might end earlier than the time specified in @SessionMaxExpirationTime@,
-- when the @DisconnectTimeOutInSeconds@ elapses or the user chooses to end
-- his or her session. If the @DisconnectTimeOutInSeconds@ elapses, or the
-- user chooses to end his or her session, the streaming instance is
-- terminated and the streaming session ends.
--
-- 'startTime', 'session_startTime' - The time when a streaming instance is dedicated for the user.
--
-- 'authenticationType', 'session_authenticationType' - The authentication method. The user is authenticated using a streaming
-- URL (@API@) or SAML 2.0 federation (@SAML@).
--
-- 'connectionState', 'session_connectionState' - Specifies whether a user is connected to the streaming session.
--
-- 'id', 'session_id' - The identifier of the streaming session.
--
-- 'userId', 'session_userId' - The identifier of the user for whom the session was created.
--
-- 'stackName', 'session_stackName' - The name of the stack for the streaming session.
--
-- 'fleetName', 'session_fleetName' - The name of the fleet for the streaming session.
--
-- 'state', 'session_state' - The current state of the streaming session.
newSession ::
  -- | 'id'
  Prelude.Text ->
  -- | 'userId'
  Prelude.Text ->
  -- | 'stackName'
  Prelude.Text ->
  -- | 'fleetName'
  Prelude.Text ->
  -- | 'state'
  SessionState ->
  Session
newSession :: Text -> Text -> Text -> Text -> SessionState -> Session
newSession
  Text
pId_
  Text
pUserId_
  Text
pStackName_
  Text
pFleetName_
  SessionState
pState_ =
    Session' :: Maybe NetworkAccessConfiguration
-> Maybe POSIX
-> Maybe POSIX
-> Maybe AuthenticationType
-> Maybe SessionConnectionState
-> Text
-> Text
-> Text
-> Text
-> SessionState
-> Session
Session'
      { $sel:networkAccessConfiguration:Session' :: Maybe NetworkAccessConfiguration
networkAccessConfiguration =
          Maybe NetworkAccessConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:maxExpirationTime:Session' :: Maybe POSIX
maxExpirationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:startTime:Session' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:authenticationType:Session' :: Maybe AuthenticationType
authenticationType = Maybe AuthenticationType
forall a. Maybe a
Prelude.Nothing,
        $sel:connectionState:Session' :: Maybe SessionConnectionState
connectionState = Maybe SessionConnectionState
forall a. Maybe a
Prelude.Nothing,
        $sel:id:Session' :: Text
id = Text
pId_,
        $sel:userId:Session' :: Text
userId = Text
pUserId_,
        $sel:stackName:Session' :: Text
stackName = Text
pStackName_,
        $sel:fleetName:Session' :: Text
fleetName = Text
pFleetName_,
        $sel:state:Session' :: SessionState
state = SessionState
pState_
      }

-- | The network details for the streaming session.
session_networkAccessConfiguration :: Lens.Lens' Session (Prelude.Maybe NetworkAccessConfiguration)
session_networkAccessConfiguration :: (Maybe NetworkAccessConfiguration
 -> f (Maybe NetworkAccessConfiguration))
-> Session -> f Session
session_networkAccessConfiguration = (Session -> Maybe NetworkAccessConfiguration)
-> (Session -> Maybe NetworkAccessConfiguration -> Session)
-> Lens
     Session
     Session
     (Maybe NetworkAccessConfiguration)
     (Maybe NetworkAccessConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Maybe NetworkAccessConfiguration
networkAccessConfiguration :: Maybe NetworkAccessConfiguration
$sel:networkAccessConfiguration:Session' :: Session -> Maybe NetworkAccessConfiguration
networkAccessConfiguration} -> Maybe NetworkAccessConfiguration
networkAccessConfiguration) (\s :: Session
s@Session' {} Maybe NetworkAccessConfiguration
a -> Session
s {$sel:networkAccessConfiguration:Session' :: Maybe NetworkAccessConfiguration
networkAccessConfiguration = Maybe NetworkAccessConfiguration
a} :: Session)

-- | The time when the streaming session is set to expire. This time is based
-- on the @MaxUserDurationinSeconds@ value, which determines the maximum
-- length of time that a streaming session can run. A streaming session
-- might end earlier than the time specified in @SessionMaxExpirationTime@,
-- when the @DisconnectTimeOutInSeconds@ elapses or the user chooses to end
-- his or her session. If the @DisconnectTimeOutInSeconds@ elapses, or the
-- user chooses to end his or her session, the streaming instance is
-- terminated and the streaming session ends.
session_maxExpirationTime :: Lens.Lens' Session (Prelude.Maybe Prelude.UTCTime)
session_maxExpirationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Session -> f Session
session_maxExpirationTime = (Session -> Maybe POSIX)
-> (Session -> Maybe POSIX -> Session)
-> Lens Session Session (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Maybe POSIX
maxExpirationTime :: Maybe POSIX
$sel:maxExpirationTime:Session' :: Session -> Maybe POSIX
maxExpirationTime} -> Maybe POSIX
maxExpirationTime) (\s :: Session
s@Session' {} Maybe POSIX
a -> Session
s {$sel:maxExpirationTime:Session' :: Maybe POSIX
maxExpirationTime = Maybe POSIX
a} :: Session) ((Maybe POSIX -> f (Maybe POSIX)) -> Session -> f Session)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Session
-> f Session
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time when a streaming instance is dedicated for the user.
session_startTime :: Lens.Lens' Session (Prelude.Maybe Prelude.UTCTime)
session_startTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Session -> f Session
session_startTime = (Session -> Maybe POSIX)
-> (Session -> Maybe POSIX -> Session)
-> Lens Session Session (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:Session' :: Session -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: Session
s@Session' {} Maybe POSIX
a -> Session
s {$sel:startTime:Session' :: Maybe POSIX
startTime = Maybe POSIX
a} :: Session) ((Maybe POSIX -> f (Maybe POSIX)) -> Session -> f Session)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Session
-> f Session
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The authentication method. The user is authenticated using a streaming
-- URL (@API@) or SAML 2.0 federation (@SAML@).
session_authenticationType :: Lens.Lens' Session (Prelude.Maybe AuthenticationType)
session_authenticationType :: (Maybe AuthenticationType -> f (Maybe AuthenticationType))
-> Session -> f Session
session_authenticationType = (Session -> Maybe AuthenticationType)
-> (Session -> Maybe AuthenticationType -> Session)
-> Lens
     Session
     Session
     (Maybe AuthenticationType)
     (Maybe AuthenticationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Maybe AuthenticationType
authenticationType :: Maybe AuthenticationType
$sel:authenticationType:Session' :: Session -> Maybe AuthenticationType
authenticationType} -> Maybe AuthenticationType
authenticationType) (\s :: Session
s@Session' {} Maybe AuthenticationType
a -> Session
s {$sel:authenticationType:Session' :: Maybe AuthenticationType
authenticationType = Maybe AuthenticationType
a} :: Session)

-- | Specifies whether a user is connected to the streaming session.
session_connectionState :: Lens.Lens' Session (Prelude.Maybe SessionConnectionState)
session_connectionState :: (Maybe SessionConnectionState -> f (Maybe SessionConnectionState))
-> Session -> f Session
session_connectionState = (Session -> Maybe SessionConnectionState)
-> (Session -> Maybe SessionConnectionState -> Session)
-> Lens
     Session
     Session
     (Maybe SessionConnectionState)
     (Maybe SessionConnectionState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Maybe SessionConnectionState
connectionState :: Maybe SessionConnectionState
$sel:connectionState:Session' :: Session -> Maybe SessionConnectionState
connectionState} -> Maybe SessionConnectionState
connectionState) (\s :: Session
s@Session' {} Maybe SessionConnectionState
a -> Session
s {$sel:connectionState:Session' :: Maybe SessionConnectionState
connectionState = Maybe SessionConnectionState
a} :: Session)

-- | The identifier of the streaming session.
session_id :: Lens.Lens' Session Prelude.Text
session_id :: (Text -> f Text) -> Session -> f Session
session_id = (Session -> Text)
-> (Session -> Text -> Session) -> Lens Session Session Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Text
id :: Text
$sel:id:Session' :: Session -> Text
id} -> Text
id) (\s :: Session
s@Session' {} Text
a -> Session
s {$sel:id:Session' :: Text
id = Text
a} :: Session)

-- | The identifier of the user for whom the session was created.
session_userId :: Lens.Lens' Session Prelude.Text
session_userId :: (Text -> f Text) -> Session -> f Session
session_userId = (Session -> Text)
-> (Session -> Text -> Session) -> Lens Session Session Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Text
userId :: Text
$sel:userId:Session' :: Session -> Text
userId} -> Text
userId) (\s :: Session
s@Session' {} Text
a -> Session
s {$sel:userId:Session' :: Text
userId = Text
a} :: Session)

-- | The name of the stack for the streaming session.
session_stackName :: Lens.Lens' Session Prelude.Text
session_stackName :: (Text -> f Text) -> Session -> f Session
session_stackName = (Session -> Text)
-> (Session -> Text -> Session) -> Lens Session Session Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Text
stackName :: Text
$sel:stackName:Session' :: Session -> Text
stackName} -> Text
stackName) (\s :: Session
s@Session' {} Text
a -> Session
s {$sel:stackName:Session' :: Text
stackName = Text
a} :: Session)

-- | The name of the fleet for the streaming session.
session_fleetName :: Lens.Lens' Session Prelude.Text
session_fleetName :: (Text -> f Text) -> Session -> f Session
session_fleetName = (Session -> Text)
-> (Session -> Text -> Session) -> Lens Session Session Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {Text
fleetName :: Text
$sel:fleetName:Session' :: Session -> Text
fleetName} -> Text
fleetName) (\s :: Session
s@Session' {} Text
a -> Session
s {$sel:fleetName:Session' :: Text
fleetName = Text
a} :: Session)

-- | The current state of the streaming session.
session_state :: Lens.Lens' Session SessionState
session_state :: (SessionState -> f SessionState) -> Session -> f Session
session_state = (Session -> SessionState)
-> (Session -> SessionState -> Session)
-> Lens Session Session SessionState SessionState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Session' {SessionState
state :: SessionState
$sel:state:Session' :: Session -> SessionState
state} -> SessionState
state) (\s :: Session
s@Session' {} SessionState
a -> Session
s {$sel:state:Session' :: SessionState
state = SessionState
a} :: Session)

instance Core.FromJSON Session where
  parseJSON :: Value -> Parser Session
parseJSON =
    String -> (Object -> Parser Session) -> Value -> Parser Session
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Session"
      ( \Object
x ->
          Maybe NetworkAccessConfiguration
-> Maybe POSIX
-> Maybe POSIX
-> Maybe AuthenticationType
-> Maybe SessionConnectionState
-> Text
-> Text
-> Text
-> Text
-> SessionState
-> Session
Session'
            (Maybe NetworkAccessConfiguration
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe AuthenticationType
 -> Maybe SessionConnectionState
 -> Text
 -> Text
 -> Text
 -> Text
 -> SessionState
 -> Session)
-> Parser (Maybe NetworkAccessConfiguration)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe AuthenticationType
      -> Maybe SessionConnectionState
      -> Text
      -> Text
      -> Text
      -> Text
      -> SessionState
      -> Session)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NetworkAccessConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NetworkAccessConfiguration")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe AuthenticationType
   -> Maybe SessionConnectionState
   -> Text
   -> Text
   -> Text
   -> Text
   -> SessionState
   -> Session)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe AuthenticationType
      -> Maybe SessionConnectionState
      -> Text
      -> Text
      -> Text
      -> Text
      -> SessionState
      -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxExpirationTime")
            Parser
  (Maybe POSIX
   -> Maybe AuthenticationType
   -> Maybe SessionConnectionState
   -> Text
   -> Text
   -> Text
   -> Text
   -> SessionState
   -> Session)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe AuthenticationType
      -> Maybe SessionConnectionState
      -> Text
      -> Text
      -> Text
      -> Text
      -> SessionState
      -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartTime")
            Parser
  (Maybe AuthenticationType
   -> Maybe SessionConnectionState
   -> Text
   -> Text
   -> Text
   -> Text
   -> SessionState
   -> Session)
-> Parser (Maybe AuthenticationType)
-> Parser
     (Maybe SessionConnectionState
      -> Text -> Text -> Text -> Text -> SessionState -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AuthenticationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuthenticationType")
            Parser
  (Maybe SessionConnectionState
   -> Text -> Text -> Text -> Text -> SessionState -> Session)
-> Parser (Maybe SessionConnectionState)
-> Parser (Text -> Text -> Text -> Text -> SessionState -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SessionConnectionState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectionState")
            Parser (Text -> Text -> Text -> Text -> SessionState -> Session)
-> Parser Text
-> Parser (Text -> Text -> Text -> SessionState -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
            Parser (Text -> Text -> Text -> SessionState -> Session)
-> Parser Text -> Parser (Text -> Text -> SessionState -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"UserId")
            Parser (Text -> Text -> SessionState -> Session)
-> Parser Text -> Parser (Text -> SessionState -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"StackName")
            Parser (Text -> SessionState -> Session)
-> Parser Text -> Parser (SessionState -> Session)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"FleetName")
            Parser (SessionState -> Session)
-> Parser SessionState -> Parser Session
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser SessionState
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"State")
      )

instance Prelude.Hashable Session

instance Prelude.NFData Session