{-# 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.Nimble.Types.StreamingSession
-- 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.Nimble.Types.StreamingSession where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types.StreamingSessionState
import Amazonka.Nimble.Types.StreamingSessionStatusCode
import qualified Amazonka.Prelude as Prelude

-- |
--
-- /See:/ 'newStreamingSession' smart constructor.
data StreamingSession = StreamingSession'
  { -- | The user ID of the user that owns the streaming session.
    StreamingSession -> Maybe Text
ownedBy :: Prelude.Maybe Prelude.Text,
    -- | The current state.
    StreamingSession -> Maybe StreamingSessionState
state :: Prelude.Maybe StreamingSessionState,
    -- | The ARN of the resource.
    StreamingSession -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The Unix epoch timestamp in seconds for when the resource was created.
    StreamingSession -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The EC2 Instance type used for the streaming session.
    StreamingSession -> Maybe Text
ec2InstanceType :: Prelude.Maybe Prelude.Text,
    -- | The user ID of the user that created the streaming session.
    StreamingSession -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The ID of the launch profile used to control access from the streaming
    -- session.
    StreamingSession -> Maybe Text
launchProfileId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the streaming image.
    StreamingSession -> Maybe Text
streamingImageId :: Prelude.Maybe Prelude.Text,
    -- | The user ID of the user that most recently updated the resource.
    StreamingSession -> Maybe Text
updatedBy :: Prelude.Maybe Prelude.Text,
    -- | The time the streaming session will automatically terminate if not
    -- terminated by the user.
    StreamingSession -> Maybe POSIX
terminateAt :: Prelude.Maybe Core.POSIX,
    -- | The status message for the streaming session.
    StreamingSession -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The Unix epoch timestamp in seconds for when the resource was updated.
    StreamingSession -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The session ID.
    StreamingSession -> Maybe Text
sessionId :: Prelude.Maybe Prelude.Text,
    -- | A collection of labels, in the form of key:value pairs, that apply to
    -- this resource.
    StreamingSession -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The status code.
    StreamingSession -> Maybe StreamingSessionStatusCode
statusCode :: Prelude.Maybe StreamingSessionStatusCode
  }
  deriving (StreamingSession -> StreamingSession -> Bool
(StreamingSession -> StreamingSession -> Bool)
-> (StreamingSession -> StreamingSession -> Bool)
-> Eq StreamingSession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamingSession -> StreamingSession -> Bool
$c/= :: StreamingSession -> StreamingSession -> Bool
== :: StreamingSession -> StreamingSession -> Bool
$c== :: StreamingSession -> StreamingSession -> Bool
Prelude.Eq, ReadPrec [StreamingSession]
ReadPrec StreamingSession
Int -> ReadS StreamingSession
ReadS [StreamingSession]
(Int -> ReadS StreamingSession)
-> ReadS [StreamingSession]
-> ReadPrec StreamingSession
-> ReadPrec [StreamingSession]
-> Read StreamingSession
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamingSession]
$creadListPrec :: ReadPrec [StreamingSession]
readPrec :: ReadPrec StreamingSession
$creadPrec :: ReadPrec StreamingSession
readList :: ReadS [StreamingSession]
$creadList :: ReadS [StreamingSession]
readsPrec :: Int -> ReadS StreamingSession
$creadsPrec :: Int -> ReadS StreamingSession
Prelude.Read, Int -> StreamingSession -> ShowS
[StreamingSession] -> ShowS
StreamingSession -> String
(Int -> StreamingSession -> ShowS)
-> (StreamingSession -> String)
-> ([StreamingSession] -> ShowS)
-> Show StreamingSession
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamingSession] -> ShowS
$cshowList :: [StreamingSession] -> ShowS
show :: StreamingSession -> String
$cshow :: StreamingSession -> String
showsPrec :: Int -> StreamingSession -> ShowS
$cshowsPrec :: Int -> StreamingSession -> ShowS
Prelude.Show, (forall x. StreamingSession -> Rep StreamingSession x)
-> (forall x. Rep StreamingSession x -> StreamingSession)
-> Generic StreamingSession
forall x. Rep StreamingSession x -> StreamingSession
forall x. StreamingSession -> Rep StreamingSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamingSession x -> StreamingSession
$cfrom :: forall x. StreamingSession -> Rep StreamingSession x
Prelude.Generic)

