{-# 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.DescribeUserProfile
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes a user in AWS CodeStar and the user attributes across all
-- projects.
module Amazonka.CodeStar.DescribeUserProfile
  ( -- * Creating a Request
    DescribeUserProfile (..),
    newDescribeUserProfile,

    -- * Request Lenses
    describeUserProfile_userArn,

    -- * Destructuring the Response
    DescribeUserProfileResponse (..),
    newDescribeUserProfileResponse,

    -- * Response Lenses
    describeUserProfileResponse_sshPublicKey,
    describeUserProfileResponse_emailAddress,
    describeUserProfileResponse_displayName,
    describeUserProfileResponse_httpStatus,
    describeUserProfileResponse_userArn,
    describeUserProfileResponse_createdTimestamp,
    describeUserProfileResponse_lastModifiedTimestamp,
  )
where

import Amazonka.CodeStar.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeUserProfile' smart constructor.
data DescribeUserProfile = DescribeUserProfile'
  { -- | The Amazon Resource Name (ARN) of the user.
    DescribeUserProfile -> Text
userArn :: Prelude.Text
  }
  deriving (DescribeUserProfile -> DescribeUserProfile -> Bool
(DescribeUserProfile -> DescribeUserProfile -> Bool)
-> (DescribeUserProfile -> DescribeUserProfile -> Bool)
-> Eq DescribeUserProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUserProfile -> DescribeUserProfile -> Bool
$c/= :: DescribeUserProfile -> DescribeUserProfile -> Bool
== :: DescribeUserProfile -> DescribeUserProfile -> Bool
$c== :: DescribeUserProfile -> DescribeUserProfile -> Bool
Prelude.Eq, ReadPrec [DescribeUserProfile]
ReadPrec DescribeUserProfile
Int -> ReadS DescribeUserProfile
ReadS [DescribeUserProfile]
(Int -> ReadS DescribeUserProfile)
-> ReadS [DescribeUserProfile]
-> ReadPrec DescribeUserProfile
-> ReadPrec [DescribeUserProfile]
-> Read DescribeUserProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeUserProfile]
$creadListPrec :: ReadPrec [DescribeUserProfile]
readPrec :: ReadPrec DescribeUserProfile
$creadPrec :: ReadPrec DescribeUserProfile
readList :: ReadS [DescribeUserProfile]
$creadList :: ReadS [DescribeUserProfile]
readsPrec :: Int -> ReadS DescribeUserProfile
$creadsPrec :: Int -> ReadS DescribeUserProfile
Prelude.Read, Int -> DescribeUserProfile -> ShowS
[DescribeUserProfile] -> ShowS
DescribeUserProfile -> String
(Int -> DescribeUserProfile -> ShowS)
-> (DescribeUserProfile -> String)
-> ([DescribeUserProfile] -> ShowS)
-> Show DescribeUserProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUserProfile] -> ShowS
$cshowList :: [DescribeUserProfile] -> ShowS
show :: DescribeUserProfile -> String
$cshow :: DescribeUserProfile -> String
showsPrec :: Int -> DescribeUserProfile -> ShowS
$cshowsPrec :: Int -> DescribeUserProfile -> ShowS
Prelude.Show, (forall x. DescribeUserProfile -> Rep DescribeUserProfile x)
-> (forall x. Rep DescribeUserProfile x -> DescribeUserProfile)
-> Generic DescribeUserProfile
forall x. Rep DescribeUserProfile x -> DescribeUserProfile
forall x. DescribeUserProfile -> Rep DescribeUserProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeUserProfile x -> DescribeUserProfile
$cfrom :: forall x. DescribeUserProfile -> Rep DescribeUserProfile x
Prelude.Generic)

-- |
-- Create a value of 'DescribeUserProfile' 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:
--
-- 'userArn', 'describeUserProfile_userArn' - The Amazon Resource Name (ARN) of the user.
newDescribeUserProfile ::
  -- | 'userArn'
  Prelude.Text ->
  DescribeUserProfile
newDescribeUserProfile :: Text -> DescribeUserProfile
newDescribeUserProfile Text
pUserArn_ =
  DescribeUserProfile' :: Text -> DescribeUserProfile
DescribeUserProfile' {$sel:userArn:DescribeUserProfile' :: Text
userArn = Text
pUserArn_}

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

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

instance Prelude.Hashable DescribeUserProfile

instance Prelude.NFData DescribeUserProfile

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

instance Core.ToJSON DescribeUserProfile where
  toJSON :: DescribeUserProfile -> Value
toJSON DescribeUserProfile' {Text
userArn :: Text
$sel:userArn:DescribeUserProfile' :: DescribeUserProfile -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"userArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userArn)]
      )

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

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

