{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ProfileData = ProfileData'
{
ProfileData -> Maybe Text
address :: Prelude.Maybe Prelude.Text,
ProfileData -> Maybe DistanceUnit
distanceUnit :: Prelude.Maybe DistanceUnit,
ProfileData -> Maybe Bool
isDefault :: Prelude.Maybe Prelude.Bool,
ProfileData -> Maybe Text
locale :: Prelude.Maybe Prelude.Text,
ProfileData -> Maybe Text
profileArn :: Prelude.Maybe Prelude.Text,
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 WakeWord
wakeWord :: Prelude.Maybe WakeWord
}
deriving (ProfileData -> ProfileData -> Bool
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]
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
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. 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'
{ $sel:address:ProfileData' :: Maybe Text
address = forall a. Maybe a
Prelude.Nothing,
$sel:distanceUnit:ProfileData' :: Maybe DistanceUnit
distanceUnit = forall a. Maybe a
Prelude.Nothing,
$sel:isDefault:ProfileData' :: Maybe Bool
isDefault = forall a. Maybe a
Prelude.Nothing,
$sel:locale:ProfileData' :: Maybe Text
locale = forall a. Maybe a
Prelude.Nothing,
$sel:profileArn:ProfileData' :: Maybe Text
profileArn = forall a. Maybe a
Prelude.Nothing,
$sel:profileName:ProfileData' :: Maybe Text
profileName = forall a. Maybe a
Prelude.Nothing,
$sel:temperatureUnit:ProfileData' :: Maybe TemperatureUnit
temperatureUnit = forall a. Maybe a
Prelude.Nothing,
$sel:timezone:ProfileData' :: Maybe Text
timezone = forall a. Maybe a
Prelude.Nothing,
$sel:wakeWord:ProfileData' :: Maybe WakeWord
wakeWord = forall a. Maybe a
Prelude.Nothing
}
profileData_address :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_address :: Lens' ProfileData (Maybe Text)
profileData_address = 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_distanceUnit :: Lens.Lens' ProfileData (Prelude.Maybe DistanceUnit)
profileData_distanceUnit :: Lens' ProfileData (Maybe DistanceUnit)
profileData_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_isDefault :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Bool)
profileData_isDefault :: Lens' ProfileData (Maybe Bool)
profileData_isDefault = 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)
profileData_locale :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_locale :: Lens' ProfileData (Maybe Text)
profileData_locale = 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_profileArn :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_profileArn :: Lens' ProfileData (Maybe Text)
profileData_profileArn = 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_profileName :: Lens.Lens' ProfileData (Prelude.Maybe Prelude.Text)
profileData_profileName :: Lens' ProfileData (Maybe Text)
profileData_profileName = 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 :: Lens' ProfileData (Maybe TemperatureUnit)
profileData_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 :: Lens' ProfileData (Maybe Text)
profileData_timezone = 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_wakeWord :: Lens.Lens' ProfileData (Prelude.Maybe WakeWord)
profileData_wakeWord :: Lens' ProfileData (Maybe WakeWord)
profileData_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)
instance Data.FromJSON ProfileData where
parseJSON :: Value -> Parser ProfileData
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProfileData"
( \Object
x ->
Maybe Text
-> Maybe DistanceUnit
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TemperatureUnit
-> Maybe Text
-> Maybe WakeWord
-> ProfileData
ProfileData'
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
"Address")
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
"DistanceUnit")
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
"IsDefault")
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
"Locale")
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
"TemperatureUnit")
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
"Timezone")
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
"WakeWord")
)
instance Prelude.Hashable ProfileData where
hashWithSalt :: Int -> ProfileData -> Int
hashWithSalt Int
_salt ProfileData' {Maybe Bool
Maybe Text
Maybe DistanceUnit
Maybe TemperatureUnit
Maybe WakeWord
wakeWord :: Maybe WakeWord
timezone :: Maybe Text
temperatureUnit :: Maybe TemperatureUnit
profileName :: Maybe Text
profileArn :: Maybe Text
locale :: Maybe Text
isDefault :: Maybe Bool
distanceUnit :: Maybe DistanceUnit
address :: Maybe Text
$sel:wakeWord:ProfileData' :: ProfileData -> Maybe WakeWord
$sel:timezone:ProfileData' :: ProfileData -> Maybe Text
$sel:temperatureUnit:ProfileData' :: ProfileData -> Maybe TemperatureUnit
$sel:profileName:ProfileData' :: ProfileData -> Maybe Text
$sel:profileArn:ProfileData' :: ProfileData -> Maybe Text
$sel:locale:ProfileData' :: ProfileData -> Maybe Text
$sel:isDefault:ProfileData' :: ProfileData -> Maybe Bool
$sel:distanceUnit:ProfileData' :: ProfileData -> Maybe DistanceUnit
$sel:address:ProfileData' :: ProfileData -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
address
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DistanceUnit
distanceUnit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isDefault
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
locale
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 TemperatureUnit
temperatureUnit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
timezone
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WakeWord
wakeWord
instance Prelude.NFData ProfileData where
rnf :: ProfileData -> ()
rnf ProfileData' {Maybe Bool
Maybe Text
Maybe DistanceUnit
Maybe TemperatureUnit
Maybe WakeWord
wakeWord :: Maybe WakeWord
timezone :: Maybe Text
temperatureUnit :: Maybe TemperatureUnit
profileName :: Maybe Text
profileArn :: Maybe Text
locale :: Maybe Text
isDefault :: Maybe Bool
distanceUnit :: Maybe DistanceUnit
address :: Maybe Text
$sel:wakeWord:ProfileData' :: ProfileData -> Maybe WakeWord
$sel:timezone:ProfileData' :: ProfileData -> Maybe Text
$sel:temperatureUnit:ProfileData' :: ProfileData -> Maybe TemperatureUnit
$sel:profileName:ProfileData' :: ProfileData -> Maybe Text
$sel:profileArn:ProfileData' :: ProfileData -> Maybe Text
$sel:locale:ProfileData' :: ProfileData -> Maybe Text
$sel:isDefault:ProfileData' :: ProfileData -> Maybe Bool
$sel:distanceUnit:ProfileData' :: ProfileData -> Maybe DistanceUnit
$sel:address:ProfileData' :: ProfileData -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
address
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DistanceUnit
distanceUnit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isDefault
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
locale
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 TemperatureUnit
temperatureUnit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
timezone
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WakeWord
wakeWord