-- |
-- Create a value of 'StreamingSession' 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:
--
-- 'ownedBy', 'streamingSession_ownedBy' - The user ID of the user that owns the streaming session.
--
-- 'state', 'streamingSession_state' - The current state.
--
-- 'arn', 'streamingSession_arn' - The ARN of the resource.
--
-- 'createdAt', 'streamingSession_createdAt' - The Unix epoch timestamp in seconds for when the resource was created.
--
-- 'ec2InstanceType', 'streamingSession_ec2InstanceType' - The EC2 Instance type used for the streaming session.
--
-- 'createdBy', 'streamingSession_createdBy' - The user ID of the user that created the streaming session.
--
-- 'launchProfileId', 'streamingSession_launchProfileId' - The ID of the launch profile used to control access from the streaming
-- session.
--
-- 'streamingImageId', 'streamingSession_streamingImageId' - The ID of the streaming image.
--
-- 'updatedBy', 'streamingSession_updatedBy' - The user ID of the user that most recently updated the resource.
--
-- 'terminateAt', 'streamingSession_terminateAt' - The time the streaming session will automatically terminate if not
-- terminated by the user.
--
-- 'statusMessage', 'streamingSession_statusMessage' - The status message for the streaming session.
--
-- 'updatedAt', 'streamingSession_updatedAt' - The Unix epoch timestamp in seconds for when the resource was updated.
--
-- 'sessionId', 'streamingSession_sessionId' - The session ID.
--
-- 'tags', 'streamingSession_tags' - A collection of labels, in the form of key:value pairs, that apply to
-- this resource.
--
-- 'statusCode', 'streamingSession_statusCode' - The status code.
newStreamingSession ::
  StreamingSession
newStreamingSession :: StreamingSession
newStreamingSession =
  StreamingSession' :: Maybe Text
-> Maybe StreamingSessionState
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe StreamingSessionStatusCode
-> StreamingSession
StreamingSession'
    { $sel:ownedBy:StreamingSession' :: Maybe Text
ownedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:StreamingSession' :: Maybe StreamingSessionState
state = Maybe StreamingSessionState
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:StreamingSession' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:StreamingSession' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceType:StreamingSession' :: Maybe Text
ec2InstanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:StreamingSession' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:launchProfileId:StreamingSession' :: Maybe Text
launchProfileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:streamingImageId:StreamingSession' :: Maybe Text
streamingImageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedBy:StreamingSession' :: Maybe Text
updatedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:terminateAt:StreamingSession' :: Maybe POSIX
terminateAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:StreamingSession' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:StreamingSession' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sessionId:StreamingSession' :: Maybe Text
sessionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StreamingSession' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:StreamingSession' :: Maybe StreamingSessionStatusCode
statusCode = Maybe StreamingSessionStatusCode
forall a. Maybe a
Prelude.Nothing
    }

-- | The user ID of the user that owns the streaming session.
streamingSession_ownedBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_ownedBy :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_ownedBy = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
ownedBy :: Maybe Text
$sel:ownedBy:StreamingSession' :: StreamingSession -> Maybe Text
ownedBy} -> Maybe Text
ownedBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:ownedBy:StreamingSession' :: Maybe Text
ownedBy = Maybe Text
a} :: StreamingSession)

-- | The current state.
streamingSession_state :: Lens.Lens' StreamingSession (Prelude.Maybe StreamingSessionState)
streamingSession_state :: (Maybe StreamingSessionState -> f (Maybe StreamingSessionState))
-> StreamingSession -> f StreamingSession
streamingSession_state = (StreamingSession -> Maybe StreamingSessionState)
-> (StreamingSession
    -> Maybe StreamingSessionState -> StreamingSession)
-> Lens
     StreamingSession
     StreamingSession
     (Maybe StreamingSessionState)
     (Maybe StreamingSessionState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe StreamingSessionState
state :: Maybe StreamingSessionState
$sel:state:StreamingSession' :: StreamingSession -> Maybe StreamingSessionState
state} -> Maybe StreamingSessionState
state) (\s :: StreamingSession
s@StreamingSession' {} Maybe StreamingSessionState
a -> StreamingSession
s {$sel:state:StreamingSession' :: Maybe StreamingSessionState
state = Maybe StreamingSessionState
a} :: StreamingSession)

-- | The ARN of the resource.
streamingSession_arn :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_arn :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_arn = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
arn :: Maybe Text
$sel:arn:StreamingSession' :: StreamingSession -> Maybe Text
arn} -> Maybe Text
arn) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:arn:StreamingSession' :: Maybe Text
arn = Maybe Text
a} :: StreamingSession)

