{-# 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.ChannelMessage where
import Amazonka.ChimeSDKMessaging.Types.ChannelMessagePersistenceType
import Amazonka.ChimeSDKMessaging.Types.ChannelMessageStatusStructure
import Amazonka.ChimeSDKMessaging.Types.ChannelMessageType
import Amazonka.ChimeSDKMessaging.Types.Identity
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ChannelMessage = ChannelMessage'
{
ChannelMessage -> Maybe ChannelMessageStatusStructure
status :: Prelude.Maybe ChannelMessageStatusStructure,
ChannelMessage -> Maybe Identity
sender :: Prelude.Maybe Identity,
ChannelMessage -> Maybe Text
channelArn :: Prelude.Maybe Prelude.Text,
ChannelMessage -> Maybe (Sensitive Text)
content :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ChannelMessage -> Maybe Bool
redacted :: Prelude.Maybe Prelude.Bool,
ChannelMessage -> Maybe ChannelMessagePersistenceType
persistence :: Prelude.Maybe ChannelMessagePersistenceType,
ChannelMessage -> Maybe (Sensitive Text)
metadata :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ChannelMessage -> Maybe ChannelMessageType
type' :: Prelude.Maybe ChannelMessageType,
ChannelMessage -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
ChannelMessage -> Maybe Text
messageId :: Prelude.Maybe Prelude.Text,
ChannelMessage -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Core.POSIX,
ChannelMessage -> Maybe POSIX
lastEditedTimestamp :: Prelude.Maybe Core.POSIX
}
deriving (ChannelMessage -> ChannelMessage -> Bool
(ChannelMessage -> ChannelMessage -> Bool)
-> (ChannelMessage -> ChannelMessage -> Bool) -> Eq ChannelMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelMessage -> ChannelMessage -> Bool
$c/= :: ChannelMessage -> ChannelMessage -> Bool
== :: ChannelMessage -> ChannelMessage -> Bool
$c== :: ChannelMessage -> ChannelMessage -> Bool
Prelude.Eq, Int -> ChannelMessage -> ShowS
[ChannelMessage] -> ShowS
ChannelMessage -> String
(Int -> ChannelMessage -> ShowS)
-> (ChannelMessage -> String)
-> ([ChannelMessage] -> ShowS)
-> Show ChannelMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelMessage] -> ShowS
$cshowList :: [ChannelMessage] -> ShowS
show :: ChannelMessage -> String
$cshow :: ChannelMessage -> String
showsPrec :: Int -> ChannelMessage -> ShowS
$cshowsPrec :: Int -> ChannelMessage -> ShowS
Prelude.Show, (forall x. ChannelMessage -> Rep ChannelMessage x)
-> (forall x. Rep ChannelMessage x -> ChannelMessage)
-> Generic ChannelMessage
forall x. Rep ChannelMessage x -> ChannelMessage
forall x. ChannelMessage -> Rep ChannelMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelMessage x -> ChannelMessage
$cfrom :: forall x. ChannelMessage -> Rep ChannelMessage x
Prelude.Generic)
newChannelMessage ::
ChannelMessage
newChannelMessage :: ChannelMessage
newChannelMessage =
ChannelMessage' :: Maybe ChannelMessageStatusStructure
-> Maybe Identity
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage
ChannelMessage'
{ $sel:status:ChannelMessage' :: Maybe ChannelMessageStatusStructure
status = Maybe ChannelMessageStatusStructure
forall a. Maybe a
Prelude.Nothing,
$sel:sender:ChannelMessage' :: Maybe Identity
sender = Maybe Identity
forall a. Maybe a
Prelude.Nothing,
$sel:channelArn:ChannelMessage' :: Maybe Text
channelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:content:ChannelMessage' :: Maybe (Sensitive Text)
content = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:redacted:ChannelMessage' :: Maybe Bool
redacted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:persistence:ChannelMessage' :: Maybe ChannelMessagePersistenceType
persistence = Maybe ChannelMessagePersistenceType
forall a. Maybe a
Prelude.Nothing,
$sel:metadata:ChannelMessage' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:type':ChannelMessage' :: Maybe ChannelMessageType
type' = Maybe ChannelMessageType
forall a. Maybe a
Prelude.Nothing,
$sel:createdTimestamp:ChannelMessage' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:messageId:ChannelMessage' :: Maybe Text
messageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:ChannelMessage' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastEditedTimestamp:ChannelMessage' :: Maybe POSIX
lastEditedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
channelMessage_status :: Lens.Lens' ChannelMessage (Prelude.Maybe ChannelMessageStatusStructure)
channelMessage_status :: (Maybe ChannelMessageStatusStructure
-> f (Maybe ChannelMessageStatusStructure))
-> ChannelMessage -> f ChannelMessage
channelMessage_status = (ChannelMessage -> Maybe ChannelMessageStatusStructure)
-> (ChannelMessage
-> Maybe ChannelMessageStatusStructure -> ChannelMessage)
-> Lens
ChannelMessage
ChannelMessage
(Maybe ChannelMessageStatusStructure)
(Maybe ChannelMessageStatusStructure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe ChannelMessageStatusStructure
status :: Maybe ChannelMessageStatusStructure
$sel:status:ChannelMessage' :: ChannelMessage -> Maybe ChannelMessageStatusStructure
status} -> Maybe ChannelMessageStatusStructure
status) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe ChannelMessageStatusStructure
a -> ChannelMessage
s {$sel:status:ChannelMessage' :: Maybe ChannelMessageStatusStructure
status = Maybe ChannelMessageStatusStructure
a} :: ChannelMessage)
channelMessage_sender :: Lens.Lens' ChannelMessage (Prelude.Maybe Identity)
channelMessage_sender :: (Maybe Identity -> f (Maybe Identity))
-> ChannelMessage -> f ChannelMessage
channelMessage_sender = (ChannelMessage -> Maybe Identity)
-> (ChannelMessage -> Maybe Identity -> ChannelMessage)
-> Lens
ChannelMessage ChannelMessage (Maybe Identity) (Maybe Identity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe Identity
sender :: Maybe Identity
$sel:sender:ChannelMessage' :: ChannelMessage -> Maybe Identity
sender} -> Maybe Identity
sender) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe Identity
a -> ChannelMessage
s {$sel:sender:ChannelMessage' :: Maybe Identity
sender = Maybe Identity
a} :: ChannelMessage)
channelMessage_channelArn :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.Text)
channelMessage_channelArn :: (Maybe Text -> f (Maybe Text))
-> ChannelMessage -> f ChannelMessage
channelMessage_channelArn = (ChannelMessage -> Maybe Text)
-> (ChannelMessage -> Maybe Text -> ChannelMessage)
-> Lens ChannelMessage ChannelMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe Text
channelArn :: Maybe Text
$sel:channelArn:ChannelMessage' :: ChannelMessage -> Maybe Text
channelArn} -> Maybe Text
channelArn) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe Text
a -> ChannelMessage
s {$sel:channelArn:ChannelMessage' :: Maybe Text
channelArn = Maybe Text
a} :: ChannelMessage)
channelMessage_content :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.Text)
channelMessage_content :: (Maybe Text -> f (Maybe Text))
-> ChannelMessage -> f ChannelMessage
channelMessage_content = (ChannelMessage -> Maybe (Sensitive Text))
-> (ChannelMessage -> Maybe (Sensitive Text) -> ChannelMessage)
-> Lens
ChannelMessage
ChannelMessage
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe (Sensitive Text)
content :: Maybe (Sensitive Text)
$sel:content:ChannelMessage' :: ChannelMessage -> Maybe (Sensitive Text)
content} -> Maybe (Sensitive Text)
content) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe (Sensitive Text)
a -> ChannelMessage
s {$sel:content:ChannelMessage' :: Maybe (Sensitive Text)
content = Maybe (Sensitive Text)
a} :: ChannelMessage) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ChannelMessage -> f ChannelMessage)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ChannelMessage
-> f ChannelMessage
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
channelMessage_redacted :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.Bool)
channelMessage_redacted :: (Maybe Bool -> f (Maybe Bool))
-> ChannelMessage -> f ChannelMessage
channelMessage_redacted = (ChannelMessage -> Maybe Bool)
-> (ChannelMessage -> Maybe Bool -> ChannelMessage)
-> Lens ChannelMessage ChannelMessage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe Bool
redacted :: Maybe Bool
$sel:redacted:ChannelMessage' :: ChannelMessage -> Maybe Bool
redacted} -> Maybe Bool
redacted) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe Bool
a -> ChannelMessage
s {$sel:redacted:ChannelMessage' :: Maybe Bool
redacted = Maybe Bool
a} :: ChannelMessage)
channelMessage_persistence :: Lens.Lens' ChannelMessage (Prelude.Maybe ChannelMessagePersistenceType)
channelMessage_persistence :: (Maybe ChannelMessagePersistenceType
-> f (Maybe ChannelMessagePersistenceType))
-> ChannelMessage -> f ChannelMessage
channelMessage_persistence = (ChannelMessage -> Maybe ChannelMessagePersistenceType)
-> (ChannelMessage
-> Maybe ChannelMessagePersistenceType -> ChannelMessage)
-> Lens
ChannelMessage
ChannelMessage
(Maybe ChannelMessagePersistenceType)
(Maybe ChannelMessagePersistenceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe ChannelMessagePersistenceType
persistence :: Maybe ChannelMessagePersistenceType
$sel:persistence:ChannelMessage' :: ChannelMessage -> Maybe ChannelMessagePersistenceType
persistence} -> Maybe ChannelMessagePersistenceType
persistence) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe ChannelMessagePersistenceType
a -> ChannelMessage
s {$sel:persistence:ChannelMessage' :: Maybe ChannelMessagePersistenceType
persistence = Maybe ChannelMessagePersistenceType
a} :: ChannelMessage)
channelMessage_metadata :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.Text)
channelMessage_metadata :: (Maybe Text -> f (Maybe Text))
-> ChannelMessage -> f ChannelMessage
channelMessage_metadata = (ChannelMessage -> Maybe (Sensitive Text))
-> (ChannelMessage -> Maybe (Sensitive Text) -> ChannelMessage)
-> Lens
ChannelMessage
ChannelMessage
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe (Sensitive Text)
metadata :: Maybe (Sensitive Text)
$sel:metadata:ChannelMessage' :: ChannelMessage -> Maybe (Sensitive Text)
metadata} -> Maybe (Sensitive Text)
metadata) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe (Sensitive Text)
a -> ChannelMessage
s {$sel:metadata:ChannelMessage' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
a} :: ChannelMessage) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ChannelMessage -> f ChannelMessage)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ChannelMessage
-> f ChannelMessage
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
channelMessage_type :: Lens.Lens' ChannelMessage (Prelude.Maybe ChannelMessageType)
channelMessage_type :: (Maybe ChannelMessageType -> f (Maybe ChannelMessageType))
-> ChannelMessage -> f ChannelMessage
channelMessage_type = (ChannelMessage -> Maybe ChannelMessageType)
-> (ChannelMessage -> Maybe ChannelMessageType -> ChannelMessage)
-> Lens
ChannelMessage
ChannelMessage
(Maybe ChannelMessageType)
(Maybe ChannelMessageType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe ChannelMessageType
type' :: Maybe ChannelMessageType
$sel:type':ChannelMessage' :: ChannelMessage -> Maybe ChannelMessageType
type'} -> Maybe ChannelMessageType
type') (\s :: ChannelMessage
s@ChannelMessage' {} Maybe ChannelMessageType
a -> ChannelMessage
s {$sel:type':ChannelMessage' :: Maybe ChannelMessageType
type' = Maybe ChannelMessageType
a} :: ChannelMessage)
channelMessage_createdTimestamp :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.UTCTime)
channelMessage_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ChannelMessage -> f ChannelMessage
channelMessage_createdTimestamp = (ChannelMessage -> Maybe POSIX)
-> (ChannelMessage -> Maybe POSIX -> ChannelMessage)
-> Lens ChannelMessage ChannelMessage (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:ChannelMessage' :: ChannelMessage -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe POSIX
a -> ChannelMessage
s {$sel:createdTimestamp:ChannelMessage' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: ChannelMessage) ((Maybe POSIX -> f (Maybe POSIX))
-> ChannelMessage -> f ChannelMessage)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ChannelMessage
-> f ChannelMessage
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
channelMessage_messageId :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.Text)
channelMessage_messageId :: (Maybe Text -> f (Maybe Text))
-> ChannelMessage -> f ChannelMessage
channelMessage_messageId = (ChannelMessage -> Maybe Text)
-> (ChannelMessage -> Maybe Text -> ChannelMessage)
-> Lens ChannelMessage ChannelMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe Text
messageId :: Maybe Text
$sel:messageId:ChannelMessage' :: ChannelMessage -> Maybe Text
messageId} -> Maybe Text
messageId) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe Text
a -> ChannelMessage
s {$sel:messageId:ChannelMessage' :: Maybe Text
messageId = Maybe Text
a} :: ChannelMessage)
channelMessage_lastUpdatedTimestamp :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.UTCTime)
channelMessage_lastUpdatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ChannelMessage -> f ChannelMessage
channelMessage_lastUpdatedTimestamp = (ChannelMessage -> Maybe POSIX)
-> (ChannelMessage -> Maybe POSIX -> ChannelMessage)
-> Lens ChannelMessage ChannelMessage (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
$sel:lastUpdatedTimestamp:ChannelMessage' :: ChannelMessage -> Maybe POSIX
lastUpdatedTimestamp} -> Maybe POSIX
lastUpdatedTimestamp) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe POSIX
a -> ChannelMessage
s {$sel:lastUpdatedTimestamp:ChannelMessage' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
a} :: ChannelMessage) ((Maybe POSIX -> f (Maybe POSIX))
-> ChannelMessage -> f ChannelMessage)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ChannelMessage
-> f ChannelMessage
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
channelMessage_lastEditedTimestamp :: Lens.Lens' ChannelMessage (Prelude.Maybe Prelude.UTCTime)
channelMessage_lastEditedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ChannelMessage -> f ChannelMessage
channelMessage_lastEditedTimestamp = (ChannelMessage -> Maybe POSIX)
-> (ChannelMessage -> Maybe POSIX -> ChannelMessage)
-> Lens ChannelMessage ChannelMessage (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessage' {Maybe POSIX
lastEditedTimestamp :: Maybe POSIX
$sel:lastEditedTimestamp:ChannelMessage' :: ChannelMessage -> Maybe POSIX
lastEditedTimestamp} -> Maybe POSIX
lastEditedTimestamp) (\s :: ChannelMessage
s@ChannelMessage' {} Maybe POSIX
a -> ChannelMessage
s {$sel:lastEditedTimestamp:ChannelMessage' :: Maybe POSIX
lastEditedTimestamp = Maybe POSIX
a} :: ChannelMessage) ((Maybe POSIX -> f (Maybe POSIX))
-> ChannelMessage -> f ChannelMessage)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ChannelMessage
-> f ChannelMessage
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 ChannelMessage where
parseJSON :: Value -> Parser ChannelMessage
parseJSON =
String
-> (Object -> Parser ChannelMessage)
-> Value
-> Parser ChannelMessage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChannelMessage"
( \Object
x ->
Maybe ChannelMessageStatusStructure
-> Maybe Identity
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage
ChannelMessage'
(Maybe ChannelMessageStatusStructure
-> Maybe Identity
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe ChannelMessageStatusStructure)
-> Parser
(Maybe Identity
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ChannelMessageStatusStructure)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Identity
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe Identity)
-> Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
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
"Sender")
Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
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 (Sensitive Text)
-> Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
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
"Content")
Parser
(Maybe Bool
-> Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe Bool)
-> Parser
(Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
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
"Redacted")
Parser
(Maybe ChannelMessagePersistenceType
-> Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe ChannelMessagePersistenceType)
-> Parser
(Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelMessagePersistenceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Persistence")
Parser
(Maybe (Sensitive Text)
-> Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
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 ChannelMessageType
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> ChannelMessage)
-> Parser (Maybe ChannelMessageType)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe POSIX -> Maybe POSIX -> ChannelMessage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelMessageType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe POSIX -> Maybe POSIX -> ChannelMessage)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe POSIX -> ChannelMessage)
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 Text -> Maybe POSIX -> Maybe POSIX -> ChannelMessage)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe POSIX -> ChannelMessage)
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
"MessageId")
Parser (Maybe POSIX -> Maybe POSIX -> ChannelMessage)
-> Parser (Maybe POSIX) -> Parser (Maybe POSIX -> ChannelMessage)
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")
Parser (Maybe POSIX -> ChannelMessage)
-> Parser (Maybe POSIX) -> Parser ChannelMessage
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
"LastEditedTimestamp")
)
instance Prelude.Hashable ChannelMessage
instance Prelude.NFData ChannelMessage