{-# 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.ChimeSDKMessaging.Types.Channel where
import Amazonka.ChimeSDKMessaging.Types.ChannelMode
import Amazonka.ChimeSDKMessaging.Types.ChannelPrivacy
import Amazonka.ChimeSDKMessaging.Types.Identity
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Channel = Channel'
{
Channel -> Maybe ChannelMode
mode :: Prelude.Maybe ChannelMode,
Channel -> Maybe Identity
createdBy :: Prelude.Maybe Identity,
Channel -> Maybe Text
channelArn :: Prelude.Maybe Prelude.Text,
Channel -> Maybe ChannelPrivacy
privacy :: Prelude.Maybe ChannelPrivacy,
Channel -> Maybe Text
channelFlowArn :: Prelude.Maybe Prelude.Text,
Channel -> Maybe POSIX
lastMessageTimestamp :: Prelude.Maybe Core.POSIX,
Channel -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Core.Sensitive Prelude.Text),
Channel -> Maybe (Sensitive Text)
metadata :: Prelude.Maybe (Core.Sensitive Prelude.Text),
Channel -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
Channel -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Core.POSIX
}
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, 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 ChannelMode
-> Maybe Identity
-> Maybe Text
-> Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel
Channel'
{ $sel:mode:Channel' :: Maybe ChannelMode
mode = Maybe ChannelMode
forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:Channel' :: Maybe Identity
createdBy = Maybe Identity
forall a. Maybe a
Prelude.Nothing,
$sel:channelArn:Channel' :: Maybe Text
channelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privacy:Channel' :: Maybe ChannelPrivacy
privacy = Maybe ChannelPrivacy
forall a. Maybe a
Prelude.Nothing,
$sel:channelFlowArn:Channel' :: Maybe Text
channelFlowArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastMessageTimestamp:Channel' :: Maybe POSIX
lastMessageTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:Channel' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:metadata:Channel' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:createdTimestamp:Channel' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:Channel' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
channel_mode :: Lens.Lens' Channel (Prelude.Maybe ChannelMode)
channel_mode :: (Maybe ChannelMode -> f (Maybe ChannelMode))
-> Channel -> f Channel
channel_mode = (Channel -> Maybe ChannelMode)
-> (Channel -> Maybe ChannelMode -> Channel)
-> Lens Channel Channel (Maybe ChannelMode) (Maybe ChannelMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelMode
mode :: Maybe ChannelMode
$sel:mode:Channel' :: Channel -> Maybe ChannelMode
mode} -> Maybe ChannelMode
mode) (\s :: Channel
s@Channel' {} Maybe ChannelMode
a -> Channel
s {$sel:mode:Channel' :: Maybe ChannelMode
mode = Maybe ChannelMode
a} :: Channel)
channel_createdBy :: Lens.Lens' Channel (Prelude.Maybe Identity)
channel_createdBy :: (Maybe Identity -> f (Maybe Identity)) -> Channel -> f Channel
channel_createdBy = (Channel -> Maybe Identity)
-> (Channel -> Maybe Identity -> Channel)
-> Lens Channel Channel (Maybe Identity) (Maybe Identity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Identity
createdBy :: Maybe Identity
$sel:createdBy:Channel' :: Channel -> Maybe Identity
createdBy} -> Maybe Identity
createdBy) (\s :: Channel
s@Channel' {} Maybe Identity
a -> Channel
s {$sel:createdBy:Channel' :: Maybe Identity
createdBy = Maybe Identity
a} :: Channel)
channel_channelArn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_channelArn :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_channelArn = (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
channelArn :: Maybe Text
$sel:channelArn:Channel' :: Channel -> Maybe Text
channelArn} -> Maybe Text
channelArn) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:channelArn:Channel' :: Maybe Text
channelArn = Maybe Text
a} :: Channel)
channel_privacy :: Lens.Lens' Channel (Prelude.Maybe ChannelPrivacy)
channel_privacy :: (Maybe ChannelPrivacy -> f (Maybe ChannelPrivacy))
-> Channel -> f Channel
channel_privacy = (Channel -> Maybe ChannelPrivacy)
-> (Channel -> Maybe ChannelPrivacy -> Channel)
-> Lens
Channel Channel (Maybe ChannelPrivacy) (Maybe ChannelPrivacy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelPrivacy
privacy :: Maybe ChannelPrivacy
$sel:privacy:Channel' :: Channel -> Maybe ChannelPrivacy
privacy} -> Maybe ChannelPrivacy
privacy) (\s :: Channel
s@Channel' {} Maybe ChannelPrivacy
a -> Channel
s {$sel:privacy:Channel' :: Maybe ChannelPrivacy
privacy = Maybe ChannelPrivacy
a} :: Channel)
channel_channelFlowArn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_channelFlowArn :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_channelFlowArn = (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
channelFlowArn :: Maybe Text
$sel:channelFlowArn:Channel' :: Channel -> Maybe Text
channelFlowArn} -> Maybe Text
channelFlowArn) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:channelFlowArn:Channel' :: Maybe Text
channelFlowArn = Maybe Text
a} :: Channel)
channel_lastMessageTimestamp :: Lens.Lens' Channel (Prelude.Maybe Prelude.UTCTime)
channel_lastMessageTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Channel -> f Channel
channel_lastMessageTimestamp = (Channel -> Maybe POSIX)
-> (Channel -> Maybe POSIX -> Channel)
-> Lens Channel Channel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe POSIX
lastMessageTimestamp :: Maybe POSIX
$sel:lastMessageTimestamp:Channel' :: Channel -> Maybe POSIX
lastMessageTimestamp} -> Maybe POSIX
lastMessageTimestamp) (\s :: Channel
s@Channel' {} Maybe POSIX
a -> Channel
s {$sel:lastMessageTimestamp:Channel' :: Maybe POSIX
lastMessageTimestamp = Maybe POSIX
a} :: Channel) ((Maybe POSIX -> f (Maybe POSIX)) -> Channel -> f Channel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Channel
-> f Channel
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
channel_name :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_name :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_name = (Channel -> Maybe (Sensitive Text))
-> (Channel -> Maybe (Sensitive Text) -> Channel)
-> Lens
Channel Channel (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:Channel' :: Channel -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: Channel
s@Channel' {} Maybe (Sensitive Text)
a -> Channel
s {$sel:name:Channel' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: Channel) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Channel -> f Channel)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Channel
-> f Channel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
channel_metadata :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_metadata :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_metadata = (Channel -> Maybe (Sensitive Text))
-> (Channel -> Maybe (Sensitive Text) -> Channel)
-> Lens
Channel Channel (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe (Sensitive Text)
metadata :: Maybe (Sensitive Text)
$sel:metadata:Channel' :: Channel -> Maybe (Sensitive Text)
metadata} -> Maybe (Sensitive Text)
metadata) (\s :: Channel
s@Channel' {} Maybe (Sensitive Text)
a -> Channel
s {$sel:metadata:Channel' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
a} :: Channel) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Channel -> f Channel)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Channel
-> f Channel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
channel_createdTimestamp :: Lens.Lens' Channel (Prelude.Maybe Prelude.UTCTime)
channel_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Channel -> f Channel
channel_createdTimestamp = (Channel -> Maybe POSIX)
-> (Channel -> Maybe POSIX -> Channel)
-> Lens Channel Channel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:Channel' :: Channel -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: Channel
s@Channel' {} Maybe POSIX
a -> Channel
s {$sel:createdTimestamp:Channel' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: Channel) ((Maybe POSIX -> f (Maybe POSIX)) -> Channel -> f Channel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Channel
-> f Channel
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
channel_lastUpdatedTimestamp :: Lens.Lens' Channel (Prelude.Maybe Prelude.UTCTime)
channel_lastUpdatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Channel -> f Channel
channel_lastUpdatedTimestamp = (Channel -> Maybe POSIX)
-> (Channel -> Maybe POSIX -> Channel)
-> Lens Channel Channel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
$sel:lastUpdatedTimestamp:Channel' :: Channel -> Maybe POSIX
lastUpdatedTimestamp} -> Maybe POSIX
lastUpdatedTimestamp) (\s :: Channel
s@Channel' {} Maybe POSIX
a -> Channel
s {$sel:lastUpdatedTimestamp:Channel' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
a} :: Channel) ((Maybe POSIX -> f (Maybe POSIX)) -> Channel -> f Channel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Channel
-> f Channel
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
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 ChannelMode
-> Maybe Identity
-> Maybe Text
-> Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel
Channel'
(Maybe ChannelMode
-> Maybe Identity
-> Maybe Text
-> Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
-> Parser (Maybe ChannelMode)
-> Parser
(Maybe Identity
-> Maybe Text
-> Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ChannelMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Mode")
Parser
(Maybe Identity
-> Maybe Text
-> Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
-> Parser (Maybe Identity)
-> Parser
(Maybe Text
-> Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Identity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedBy")
Parser
(Maybe Text
-> Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
-> Parser (Maybe Text)
-> Parser
(Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> 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
"ChannelArn")
Parser
(Maybe ChannelPrivacy
-> Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
-> Parser (Maybe ChannelPrivacy)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelPrivacy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Privacy")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> 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
"ChannelFlowArn")
Parser
(Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe POSIX
-> Channel)
-> Parser (Maybe POSIX)
-> Parser
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> Maybe POSIX -> Maybe POSIX -> Channel)
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
"LastMessageTimestamp")
Parser
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text) -> Maybe POSIX -> Maybe POSIX -> Channel)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe (Sensitive Text) -> Maybe POSIX -> Maybe POSIX -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe (Sensitive Text) -> Maybe POSIX -> Maybe POSIX -> Channel)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe POSIX -> Maybe POSIX -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Metadata")
Parser (Maybe POSIX -> Maybe POSIX -> Channel)
-> Parser (Maybe POSIX) -> Parser (Maybe POSIX -> Channel)
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
"CreatedTimestamp")
Parser (Maybe POSIX -> Channel)
-> Parser (Maybe POSIX) -> Parser Channel
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
"LastUpdatedTimestamp")
)
instance Prelude.Hashable Channel
instance Prelude.NFData Channel