{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types.StreamingSessionStreamState
import Amazonka.Nimble.Types.StreamingSessionStreamStatusCode
import qualified Amazonka.Prelude as Prelude
data StreamingSessionStream = StreamingSessionStream'
{
StreamingSessionStream -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
StreamingSessionStream -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
StreamingSessionStream -> Maybe ISO8601
expiresAt :: Prelude.Maybe Data.ISO8601,
StreamingSessionStream -> Maybe Text
ownedBy :: Prelude.Maybe Prelude.Text,
StreamingSessionStream -> Maybe StreamingSessionStreamState
state :: Prelude.Maybe StreamingSessionStreamState,
StreamingSessionStream -> Maybe StreamingSessionStreamStatusCode
statusCode :: Prelude.Maybe StreamingSessionStreamStatusCode,
StreamingSessionStream -> Maybe Text
streamId :: Prelude.Maybe Prelude.Text,
StreamingSessionStream -> Maybe (Sensitive Text)
url :: Prelude.Maybe (Data.Sensitive Prelude.Text)
}
deriving (StreamingSessionStream -> StreamingSessionStream -> Bool
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, Int -> StreamingSessionStream -> ShowS
[StreamingSessionStream] -> ShowS
StreamingSessionStream -> String
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. 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'
{ $sel:createdAt:StreamingSessionStream' :: Maybe ISO8601
createdAt =
forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:StreamingSessionStream' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
$sel:expiresAt:StreamingSessionStream' :: Maybe ISO8601
expiresAt = forall a. Maybe a
Prelude.Nothing,
$sel:ownedBy:StreamingSessionStream' :: Maybe Text
ownedBy = forall a. Maybe a
Prelude.Nothing,
$sel:state:StreamingSessionStream' :: Maybe StreamingSessionStreamState
state = forall a. Maybe a
Prelude.Nothing,
$sel:statusCode:StreamingSessionStream' :: Maybe StreamingSessionStreamStatusCode
statusCode = forall a. Maybe a
Prelude.Nothing,
$sel:streamId:StreamingSessionStream' :: Maybe Text
streamId = forall a. Maybe a
Prelude.Nothing,
$sel:url:StreamingSessionStream' :: Maybe (Sensitive Text)
url = forall a. Maybe a
Prelude.Nothing
}
streamingSessionStream_createdAt :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.UTCTime)
streamingSessionStream_createdAt :: Lens' StreamingSessionStream (Maybe UTCTime)
streamingSessionStream_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe ISO8601
a -> StreamingSessionStream
s {$sel:createdAt:StreamingSessionStream' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: StreamingSessionStream) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
streamingSessionStream_createdBy :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_createdBy :: Lens' StreamingSessionStream (Maybe Text)
streamingSessionStream_createdBy = 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_expiresAt :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.UTCTime)
streamingSessionStream_expiresAt :: Lens' StreamingSessionStream (Maybe UTCTime)
streamingSessionStream_expiresAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe ISO8601
expiresAt :: Maybe ISO8601
$sel:expiresAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe ISO8601
expiresAt} -> Maybe ISO8601
expiresAt) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe ISO8601
a -> StreamingSessionStream
s {$sel:expiresAt:StreamingSessionStream' :: Maybe ISO8601
expiresAt = Maybe ISO8601
a} :: StreamingSessionStream) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
streamingSessionStream_ownedBy :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_ownedBy :: Lens' StreamingSessionStream (Maybe Text)
streamingSessionStream_ownedBy = 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 :: Lens' StreamingSessionStream (Maybe StreamingSessionStreamState)
streamingSessionStream_state = 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_statusCode :: Lens.Lens' StreamingSessionStream (Prelude.Maybe StreamingSessionStreamStatusCode)
streamingSessionStream_statusCode :: Lens'
StreamingSessionStream (Maybe StreamingSessionStreamStatusCode)
streamingSessionStream_statusCode = 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)
streamingSessionStream_streamId :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_streamId :: Lens' StreamingSessionStream (Maybe Text)
streamingSessionStream_streamId = 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_url :: Lens.Lens' StreamingSessionStream (Prelude.Maybe Prelude.Text)
streamingSessionStream_url :: Lens' StreamingSessionStream (Maybe Text)
streamingSessionStream_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamingSessionStream' {Maybe (Sensitive Text)
url :: Maybe (Sensitive Text)
$sel:url:StreamingSessionStream' :: StreamingSessionStream -> Maybe (Sensitive Text)
url} -> Maybe (Sensitive Text)
url) (\s :: StreamingSessionStream
s@StreamingSessionStream' {} Maybe (Sensitive Text)
a -> StreamingSessionStream
s {$sel:url:StreamingSessionStream' :: Maybe (Sensitive Text)
url = Maybe (Sensitive Text)
a} :: StreamingSessionStream) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
instance Data.FromJSON StreamingSessionStream where
parseJSON :: Value -> Parser StreamingSessionStream
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StreamingSessionStream"
( \Object
x ->
Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe StreamingSessionStreamState
-> Maybe StreamingSessionStreamStatusCode
-> Maybe Text
-> Maybe (Sensitive Text)
-> StreamingSessionStream
StreamingSessionStream'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdBy")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"expiresAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ownedBy")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"statusCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"streamId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"url")
)
instance Prelude.Hashable StreamingSessionStream where
hashWithSalt :: Int -> StreamingSessionStream -> Int
hashWithSalt Int
_salt StreamingSessionStream' {Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe StreamingSessionStreamState
Maybe StreamingSessionStreamStatusCode
url :: Maybe (Sensitive Text)
streamId :: Maybe Text
statusCode :: Maybe StreamingSessionStreamStatusCode
state :: Maybe StreamingSessionStreamState
ownedBy :: Maybe Text
expiresAt :: Maybe ISO8601
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
$sel:url:StreamingSessionStream' :: StreamingSessionStream -> Maybe (Sensitive Text)
$sel:streamId:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
$sel:statusCode:StreamingSessionStream' :: StreamingSessionStream -> Maybe StreamingSessionStreamStatusCode
$sel:state:StreamingSessionStream' :: StreamingSessionStream -> Maybe StreamingSessionStreamState
$sel:ownedBy:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
$sel:expiresAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe ISO8601
$sel:createdBy:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
$sel:createdAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe ISO8601
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
expiresAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownedBy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamingSessionStreamState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamingSessionStreamStatusCode
statusCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
url
instance Prelude.NFData StreamingSessionStream where
rnf :: StreamingSessionStream -> ()
rnf StreamingSessionStream' {Maybe Text
Maybe (Sensitive Text)
Maybe ISO8601
Maybe StreamingSessionStreamState
Maybe StreamingSessionStreamStatusCode
url :: Maybe (Sensitive Text)
streamId :: Maybe Text
statusCode :: Maybe StreamingSessionStreamStatusCode
state :: Maybe StreamingSessionStreamState
ownedBy :: Maybe Text
expiresAt :: Maybe ISO8601
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
$sel:url:StreamingSessionStream' :: StreamingSessionStream -> Maybe (Sensitive Text)
$sel:streamId:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
$sel:statusCode:StreamingSessionStream' :: StreamingSessionStream -> Maybe StreamingSessionStreamStatusCode
$sel:state:StreamingSessionStream' :: StreamingSessionStream -> Maybe StreamingSessionStreamState
$sel:ownedBy:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
$sel:expiresAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe ISO8601
$sel:createdBy:StreamingSessionStream' :: StreamingSessionStream -> Maybe Text
$sel:createdAt:StreamingSessionStream' :: StreamingSessionStream -> Maybe ISO8601
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
expiresAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownedBy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingSessionStreamState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamingSessionStreamStatusCode
statusCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
url