-- | /See:/ 'newDescribeUserProfileResponse' smart constructor.
data DescribeUserProfileResponse = DescribeUserProfileResponse'
  { -- | The SSH public key associated with the user. This SSH public key is
    -- associated with the user profile, and can be used in conjunction with
    -- the associated private key for access to project resources, such as
    -- Amazon EC2 instances, if a project owner grants remote access to those
    -- resources.
    DescribeUserProfileResponse -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
    -- | The email address for the user. Optional.
    DescribeUserProfileResponse -> Maybe (Sensitive Text)
emailAddress :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The display name shown for the user in AWS CodeStar projects. For
    -- example, this could be set to both first and last name (\"Mary Major\")
    -- or a single name (\"Mary\"). The display name is also used to generate
    -- the initial icon associated with the user in AWS CodeStar projects. If
    -- spaces are included in the display name, the first character that
    -- appears after the space will be used as the second character in the user
    -- initial icon. The initial icon displays a maximum of two characters, so
    -- a display name with more than one space (for example \"Mary Jane
    -- Major\") would generate an initial icon using the first character and
    -- the first character after the space (\"MJ\", not \"MM\").
    DescribeUserProfileResponse -> Maybe (Sensitive Text)
displayName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The response's http status code.
    DescribeUserProfileResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the user.
    DescribeUserProfileResponse -> Text
userArn :: Prelude.Text,
    -- | The date and time when the user profile was created in AWS CodeStar, in
    -- timestamp format.
    DescribeUserProfileResponse -> POSIX
createdTimestamp :: Core.POSIX,
    -- | The date and time when the user profile was last modified, in timestamp
    -- format.
    DescribeUserProfileResponse -> POSIX
lastModifiedTimestamp :: Core.POSIX
  }
  deriving (DescribeUserProfileResponse -> DescribeUserProfileResponse -> Bool
(DescribeUserProfileResponse
 -> DescribeUserProfileResponse -> Bool)
-> (DescribeUserProfileResponse
    -> DescribeUserProfileResponse -> Bool)
-> Eq DescribeUserProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUserProfileResponse -> DescribeUserProfileResponse -> Bool
$c/= :: DescribeUserProfileResponse -> DescribeUserProfileResponse -> Bool
== :: DescribeUserProfileResponse -> DescribeUserProfileResponse -> Bool
$c== :: DescribeUserProfileResponse -> DescribeUserProfileResponse -> Bool
Prelude.Eq, Int -> DescribeUserProfileResponse -> ShowS
[DescribeUserProfileResponse] -> ShowS
DescribeUserProfileResponse -> String
(Int -> DescribeUserProfileResponse -> ShowS)
-> (DescribeUserProfileResponse -> String)
-> ([DescribeUserProfileResponse] -> ShowS)
-> Show DescribeUserProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUserProfileResponse] -> ShowS
$cshowList :: [DescribeUserProfileResponse] -> ShowS
show :: DescribeUserProfileResponse -> String
$cshow :: DescribeUserProfileResponse -> String
showsPrec :: Int -> DescribeUserProfileResponse -> ShowS
$cshowsPrec :: Int -> DescribeUserProfileResponse -> ShowS
Prelude.Show, (forall x.
 DescribeUserProfileResponse -> Rep DescribeUserProfileResponse x)
-> (forall x.
    Rep DescribeUserProfileResponse x -> DescribeUserProfileResponse)
-> Generic DescribeUserProfileResponse
forall x.
Rep DescribeUserProfileResponse x -> DescribeUserProfileResponse
forall x.
DescribeUserProfileResponse -> Rep DescribeUserProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeUserProfileResponse x -> DescribeUserProfileResponse
$cfrom :: forall x.
DescribeUserProfileResponse -> Rep DescribeUserProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeUserProfileResponse' 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:
--
-- 'sshPublicKey', 'describeUserProfileResponse_sshPublicKey' - The SSH public key associated with the user. This SSH public key is
-- associated with the user profile, and can be used in conjunction with
-- the associated private key for access to project resources, such as
-- Amazon EC2 instances, if a project owner grants remote access to those
-- resources.
--
-- 'emailAddress', 'describeUserProfileResponse_emailAddress' - The email address for the user. Optional.
--
-- 'displayName', 'describeUserProfileResponse_displayName' - The display name shown for the user in AWS CodeStar projects. For
-- example, this could be set to both first and last name (\"Mary Major\")
-- or a single name (\"Mary\"). The display name is also used to generate
-- the initial icon associated with the user in AWS CodeStar projects. If
-- spaces are included in the display name, the first character that
-- appears after the space will be used as the second character in the user
-- initial icon. The initial icon displays a maximum of two characters, so
-- a display name with more than one space (for example \"Mary Jane
-- Major\") would generate an initial icon using the first character and
-- the first character after the space (\"MJ\", not \"MM\").
--
-- 'httpStatus', 'describeUserProfileResponse_httpStatus' - The response's http status code.
--
-- 'userArn', 'describeUserProfileResponse_userArn' - The Amazon Resource Name (ARN) of the user.
--
-- 'createdTimestamp', 'describeUserProfileResponse_createdTimestamp' - The date and time when the user profile was created in AWS CodeStar, in
-- timestamp format.
--
-- 'lastModifiedTimestamp', 'describeUserProfileResponse_lastModifiedTimestamp' - The date and time when the user profile was last modified, in timestamp
-- format.
newDescribeUserProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'userArn'
  Prelude.Text ->
  -- | 'createdTimestamp'
  Prelude.UTCTime ->
  -- | 'lastModifiedTimestamp'
  Prelude.UTCTime ->
  DescribeUserProfileResponse
newDescribeUserProfileResponse :: Int -> Text -> UTCTime -> UTCTime -> DescribeUserProfileResponse
newDescribeUserProfileResponse
  Int
pHttpStatus_
  Text
pUserArn_
  UTCTime
pCreatedTimestamp_
  UTCTime
pLastModifiedTimestamp_ =
    DescribeUserProfileResponse' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Int
-> Text
-> POSIX
-> POSIX
-> DescribeUserProfileResponse
DescribeUserProfileResponse'
      { $sel:sshPublicKey:DescribeUserProfileResponse' :: Maybe Text
sshPublicKey =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:emailAddress:DescribeUserProfileResponse' :: Maybe (Sensitive Text)
emailAddress = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:displayName:DescribeUserProfileResponse' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeUserProfileResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:userArn:DescribeUserProfileResponse' :: Text
userArn = Text
pUserArn_,
        $sel:createdTimestamp:DescribeUserProfileResponse' :: POSIX
createdTimestamp =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTimestamp_,
        $sel:lastModifiedTimestamp:DescribeUserProfileResponse' :: POSIX
lastModifiedTimestamp =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTimestamp_
      }

-- | The SSH public key associated with the user. This SSH public key is
-- associated with the user profile, and can be used in conjunction with
-- the associated private key for access to project resources, such as
-- Amazon EC2 instances, if a project owner grants remote access to those
-- resources.
describeUserProfileResponse_sshPublicKey :: Lens.Lens' DescribeUserProfileResponse (Prelude.Maybe Prelude.Text)
describeUserProfileResponse_sshPublicKey :: (Maybe Text -> f (Maybe Text))
-> DescribeUserProfileResponse -> f DescribeUserProfileResponse
describeUserProfileResponse_sshPublicKey = (DescribeUserProfileResponse -> Maybe Text)
-> (DescribeUserProfileResponse
    -> Maybe Text -> DescribeUserProfileResponse)
-> Lens
     DescribeUserProfileResponse
     DescribeUserProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserProfileResponse' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:DescribeUserProfileResponse' :: DescribeUserProfileResponse -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: DescribeUserProfileResponse
s@DescribeUserProfileResponse' {} Maybe Text
a -> DescribeUserProfileResponse
s {$sel:sshPublicKey:DescribeUserProfileResponse' :: Maybe Text
sshPublicKey = Maybe Text
a} :: DescribeUserProfileResponse)

-- | The email address for the user. Optional.
describeUserProfileResponse_emailAddress :: Lens.Lens' DescribeUserProfileResponse (Prelude.Maybe Prelude.Text)
describeUserProfileResponse_emailAddress :: (Maybe Text -> f (Maybe Text))
-> DescribeUserProfileResponse -> f DescribeUserProfileResponse
describeUserProfileResponse_emailAddress = (DescribeUserProfileResponse -> Maybe (Sensitive Text))
-> (DescribeUserProfileResponse
    -> Maybe (Sensitive Text) -> DescribeUserProfileResponse)
-> Lens
     DescribeUserProfileResponse
     DescribeUserProfileResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserProfileResponse' {Maybe (Sensitive Text)
emailAddress :: Maybe (Sensitive Text)
$sel:emailAddress:DescribeUserProfileResponse' :: DescribeUserProfileResponse -> Maybe (Sensitive Text)
emailAddress} -> Maybe (Sensitive Text)
emailAddress) (\s :: DescribeUserProfileResponse
s@DescribeUserProfileResponse' {} Maybe (Sensitive Text)
a -> DescribeUserProfileResponse
s {$sel:emailAddress:DescribeUserProfileResponse' :: Maybe (Sensitive Text)
emailAddress = Maybe (Sensitive Text)
a} :: DescribeUserProfileResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> DescribeUserProfileResponse -> f DescribeUserProfileResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> DescribeUserProfileResponse
-> f DescribeUserProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The display name shown for the user in AWS CodeStar projects. For
-- example, this could be set to both first and last name (\"Mary Major\")
-- or a single name (\"Mary\"). The display name is also used to generate
-- the initial icon associated with the user in AWS CodeStar projects. If
-- spaces are included in the display name, the first character that
-- appears after the space will be used as the second character in the user
-- initial icon. The initial icon displays a maximum of two characters, so
-- a display name with more than one space (for example \"Mary Jane
-- Major\") would generate an initial icon using the first character and
-- the first character after the space (\"MJ\", not \"MM\").
describeUserProfileResponse_displayName :: Lens.Lens' DescribeUserProfileResponse (Prelude.Maybe Prelude.Text)
describeUserProfileResponse_displayName :: (Maybe Text -> f (Maybe Text))
-> DescribeUserProfileResponse -> f DescribeUserProfileResponse
describeUserProfileResponse_displayName = (DescribeUserProfileResponse -> Maybe (Sensitive Text))
-> (DescribeUserProfileResponse
    -> Maybe (Sensitive Text) -> DescribeUserProfileResponse)
-> Lens
     DescribeUserProfileResponse
     DescribeUserProfileResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserProfileResponse' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:DescribeUserProfileResponse' :: DescribeUserProfileResponse -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: DescribeUserProfileResponse
s@DescribeUserProfileResponse' {} Maybe (Sensitive Text)
a -> DescribeUserProfileResponse
s {$sel:displayName:DescribeUserProfileResponse' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: DescribeUserProfileResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> DescribeUserProfileResponse -> f DescribeUserProfileResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> DescribeUserProfileResponse
-> f DescribeUserProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

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

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

-- | The date and time when the user profile was created in AWS CodeStar, in
-- timestamp format.
describeUserProfileResponse_createdTimestamp :: Lens.Lens' DescribeUserProfileResponse Prelude.UTCTime
describeUserProfileResponse_createdTimestamp :: (UTCTime -> f UTCTime)
-> DescribeUserProfileResponse -> f DescribeUserProfileResponse
describeUserProfileResponse_createdTimestamp = (DescribeUserProfileResponse -> POSIX)
-> (DescribeUserProfileResponse
    -> POSIX -> DescribeUserProfileResponse)
-> Lens
     DescribeUserProfileResponse DescribeUserProfileResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserProfileResponse' {POSIX
createdTimestamp :: POSIX
$sel:createdTimestamp:DescribeUserProfileResponse' :: DescribeUserProfileResponse -> POSIX
createdTimestamp} -> POSIX
createdTimestamp) (\s :: DescribeUserProfileResponse
s@DescribeUserProfileResponse' {} POSIX
a -> DescribeUserProfileResponse
s {$sel:createdTimestamp:DescribeUserProfileResponse' :: POSIX
createdTimestamp = POSIX
a} :: DescribeUserProfileResponse) ((POSIX -> f POSIX)
 -> DescribeUserProfileResponse -> f DescribeUserProfileResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeUserProfileResponse
-> f DescribeUserProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The date and time when the user profile was last modified, in timestamp
-- format.
describeUserProfileResponse_lastModifiedTimestamp :: Lens.Lens' DescribeUserProfileResponse Prelude.UTCTime
describeUserProfileResponse_lastModifiedTimestamp :: (UTCTime -> f UTCTime)
-> DescribeUserProfileResponse -> f DescribeUserProfileResponse
describeUserProfileResponse_lastModifiedTimestamp = (DescribeUserProfileResponse -> POSIX)
-> (DescribeUserProfileResponse
    -> POSIX -> DescribeUserProfileResponse)
-> Lens
     DescribeUserProfileResponse DescribeUserProfileResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUserProfileResponse' {POSIX
lastModifiedTimestamp :: POSIX
$sel:lastModifiedTimestamp:DescribeUserProfileResponse' :: DescribeUserProfileResponse -> POSIX
lastModifiedTimestamp} -> POSIX
lastModifiedTimestamp) (\s :: DescribeUserProfileResponse
s@DescribeUserProfileResponse' {} POSIX
a -> DescribeUserProfileResponse
s {$sel:lastModifiedTimestamp:DescribeUserProfileResponse' :: POSIX
lastModifiedTimestamp = POSIX
a} :: DescribeUserProfileResponse) ((POSIX -> f POSIX)
 -> DescribeUserProfileResponse -> f DescribeUserProfileResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeUserProfileResponse
-> f DescribeUserProfileResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Prelude.NFData DescribeUserProfileResponse