{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CodeStar.UpdateUserProfile
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a user\'s profile in AWS CodeStar. The user profile is not
-- project-specific. Information in the user profile is displayed wherever
-- the user\'s information appears to other users in AWS CodeStar.
module Amazonka.CodeStar.UpdateUserProfile
  ( -- * Creating a Request
    UpdateUserProfile (..),
    newUpdateUserProfile,

    -- * Request Lenses
    updateUserProfile_displayName,
    updateUserProfile_emailAddress,
    updateUserProfile_sshPublicKey,
    updateUserProfile_userArn,

    -- * Destructuring the Response
    UpdateUserProfileResponse (..),
    newUpdateUserProfileResponse,

    -- * Response Lenses
    updateUserProfileResponse_createdTimestamp,
    updateUserProfileResponse_displayName,
    updateUserProfileResponse_emailAddress,
    updateUserProfileResponse_lastModifiedTimestamp,
    updateUserProfileResponse_sshPublicKey,
    updateUserProfileResponse_httpStatus,
    updateUserProfileResponse_userArn,
  )
where

import Amazonka.CodeStar.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateUserProfile' smart constructor.
data UpdateUserProfile = UpdateUserProfile'
  { -- | The name that is displayed as the friendly name for the user in AWS
    -- CodeStar.
    UpdateUserProfile -> Maybe (Sensitive Text)
displayName :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The email address that is displayed as part of the user\'s profile in
    -- AWS CodeStar.
    UpdateUserProfile -> Maybe (Sensitive Text)
emailAddress :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The SSH public key associated with the user in AWS CodeStar. If a
    -- project owner allows the user remote access to project resources, this
    -- public key will be used along with the user\'s private key for SSH
    -- access.
    UpdateUserProfile -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
    -- | The name that will be displayed as the friendly name for the user in AWS
    -- CodeStar.
    UpdateUserProfile -> Text
userArn :: Prelude.Text
  }
  deriving (UpdateUserProfile -> UpdateUserProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateUserProfile -> UpdateUserProfile -> Bool
$c/= :: UpdateUserProfile -> UpdateUserProfile -> Bool
== :: UpdateUserProfile -> UpdateUserProfile -> Bool
$c== :: UpdateUserProfile -> UpdateUserProfile -> Bool
Prelude.Eq, Int -> UpdateUserProfile -> ShowS
[UpdateUserProfile] -> ShowS
UpdateUserProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateUserProfile] -> ShowS
$cshowList :: [UpdateUserProfile] -> ShowS
show :: UpdateUserProfile -> String
$cshow :: UpdateUserProfile -> String
showsPrec :: Int -> UpdateUserProfile -> ShowS
$cshowsPrec :: Int -> UpdateUserProfile -> ShowS
Prelude.Show, forall x. Rep UpdateUserProfile x -> UpdateUserProfile
forall x. UpdateUserProfile -> Rep UpdateUserProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateUserProfile x -> UpdateUserProfile
$cfrom :: forall x. UpdateUserProfile -> Rep UpdateUserProfile x
Prelude.Generic)

-- |
-- Create a value of 'UpdateUserProfile' 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:
--
-- 'displayName', 'updateUserProfile_displayName' - The name that is displayed as the friendly name for the user in AWS
-- CodeStar.
--
-- 'emailAddress', 'updateUserProfile_emailAddress' - The email address that is displayed as part of the user\'s profile in
-- AWS CodeStar.
--
-- 'sshPublicKey', 'updateUserProfile_sshPublicKey' - The SSH public key associated with the user in AWS CodeStar. If a
-- project owner allows the user remote access to project resources, this
-- public key will be used along with the user\'s private key for SSH
-- access.
--
-- 'userArn', 'updateUserProfile_userArn' - The name that will be displayed as the friendly name for the user in AWS
-- CodeStar.
newUpdateUserProfile ::
  -- | 'userArn'
  Prelude.Text ->
  UpdateUserProfile
