{-# 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.ProfileData where
import Amazonka.AlexaBusiness.Types.DistanceUnit
import Amazonka.AlexaBusiness.Types.TemperatureUnit
import Amazonka.AlexaBusiness.Types.WakeWord
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProfileData = ProfileData'
{
ProfileData -> Maybe DistanceUnit
distanceUnit :: Prelude.Maybe DistanceUnit,
ProfileData -> Maybe Text
locale :: Prelude.Maybe Prelude.Text,
ProfileData -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
ProfileData -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
ProfileData -> Maybe WakeWord
wakeWord :: Prelude.Maybe WakeWord,
ProfileData -> Maybe Text
profileName :: Prelude.Maybe Prelude.Text,
ProfileData -> Maybe TemperatureUnit
temperatureUnit :: Prelude.Maybe TemperatureUnit,
ProfileData -> Maybe Text
timezone :: Prelude.Maybe Prelude.Text,
ProfileData -> Maybe Bool
isDefault :: Prelude.Maybe Prelude.Bool
}
deriving (ProfileData -> ProfileData -> Bool
(ProfileData -> ProfileData -> Bool)
-> (ProfileData -> ProfileData -> Bool) -> Eq ProfileData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProfileData -> ProfileData -> Bool
$c/= :: ProfileData -> ProfileData -> Bool
== :: ProfileData -> ProfileData -> Bool
$c== :: ProfileData -> ProfileData -> Bool
Prelude.Eq, ReadPrec [ProfileData]
ReadPrec ProfileData
Int -> ReadS ProfileData
ReadS [ProfileData]
(Int -> ReadS ProfileData)
-> ReadS [ProfileData]
-> ReadPrec ProfileData
-> ReadPrec [ProfileData]
-> Read ProfileData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProfileData]
$creadListPrec :: ReadPrec [ProfileData]
readPrec :: ReadPrec ProfileData
$creadPrec :: ReadPrec ProfileData
readList :: ReadS [ProfileData]
$creadList :: ReadS [ProfileData]
readsPrec :: Int -> ReadS ProfileData
$creadsPrec :: Int -> ReadS ProfileData
Prelude.Read, Int -> ProfileData -> ShowS
[ProfileData] -> ShowS
ProfileData -> String
(Int -> ProfileData -> ShowS)
-> (ProfileData -> String)
-> ([ProfileData] -> ShowS)
-> Show ProfileData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProfileData] -> ShowS
$cshowList :: [ProfileData] -> ShowS
show :: ProfileData -> String
$cshow :: ProfileData -> String
showsPrec :: Int -> ProfileData -> ShowS
$cshowsPrec :: Int -> ProfileData -> ShowS
Prelude.Show, (forall x. ProfileData -> Rep ProfileData x)
-> (forall x. Rep ProfileData x -> ProfileData)
-> Generic ProfileData
forall x. Rep ProfileData x -> ProfileData
forall x. ProfileData -> Rep ProfileData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProfileData x -> ProfileData
$cfrom :: forall x. ProfileData -> Rep ProfileData x
Prelude.Generic)
newProfileData ::
ProfileData
newProfileData :: ProfileData
newProfileData =
ProfileData' :: Maybe DistanceUnit
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData
ProfileData'
{ $sel:distanceUnit:ProfileData' :: Maybe DistanceUnit
distanceUnit = Maybe DistanceUnit
forall a. Maybe a
Prelude.Nothing,
$sel:locale:ProfileData' :: Maybe Text
locale = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:address:ProfileData' :: Maybe Text
address = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:profileArn:ProfileData' :: Maybe Text
profileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:wakeWord:ProfileData' :: Maybe WakeWord
wakeWord = Maybe WakeWord
forall a. Maybe a
Prelude.Nothing,
$sel:profileName:ProfileData' :: Maybe Text
profileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:temperatureUnit:ProfileData' :: Maybe TemperatureUnit
temperatureUnit = Maybe TemperatureUnit
forall a. Maybe a
Prelude.Nothing,
$sel:timezone:ProfileData' :: Maybe Text
timezone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isDefault:ProfileData' :: Maybe Bool
isDefault = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
profileData_distanceUnit :: Lens.Lens' ProfileData (Prelude.Maybe DistanceUnit)
profileData_distanceUnit :: (Maybe DistanceUnit -> f (Maybe DistanceUnit))
-> ProfileData -> f ProfileData
profileData_distanceUnit = (ProfileData -> Maybe DistanceUnit)
-> (ProfileData -> Maybe DistanceUnit -> ProfileData)
-> Lens
ProfileData ProfileData (Maybe DistanceUnit) (Maybe DistanceUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe DistanceUnit
distanceUnit :: Maybe DistanceUnit
$sel:distanceUnit:ProfileData' :: ProfileData -> Maybe DistanceUnit
distanceUnit} -> Maybe DistanceUnit
distanceUnit) (\s :: ProfileData
s@ProfileData' {} Maybe DistanceUnit
a -> ProfileData
s {$sel:distanceUnit:ProfileData' :: Maybe DistanceUnit
distanceUnit = Maybe DistanceUnit
a} :: ProfileData)
profileData_locale :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_locale :: (Maybe Text -> f (Maybe Text)) -> ProfileData -> f ProfileData
profileData_locale = (ProfileData -> Maybe Text)
-> (ProfileData -> Maybe Text -> ProfileData)
-> Lens ProfileData ProfileData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe Text
locale :: Maybe Text
$sel:locale:ProfileData' :: ProfileData -> Maybe Text
locale} -> Maybe Text
locale) (\s :: ProfileData
s@ProfileData' {} Maybe Text
a -> ProfileData
s {$sel:locale:ProfileData' :: Maybe Text
locale = Maybe Text
a} :: ProfileData)
profileData_address :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_address :: (Maybe Text -> f (Maybe Text)) -> ProfileData -> f ProfileData
profileData_address = (ProfileData -> Maybe Text)
-> (ProfileData -> Maybe Text -> ProfileData)
-> Lens ProfileData ProfileData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe Text
address :: Maybe Text
$sel:address:ProfileData' :: ProfileData -> Maybe Text
address} -> Maybe Text
address) (\s :: ProfileData
s@ProfileData' {} Maybe Text
a -> ProfileData
s {$sel:address:ProfileData' :: Maybe Text
address = Maybe Text
a} :: ProfileData)
profileData_profileArn :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_profileArn :: (Maybe Text -> f (Maybe Text)) -> ProfileData -> f ProfileData
profileData_profileArn = (ProfileData -> Maybe Text)
-> (ProfileData -> Maybe Text -> ProfileData)
-> Lens ProfileData ProfileData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe Text
profileArn :: Maybe Text
$sel:profileArn:ProfileData' :: ProfileData -> Maybe Text
profileArn} -> Maybe Text
profileArn) (\s :: ProfileData
s@ProfileData' {} Maybe Text
a -> ProfileData
s {$sel:profileArn:ProfileData' :: Maybe Text
profileArn = Maybe Text
a} :: ProfileData)
profileData_wakeWord :: Lens.Lens' ProfileData (Prelude.Maybe WakeWord)
profileData_wakeWord :: (Maybe WakeWord -> f (Maybe WakeWord))
-> ProfileData -> f ProfileData
profileData_wakeWord = (ProfileData -> Maybe WakeWord)
-> (ProfileData -> Maybe WakeWord -> ProfileData)
-> Lens ProfileData ProfileData (Maybe WakeWord) (Maybe WakeWord)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe WakeWord
wakeWord :: Maybe WakeWord
$sel:wakeWord:ProfileData' :: ProfileData -> Maybe WakeWord
wakeWord} -> Maybe WakeWord
wakeWord) (\s :: ProfileData
s@ProfileData' {} Maybe WakeWord
a -> ProfileData
s {$sel:wakeWord:ProfileData' :: Maybe WakeWord
wakeWord = Maybe WakeWord
a} :: ProfileData)
profileData_profileName :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_profileName :: (Maybe Text -> f (Maybe Text)) -> ProfileData -> f ProfileData
profileData_profileName = (ProfileData -> Maybe Text)
-> (ProfileData -> Maybe Text -> ProfileData)
-> Lens ProfileData ProfileData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe Text
profileName :: Maybe Text
$sel:profileName:ProfileData' :: ProfileData -> Maybe Text
profileName} -> Maybe Text
profileName) (\s :: ProfileData
s@ProfileData' {} Maybe Text
a -> ProfileData
s {$sel:profileName:ProfileData' :: Maybe Text
profileName = Maybe Text
a} :: ProfileData)
profileData_temperatureUnit :: Lens.Lens' ProfileData (Prelude.Maybe TemperatureUnit)
profileData_temperatureUnit :: (Maybe TemperatureUnit -> f (Maybe TemperatureUnit))
-> ProfileData -> f ProfileData
profileData_temperatureUnit = (ProfileData -> Maybe TemperatureUnit)
-> (ProfileData -> Maybe TemperatureUnit -> ProfileData)
-> Lens
ProfileData
ProfileData
(Maybe TemperatureUnit)
(Maybe TemperatureUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe TemperatureUnit
temperatureUnit :: Maybe TemperatureUnit
$sel:temperatureUnit:ProfileData' :: ProfileData -> Maybe TemperatureUnit
temperatureUnit} -> Maybe TemperatureUnit
temperatureUnit) (\s :: ProfileData
s@ProfileData' {} Maybe TemperatureUnit
a -> ProfileData
s {$sel:temperatureUnit:ProfileData' :: Maybe TemperatureUnit
temperatureUnit = Maybe TemperatureUnit
a} :: ProfileData)
profileData_timezone :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_timezone :: (Maybe Text -> f (Maybe Text)) -> ProfileData -> f ProfileData
profileData_timezone = (ProfileData -> Maybe Text)
-> (ProfileData -> Maybe Text -> ProfileData)
-> Lens ProfileData ProfileData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe Text
timezone :: Maybe Text
$sel:timezone:ProfileData' :: ProfileData -> Maybe Text
timezone} -> Maybe Text
timezone) (\s :: ProfileData
s@ProfileData' {} Maybe Text
a -> ProfileData
s {$sel:timezone:ProfileData' :: Maybe Text
timezone = Maybe Text
a} :: ProfileData)
profileData_isDefault :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Bool)
profileData_isDefault :: (Maybe Bool -> f (Maybe Bool)) -> ProfileData -> f ProfileData
profileData_isDefault = (ProfileData -> Maybe Bool)
-> (ProfileData -> Maybe Bool -> ProfileData)
-> Lens ProfileData ProfileData (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProfileData' {Maybe Bool
isDefault :: Maybe Bool
$sel:isDefault:ProfileData' :: ProfileData -> Maybe Bool
isDefault} -> Maybe Bool
isDefault) (\s :: ProfileData
s@ProfileData' {} Maybe Bool
a -> ProfileData
s {$sel:isDefault:ProfileData' :: Maybe Bool
isDefault = Maybe Bool
a} :: ProfileData)
instance Core.FromJSON ProfileData where
parseJSON :: Value -> Parser ProfileData
parseJSON =
String
-> (Object -> Parser ProfileData) -> Value -> Parser ProfileData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProfileData"
( \Object
x ->
Maybe DistanceUnit
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData
ProfileData'
(Maybe DistanceUnit
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
-> Parser (Maybe DistanceUnit)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DistanceUnit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DistanceUnit")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
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
"Locale")
Parser
(Maybe Text
-> Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
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
"Address")
Parser
(Maybe Text
-> Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
-> Parser (Maybe Text)
-> Parser
(Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
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
"ProfileArn")
Parser
(Maybe WakeWord
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
-> Parser (Maybe WakeWord)
-> Parser
(Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WakeWord)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WakeWord")
Parser
(Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe Bool
-> ProfileData)
-> Parser (Maybe Text)
-> Parser
(Maybe TemperatureUnit -> Maybe Text -> Maybe Bool -> ProfileData)
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 TemperatureUnit -> Maybe Text -> Maybe Bool -> ProfileData)
-> Parser (Maybe TemperatureUnit)
-> Parser (Maybe Text -> Maybe Bool -> ProfileData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TemperatureUnit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TemperatureUnit")
Parser (Maybe Text -> Maybe Bool -> ProfileData)
-> Parser (Maybe Text) -> Parser (Maybe Bool -> ProfileData)
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
"Timezone")
Parser (Maybe Bool -> ProfileData)
-> Parser (Maybe Bool) -> Parser ProfileData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsDefault")
)
instance Prelude.Hashable ProfileData
instance Prelude.NFData ProfileData