{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AlexaBusiness.Types.RoomData
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AlexaBusiness.Types.RoomData 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

-- | The data of a room.
--
-- /See:/ 'newRoomData' smart constructor.
data RoomData = RoomData'
  { -- | The description of a room.
    RoomData -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The profile ARN of a room.
    RoomData -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
    -- | The profile name of a room.
    RoomData -> Maybe Text
profileName :: Prelude.Maybe Prelude.Text,
    -- | The provider calendar ARN of a room.
    RoomData -> Maybe Text
providerCalendarId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of a room.
    RoomData -> Maybe Text
roomArn :: Prelude.Maybe Prelude.Text,
    -- | The name of a room.
    RoomData -> Maybe Text
roomName :: Prelude.Maybe Prelude.Text
  }
  deriving (RoomData -> RoomData -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoomData -> RoomData -> Bool
$c/= :: RoomData -> RoomData -> Bool
== :: RoomData -> RoomData -> Bool
$c== :: RoomData -> RoomData -> Bool
Prelude.Eq, ReadPrec [RoomData]
ReadPrec RoomData
Int -> ReadS RoomData
ReadS [RoomData]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoomData]
$creadListPrec :: ReadPrec [RoomData]
readPrec :: ReadPrec RoomData
$creadPrec :: ReadPrec RoomData
readList :: ReadS [RoomData]
$creadList :: ReadS [RoomData]
readsPrec :: Int -> ReadS RoomData
$creadsPrec :: Int -> ReadS RoomData
Prelude.Read, Int -> RoomData -> ShowS
[RoomData] -> ShowS
RoomData -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoomData] -> ShowS
$cshowList :: [RoomData] -> ShowS
show :: RoomData -> String
$cshow :: RoomData -> String
showsPrec :: Int -> RoomData -> ShowS
$cshowsPrec :: Int -> RoomData -> ShowS
Prelude.Show, forall x. Rep RoomData x -> RoomData
forall x. RoomData -> Rep RoomData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RoomData x -> RoomData
$cfrom :: forall x. RoomData -> Rep RoomData x
Prelude.Generic)

-- |
-- Create a value of 'RoomData' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'description', 'roomData_description' - The description of a room.
--
-- 'profileArn', 'roomData_profileArn' - The profile ARN of a room.
--
-- 'profileName', 'roomData_profileName' - The profile name of a room.
--
-- 'providerCalendarId', 'roomData_providerCalendarId' - The provider calendar ARN of a room.
--
-- 'roomArn', 'roomData_roomArn' - The ARN of a room.
--
-- 'roomName', 'roomData_roomName' - The name of a room.
newRoomData ::
  RoomData
newRoomData :: RoomData
newRoomData =
  RoomData'
    { $sel:description:RoomData' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:profileArn:RoomData' :: Maybe Text
profileArn = forall a. Maybe a
Prelude.Nothing,
      $sel:profileName:RoomData' :: Maybe Text
profileName = forall a. Maybe a
Prelude.Nothing,
      $sel:providerCalendarId:RoomData' :: Maybe Text
providerCalendarId = forall a. Maybe a
Prelude.Nothing,
      $sel:roomArn:RoomData' :: Maybe Text
roomArn = forall a. Maybe a
Prelude.Nothing,
      $sel:roomName:RoomData' :: Maybe Text
roomName = forall a. Maybe a
Prelude.Nothing
    }

-- | The description of a room.
roomData_description :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_description :: Lens' RoomData (Maybe Text)
roomData_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomData' {Maybe Text
description :: Maybe Text
$sel:description:RoomData' :: RoomData -> Maybe Text
description} -> Maybe Text
description) (\s :: RoomData
s@RoomData' {} Maybe Text
a -> RoomData
s {$sel:description:RoomData' :: Maybe Text
description = Maybe Text
a} :: RoomData)