newUpdateUserProfile :: Text -> UpdateUserProfile
newUpdateUserProfile Text
pUserArn_ =
  UpdateUserProfile'
    { $sel:displayName:UpdateUserProfile' :: Maybe (Sensitive Text)
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:emailAddress:UpdateUserProfile' :: Maybe (Sensitive Text)
emailAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:sshPublicKey:UpdateUserProfile' :: Maybe Text
sshPublicKey = forall a. Maybe a
Prelude.Nothing,
      $sel:userArn:UpdateUserProfile' :: Text
userArn = Text
pUserArn_
    }

-- | The name that is displayed as the friendly name for the user in AWS
-- CodeStar.
updateUserProfile_displayName :: Lens.Lens' UpdateUserProfile (Prelude.Maybe Prelude.Text)
updateUserProfile_displayName :: Lens' UpdateUserProfile (Maybe Text)
updateUserProfile_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfile' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: UpdateUserProfile
s@UpdateUserProfile' {} Maybe (Sensitive Text)
a -> UpdateUserProfile
s {$sel:displayName:UpdateUserProfile' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: UpdateUserProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The email address that is displayed as part of the user\'s profile in
-- AWS CodeStar.
updateUserProfile_emailAddress :: Lens.Lens' UpdateUserProfile (Prelude.Maybe Prelude.Text)
updateUserProfile_emailAddress :: Lens' UpdateUserProfile (Maybe Text)
updateUserProfile_emailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfile' {Maybe (Sensitive Text)
emailAddress :: Maybe (Sensitive Text)
$sel:emailAddress:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
emailAddress} -> Maybe (Sensitive Text)
emailAddress) (\s :: UpdateUserProfile
s@UpdateUserProfile' {} Maybe (Sensitive Text)
a -> UpdateUserProfile
s {$sel:emailAddress:UpdateUserProfile' :: Maybe (Sensitive Text)
emailAddress = Maybe (Sensitive Text)
a} :: UpdateUserProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The SSH public key associated with the user in AWS CodeStar. If a
-- project owner allows the user remote access to project resources, this
-- public key will be used along with the user\'s private key for SSH
-- access.
updateUserProfile_sshPublicKey :: Lens.Lens' UpdateUserProfile (Prelude.Maybe Prelude.Text)
updateUserProfile_sshPublicKey :: Lens' UpdateUserProfile (Maybe Text)
updateUserProfile_sshPublicKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfile' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:UpdateUserProfile' :: UpdateUserProfile -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: UpdateUserProfile
s@UpdateUserProfile' {} Maybe Text
a -> UpdateUserProfile
s {$sel:sshPublicKey:UpdateUserProfile' :: Maybe Text
sshPublicKey = Maybe Text
a} :: UpdateUserProfile)

-- | The name that will be displayed as the friendly name for the user in AWS
-- CodeStar.
updateUserProfile_userArn :: Lens.Lens' UpdateUserProfile Prelude.Text
updateUserProfile_userArn :: Lens' UpdateUserProfile Text
updateUserProfile_userArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfile' {Text
userArn :: Text
$sel:userArn:UpdateUserProfile' :: UpdateUserProfile -> Text
userArn} -> Text
userArn) (\s :: UpdateUserProfile
s@UpdateUserProfile' {} Text
a -> UpdateUserProfile
s {$sel:userArn:UpdateUserProfile' :: Text
userArn = Text
a} :: UpdateUserProfile)

instance Core.AWSRequest UpdateUserProfile where
  type
    AWSResponse UpdateUserProfile =
      UpdateUserProfileResponse
  request :: (Service -> Service)
-> UpdateUserProfile -> Request UpdateUserProfile
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateUserProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateUserProfile)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Int
-> Text
-> UpdateUserProfileResponse
UpdateUserProfileResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createdTimestamp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"displayName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"emailAddress")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"lastModifiedTimestamp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"sshPublicKey")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"userArn")
      )

instance Prelude.Hashable UpdateUserProfile where
  hashWithSalt :: Int -> UpdateUserProfile -> Int
