{-# 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.ChannelSummary where
import qualified Amazonka.Core as Core
import Amazonka.IVS.Types.ChannelLatencyMode
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ChannelSummary = ChannelSummary'
{
ChannelSummary -> Maybe Bool
authorized :: Prelude.Maybe Prelude.Bool,
ChannelSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ChannelSummary -> Maybe ChannelLatencyMode
latencyMode :: Prelude.Maybe ChannelLatencyMode,
ChannelSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ChannelSummary -> Maybe Text
recordingConfigurationArn :: Prelude.Maybe Prelude.Text,
ChannelSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (ChannelSummary -> ChannelSummary -> Bool
(ChannelSummary -> ChannelSummary -> Bool)
-> (ChannelSummary -> ChannelSummary -> Bool) -> Eq ChannelSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelSummary -> ChannelSummary -> Bool
$c/= :: ChannelSummary -> ChannelSummary -> Bool
== :: ChannelSummary -> ChannelSummary -> Bool
$c== :: ChannelSummary -> ChannelSummary -> Bool
Prelude.Eq, ReadPrec [ChannelSummary]
ReadPrec ChannelSummary
Int -> ReadS ChannelSummary
ReadS [ChannelSummary]
(Int -> ReadS ChannelSummary)
-> ReadS [ChannelSummary]
-> ReadPrec ChannelSummary
-> ReadPrec [ChannelSummary]
-> Read ChannelSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChannelSummary]
$creadListPrec :: ReadPrec [ChannelSummary]
readPrec :: ReadPrec ChannelSummary
$creadPrec :: ReadPrec ChannelSummary
readList :: ReadS [ChannelSummary]
$creadList :: ReadS [ChannelSummary]
readsPrec :: Int -> ReadS ChannelSummary
$creadsPrec :: Int -> ReadS ChannelSummary
Prelude.Read, Int -> ChannelSummary -> ShowS
[ChannelSummary] -> ShowS
ChannelSummary -> String
(Int -> ChannelSummary -> ShowS)
-> (ChannelSummary -> String)
-> ([ChannelSummary] -> ShowS)
-> Show ChannelSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelSummary] -> ShowS
$cshowList :: [ChannelSummary] -> ShowS
show :: ChannelSummary -> String
$cshow :: ChannelSummary -> String
showsPrec :: Int -> ChannelSummary -> ShowS
$cshowsPrec :: Int -> ChannelSummary -> ShowS
Prelude.Show, (forall x. ChannelSummary -> Rep ChannelSummary x)
-> (forall x. Rep ChannelSummary x -> ChannelSummary)
-> Generic ChannelSummary
forall x. Rep ChannelSummary x -> ChannelSummary
forall x. ChannelSummary -> Rep ChannelSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelSummary x -> ChannelSummary
$cfrom :: forall x. ChannelSummary -> Rep ChannelSummary x
Prelude.Generic)
newChannelSummary ::
ChannelSummary
newChannelSummary :: ChannelSummary
newChannelSummary =
ChannelSummary' :: Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ChannelSummary
ChannelSummary'
{ $sel:authorized:ChannelSummary' :: Maybe Bool
authorized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ChannelSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latencyMode:ChannelSummary' :: Maybe ChannelLatencyMode
latencyMode = Maybe ChannelLatencyMode
forall a. Maybe a
Prelude.Nothing,
$sel:name:ChannelSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recordingConfigurationArn:ChannelSummary' :: Maybe Text
recordingConfigurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ChannelSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
channelSummary_authorized :: Lens.Lens' ChannelSummary (Prelude.Maybe Prelude.Bool)
channelSummary_authorized :: (Maybe Bool -> f (Maybe Bool))
-> ChannelSummary -> f ChannelSummary
channelSummary_authorized = (ChannelSummary -> Maybe Bool)
-> (ChannelSummary -> Maybe Bool -> ChannelSummary)
-> Lens ChannelSummary ChannelSummary (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelSummary' {Maybe Bool
authorized :: Maybe Bool
$sel:authorized:ChannelSummary' :: ChannelSummary -> Maybe Bool
authorized} -> Maybe Bool
authorized) (\s :: ChannelSummary
s@ChannelSummary' {} Maybe Bool
a -> ChannelSummary
s {$sel:authorized:ChannelSummary' :: Maybe Bool
authorized = Maybe Bool
a} :: ChannelSummary)
channelSummary_arn :: Lens.Lens' ChannelSummary (Prelude.Maybe Prelude.Text)
channelSummary_arn :: (Maybe Text -> f (Maybe Text))
-> ChannelSummary -> f ChannelSummary
channelSummary_arn = (ChannelSummary -> Maybe Text)
-> (ChannelSummary -> Maybe Text -> ChannelSummary)
-> Lens ChannelSummary ChannelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:ChannelSummary' :: ChannelSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ChannelSummary
s@ChannelSummary' {} Maybe Text
a -> ChannelSummary
s {$sel:arn:ChannelSummary' :: Maybe Text
arn = Maybe Text
a} :: ChannelSummary)
channelSummary_latencyMode :: Lens.Lens' ChannelSummary (Prelude.Maybe ChannelLatencyMode)
channelSummary_latencyMode :: (Maybe ChannelLatencyMode -> f (Maybe ChannelLatencyMode))
-> ChannelSummary -> f ChannelSummary
channelSummary_latencyMode = (ChannelSummary -> Maybe ChannelLatencyMode)
-> (ChannelSummary -> Maybe ChannelLatencyMode -> ChannelSummary)
-> Lens
ChannelSummary
ChannelSummary
(Maybe ChannelLatencyMode)
(Maybe ChannelLatencyMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelSummary' {Maybe ChannelLatencyMode
latencyMode :: Maybe ChannelLatencyMode
$sel:latencyMode:ChannelSummary' :: ChannelSummary -> Maybe ChannelLatencyMode
latencyMode} -> Maybe ChannelLatencyMode
latencyMode) (\s :: ChannelSummary
s@ChannelSummary' {} Maybe ChannelLatencyMode
a -> ChannelSummary
s {$sel:latencyMode:ChannelSummary' :: Maybe ChannelLatencyMode
latencyMode = Maybe ChannelLatencyMode
a} :: ChannelSummary)
channelSummary_name :: Lens.Lens' ChannelSummary (Prelude.Maybe Prelude.Text)
channelSummary_name :: (Maybe Text -> f (Maybe Text))
-> ChannelSummary -> f ChannelSummary
channelSummary_name = (ChannelSummary -> Maybe Text)
-> (ChannelSummary -> Maybe Text -> ChannelSummary)
-> Lens ChannelSummary ChannelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelSummary' {Maybe Text
name :: Maybe Text
$sel:name:ChannelSummary' :: ChannelSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ChannelSummary
s@ChannelSummary' {} Maybe Text
a -> ChannelSummary
s {$sel:name:ChannelSummary' :: Maybe Text
name = Maybe Text
a} :: ChannelSummary)
channelSummary_recordingConfigurationArn :: Lens.Lens' ChannelSummary (Prelude.Maybe Prelude.Text)
channelSummary_recordingConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> ChannelSummary -> f ChannelSummary
channelSummary_recordingConfigurationArn = (ChannelSummary -> Maybe Text)
-> (ChannelSummary -> Maybe Text -> ChannelSummary)
-> Lens ChannelSummary ChannelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelSummary' {Maybe Text
recordingConfigurationArn :: Maybe Text
$sel:recordingConfigurationArn:ChannelSummary' :: ChannelSummary -> Maybe Text
recordingConfigurationArn} -> Maybe Text
recordingConfigurationArn) (\s :: ChannelSummary
s@ChannelSummary' {} Maybe Text
a -> ChannelSummary
s {$sel:recordingConfigurationArn:ChannelSummary' :: Maybe Text
recordingConfigurationArn = Maybe Text
a} :: ChannelSummary)
channelSummary_tags :: Lens.Lens' ChannelSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
channelSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChannelSummary -> f ChannelSummary
channelSummary_tags = (ChannelSummary -> Maybe (HashMap Text Text))
-> (ChannelSummary -> Maybe (HashMap Text Text) -> ChannelSummary)
-> Lens
ChannelSummary
ChannelSummary
(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 (\ChannelSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ChannelSummary' :: ChannelSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ChannelSummary
s@ChannelSummary' {} Maybe (HashMap Text Text)
a -> ChannelSummary
s {$sel:tags:ChannelSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ChannelSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChannelSummary -> f ChannelSummary)
-> ((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)))
-> ChannelSummary
-> f ChannelSummary
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
instance Core.FromJSON ChannelSummary where
parseJSON :: Value -> Parser ChannelSummary
parseJSON =
String
-> (Object -> Parser ChannelSummary)
-> Value
-> Parser ChannelSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChannelSummary"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ChannelSummary
ChannelSummary'
(Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ChannelSummary)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ChannelSummary)
forall (f :: * -> *) a b. Functor 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 (HashMap Text Text)
-> ChannelSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ChannelSummary)
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 (HashMap Text Text)
-> ChannelSummary)
-> Parser (Maybe ChannelLatencyMode)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe (HashMap Text Text) -> ChannelSummary)
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 (HashMap Text Text) -> ChannelSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe (HashMap Text Text) -> ChannelSummary)
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 (HashMap Text Text) -> ChannelSummary)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> ChannelSummary)
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 (HashMap Text Text) -> ChannelSummary)
-> Parser (Maybe (HashMap Text Text)) -> Parser ChannelSummary
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)
)
instance Prelude.Hashable ChannelSummary
instance Prelude.NFData ChannelSummary