{-# 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 #-}
module Amazonka.Nimble.Types.StreamingSessionStream where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types.StreamingSessionStreamState
import Amazonka.Nimble.Types.StreamingSessionStreamStatusCode
import qualified Amazonka.Prelude as Prelude
data StreamingSessionStream = StreamingSessionStream'
{
StreamingSessionStream -> Maybe Text
ownedBy :: Prelude.Maybe Prelude.Text,
StreamingSessionStream -> Maybe StreamingSessionStreamState
state :: Prelude.Maybe StreamingSessionStreamState,
StreamingSessionStream -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
StreamingSessionStream -> Maybe POSIX
expiresAt :: Prelude.Maybe Core.POSIX,
StreamingSessionStream -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
StreamingSessionStream -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
StreamingSessionStream -> Maybe Text
streamId :: Prelude.Maybe Prelude.Text,
StreamingSessionStream -> Maybe StreamingSessionStreamStatusCode
statusCode :: Prelude.Maybe StreamingSessionStreamStatusCode
}
deriving (StreamingSessionStream -> StreamingSessionStream -> Bool
(StreamingSessionStream -> StreamingSessionStream -> Bool)
-> (StreamingSessionStream -> StreamingSessionStream -> Bool)
-> Eq StreamingSessionStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamingSessionStream -> StreamingSessionStream -> Bool
$c/= :: StreamingSessionStream -> StreamingSessionStream -> Bool
== :: StreamingSessionStream -> StreamingSessionStream -> Bool
$c== :: StreamingSessionStream -> StreamingSessionStream -> Bool
Prelude.Eq, ReadPrec [StreamingSessionStream]
ReadPrec StreamingSessionStream
Int -> ReadS StreamingSessionStream
ReadS [StreamingSessionStream]
(Int -> ReadS StreamingSessionStream)
-> ReadS [StreamingSessionStream]
-> ReadPrec StreamingSessionStream
-> ReadPrec [StreamingSessionStream]
-> Read StreamingSessionStream
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamingSessionStream]
$creadListPrec :: ReadPrec [StreamingSessionStream]
readPrec :: ReadPrec StreamingSessionStream
$creadPrec :: ReadPrec StreamingSessionStream
readList :: ReadS [StreamingSessionStream]
$creadList :: ReadS [StreamingSessionStream]
readsPrec :: Int -> ReadS StreamingSessionStream
$creadsPrec :: Int -> ReadS StreamingSessionStream
Prelude.Read, Int -> StreamingSessionStream -> ShowS
[StreamingSessionStream] -> ShowS
StreamingSessionStream -> String
(Int -> StreamingSessionStream -> ShowS)
-> (StreamingSessionStream -> String)
-> ([StreamingSessionStream] -> ShowS)
-> Show StreamingSessionStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamingSessionStream] -> ShowS
$cshowList :: [StreamingSessionStream] -> ShowS
show :: StreamingSessionStream -> String
$cshow :: StreamingSessionStream -> String
showsPrec :: Int -> StreamingSessionStream -> ShowS
$cshowsPrec :: Int -> StreamingSessionStream -> ShowS
Prelude.Show, (forall x. StreamingSessionStream -> Rep StreamingSessionStream x)
-> (forall x.
Rep StreamingSessionStream x -> StreamingSessionStream)
-> Generic StreamingSessionStream
forall x. Rep StreamingSessionStream x -> StreamingSessionStream
forall x. StreamingSessionStream -> Rep StreamingSessionStream x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamingSessionStream x -> StreamingSessionStream
$cfrom :: forall x. StreamingSessionStream -> Rep StreamingSessionStream x
Prelude.Generic)
newStreamingSessionStream ::
StreamingSessionStream
newStreamingSessionStream :: StreamingSessionStream
newStreamingSessionStream =
StreamingSessionStream' :: Maybe Text
-> Maybe StreamingSessionStreamState
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream
StreamingSessionStream'
{ $sel:ownedBy:StreamingSessionStream' :: Maybe Text
ownedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:StreamingSessionStream' :: Maybe StreamingSessionStreamState
state = Maybe StreamingSessionStreamState
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:StreamingSessionStream' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:expiresAt:StreamingSessionStream' :: Maybe POSIX
expiresAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:url:StreamingSessionStream' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:StreamingSessionStream' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamId:StreamingSessionStream' :: Maybe Text
streamId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusCode:StreamingSessionStream' :: Maybe StreamingSessionStreamStatusCode
statusCode = Maybe StreamingSessionStreamStatusCode
forall a. Maybe a
Prelude.Nothing
}
streamingSessionStream_ownedBy :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_ownedBy :: (Maybe Text -> f (Maybe Text))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_ownedBy = (StreamingSessionStream -> Maybe Text)
-> (StreamingSessionStream -> Maybe Text -> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe Text
ownedBy :: Maybe Text
$sel:ownedBy:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
ownedBy} -> Maybe Text
ownedBy) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe Text
a -> StreamingSessionStream
s {$sel:ownedBy:StreamingSessionStream' :: Maybe Text
ownedBy = Maybe Text
a} :: StreamingSessionStream)
streamingSessionStream_state :: Lens.Lens' StreamingSessionStream (Prelude.Maybe StreamingSessionStreamState)
streamingSessionStream_state :: (Maybe StreamingSessionStreamState
-> f (Maybe StreamingSessionStreamState))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_state = (StreamingSessionStream -> Maybe StreamingSessionStreamState)
-> (StreamingSessionStream
-> Maybe StreamingSessionStreamState -> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe StreamingSessionStreamState)
(Maybe StreamingSessionStreamState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe StreamingSessionStreamState
state :: Maybe StreamingSessionStreamState
$sel:state:StreamingSessionStream' :: StreamingSessionStream -> Maybe StreamingSessionStreamState
state} -> Maybe StreamingSessionStreamState
state) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe StreamingSessionStreamState
a -> StreamingSessionStream
s {$sel:state:StreamingSessionStream' :: Maybe StreamingSessionStreamState
state = Maybe StreamingSessionStreamState
a} :: StreamingSessionStream)
streamingSessionStream_createdAt :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.UTCTime)
streamingSessionStream_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_createdAt = (StreamingSessionStream -> Maybe POSIX)
-> (StreamingSessionStream
-> Maybe POSIX -> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe POSIX
a -> StreamingSessionStream
s {$sel:createdAt:StreamingSessionStream' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: StreamingSessionStream) ((Maybe POSIX -> f (Maybe POSIX))
-> StreamingSessionStream -> f StreamingSessionStream)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSessionStream
-> f StreamingSessionStream
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
streamingSessionStream_expiresAt :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.UTCTime)
streamingSessionStream_expiresAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_expiresAt = (StreamingSessionStream -> Maybe POSIX)
-> (StreamingSessionStream
-> Maybe POSIX -> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe POSIX
expiresAt :: Maybe POSIX
$sel:expiresAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe POSIX
expiresAt} -> Maybe POSIX
expiresAt) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe POSIX
a -> StreamingSessionStream
s {$sel:expiresAt:StreamingSessionStream' :: Maybe POSIX
expiresAt = Maybe POSIX
a} :: StreamingSessionStream) ((Maybe POSIX -> f (Maybe POSIX))
-> StreamingSessionStream -> f StreamingSessionStream)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamingSessionStream
-> f StreamingSessionStream
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
streamingSessionStream_url :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_url :: (Maybe Text -> f (Maybe Text))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_url = (StreamingSessionStream -> Maybe Text)
-> (StreamingSessionStream -> Maybe Text -> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe Text
url :: Maybe Text
$sel:url:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
url} -> Maybe Text
url) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe Text
a -> StreamingSessionStream
s {$sel:url:StreamingSessionStream' :: Maybe Text
url = Maybe Text
a} :: StreamingSessionStream)
streamingSessionStream_createdBy :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_createdBy :: (Maybe Text -> f (Maybe Text))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_createdBy = (StreamingSessionStream -> Maybe Text)
-> (StreamingSessionStream -> Maybe Text -> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe Text
a -> StreamingSessionStream
s {$sel:createdBy:StreamingSessionStream' :: Maybe Text
createdBy = Maybe Text
a} :: StreamingSessionStream)
streamingSessionStream_streamId :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_streamId :: (Maybe Text -> f (Maybe Text))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_streamId = (StreamingSessionStream -> Maybe Text)
-> (StreamingSessionStream -> Maybe Text -> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe Text
streamId :: Maybe Text
$sel:streamId:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
streamId} -> Maybe Text
streamId) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe Text
a -> StreamingSessionStream
s {$sel:streamId:StreamingSessionStream' :: Maybe Text
streamId = Maybe Text
a} :: StreamingSessionStream)
streamingSessionStream_statusCode :: Lens.Lens' StreamingSessionStream (Prelude.Maybe StreamingSessionStreamStatusCode)
streamingSessionStream_statusCode :: (Maybe StreamingSessionStreamStatusCode
-> f (Maybe StreamingSessionStreamStatusCode))
-> StreamingSessionStream -> f StreamingSessionStream
streamingSessionStream_statusCode = (StreamingSessionStream -> Maybe StreamingSessionStreamStatusCode)
-> (StreamingSessionStream
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Lens
StreamingSessionStream
StreamingSessionStream
(Maybe StreamingSessionStreamStatusCode)
(Maybe StreamingSessionStreamStatusCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe StreamingSessionStreamStatusCode
statusCode :: Maybe StreamingSessionStreamStatusCode
$sel:statusCode:StreamingSessionStream' :: StreamingSessionStream -> Maybe StreamingSessionStreamStatusCode
statusCode} -> Maybe StreamingSessionStreamStatusCode
statusCode) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe StreamingSessionStreamStatusCode
a -> StreamingSessionStream
s {$sel:statusCode:StreamingSessionStream' :: Maybe StreamingSessionStreamStatusCode
statusCode = Maybe StreamingSessionStreamStatusCode
a} :: StreamingSessionStream)
instance Core.FromJSON StreamingSessionStream where
parseJSON :: Value -> Parser StreamingSessionStream
parseJSON =
String
-> (Object -> Parser StreamingSessionStream)
-> Value
-> Parser StreamingSessionStream
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StreamingSessionStream"
( \Object
x ->
Maybe Text
-> Maybe StreamingSessionStreamState
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream
StreamingSessionStream'
(Maybe Text
-> Maybe StreamingSessionStreamState
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Parser (Maybe Text)
-> Parser
(Maybe StreamingSessionStreamState
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
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 StreamingSessionStreamState
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Parser (Maybe StreamingSessionStreamState)
-> Parser
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamingSessionStreamState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
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
"expiresAt")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
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
"url")
Parser
(Maybe Text
-> Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe StreamingSessionStreamStatusCode
-> StreamingSessionStream)
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 StreamingSessionStreamStatusCode
-> StreamingSessionStream)
-> Parser (Maybe Text)
-> Parser
(Maybe StreamingSessionStreamStatusCode -> StreamingSessionStream)
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
"streamId")
Parser
(Maybe StreamingSessionStreamStatusCode -> StreamingSessionStream)
-> Parser (Maybe StreamingSessionStreamStatusCode)
-> Parser StreamingSessionStream
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamingSessionStreamStatusCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusCode")
)
instance Prelude.Hashable StreamingSessionStream
instance Prelude.NFData StreamingSessionStream