hashWithSalt Int
_salt UpdateUserProfile' {Maybe Text
Maybe (Sensitive Text)
Text
userArn :: Text
sshPublicKey :: Maybe Text
emailAddress :: Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:userArn:UpdateUserProfile' :: UpdateUserProfile -> Text
$sel:sshPublicKey:UpdateUserProfile' :: UpdateUserProfile -> Maybe Text
$sel:emailAddress:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
$sel:displayName:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
displayName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
emailAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sshPublicKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userArn

instance Prelude.NFData UpdateUserProfile where
  rnf :: UpdateUserProfile -> ()
rnf UpdateUserProfile' {Maybe Text
Maybe (Sensitive Text)
Text
userArn :: Text
sshPublicKey :: Maybe Text
emailAddress :: Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:userArn:UpdateUserProfile' :: UpdateUserProfile -> Text
$sel:sshPublicKey:UpdateUserProfile' :: UpdateUserProfile -> Maybe Text
$sel:emailAddress:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
$sel:displayName:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
emailAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sshPublicKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userArn

instance Data.ToHeaders UpdateUserProfile where
  toHeaders :: UpdateUserProfile -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"CodeStar_20170419.UpdateUserProfile" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateUserProfile where
  toJSON :: UpdateUserProfile -> Value
toJSON UpdateUserProfile' {Maybe Text
Maybe (Sensitive Text)
Text
userArn :: Text
sshPublicKey :: Maybe Text
emailAddress :: Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:userArn:UpdateUserProfile' :: UpdateUserProfile -> Text
$sel:sshPublicKey:UpdateUserProfile' :: UpdateUserProfile -> Maybe Text
$sel:emailAddress:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
$sel:displayName:UpdateUserProfile' :: UpdateUserProfile -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"displayName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
displayName,
            (Key
"emailAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
emailAddress,
            (Key
"sshPublicKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sshPublicKey,
            forall a. a -> Maybe a
Prelude.Just (Key
"userArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
userArn)
          ]
      )

instance Data.ToPath UpdateUserProfile where
  toPath :: UpdateUserProfile -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery UpdateUserProfile where
  toQuery :: UpdateUserProfile -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateUserProfileResponse' smart constructor.
data UpdateUserProfileResponse = UpdateUserProfileResponse'
  { -- | The date the user profile was created, in timestamp format.
    UpdateUserProfileResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The name that is displayed as the friendly name for the user in AWS
    -- CodeStar.
    UpdateUserProfileResponse -> Maybe (Sensitive Text)
displayName :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The email address that is displayed as part of the user\'s profile in
    -- AWS CodeStar.
    UpdateUserProfileResponse -> Maybe (Sensitive Text)
emailAddress :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The date the user profile was last modified, in timestamp format.
    UpdateUserProfileResponse -> Maybe POSIX
lastModifiedTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The SSH public key associated with the user in AWS CodeStar. This is the
    -- public portion of the public\/private keypair the user can use to access
    -- project resources if a project owner allows the user remote access to
    -- those resources.
    UpdateUserProfileResponse -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateUserProfileResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the user in IAM.
    UpdateUserProfileResponse -> Text
userArn :: Prelude.Text
  }
  deriving (UpdateUserProfileResponse -> UpdateUserProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateUserProfileResponse -> UpdateUserProfileResponse -> Bool
$c/= :: UpdateUserProfileResponse -> UpdateUserProfileResponse -> Bool
== :: UpdateUserProfileResponse -> UpdateUserProfileResponse -> Bool
$c== :: UpdateUserProfileResponse -> UpdateUserProfileResponse -> Bool
Prelude.Eq, Int -> UpdateUserProfileResponse -> ShowS
[UpdateUserProfileResponse] -> ShowS
UpdateUserProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateUserProfileResponse] -> ShowS
$cshowList :: [UpdateUserProfileResponse] -> ShowS
show :: UpdateUserProfileResponse -> String
$cshow :: UpdateUserProfileResponse -> String
showsPrec :: Int -> UpdateUserProfileResponse -> ShowS
$cshowsPrec :: Int -> UpdateUserProfileResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateUserProfileResponse x -> UpdateUserProfileResponse
forall x.
UpdateUserProfileResponse -> Rep UpdateUserProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateUserProfileResponse x -> UpdateUserProfileResponse
$cfrom :: forall x.
UpdateUserProfileResponse -> Rep UpdateUserProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateUserProfileResponse' 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:
--
-- 'createdTimestamp', 'updateUserProfileResponse_createdTimestamp' - The date the user profile was created, in timestamp format.
--
-- 'displayName', 'updateUserProfileResponse_displayName' - The name that is displayed as the friendly name for the user in AWS
-- CodeStar.
--
-- 'emailAddress', 'updateUserProfileResponse_emailAddress' - The email address that is displayed as part of the user\'s profile in
-- AWS CodeStar.
--
-- 'lastModifiedTimestamp', 'updateUserProfileResponse_lastModifiedTimestamp' - The date the user profile was last modified, in timestamp format.
--
-- 'sshPublicKey', 'updateUserProfileResponse_sshPublicKey' - The SSH public key associated with the user in AWS CodeStar. This is the
-- public portion of the public\/private keypair the user can use to access
-- project resources if a project owner allows the user remote access to
-- those resources.
--
-- 'httpStatus', 'updateUserProfileResponse_httpStatus' - The response's http status code.
--
-- 'userArn', 'updateUserProfileResponse_userArn' - The Amazon Resource Name (ARN) of the user in IAM.
newUpdateUserProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'userArn'
  Prelude.Text ->
  UpdateUserProfileResponse
