{-# 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.IVS.Types.Channel where
import qualified Amazonka.Core as Core
import Amazonka.IVS.Types.ChannelLatencyMode
import Amazonka.IVS.Types.ChannelType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Channel = Channel'
{
Channel -> Maybe Text
playbackUrl :: Prelude.Maybe Prelude.Text,
Channel -> Maybe Bool
authorized :: Prelude.Maybe Prelude.Bool,
Channel -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Channel -> Maybe ChannelLatencyMode
latencyMode :: Prelude.Maybe ChannelLatencyMode,
Channel -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Channel -> Maybe Text
recordingConfigurationArn :: Prelude.Maybe Prelude.Text,
Channel -> Maybe ChannelType
type' :: Prelude.Maybe ChannelType,
Channel -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Channel -> Maybe Text
ingestEndpoint :: Prelude.Maybe Prelude.Text
}
deriving (Channel -> Channel -> Bool
(Channel -> Channel -> Bool)
-> (Channel -> Channel -> Bool) -> Eq Channel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Channel -> Channel -> Bool
$c/= :: Channel -> Channel -> Bool
== :: Channel -> Channel -> Bool
$c== :: Channel -> Channel -> Bool
Prelude.Eq, ReadPrec [Channel]
ReadPrec Channel
Int -> ReadS Channel
ReadS [Channel]
(Int -> ReadS Channel)
-> ReadS [Channel]
-> ReadPrec Channel
-> ReadPrec [Channel]
-> Read Channel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Channel]
$creadListPrec :: ReadPrec [Channel]
readPrec :: ReadPrec Channel
$creadPrec :: ReadPrec Channel
readList :: ReadS [Channel]
$creadList :: ReadS [Channel]
readsPrec :: Int -> ReadS Channel
$creadsPrec :: Int -> ReadS Channel
Prelude.Read, Int -> Channel -> ShowS
[Channel] -> ShowS
Channel -> String
(Int -> Channel -> ShowS)
-> (Channel -> String) -> ([Channel] -> ShowS) -> Show Channel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Channel] -> ShowS
$cshowList :: [Channel] -> ShowS
show :: Channel -> String
$cshow :: Channel -> String
showsPrec :: Int -> Channel -> ShowS
$cshowsPrec :: Int -> Channel -> ShowS
Prelude.Show, (forall x. Channel -> Rep Channel x)
-> (forall x. Rep Channel x -> Channel) -> Generic Channel
forall x. Rep Channel x -> Channel
forall x. Channel -> Rep Channel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Channel x -> Channel
$cfrom :: forall x. Channel -> Rep Channel x
Prelude.Generic)
newChannel ::
Channel
newChannel :: Channel
newChannel =
Channel' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel
Channel'
{ $sel:playbackUrl:Channel' :: Maybe Text
playbackUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorized:Channel' :: Maybe Bool
authorized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Channel' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latencyMode:Channel' :: Maybe ChannelLatencyMode
latencyMode = Maybe ChannelLatencyMode
forall a. Maybe a
Prelude.Nothing,
$sel:name:Channel' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recordingConfigurationArn:Channel' :: Maybe Text
recordingConfigurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':Channel' :: Maybe ChannelType
type' = Maybe ChannelType
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Channel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:ingestEndpoint:Channel' :: Maybe Text
ingestEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
channel_playbackUrl :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_playbackUrl :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_playbackUrl = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
playbackUrl :: Maybe Text
$sel:playbackUrl:Channel' :: Channel -> Maybe Text
playbackUrl} -> Maybe Text
playbackUrl) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:playbackUrl:Channel' :: Maybe Text
playbackUrl = Maybe Text
a} :: Channel)
channel_authorized :: Lens.Lens' Channel (Prelude.Maybe Prelude.Bool)
channel_authorized :: (Maybe Bool -> f (Maybe Bool)) -> Channel -> f Channel
channel_authorized = (Channel -> Maybe Bool)
-> (Channel -> Maybe Bool -> Channel)
-> Lens Channel Channel (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Bool
authorized :: Maybe Bool
$sel:authorized:Channel' :: Channel -> Maybe Bool
authorized} -> Maybe Bool
authorized) (\s :: Channel
s@Channel' {} Maybe Bool
a -> Channel
s {$sel:authorized:Channel' :: Maybe Bool
authorized = Maybe Bool
a} :: Channel)
channel_arn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_arn :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_arn = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
arn :: Maybe Text
$sel:arn:Channel' :: Channel -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:arn:Channel' :: Maybe Text
arn = Maybe Text
a} :: Channel)
channel_latencyMode :: Lens.Lens' Channel (Prelude.Maybe ChannelLatencyMode)
channel_latencyMode :: (Maybe ChannelLatencyMode -> f (Maybe ChannelLatencyMode))
-> Channel -> f Channel
channel_latencyMode = (Channel -> Maybe ChannelLatencyMode)
-> (Channel -> Maybe ChannelLatencyMode -> Channel)
-> Lens
Channel
Channel
(Maybe ChannelLatencyMode)
(Maybe ChannelLatencyMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelLatencyMode
latencyMode :: Maybe ChannelLatencyMode
$sel:latencyMode:Channel' :: Channel -> Maybe ChannelLatencyMode
latencyMode} -> Maybe ChannelLatencyMode
latencyMode) (\s :: Channel
s@Channel' {} Maybe ChannelLatencyMode
a -> Channel
s {$sel:latencyMode:Channel' :: Maybe ChannelLatencyMode
latencyMode = Maybe ChannelLatencyMode
a} :: Channel)
channel_name :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_name :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_name = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
name :: Maybe Text
$sel:name:Channel' :: Channel -> Maybe Text
name} -> Maybe Text
name) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:name:Channel' :: Maybe Text
name = Maybe Text
a} :: Channel)
channel_recordingConfigurationArn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_recordingConfigurationArn :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_recordingConfigurationArn = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
recordingConfigurationArn :: Maybe Text
$sel:recordingConfigurationArn:Channel' :: Channel -> Maybe Text
recordingConfigurationArn} -> Maybe Text
recordingConfigurationArn) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:recordingConfigurationArn:Channel' :: Maybe Text
recordingConfigurationArn = Maybe Text
a} :: Channel)
channel_type :: Lens.Lens' Channel (Prelude.Maybe ChannelType)
channel_type :: (Maybe ChannelType -> f (Maybe ChannelType))
-> Channel -> f Channel
channel_type = (Channel -> Maybe ChannelType)
-> (Channel -> Maybe ChannelType -> Channel)
-> Lens Channel Channel (Maybe ChannelType) (Maybe ChannelType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelType
type' :: Maybe ChannelType
$sel:type':Channel' :: Channel -> Maybe ChannelType
type'} -> Maybe ChannelType
type') (\s :: Channel
s@Channel' {} Maybe ChannelType
a -> Channel
s {$sel:type':Channel' :: Maybe ChannelType
type' = Maybe ChannelType
a} :: Channel)
channel_tags :: Lens.Lens' Channel (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
channel_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Channel -> f Channel
channel_tags = (Channel -> Maybe (HashMap Text Text))
-> (Channel -> Maybe (HashMap Text Text) -> Channel)
-> Lens
Channel
Channel
(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 (\Channel' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Channel' :: Channel -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Channel
s@Channel' {} Maybe (HashMap Text Text)
a -> Channel
s {$sel:tags:Channel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Channel) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Channel -> f Channel)
-> ((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)))
-> Channel
-> f Channel
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
channel_ingestEndpoint :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_ingestEndpoint :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_ingestEndpoint = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
ingestEndpoint :: Maybe Text
$sel:ingestEndpoint:Channel' :: Channel -> Maybe Text
ingestEndpoint} -> Maybe Text
ingestEndpoint) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:ingestEndpoint:Channel' :: Maybe Text
ingestEndpoint = Maybe Text
a} :: Channel)
instance Core.FromJSON Channel where
parseJSON :: Value -> Parser Channel
parseJSON =
String -> (Object -> Parser Channel) -> Value -> Parser Channel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Channel"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel
Channel'
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
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
"playbackUrl")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"authorized")
Parser
(Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
-> Parser (Maybe Text)
-> Parser
(Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
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 ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
-> Parser (Maybe ChannelLatencyMode)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelLatencyMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"latencyMode")
Parser
(Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
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
"name")
Parser
(Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel)
-> Parser (Maybe Text)
-> Parser
(Maybe ChannelType
-> Maybe (HashMap Text Text) -> Maybe Text -> Channel)
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
"recordingConfigurationArn")
Parser
(Maybe ChannelType
-> Maybe (HashMap Text Text) -> Maybe Text -> Channel)
-> Parser (Maybe ChannelType)
-> Parser (Maybe (HashMap Text Text) -> Maybe Text -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser (Maybe (HashMap Text Text) -> Maybe Text -> Channel)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Channel)
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 Text -> Channel)
-> Parser (Maybe Text) -> Parser Channel
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
"ingestEndpoint")
)
instance Prelude.Hashable Channel
instance Prelude.NFData Channel