-- | The profile ARN of a room.
roomData_profileArn :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_profileArn :: Lens' RoomData (Maybe Text)
roomData_profileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomData' {Maybe Text
profileArn :: Maybe Text
$sel:profileArn:RoomData' :: RoomData -> Maybe Text
profileArn} -> Maybe Text
profileArn) (\s :: RoomData
s@RoomData' {} Maybe Text
a -> RoomData
s {$sel:profileArn:RoomData' :: Maybe Text
profileArn = Maybe Text
a} :: RoomData)

-- | The profile name of a room.
roomData_profileName :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_profileName :: Lens' RoomData (Maybe Text)
roomData_profileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomData' {Maybe Text
profileName :: Maybe Text
$sel:profileName:RoomData' :: RoomData -> Maybe Text
profileName} -> Maybe Text
profileName) (\s :: RoomData
s@RoomData' {} Maybe Text
a -> RoomData
s {$sel:profileName:RoomData' :: Maybe Text
profileName = Maybe Text
a} :: RoomData)

-- | The provider calendar ARN of a room.
roomData_providerCalendarId :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_providerCalendarId :: Lens' RoomData (Maybe Text)
roomData_providerCalendarId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomData' {Maybe Text
providerCalendarId :: Maybe Text
$sel:providerCalendarId:RoomData' :: RoomData -> Maybe Text
providerCalendarId} -> Maybe Text
providerCalendarId) (\s :: RoomData
s@RoomData' {} Maybe Text
a -> RoomData
s {$sel:providerCalendarId:RoomData' :: Maybe Text
providerCalendarId = Maybe Text
a} :: RoomData)

-- | The ARN of a room.
roomData_roomArn :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_roomArn :: Lens' RoomData (Maybe Text)
roomData_roomArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomData' {Maybe Text
roomArn :: Maybe Text
$sel:roomArn:RoomData' :: RoomData -> Maybe Text
roomArn} -> Maybe Text
roomArn) (\s :: RoomData
s@RoomData' {} Maybe Text
a -> RoomData
s {$sel:roomArn:RoomData' :: Maybe Text
roomArn = Maybe Text
a} :: RoomData)

-- | The name of a room.
roomData_roomName :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_roomName :: Lens' RoomData (Maybe Text)
roomData_roomName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoomData' {Maybe Text
roomName :: Maybe Text
$sel:roomName:RoomData' :: RoomData -> Maybe Text
roomName} -> Maybe Text
roomName) (\s :: RoomData
s@RoomData' {} Maybe Text
a -> RoomData
s {$sel:roomName:RoomData' :: Maybe Text
roomName = Maybe Text
a} :: RoomData)

instance Data.FromJSON RoomData where
  parseJSON :: Value -> Parser RoomData
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RoomData"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RoomData
RoomData'
            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
"ProfileName")
            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 RoomData where
  hashWithSalt :: Int -> RoomData -> Int
hashWithSalt Int
_salt RoomData' {Maybe Text
roomName :: Maybe Text
roomArn :: Maybe Text
providerCalendarId :: Maybe Text
profileName :: Maybe Text
profileArn :: Maybe Text
description :: Maybe Text
$sel:roomName:RoomData' :: RoomData -> Maybe Text
$sel:roomArn:RoomData' :: RoomData -> Maybe Text
$sel:providerCalendarId:RoomData' :: RoomData -> Maybe Text
$sel:profileName:RoomData' :: RoomData -> Maybe Text
$sel:profileArn:RoomData' :: RoomData -> Maybe Text
$sel:description:RoomData' :: RoomData -> 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
profileName
      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 RoomData where
  rnf :: RoomData -> ()
rnf RoomData' {Maybe Text
roomName :: Maybe Text
roomArn :: Maybe Text
providerCalendarId :: Maybe Text
profileName :: Maybe Text
profileArn :: Maybe Text
description :: Maybe Text
$sel:roomName:RoomData' :: RoomData -> Maybe Text
$sel:roomArn:RoomData' :: RoomData -> Maybe Text
$sel:providerCalendarId:RoomData' :: RoomData -> Maybe Text
$sel:profileName:RoomData' :: RoomData -> Maybe Text
$sel:profileArn:RoomData' :: RoomData -> Maybe Text
$sel:description:RoomData' :: RoomData -> 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
profileName
      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