{-# 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.IVSChat.Types.RoomSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IVSChat.Types.MessageReviewHandler
import qualified Amazonka.Prelude as Prelude
data RoomSummary = RoomSummary'
{
RoomSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
RoomSummary -> Maybe ISO8601
createTime :: Prelude.Maybe Data.ISO8601,
RoomSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
RoomSummary -> Maybe [Text]
loggingConfigurationIdentifiers :: Prelude.Maybe [Prelude.Text],
RoomSummary -> Maybe MessageReviewHandler
messageReviewHandler :: Prelude.Maybe MessageReviewHandler,
RoomSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
RoomSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
RoomSummary -> Maybe ISO8601
updateTime :: Prelude.Maybe Data.ISO8601
}
deriving (RoomSummary -> RoomSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoomSummary -> RoomSummary -> Bool
$c/= :: RoomSummary -> RoomSummary -> Bool
== :: RoomSummary -> RoomSummary -> Bool
$c== :: RoomSummary -> RoomSummary -> Bool
Prelude.Eq, ReadPrec [RoomSummary]
ReadPrec RoomSummary
Int -> ReadS RoomSummary
ReadS [RoomSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoomSummary]
$creadListPrec :: ReadPrec [RoomSummary]
readPrec :: ReadPrec RoomSummary
$creadPrec :: ReadPrec RoomSummary
readList :: ReadS [RoomSummary]
$creadList :: ReadS [RoomSummary]
readsPrec :: Int -> ReadS RoomSummary
$creadsPrec :: Int -> ReadS RoomSummary
Prelude.Read, Int -> RoomSummary -> ShowS
[RoomSummary] -> ShowS
RoomSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoomSummary] -> ShowS
$cshowList :: [RoomSummary] -> ShowS
show :: RoomSummary -> String
$cshow :: RoomSummary -> String
showsPrec :: Int -> RoomSummary -> ShowS
$cshowsPrec :: Int -> RoomSummary -> ShowS
Prelude.Show, forall x. Rep RoomSummary x -> RoomSummary
forall x. RoomSummary -> Rep RoomSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RoomSummary x -> RoomSummary
$cfrom :: forall x. RoomSummary -> Rep RoomSummary x
Prelude.Generic)
newRoomSummary ::
RoomSummary
newRoomSummary :: RoomSummary
newRoomSummary =
RoomSummary'
{ $sel:arn:RoomSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createTime:RoomSummary' :: Maybe ISO8601
createTime = forall a. Maybe a
Prelude.Nothing,
$sel:id:RoomSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:loggingConfigurationIdentifiers:RoomSummary' :: Maybe [Text]
loggingConfigurationIdentifiers = forall a. Maybe a
Prelude.Nothing,
$sel:messageReviewHandler:RoomSummary' :: Maybe MessageReviewHandler
messageReviewHandler = forall a. Maybe a
Prelude.Nothing,
$sel:name:RoomSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:tags:RoomSummary' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:updateTime:RoomSummary' :: Maybe ISO8601
updateTime = forall a. Maybe a
Prelude.Nothing
}
roomSummary_arn :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.Text)
roomSummary_arn :: Lens' RoomSummary (Maybe Text)
roomSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:RoomSummary' :: RoomSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RoomSummary
s@RoomSummary' {} Maybe Text
a -> RoomSummary
s {$sel:arn:RoomSummary' :: Maybe Text
arn = Maybe Text
a} :: RoomSummary)
roomSummary_createTime :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.UTCTime)
roomSummary_createTime :: Lens' RoomSummary (Maybe UTCTime)
roomSummary_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe ISO8601
createTime :: Maybe ISO8601
$sel:createTime:RoomSummary' :: RoomSummary -> Maybe ISO8601
createTime} -> Maybe ISO8601
createTime) (\s :: RoomSummary
s@RoomSummary' {} Maybe ISO8601
a -> RoomSummary
s {$sel:createTime:RoomSummary' :: Maybe ISO8601
createTime = Maybe ISO8601
a} :: RoomSummary) 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
roomSummary_id :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.Text)
roomSummary_id :: Lens' RoomSummary (Maybe Text)
roomSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe Text
id :: Maybe Text
$sel:id:RoomSummary' :: RoomSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: RoomSummary
s@RoomSummary' {} Maybe Text
a -> RoomSummary
s {$sel:id:RoomSummary' :: Maybe Text
id = Maybe Text
a} :: RoomSummary)
roomSummary_loggingConfigurationIdentifiers :: Lens.Lens' RoomSummary (Prelude.Maybe [Prelude.Text])
roomSummary_loggingConfigurationIdentifiers :: Lens' RoomSummary (Maybe [Text])
roomSummary_loggingConfigurationIdentifiers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe [Text]
loggingConfigurationIdentifiers :: Maybe [Text]
$sel:loggingConfigurationIdentifiers:RoomSummary' :: RoomSummary -> Maybe [Text]
loggingConfigurationIdentifiers} -> Maybe [Text]
loggingConfigurationIdentifiers) (\s :: RoomSummary
s@RoomSummary' {} Maybe [Text]
a -> RoomSummary
s {$sel:loggingConfigurationIdentifiers:RoomSummary' :: Maybe [Text]
loggingConfigurationIdentifiers = Maybe [Text]
a} :: RoomSummary) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
roomSummary_messageReviewHandler :: Lens.Lens' RoomSummary (Prelude.Maybe MessageReviewHandler)
roomSummary_messageReviewHandler :: Lens' RoomSummary (Maybe MessageReviewHandler)
roomSummary_messageReviewHandler = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe MessageReviewHandler
messageReviewHandler :: Maybe MessageReviewHandler
$sel:messageReviewHandler:RoomSummary' :: RoomSummary -> Maybe MessageReviewHandler
messageReviewHandler} -> Maybe MessageReviewHandler
messageReviewHandler) (\s :: RoomSummary
s@RoomSummary' {} Maybe MessageReviewHandler
a -> RoomSummary
s {$sel:messageReviewHandler:RoomSummary' :: Maybe MessageReviewHandler
messageReviewHandler = Maybe MessageReviewHandler
a} :: RoomSummary)
roomSummary_name :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.Text)
roomSummary_name :: Lens' RoomSummary (Maybe Text)
roomSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe Text
name :: Maybe Text
$sel:name:RoomSummary' :: RoomSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: RoomSummary
s@RoomSummary' {} Maybe Text
a -> RoomSummary
s {$sel:name:RoomSummary' :: Maybe Text
name = Maybe Text
a} :: RoomSummary)
roomSummary_tags :: Lens.Lens' RoomSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
roomSummary_tags :: Lens' RoomSummary (Maybe (HashMap Text Text))
roomSummary_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:RoomSummary' :: RoomSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: RoomSummary
s@RoomSummary' {} Maybe (HashMap Text Text)
a -> RoomSummary
s {$sel:tags:RoomSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: RoomSummary) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
roomSummary_updateTime :: Lens.Lens' RoomSummary (Prelude.Maybe Prelude.UTCTime)
roomSummary_updateTime :: Lens' RoomSummary (Maybe UTCTime)
roomSummary_updateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomSummary' {Maybe ISO8601
updateTime :: Maybe ISO8601
$sel:updateTime:RoomSummary' :: RoomSummary -> Maybe ISO8601
updateTime} -> Maybe ISO8601
updateTime) (\s :: RoomSummary
s@RoomSummary' {} Maybe ISO8601
a -> RoomSummary
s {$sel:updateTime:RoomSummary' :: Maybe ISO8601
updateTime = Maybe ISO8601
a} :: RoomSummary) 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
instance Data.FromJSON RoomSummary where
parseJSON :: Value -> Parser RoomSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RoomSummary"
( \Object
x ->
Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe [Text]
-> Maybe MessageReviewHandler
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ISO8601
-> RoomSummary
RoomSummary'
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
"arn")
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
"createTime")
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
"id")
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
"loggingConfigurationIdentifiers"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
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
"messageReviewHandler")
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
"name")
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
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"updateTime")
)
instance Prelude.Hashable RoomSummary where
hashWithSalt :: Int -> RoomSummary -> Int
hashWithSalt Int
_salt RoomSummary' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe MessageReviewHandler
updateTime :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
messageReviewHandler :: Maybe MessageReviewHandler
loggingConfigurationIdentifiers :: Maybe [Text]
id :: Maybe Text
createTime :: Maybe ISO8601
arn :: Maybe Text
$sel:updateTime:RoomSummary' :: RoomSummary -> Maybe ISO8601
$sel:tags:RoomSummary' :: RoomSummary -> Maybe (HashMap Text Text)
$sel:name:RoomSummary' :: RoomSummary -> Maybe Text
$sel:messageReviewHandler:RoomSummary' :: RoomSummary -> Maybe MessageReviewHandler
$sel:loggingConfigurationIdentifiers:RoomSummary' :: RoomSummary -> Maybe [Text]
$sel:id:RoomSummary' :: RoomSummary -> Maybe Text
$sel:createTime:RoomSummary' :: RoomSummary -> Maybe ISO8601
$sel:arn:RoomSummary' :: RoomSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
loggingConfigurationIdentifiers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MessageReviewHandler
messageReviewHandler
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
updateTime
instance Prelude.NFData RoomSummary where
rnf :: RoomSummary -> ()
rnf RoomSummary' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe MessageReviewHandler
updateTime :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
messageReviewHandler :: Maybe MessageReviewHandler
loggingConfigurationIdentifiers :: Maybe [Text]
id :: Maybe Text
createTime :: Maybe ISO8601
arn :: Maybe Text
$sel:updateTime:RoomSummary' :: RoomSummary -> Maybe ISO8601
$sel:tags:RoomSummary' :: RoomSummary -> Maybe (HashMap Text Text)
$sel:name:RoomSummary' :: RoomSummary -> Maybe Text
$sel:messageReviewHandler:RoomSummary' :: RoomSummary -> Maybe MessageReviewHandler
$sel:loggingConfigurationIdentifiers:RoomSummary' :: RoomSummary -> Maybe [Text]
$sel:id:RoomSummary' :: RoomSummary -> Maybe Text
$sel:createTime:RoomSummary' :: RoomSummary -> Maybe ISO8601
$sel:arn:RoomSummary' :: RoomSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
loggingConfigurationIdentifiers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MessageReviewHandler
messageReviewHandler
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updateTime