newUpdateUserProfileResponse :: Int -> Text -> UpdateUserProfileResponse
newUpdateUserProfileResponse Int
pHttpStatus_ Text
pUserArn_ =
  UpdateUserProfileResponse'
    { $sel:createdTimestamp:UpdateUserProfileResponse' :: Maybe POSIX
createdTimestamp =
        forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:UpdateUserProfileResponse' :: Maybe (Sensitive Text)
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:emailAddress:UpdateUserProfileResponse' :: Maybe (Sensitive Text)
emailAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimestamp:UpdateUserProfileResponse' :: Maybe POSIX
lastModifiedTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:sshPublicKey:UpdateUserProfileResponse' :: Maybe Text
sshPublicKey = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateUserProfileResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:userArn:UpdateUserProfileResponse' :: Text
userArn = Text
pUserArn_
    }

-- | The date the user profile was created, in timestamp format.
updateUserProfileResponse_createdTimestamp :: Lens.Lens' UpdateUserProfileResponse (Prelude.Maybe Prelude.UTCTime)
updateUserProfileResponse_createdTimestamp :: Lens' UpdateUserProfileResponse (Maybe UTCTime)
updateUserProfileResponse_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfileResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: UpdateUserProfileResponse
s@UpdateUserProfileResponse' {} Maybe POSIX
a -> UpdateUserProfileResponse
s {$sel:createdTimestamp:UpdateUserProfileResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: UpdateUserProfileResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The name that is displayed as the friendly name for the user in AWS
-- CodeStar.
updateUserProfileResponse_displayName :: Lens.Lens' UpdateUserProfileResponse (Prelude.Maybe Prelude.Text)
updateUserProfileResponse_displayName :: Lens' UpdateUserProfileResponse (Maybe Text)
updateUserProfileResponse_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfileResponse' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: UpdateUserProfileResponse
s@UpdateUserProfileResponse' {} Maybe (Sensitive Text)
a -> UpdateUserProfileResponse
s {$sel:displayName:UpdateUserProfileResponse' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: UpdateUserProfileResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The email address that is displayed as part of the user\'s profile in
-- AWS CodeStar.
updateUserProfileResponse_emailAddress :: Lens.Lens' UpdateUserProfileResponse (Prelude.Maybe Prelude.Text)
updateUserProfileResponse_emailAddress :: Lens' UpdateUserProfileResponse (Maybe Text)
updateUserProfileResponse_emailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfileResponse' {Maybe (Sensitive Text)
emailAddress :: Maybe (Sensitive Text)
$sel:emailAddress:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe (Sensitive Text)
emailAddress} -> Maybe (Sensitive Text)
emailAddress) (\s :: UpdateUserProfileResponse
s@UpdateUserProfileResponse' {} Maybe (Sensitive Text)
a -> UpdateUserProfileResponse
s {$sel:emailAddress:UpdateUserProfileResponse' :: Maybe (Sensitive Text)
emailAddress = Maybe (Sensitive Text)
a} :: UpdateUserProfileResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The date the user profile was last modified, in timestamp format.
updateUserProfileResponse_lastModifiedTimestamp :: Lens.Lens' UpdateUserProfileResponse (Prelude.Maybe Prelude.UTCTime)
updateUserProfileResponse_lastModifiedTimestamp :: Lens' UpdateUserProfileResponse (Maybe UTCTime)
updateUserProfileResponse_lastModifiedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfileResponse' {Maybe POSIX
lastModifiedTimestamp :: Maybe POSIX
$sel:lastModifiedTimestamp:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe POSIX
lastModifiedTimestamp} -> Maybe POSIX
lastModifiedTimestamp) (\s :: UpdateUserProfileResponse
s@UpdateUserProfileResponse' {} Maybe POSIX
a -> UpdateUserProfileResponse
s {$sel:lastModifiedTimestamp:UpdateUserProfileResponse' :: Maybe POSIX
lastModifiedTimestamp = Maybe POSIX
a} :: UpdateUserProfileResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The SSH public key associated with the user in AWS CodeStar. This is the
-- public portion of the public\/private keypair the user can use to access
-- project resources if a project owner allows the user remote access to
-- those resources.
updateUserProfileResponse_sshPublicKey :: Lens.Lens' UpdateUserProfileResponse (Prelude.Maybe Prelude.Text)
updateUserProfileResponse_sshPublicKey :: Lens' UpdateUserProfileResponse (Maybe Text)
updateUserProfileResponse_sshPublicKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfileResponse' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: UpdateUserProfileResponse
s@UpdateUserProfileResponse' {} Maybe Text
a -> UpdateUserProfileResponse
s {$sel:sshPublicKey:UpdateUserProfileResponse' :: Maybe Text
sshPublicKey = Maybe Text
a} :: UpdateUserProfileResponse)