-- | The Unix epoch timestamp in seconds for when the resource was created.
streamingSession_createdAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSession -> f StreamingSession
streamingSession_createdAt = (StreamingSession -> Maybe POSIX)
-> (StreamingSession -> Maybe POSIX -> StreamingSession)
-> Lens
     StreamingSession StreamingSession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:StreamingSession' :: StreamingSession -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe POSIX
a -> StreamingSession
s {$sel:createdAt:StreamingSession' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: StreamingSession) ((Maybe POSIX -> f (Maybe POSIX))
 -> StreamingSession -> f StreamingSession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSession
-> f StreamingSession
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 EC2 Instance type used for the streaming session.
streamingSession_ec2InstanceType :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_ec2InstanceType :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_ec2InstanceType = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
ec2InstanceType :: Maybe Text
$sel:ec2InstanceType:StreamingSession' :: StreamingSession -> Maybe Text
ec2InstanceType} -> Maybe Text
ec2InstanceType) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:ec2InstanceType:StreamingSession' :: Maybe Text
ec2InstanceType = Maybe Text
a} :: StreamingSession)

-- | The user ID of the user that created the streaming session.
streamingSession_createdBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_createdBy :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_createdBy = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:StreamingSession' :: StreamingSession -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:createdBy:StreamingSession' :: Maybe Text
createdBy = Maybe Text
a} :: StreamingSession)

-- | The ID of the launch profile used to control access from the streaming
-- session.
streamingSession_launchProfileId :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_launchProfileId :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_launchProfileId = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
launchProfileId :: Maybe Text
$sel:launchProfileId:StreamingSession' :: StreamingSession -> Maybe Text
launchProfileId} -> Maybe Text
launchProfileId) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:launchProfileId:StreamingSession' :: Maybe Text
launchProfileId = Maybe Text
a} :: StreamingSession)

-- | The ID of the streaming image.
streamingSession_streamingImageId :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_streamingImageId :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_streamingImageId = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
streamingImageId :: Maybe Text
$sel:streamingImageId:StreamingSession' :: StreamingSession -> Maybe Text
streamingImageId} -> Maybe Text
streamingImageId) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:streamingImageId:StreamingSession' :: Maybe Text
streamingImageId = Maybe Text
a} :: StreamingSession)

-- | The user ID of the user that most recently updated the resource.
streamingSession_updatedBy :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_updatedBy :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_updatedBy = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
updatedBy :: Maybe Text
$sel:updatedBy:StreamingSession' :: StreamingSession -> Maybe Text
updatedBy} -> Maybe Text
updatedBy) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:updatedBy:StreamingSession' :: Maybe Text
updatedBy = Maybe Text
a} :: StreamingSession)

-- | The time the streaming session will automatically terminate if not
-- terminated by the user.
streamingSession_terminateAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_terminateAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSession -> f StreamingSession
streamingSession_terminateAt = (StreamingSession -> Maybe POSIX)
-> (StreamingSession -> Maybe POSIX -> StreamingSession)
-> Lens
     StreamingSession StreamingSession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe POSIX
terminateAt :: Maybe POSIX
$sel:terminateAt:StreamingSession' :: StreamingSession -> Maybe POSIX
terminateAt} -> Maybe POSIX
terminateAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe POSIX
a -> StreamingSession
s {$sel:terminateAt:StreamingSession' :: Maybe POSIX
terminateAt = Maybe POSIX
a} :: StreamingSession) ((Maybe POSIX -> f (Maybe POSIX))
 -> StreamingSession -> f StreamingSession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSession
-> f StreamingSession
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 status message for the streaming session.
streamingSession_statusMessage :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_statusMessage :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_statusMessage = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:StreamingSession' :: StreamingSession -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:statusMessage:StreamingSession' :: Maybe Text
statusMessage = Maybe Text
a} :: StreamingSession)

