{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Room = Room'
{
Room -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
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
}
deriving (Room -> Room -> Bool
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]
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
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. 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'
{ $sel:description:Room' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:profileArn:Room' :: Maybe Text
profileArn = forall a. Maybe a
Prelude.Nothing,
$sel:providerCalendarId:Room' :: Maybe Text
providerCalendarId = forall a. Maybe a
Prelude.Nothing,
$sel:roomArn:Room' :: Maybe Text
roomArn = forall a. Maybe a
Prelude.Nothing,
$sel:roomName:Room' :: Maybe Text
roomName = forall a. Maybe a
Prelude.Nothing
}
room_description :: Lens.Lens' Room (Prelude.Maybe Prelude.Text)
room_description :: Lens' Room (Maybe Text)
room_description = 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)
room_profileArn :: Lens.Lens' Room (Prelude.Maybe Prelude.Text)
room_profileArn :: Lens' Room (Maybe Text)
room_profileArn = 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 :: Lens' Room (Maybe Text)
room_providerCalendarId = 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 :: Lens' Room (Maybe Text)
room_roomArn = 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 :: Lens' Room (Maybe Text)
room_roomName = 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)
instance Data.FromJSON Room where
parseJSON :: Value -> Parser Room
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Room"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Room
Room'
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
"Description")
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
"ProfileArn")
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
"ProviderCalendarId")
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
"RoomArn")
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
"RoomName")
)
instance Prelude.Hashable Room where
hashWithSalt :: Int -> Room -> Int
hashWithSalt Int
_salt Room' {Maybe Text
roomName :: Maybe Text
roomArn :: Maybe Text
providerCalendarId :: Maybe Text
profileArn :: Maybe Text
description :: Maybe Text
$sel:roomName:Room' :: Room -> Maybe Text
$sel:roomArn:Room' :: Room -> Maybe Text
$sel:providerCalendarId:Room' :: Room -> Maybe Text
$sel:profileArn:Room' :: Room -> Maybe Text
$sel:description:Room' :: Room -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
profileArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
providerCalendarId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roomArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roomName
instance Prelude.NFData Room where
rnf :: Room -> ()
rnf Room' {Maybe Text
roomName :: Maybe Text
roomArn :: Maybe Text
providerCalendarId :: Maybe Text
profileArn :: Maybe Text
description :: Maybe Text
$sel:roomName:Room' :: Room -> Maybe Text
$sel:roomArn:Room' :: Room -> Maybe Text
$sel:providerCalendarId:Room' :: Room -> Maybe Text
$sel:profileArn:Room' :: Room -> Maybe Text
$sel:description:Room' :: Room -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
profileArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
providerCalendarId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roomArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roomName