{-# 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.AlexaBusiness.Types.Room where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Room = Room'
{
Room -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
Room -> Maybe Text
providerCalendarId :: Prelude.Maybe Prelude.Text,
Room -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
Room -> Maybe Text
roomName :: Prelude.Maybe Prelude.Text,
Room -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Room -> Room -> Bool
(Room -> Room -> Bool) -> (Room -> Room -> Bool) -> Eq Room
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Room -> Room -> Bool
$c/= :: Room -> Room -> Bool
== :: Room -> Room -> Bool
$c== :: Room -> Room -> Bool
Prelude.Eq, ReadPrec [Room]
ReadPrec Room
Int -> ReadS Room
ReadS [Room]
(Int -> ReadS Room)
-> ReadS [Room] -> ReadPrec Room -> ReadPrec [Room] -> Read Room
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Room]
$creadListPrec :: ReadPrec [Room]
readPrec :: ReadPrec Room
$creadPrec :: ReadPrec Room
readList :: ReadS [Room]
$creadList :: ReadS [Room]
readsPrec :: Int -> ReadS Room
$creadsPrec :: Int -> ReadS Room
Prelude.Read, Int -> Room -> ShowS
[Room] -> ShowS
Room -> String
(Int -> Room -> ShowS)
-> (Room -> String) -> ([Room] -> ShowS) -> Show Room
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Room] -> ShowS
$cshowList :: [Room] -> ShowS
show :: Room -> String
$cshow :: Room -> String
showsPrec :: Int -> Room -> ShowS
$cshowsPrec :: Int -> Room -> ShowS
Prelude.Show, (forall x. Room -> Rep Room x)
-> (forall x. Rep Room x -> Room) -> Generic Room
forall x. Rep Room x -> Room
forall x. Room -> Rep Room x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Room x -> Room
$cfrom :: forall x. Room -> Rep Room x
Prelude.Generic)
newRoom ::
Room
newRoom :: Room
newRoom =
Room' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Room
Room'
{ $sel:profileArn:Room' :: Maybe Text
profileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:providerCalendarId:Room' :: Maybe Text
providerCalendarId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roomArn:Room' :: Maybe Text
roomArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roomName:Room' :: Maybe Text
roomName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Room' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
room_profileArn :: Lens.Lens' Room (Prelude.Maybe Prelude.Text)
room_profileArn :: (Maybe Text -> f (Maybe Text)) -> Room -> f Room
room_profileArn = (Room -> Maybe Text)
-> (Room -> Maybe Text -> Room)
-> Lens Room Room (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Room' {Maybe Text
profileArn :: Maybe Text
$sel:profileArn:Room' :: Room -> Maybe Text
profileArn} -> Maybe Text
profileArn) (\s :: Room
s@Room' {} Maybe Text
a -> Room
s {$sel:profileArn:Room' :: Maybe Text
profileArn = Maybe Text
a} :: Room)
room_providerCalendarId :: Lens.Lens' Room (Prelude.Maybe Prelude.Text)
room_providerCalendarId :: (Maybe Text -> f (Maybe Text)) -> Room -> f Room
room_providerCalendarId = (Room -> Maybe Text)
-> (Room -> Maybe Text -> Room)
-> Lens Room Room (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Room' {Maybe Text
providerCalendarId :: Maybe Text
$sel:providerCalendarId:Room' :: Room -> Maybe Text
providerCalendarId} -> Maybe Text
providerCalendarId) (\s :: Room
s@Room' {} Maybe Text
a -> Room
s {$sel:providerCalendarId:Room' :: Maybe Text
providerCalendarId = Maybe Text
a} :: Room)
room_roomArn :: Lens.Lens' Room (Prelude.Maybe Prelude.Text)
room_roomArn :: (Maybe Text -> f (Maybe Text)) -> Room -> f Room
room_roomArn = (Room -> Maybe Text)
-> (Room -> Maybe Text -> Room)
-> Lens Room Room (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Room' {Maybe Text
roomArn :: Maybe Text
$sel:roomArn:Room' :: Room -> Maybe Text
roomArn} -> Maybe Text
roomArn) (\s :: Room
s@Room' {} Maybe Text
a -> Room
s {$sel:roomArn:Room' :: Maybe Text
roomArn = Maybe Text
a} :: Room)
room_roomName :: Lens.Lens' Room (Prelude.Maybe Prelude.Text)
room_roomName :: (Maybe Text -> f (Maybe Text)) -> Room -> f Room
room_roomName = (Room -> Maybe Text)
-> (Room -> Maybe Text -> Room)
-> Lens Room Room (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Room' {Maybe Text
roomName :: Maybe Text
$sel:roomName:Room' :: Room -> Maybe Text
roomName} -> Maybe Text
roomName) (\s :: Room
s@Room' {} Maybe Text
a -> Room
s {$sel:roomName:Room' :: Maybe Text
roomName = Maybe Text
a} :: Room)
room_description :: Lens.Lens' Room (Prelude.Maybe Prelude.Text)
room_description :: (Maybe Text -> f (Maybe Text)) -> Room -> f Room
room_description = (Room -> Maybe Text)
-> (Room -> Maybe Text -> Room)
-> Lens Room Room (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Room' {Maybe Text
description :: Maybe Text
$sel:description:Room' :: Room -> Maybe Text
description} -> Maybe Text
description) (\s :: Room
s@Room' {} Maybe Text
a -> Room
s {$sel:description:Room' :: Maybe Text
description = Maybe Text
a} :: Room)
instance Core.FromJSON Room where
parseJSON :: Value -> Parser Room
parseJSON =
String -> (Object -> Parser Room) -> Value -> Parser Room
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Room"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Room
Room'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Room)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Room)
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
"ProfileArn")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Room)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Room)
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
"ProviderCalendarId")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Room)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Maybe Text -> Room)
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
"RoomArn")
Parser (Maybe Text -> Maybe Text -> Room)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Room)
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
"RoomName")
Parser (Maybe Text -> Room) -> Parser (Maybe Text) -> Parser Room
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
"Description")
)
instance Prelude.Hashable Room
instance Prelude.NFData Room