{-# 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.Chime.Types.UpdateUserRequestItem where
import Amazonka.Chime.Types.AlexaForBusinessMetadata
import Amazonka.Chime.Types.License
import Amazonka.Chime.Types.UserType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateUserRequestItem = UpdateUserRequestItem'
{
UpdateUserRequestItem -> Maybe License
licenseType :: Prelude.Maybe License,
UpdateUserRequestItem -> Maybe UserType
userType :: Prelude.Maybe UserType,
UpdateUserRequestItem -> Maybe AlexaForBusinessMetadata
alexaForBusinessMetadata :: Prelude.Maybe AlexaForBusinessMetadata,
UpdateUserRequestItem -> Text
userId :: Prelude.Text
}
deriving (UpdateUserRequestItem -> UpdateUserRequestItem -> Bool
(UpdateUserRequestItem -> UpdateUserRequestItem -> Bool)
-> (UpdateUserRequestItem -> UpdateUserRequestItem -> Bool)
-> Eq UpdateUserRequestItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateUserRequestItem -> UpdateUserRequestItem -> Bool
$c/= :: UpdateUserRequestItem -> UpdateUserRequestItem -> Bool
== :: UpdateUserRequestItem -> UpdateUserRequestItem -> Bool
$c== :: UpdateUserRequestItem -> UpdateUserRequestItem -> Bool
Prelude.Eq, Int -> UpdateUserRequestItem -> ShowS
[UpdateUserRequestItem] -> ShowS
UpdateUserRequestItem -> String
(Int -> UpdateUserRequestItem -> ShowS)
-> (UpdateUserRequestItem -> String)
-> ([UpdateUserRequestItem] -> ShowS)
-> Show UpdateUserRequestItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateUserRequestItem] -> ShowS
$cshowList :: [UpdateUserRequestItem] -> ShowS
show :: UpdateUserRequestItem -> String
$cshow :: UpdateUserRequestItem -> String
showsPrec :: Int -> UpdateUserRequestItem -> ShowS
$cshowsPrec :: Int -> UpdateUserRequestItem -> ShowS
Prelude.Show, (forall x. UpdateUserRequestItem -> Rep UpdateUserRequestItem x)
-> (forall x. Rep UpdateUserRequestItem x -> UpdateUserRequestItem)
-> Generic UpdateUserRequestItem
forall x. Rep UpdateUserRequestItem x -> UpdateUserRequestItem
forall x. UpdateUserRequestItem -> Rep UpdateUserRequestItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateUserRequestItem x -> UpdateUserRequestItem
$cfrom :: forall x. UpdateUserRequestItem -> Rep UpdateUserRequestItem x
Prelude.Generic)
newUpdateUserRequestItem ::
Prelude.Text ->
UpdateUserRequestItem
newUpdateUserRequestItem :: Text -> UpdateUserRequestItem
newUpdateUserRequestItem Text
pUserId_ =
UpdateUserRequestItem' :: Maybe License
-> Maybe UserType
-> Maybe AlexaForBusinessMetadata
-> Text
-> UpdateUserRequestItem
UpdateUserRequestItem'
{ $sel:licenseType:UpdateUserRequestItem' :: Maybe License
licenseType =
Maybe License
forall a. Maybe a
Prelude.Nothing,
$sel:userType:UpdateUserRequestItem' :: Maybe UserType
userType = Maybe UserType
forall a. Maybe a
Prelude.Nothing,
$sel:alexaForBusinessMetadata:UpdateUserRequestItem' :: Maybe AlexaForBusinessMetadata
alexaForBusinessMetadata = Maybe AlexaForBusinessMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:userId:UpdateUserRequestItem' :: Text
userId = Text
pUserId_
}
updateUserRequestItem_licenseType :: Lens.Lens' UpdateUserRequestItem (Prelude.Maybe License)
updateUserRequestItem_licenseType :: (Maybe License -> f (Maybe License))
-> UpdateUserRequestItem -> f UpdateUserRequestItem
updateUserRequestItem_licenseType = (UpdateUserRequestItem -> Maybe License)
-> (UpdateUserRequestItem
-> Maybe License -> UpdateUserRequestItem)
-> Lens
UpdateUserRequestItem
UpdateUserRequestItem
(Maybe License)
(Maybe License)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserRequestItem' {Maybe License
licenseType :: Maybe License
$sel:licenseType:UpdateUserRequestItem' :: UpdateUserRequestItem -> Maybe License
licenseType} -> Maybe License
licenseType) (\s :: UpdateUserRequestItem
s@UpdateUserRequestItem' {} Maybe License
a -> UpdateUserRequestItem
s {$sel:licenseType:UpdateUserRequestItem' :: Maybe License
licenseType = Maybe License
a} :: UpdateUserRequestItem)
updateUserRequestItem_userType :: Lens.Lens' UpdateUserRequestItem (Prelude.Maybe UserType)
updateUserRequestItem_userType :: (Maybe UserType -> f (Maybe UserType))
-> UpdateUserRequestItem -> f UpdateUserRequestItem
updateUserRequestItem_userType = (UpdateUserRequestItem -> Maybe UserType)
-> (UpdateUserRequestItem
-> Maybe UserType -> UpdateUserRequestItem)
-> Lens
UpdateUserRequestItem
UpdateUserRequestItem
(Maybe UserType)
(Maybe UserType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserRequestItem' {Maybe UserType
userType :: Maybe UserType
$sel:userType:UpdateUserRequestItem' :: UpdateUserRequestItem -> Maybe UserType
userType} -> Maybe UserType
userType) (\s :: UpdateUserRequestItem
s@UpdateUserRequestItem' {} Maybe UserType
a -> UpdateUserRequestItem
s {$sel:userType:UpdateUserRequestItem' :: Maybe UserType
userType = Maybe UserType
a} :: UpdateUserRequestItem)
updateUserRequestItem_alexaForBusinessMetadata :: Lens.Lens' UpdateUserRequestItem (Prelude.Maybe AlexaForBusinessMetadata)
updateUserRequestItem_alexaForBusinessMetadata :: (Maybe AlexaForBusinessMetadata
-> f (Maybe AlexaForBusinessMetadata))
-> UpdateUserRequestItem -> f UpdateUserRequestItem
updateUserRequestItem_alexaForBusinessMetadata = (UpdateUserRequestItem -> Maybe AlexaForBusinessMetadata)
-> (UpdateUserRequestItem
-> Maybe AlexaForBusinessMetadata -> UpdateUserRequestItem)
-> Lens
UpdateUserRequestItem
UpdateUserRequestItem
(Maybe AlexaForBusinessMetadata)
(Maybe AlexaForBusinessMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserRequestItem' {Maybe AlexaForBusinessMetadata
alexaForBusinessMetadata :: Maybe AlexaForBusinessMetadata
$sel:alexaForBusinessMetadata:UpdateUserRequestItem' :: UpdateUserRequestItem -> Maybe AlexaForBusinessMetadata
alexaForBusinessMetadata} -> Maybe AlexaForBusinessMetadata
alexaForBusinessMetadata) (\s :: UpdateUserRequestItem
s@UpdateUserRequestItem' {} Maybe AlexaForBusinessMetadata
a -> UpdateUserRequestItem
s {$sel:alexaForBusinessMetadata:UpdateUserRequestItem' :: Maybe AlexaForBusinessMetadata
alexaForBusinessMetadata = Maybe AlexaForBusinessMetadata
a} :: UpdateUserRequestItem)
updateUserRequestItem_userId :: Lens.Lens' UpdateUserRequestItem Prelude.Text
updateUserRequestItem_userId :: (Text -> f Text)
-> UpdateUserRequestItem -> f UpdateUserRequestItem
updateUserRequestItem_userId = (UpdateUserRequestItem -> Text)
-> (UpdateUserRequestItem -> Text -> UpdateUserRequestItem)
-> Lens UpdateUserRequestItem UpdateUserRequestItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserRequestItem' {Text
userId :: Text
$sel:userId:UpdateUserRequestItem' :: UpdateUserRequestItem -> Text
userId} -> Text
userId) (\s :: UpdateUserRequestItem
s@UpdateUserRequestItem' {} Text
a -> UpdateUserRequestItem
s {$sel:userId:UpdateUserRequestItem' :: Text
userId = Text
a} :: UpdateUserRequestItem)
instance Prelude.Hashable UpdateUserRequestItem
instance Prelude.NFData UpdateUserRequestItem
instance Core.ToJSON UpdateUserRequestItem where
toJSON :: UpdateUserRequestItem -> Value
toJSON UpdateUserRequestItem' {Maybe AlexaForBusinessMetadata
Maybe License
Maybe UserType
Text
userId :: Text
alexaForBusinessMetadata :: Maybe AlexaForBusinessMetadata
userType :: Maybe UserType
licenseType :: Maybe License
$sel:userId:UpdateUserRequestItem' :: UpdateUserRequestItem -> Text
$sel:alexaForBusinessMetadata:UpdateUserRequestItem' :: UpdateUserRequestItem -> Maybe AlexaForBusinessMetadata
$sel:userType:UpdateUserRequestItem' :: UpdateUserRequestItem -> Maybe UserType
$sel:licenseType:UpdateUserRequestItem' :: UpdateUserRequestItem -> Maybe License
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"LicenseType" Text -> License -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (License -> Pair) -> Maybe License -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe License
licenseType,
(Text
"UserType" Text -> UserType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UserType -> Pair) -> Maybe UserType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UserType
userType,
(Text
"AlexaForBusinessMetadata" Text -> AlexaForBusinessMetadata -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AlexaForBusinessMetadata -> Pair)
-> Maybe AlexaForBusinessMetadata -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AlexaForBusinessMetadata
alexaForBusinessMetadata,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UserId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userId)
]
)