-- | The Unix epoch timestamp in seconds for when the resource was updated.
streamingSession_updatedAt :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.UTCTime)
streamingSession_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSession -> f StreamingSession
streamingSession_updatedAt = (StreamingSession -> Maybe POSIX)
-> (StreamingSession -> Maybe POSIX -> StreamingSession)
-> Lens
     StreamingSession StreamingSession (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:StreamingSession' :: StreamingSession -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: StreamingSession
s@StreamingSession' {} Maybe POSIX
a -> StreamingSession
s {$sel:updatedAt:StreamingSession' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: StreamingSession) ((Maybe POSIX -> f (Maybe POSIX))
 -> StreamingSession -> f StreamingSession)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSession
-> f StreamingSession
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 session ID.
streamingSession_sessionId :: Lens.Lens' StreamingSession (Prelude.Maybe Prelude.Text)
streamingSession_sessionId :: (Maybe Text -> f (Maybe Text))
-> StreamingSession -> f StreamingSession
streamingSession_sessionId = (StreamingSession -> Maybe Text)
-> (StreamingSession -> Maybe Text -> StreamingSession)
-> Lens StreamingSession StreamingSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe Text
sessionId :: Maybe Text
$sel:sessionId:StreamingSession' :: StreamingSession -> Maybe Text
sessionId} -> Maybe Text
sessionId) (\s :: StreamingSession
s@StreamingSession' {} Maybe Text
a -> StreamingSession
s {$sel:sessionId:StreamingSession' :: Maybe Text
sessionId = Maybe Text
a} :: StreamingSession)

-- | A collection of labels, in the form of key:value pairs, that apply to
-- this resource.
streamingSession_tags :: Lens.Lens' StreamingSession (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
streamingSession_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StreamingSession -> f StreamingSession
streamingSession_tags = (StreamingSession -> Maybe (HashMap Text Text))
-> (StreamingSession
    -> Maybe (HashMap Text Text) -> StreamingSession)
-> Lens
     StreamingSession
     StreamingSession
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StreamingSession' :: StreamingSession -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StreamingSession
s@StreamingSession' {} Maybe (HashMap Text Text)
a -> StreamingSession
s {$sel:tags:StreamingSession' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StreamingSession) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> StreamingSession -> f StreamingSession)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StreamingSession
-> f StreamingSession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status code.
streamingSession_statusCode :: Lens.Lens' StreamingSession (Prelude.Maybe StreamingSessionStatusCode)
streamingSession_statusCode :: (Maybe StreamingSessionStatusCode
 -> f (Maybe StreamingSessionStatusCode))
-> StreamingSession -> f StreamingSession
streamingSession_statusCode = (StreamingSession -> Maybe StreamingSessionStatusCode)
-> (StreamingSession
    -> Maybe StreamingSessionStatusCode -> StreamingSession)
-> Lens
     StreamingSession
     StreamingSession
     (Maybe StreamingSessionStatusCode)
     (Maybe StreamingSessionStatusCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSession' {Maybe StreamingSessionStatusCode
statusCode :: Maybe StreamingSessionStatusCode
$sel:statusCode:StreamingSession' :: StreamingSession -> Maybe StreamingSessionStatusCode
statusCode} -> Maybe StreamingSessionStatusCode
statusCode) (\s :: StreamingSession
s@StreamingSession' {} Maybe StreamingSessionStatusCode
a -> StreamingSession
s {$sel:statusCode:StreamingSession' :: Maybe StreamingSessionStatusCode
statusCode = Maybe StreamingSessionStatusCode
a} :: StreamingSession)

instance Core.FromJSON StreamingSession where
  parseJSON :: Value -> Parser StreamingSession
parseJSON =
    String
-> (Object -> Parser StreamingSession)
-> Value
-> Parser StreamingSession
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"StreamingSession"
      ( \Object
x ->
          Maybe Text
-> Maybe StreamingSessionState
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe StreamingSessionStatusCode
-> StreamingSession
StreamingSession'
            (Maybe Text
 -> Maybe StreamingSessionState
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe StreamingSessionStatusCode
 -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe StreamingSessionState
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ownedBy")
            Parser
  (Maybe StreamingSessionState
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe StreamingSessionState)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamingSessionState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
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
"createdAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ec2InstanceType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdBy")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"launchProfileId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"streamingImageId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"updatedBy")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
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
"terminateAt")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusMessage")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode
      -> StreamingSession)
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
"updatedAt")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode
   -> StreamingSession)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe StreamingSessionStatusCode -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sessionId")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe StreamingSessionStatusCode -> StreamingSession)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe StreamingSessionStatusCode -> StreamingSession)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe StreamingSessionStatusCode -> StreamingSession)
-> Parser (Maybe StreamingSessionStatusCode)
-> Parser StreamingSession
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamingSessionStatusCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusCode")
      )

instance Prelude.Hashable StreamingSession

instance Prelude.NFData StreamingSession