-- | The response's http status code.
updateUserProfileResponse_httpStatus :: Lens.Lens' UpdateUserProfileResponse Prelude.Int
updateUserProfileResponse_httpStatus :: Lens' UpdateUserProfileResponse Int
updateUserProfileResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateUserProfileResponse
s@UpdateUserProfileResponse' {} Int
a -> UpdateUserProfileResponse
s {$sel:httpStatus:UpdateUserProfileResponse' :: Int
httpStatus = Int
a} :: UpdateUserProfileResponse)

-- | The Amazon Resource Name (ARN) of the user in IAM.
updateUserProfileResponse_userArn :: Lens.Lens' UpdateUserProfileResponse Prelude.Text
updateUserProfileResponse_userArn :: Lens' UpdateUserProfileResponse Text
updateUserProfileResponse_userArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateUserProfileResponse' {Text
userArn :: Text
$sel:userArn:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Text
userArn} -> Text
userArn) (\s :: UpdateUserProfileResponse
s@UpdateUserProfileResponse' {} Text
a -> UpdateUserProfileResponse
s {$sel:userArn:UpdateUserProfileResponse' :: Text
userArn = Text
a} :: UpdateUserProfileResponse)

instance Prelude.NFData UpdateUserProfileResponse where
  rnf :: UpdateUserProfileResponse -> ()
rnf UpdateUserProfileResponse' {Int
Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
Text
userArn :: Text
httpStatus :: Int
sshPublicKey :: Maybe Text
lastModifiedTimestamp :: Maybe POSIX
emailAddress :: Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
createdTimestamp :: Maybe POSIX
$sel:userArn:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Text
$sel:httpStatus:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Int
$sel:sshPublicKey:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe Text
$sel:lastModifiedTimestamp:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe POSIX
$sel:emailAddress:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe (Sensitive Text)
$sel:displayName:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe (Sensitive Text)
$sel:createdTimestamp:UpdateUserProfileResponse' :: UpdateUserProfileResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
emailAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sshPublicKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userArn