{-# 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.Connect.Types.UserIdentityInfoLite
-- 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.Connect.Types.UserIdentityInfoLite 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 user\'s first name and last name.
--
-- /See:/ 'newUserIdentityInfoLite' smart constructor.
data UserIdentityInfoLite = UserIdentityInfoLite'
  { -- | The user\'s first name.
    UserIdentityInfoLite -> Maybe Text
firstName :: Prelude.Maybe Prelude.Text,
    -- | The user\'s last name.
    UserIdentityInfoLite -> Maybe Text
lastName :: Prelude.Maybe Prelude.Text
  }
  deriving (UserIdentityInfoLite -> UserIdentityInfoLite -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserIdentityInfoLite -> UserIdentityInfoLite -> Bool
$c/= :: UserIdentityInfoLite -> UserIdentityInfoLite -> Bool
== :: UserIdentityInfoLite -> UserIdentityInfoLite -> Bool
$c== :: UserIdentityInfoLite -> UserIdentityInfoLite -> Bool
Prelude.Eq, ReadPrec [UserIdentityInfoLite]
ReadPrec UserIdentityInfoLite
Int -> ReadS UserIdentityInfoLite
ReadS [UserIdentityInfoLite]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserIdentityInfoLite]
$creadListPrec :: ReadPrec [UserIdentityInfoLite]
readPrec :: ReadPrec UserIdentityInfoLite
$creadPrec :: ReadPrec UserIdentityInfoLite
readList :: ReadS [UserIdentityInfoLite]
$creadList :: ReadS [UserIdentityInfoLite]
readsPrec :: Int -> ReadS UserIdentityInfoLite
$creadsPrec :: Int -> ReadS UserIdentityInfoLite
Prelude.Read, Int -> UserIdentityInfoLite -> ShowS
[UserIdentityInfoLite] -> ShowS
UserIdentityInfoLite -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserIdentityInfoLite] -> ShowS
$cshowList :: [UserIdentityInfoLite] -> ShowS
show :: UserIdentityInfoLite -> String
$cshow :: UserIdentityInfoLite -> String
showsPrec :: Int -> UserIdentityInfoLite -> ShowS
$cshowsPrec :: Int -> UserIdentityInfoLite -> ShowS
Prelude.Show, forall x. Rep UserIdentityInfoLite x -> UserIdentityInfoLite
forall x. UserIdentityInfoLite -> Rep UserIdentityInfoLite x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserIdentityInfoLite x -> UserIdentityInfoLite
$cfrom :: forall x. UserIdentityInfoLite -> Rep UserIdentityInfoLite x
Prelude.Generic)

-- |
-- Create a value of 'UserIdentityInfoLite' 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:
--
-- 'firstName', 'userIdentityInfoLite_firstName' - The user\'s first name.
--
-- 'lastName', 'userIdentityInfoLite_lastName' - The user\'s last name.
newUserIdentityInfoLite ::
  UserIdentityInfoLite
newUserIdentityInfoLite :: UserIdentityInfoLite
newUserIdentityInfoLite =
  UserIdentityInfoLite'
    { $sel:firstName:UserIdentityInfoLite' :: Maybe Text
firstName = forall a. Maybe a
Prelude.Nothing,
      $sel:lastName:UserIdentityInfoLite' :: Maybe Text
lastName = forall a. Maybe a
Prelude.Nothing
    }

-- | The user\'s first name.
userIdentityInfoLite_firstName :: Lens.Lens' UserIdentityInfoLite (Prelude.Maybe Prelude.Text)
userIdentityInfoLite_firstName :: Lens' UserIdentityInfoLite (Maybe Text)
userIdentityInfoLite_firstName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdentityInfoLite' {Maybe Text
firstName :: Maybe Text
$sel:firstName:UserIdentityInfoLite' :: UserIdentityInfoLite -> Maybe Text
firstName} -> Maybe Text
firstName) (\s :: UserIdentityInfoLite
s@UserIdentityInfoLite' {} Maybe Text
a -> UserIdentityInfoLite
s {$sel:firstName:UserIdentityInfoLite' :: Maybe Text
firstName = Maybe Text
a} :: UserIdentityInfoLite)

-- | The user\'s last name.
userIdentityInfoLite_lastName :: Lens.Lens' UserIdentityInfoLite (Prelude.Maybe Prelude.Text)
userIdentityInfoLite_lastName :: Lens' UserIdentityInfoLite (Maybe Text)
userIdentityInfoLite_lastName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdentityInfoLite' {Maybe Text
lastName :: Maybe Text
$sel:lastName:UserIdentityInfoLite' :: UserIdentityInfoLite -> Maybe Text
lastName} -> Maybe Text
lastName) (\s :: UserIdentityInfoLite
s@UserIdentityInfoLite' {} Maybe Text
a -> UserIdentityInfoLite
s {$sel:lastName:UserIdentityInfoLite' :: Maybe Text
lastName = Maybe Text
a} :: UserIdentityInfoLite)

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

instance Prelude.Hashable UserIdentityInfoLite where
  hashWithSalt :: Int -> UserIdentityInfoLite -> Int
hashWithSalt Int
_salt UserIdentityInfoLite' {Maybe Text
lastName :: Maybe Text
firstName :: Maybe Text
$sel:lastName:UserIdentityInfoLite' :: UserIdentityInfoLite -> Maybe Text
$sel:firstName:UserIdentityInfoLite' :: UserIdentityInfoLite -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
firstName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastName

instance Prelude.NFData UserIdentityInfoLite where
  rnf :: UserIdentityInfoLite -> ()
rnf UserIdentityInfoLite' {Maybe Text
lastName :: Maybe Text
firstName :: Maybe Text
$sel:lastName:UserIdentityInfoLite' :: UserIdentityInfoLite -> Maybe Text
$sel:firstName:UserIdentityInfoLite' :: UserIdentityInfoLite -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firstName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastName