{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AlexaBusiness.Types.RoomData where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The data of a room.
--
-- /See:/ 'newRoomData' smart constructor.
data RoomData = RoomData'
  { -- | The profile ARN of a room.
    RoomData -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
    -- | The provider calendar ARN of a room.
    RoomData -> Maybe Text
providerCalendarId :: Prelude.Maybe Prelude.Text,
    -- | The profile name of a room.
    RoomData -> Maybe Text
profileName :: 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,
    -- | The description of a room.
    RoomData -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (RoomData -> RoomData -> Bool
(RoomData -> RoomData -> Bool)
-> (RoomData -> RoomData -> Bool) -> Eq RoomData
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]
(Int -> ReadS RoomData)
-> ReadS [RoomData]
-> ReadPrec RoomData
-> ReadPrec [RoomData]
-> Read 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
(Int -> RoomData -> ShowS)
-> (RoomData -> String) -> ([RoomData] -> ShowS) -> Show RoomData
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. RoomData -> Rep RoomData x)
-> (forall x. Rep RoomData x -> RoomData) -> Generic RoomData
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:
--
-- 'profileArn', 'roomData_profileArn' - The profile ARN of a room.
--
-- 'providerCalendarId', 'roomData_providerCalendarId' - The provider calendar ARN of a room.
--
-- 'profileName', 'roomData_profileName' - The profile name of a room.
--
-- 'roomArn', 'roomData_roomArn' - The ARN of a room.
--
-- 'roomName', 'roomData_roomName' - The name of a room.
--
-- 'description', 'roomData_description' - The description of a room.
newRoomData ::
  RoomData
newRoomData :: RoomData
newRoomData =
  RoomData' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RoomData
RoomData'
    { $sel:profileArn:RoomData' :: Maybe Text
profileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:providerCalendarId:RoomData' :: Maybe Text
providerCalendarId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:profileName:RoomData' :: Maybe Text
profileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roomArn:RoomData' :: Maybe Text
roomArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roomName:RoomData' :: Maybe Text
roomName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:RoomData' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The profile ARN of a room.
roomData_profileArn :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_profileArn :: (Maybe Text -> f (Maybe Text)) -> RoomData -> f RoomData
roomData_profileArn = (RoomData -> Maybe Text)
-> (RoomData -> Maybe Text -> RoomData)
-> Lens RoomData RoomData (Maybe Text) (Maybe Text)
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 provider calendar ARN of a room.
roomData_providerCalendarId :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_providerCalendarId :: (Maybe Text -> f (Maybe Text)) -> RoomData -> f RoomData
roomData_providerCalendarId = (RoomData -> Maybe Text)
-> (RoomData -> Maybe Text -> RoomData)
-> Lens RoomData RoomData (Maybe Text) (Maybe Text)
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 profile name of a room.
roomData_profileName :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_profileName :: (Maybe Text -> f (Maybe Text)) -> RoomData -> f RoomData
roomData_profileName = (RoomData -> Maybe Text)
-> (RoomData -> Maybe Text -> RoomData)
-> Lens RoomData RoomData (Maybe Text) (Maybe Text)
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 ARN of a room.
roomData_roomArn :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_roomArn :: (Maybe Text -> f (Maybe Text)) -> RoomData -> f RoomData
roomData_roomArn = (RoomData -> Maybe Text)
-> (RoomData -> Maybe Text -> RoomData)
-> Lens RoomData RoomData (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text)) -> RoomData -> f RoomData
roomData_roomName = (RoomData -> Maybe Text)
-> (RoomData -> Maybe Text -> RoomData)
-> Lens RoomData RoomData (Maybe Text) (Maybe Text)
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)

-- | The description of a room.
roomData_description :: Lens.Lens' RoomData (Prelude.Maybe Prelude.Text)
roomData_description :: (Maybe Text -> f (Maybe Text)) -> RoomData -> f RoomData
roomData_description = (RoomData -> Maybe Text)
-> (RoomData -> Maybe Text -> RoomData)
-> Lens RoomData RoomData (Maybe Text) (Maybe Text)
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)

instance Core.FromJSON RoomData where
  parseJSON :: Value -> Parser RoomData
parseJSON =
    String -> (Object -> Parser RoomData) -> Value -> Parser RoomData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RoomData"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RoomData
RoomData'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> RoomData)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> RoomData)
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
   -> Maybe Text
   -> RoomData)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> RoomData)
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 -> Maybe Text -> RoomData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> RoomData)
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
"ProfileName")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> RoomData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RoomData)
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 -> RoomData)
-> Parser (Maybe Text) -> Parser (Maybe Text -> RoomData)
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 -> RoomData)
-> Parser (Maybe Text) -> Parser RoomData
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 RoomData

instance Prelude.NFData RoomData