{-# 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.CreateUserProfile
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a profile for a user that includes user preferences, such as the
-- display name and email address assocciated with the user, 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.CreateUserProfile
  ( -- * Creating a Request
    CreateUserProfile (..),
    newCreateUserProfile,

    -- * Request Lenses
    createUserProfile_sshPublicKey,
    createUserProfile_userArn,
    createUserProfile_displayName,
    createUserProfile_emailAddress,

    -- * Destructuring the Response
    CreateUserProfileResponse (..),
    newCreateUserProfileResponse,

    -- * Response Lenses
    createUserProfileResponse_createdTimestamp,
    createUserProfileResponse_displayName,
    createUserProfileResponse_emailAddress,
    createUserProfileResponse_lastModifiedTimestamp,
    createUserProfileResponse_sshPublicKey,
    createUserProfileResponse_httpStatus,
    createUserProfileResponse_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:/ 'newCreateUserProfile' smart constructor.
data CreateUserProfile = CreateUserProfile'
  { -- | 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.
    CreateUserProfile -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the user in IAM.
    CreateUserProfile -> Text
userArn :: Prelude.Text,
    -- | The name that will be displayed as the friendly name for the user in AWS
    -- CodeStar.
    CreateUserProfile -> Sensitive Text
displayName :: Data.Sensitive Prelude.Text,
    -- | The email address that will be displayed as part of the user\'s profile
    -- in AWS CodeStar.
    CreateUserProfile -> Sensitive Text
emailAddress :: Data.Sensitive Prelude.Text
  }
  deriving (CreateUserProfile -> CreateUserProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserProfile -> CreateUserProfile -> Bool
$c/= :: CreateUserProfile -> CreateUserProfile -> Bool
== :: CreateUserProfile -> CreateUserProfile -> Bool
$c== :: CreateUserProfile -> CreateUserProfile -> Bool
Prelude.Eq, Int -> CreateUserProfile -> ShowS
[CreateUserProfile] -> ShowS
CreateUserProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserProfile] -> ShowS
$cshowList :: [CreateUserProfile] -> ShowS
show :: CreateUserProfile -> String
$cshow :: CreateUserProfile -> String
showsPrec :: Int -> CreateUserProfile -> ShowS
$cshowsPrec :: Int -> CreateUserProfile -> ShowS
Prelude.Show, forall x. Rep CreateUserProfile x -> CreateUserProfile
forall x. CreateUserProfile -> Rep CreateUserProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateUserProfile x -> CreateUserProfile
$cfrom :: forall x. CreateUserProfile -> Rep CreateUserProfile x
Prelude.Generic)

-- |
-- Create a value of 'CreateUserProfile' 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', 'createUserProfile_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', 'createUserProfile_userArn' - The Amazon Resource Name (ARN) of the user in IAM.
--
-- 'displayName', 'createUserProfile_displayName' - The name that will be displayed as the friendly name for the user in AWS
-- CodeStar.
--
-- 'emailAddress', 'createUserProfile_emailAddress' - The email address that will be displayed as part of the user\'s profile
-- in AWS CodeStar.
newCreateUserProfile ::
  -- | 'userArn'
  Prelude.Text ->
  -- | 'displayName'
  Prelude.Text ->
  -- | 'emailAddress'
  Prelude.Text ->
  CreateUserProfile
newCreateUserProfile :: Text -> Text -> Text -> CreateUserProfile
newCreateUserProfile
  Text
pUserArn_
  Text
pDisplayName_
  Text
pEmailAddress_ =
    CreateUserProfile'
      { $sel:sshPublicKey:CreateUserProfile' :: Maybe Text
sshPublicKey = forall a. Maybe a
Prelude.Nothing,
        $sel:userArn:CreateUserProfile' :: Text
userArn = Text
pUserArn_,
        $sel:displayName:CreateUserProfile' :: Sensitive Text
displayName = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pDisplayName_,
        $sel:emailAddress:CreateUserProfile' :: Sensitive Text
emailAddress = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pEmailAddress_
      }

-- | 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.
createUserProfile_sshPublicKey :: Lens.Lens' CreateUserProfile (Prelude.Maybe Prelude.Text)
createUserProfile_sshPublicKey :: Lens' CreateUserProfile (Maybe Text)
createUserProfile_sshPublicKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:CreateUserProfile' :: CreateUserProfile -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: CreateUserProfile
s@CreateUserProfile' {} Maybe Text
a -> CreateUserProfile
s {$sel:sshPublicKey:CreateUserProfile' :: Maybe Text
sshPublicKey = Maybe Text
a} :: CreateUserProfile)

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

-- | The name that will be displayed as the friendly name for the user in AWS
-- CodeStar.
createUserProfile_displayName :: Lens.Lens' CreateUserProfile Prelude.Text
createUserProfile_displayName :: Lens' CreateUserProfile Text
createUserProfile_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Sensitive Text
displayName :: Sensitive Text
$sel:displayName:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
displayName} -> Sensitive Text
displayName) (\s :: CreateUserProfile
s@CreateUserProfile' {} Sensitive Text
a -> CreateUserProfile
s {$sel:displayName:CreateUserProfile' :: Sensitive Text
displayName = Sensitive Text
a} :: CreateUserProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The email address that will be displayed as part of the user\'s profile
-- in AWS CodeStar.
createUserProfile_emailAddress :: Lens.Lens' CreateUserProfile Prelude.Text
createUserProfile_emailAddress :: Lens' CreateUserProfile Text
createUserProfile_emailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Sensitive Text
emailAddress :: Sensitive Text
$sel:emailAddress:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
emailAddress} -> Sensitive Text
emailAddress) (\s :: CreateUserProfile
s@CreateUserProfile' {} Sensitive Text
a -> CreateUserProfile
s {$sel:emailAddress:CreateUserProfile' :: Sensitive Text
emailAddress = Sensitive Text
a} :: CreateUserProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

instance Core.AWSRequest CreateUserProfile where
  type
    AWSResponse CreateUserProfile =
      CreateUserProfileResponse
  request :: (Service -> Service)
-> CreateUserProfile -> Request CreateUserProfile
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 CreateUserProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateUserProfile)))
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
-> CreateUserProfileResponse
CreateUserProfileResponse'
            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 CreateUserProfile where
  hashWithSalt :: Int -> CreateUserProfile -> Int
hashWithSalt Int
_salt CreateUserProfile' {Maybe Text
Text
Sensitive Text
emailAddress :: Sensitive Text
displayName :: Sensitive Text
userArn :: Text
sshPublicKey :: Maybe Text
$sel:emailAddress:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
$sel:displayName:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
$sel:userArn:CreateUserProfile' :: CreateUserProfile -> Text
$sel:sshPublicKey:CreateUserProfile' :: CreateUserProfile -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sshPublicKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
displayName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
emailAddress

instance Prelude.NFData CreateUserProfile where
  rnf :: CreateUserProfile -> ()
rnf CreateUserProfile' {Maybe Text
Text
Sensitive Text
emailAddress :: Sensitive Text
displayName :: Sensitive Text
userArn :: Text
sshPublicKey :: Maybe Text
$sel:emailAddress:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
$sel:displayName:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
$sel:userArn:CreateUserProfile' :: CreateUserProfile -> Text
$sel:sshPublicKey:CreateUserProfile' :: CreateUserProfile -> Maybe Text
..} =
    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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
emailAddress

instance Data.ToHeaders CreateUserProfile where
  toHeaders :: CreateUserProfile -> 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.CreateUserProfile" ::
                          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 CreateUserProfile where
  toJSON :: CreateUserProfile -> Value
toJSON CreateUserProfile' {Maybe Text
Text
Sensitive Text
emailAddress :: Sensitive Text
displayName :: Sensitive Text
userArn :: Text
sshPublicKey :: Maybe Text
$sel:emailAddress:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
$sel:displayName:CreateUserProfile' :: CreateUserProfile -> Sensitive Text
$sel:userArn:CreateUserProfile' :: CreateUserProfile -> Text
$sel:sshPublicKey:CreateUserProfile' :: CreateUserProfile -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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),
            forall a. a -> Maybe a
Prelude.Just (Key
"displayName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
displayName),
            forall a. a -> Maybe a
Prelude.Just (Key
"emailAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
emailAddress)
          ]
      )

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

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

-- | /See:/ 'newCreateUserProfileResponse' smart constructor.
data CreateUserProfileResponse = CreateUserProfileResponse'
  { -- | The date the user profile was created, in timestamp format.
    CreateUserProfileResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The name that is displayed as the friendly name for the user in AWS
    -- CodeStar.
    CreateUserProfileResponse -> 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.
    CreateUserProfileResponse -> Maybe (Sensitive Text)
emailAddress :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The date the user profile was last modified, in timestamp format.
    CreateUserProfileResponse -> 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.
    CreateUserProfileResponse -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateUserProfileResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the user in IAM.
    CreateUserProfileResponse -> Text
userArn :: Prelude.Text
  }
  deriving (CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
$c/= :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
== :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
$c== :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
Prelude.Eq, Int -> CreateUserProfileResponse -> ShowS
[CreateUserProfileResponse] -> ShowS
CreateUserProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserProfileResponse] -> ShowS
$cshowList :: [CreateUserProfileResponse] -> ShowS
show :: CreateUserProfileResponse -> String
$cshow :: CreateUserProfileResponse -> String
showsPrec :: Int -> CreateUserProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateUserProfileResponse -> ShowS
Prelude.Show, forall x.
Rep CreateUserProfileResponse x -> CreateUserProfileResponse
forall x.
CreateUserProfileResponse -> Rep CreateUserProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUserProfileResponse x -> CreateUserProfileResponse
$cfrom :: forall x.
CreateUserProfileResponse -> Rep CreateUserProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateUserProfileResponse' 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', 'createUserProfileResponse_createdTimestamp' - The date the user profile was created, in timestamp format.
--
-- 'displayName', 'createUserProfileResponse_displayName' - The name that is displayed as the friendly name for the user in AWS
-- CodeStar.
--
-- 'emailAddress', 'createUserProfileResponse_emailAddress' - The email address that is displayed as part of the user\'s profile in
-- AWS CodeStar.
--
-- 'lastModifiedTimestamp', 'createUserProfileResponse_lastModifiedTimestamp' - The date the user profile was last modified, in timestamp format.
--
-- 'sshPublicKey', 'createUserProfileResponse_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', 'createUserProfileResponse_httpStatus' - The response's http status code.
--
-- 'userArn', 'createUserProfileResponse_userArn' - The Amazon Resource Name (ARN) of the user in IAM.
newCreateUserProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'userArn'
  Prelude.Text ->
  CreateUserProfileResponse
newCreateUserProfileResponse :: Int -> Text -> CreateUserProfileResponse
newCreateUserProfileResponse Int
pHttpStatus_ Text
pUserArn_ =
  CreateUserProfileResponse'
    { $sel:createdTimestamp:CreateUserProfileResponse' :: Maybe POSIX
createdTimestamp =
        forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:CreateUserProfileResponse' :: Maybe (Sensitive Text)
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:emailAddress:CreateUserProfileResponse' :: Maybe (Sensitive Text)
emailAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimestamp:CreateUserProfileResponse' :: Maybe POSIX
lastModifiedTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:sshPublicKey:CreateUserProfileResponse' :: Maybe Text
sshPublicKey = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateUserProfileResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:userArn:CreateUserProfileResponse' :: Text
userArn = Text
pUserArn_
    }

-- | The date the user profile was created, in timestamp format.
createUserProfileResponse_createdTimestamp :: Lens.Lens' CreateUserProfileResponse (Prelude.Maybe Prelude.UTCTime)
createUserProfileResponse_createdTimestamp :: Lens' CreateUserProfileResponse (Maybe UTCTime)
createUserProfileResponse_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfileResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: CreateUserProfileResponse
s@CreateUserProfileResponse' {} Maybe POSIX
a -> CreateUserProfileResponse
s {$sel:createdTimestamp:CreateUserProfileResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: CreateUserProfileResponse) 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.
createUserProfileResponse_displayName :: Lens.Lens' CreateUserProfileResponse (Prelude.Maybe Prelude.Text)
createUserProfileResponse_displayName :: Lens' CreateUserProfileResponse (Maybe Text)
createUserProfileResponse_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfileResponse' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: CreateUserProfileResponse
s@CreateUserProfileResponse' {} Maybe (Sensitive Text)
a -> CreateUserProfileResponse
s {$sel:displayName:CreateUserProfileResponse' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: CreateUserProfileResponse) 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.
createUserProfileResponse_emailAddress :: Lens.Lens' CreateUserProfileResponse (Prelude.Maybe Prelude.Text)
createUserProfileResponse_emailAddress :: Lens' CreateUserProfileResponse (Maybe Text)
createUserProfileResponse_emailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfileResponse' {Maybe (Sensitive Text)
emailAddress :: Maybe (Sensitive Text)
$sel:emailAddress:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe (Sensitive Text)
emailAddress} -> Maybe (Sensitive Text)
emailAddress) (\s :: CreateUserProfileResponse
s@CreateUserProfileResponse' {} Maybe (Sensitive Text)
a -> CreateUserProfileResponse
s {$sel:emailAddress:CreateUserProfileResponse' :: Maybe (Sensitive Text)
emailAddress = Maybe (Sensitive Text)
a} :: CreateUserProfileResponse) 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.
createUserProfileResponse_lastModifiedTimestamp :: Lens.Lens' CreateUserProfileResponse (Prelude.Maybe Prelude.UTCTime)
createUserProfileResponse_lastModifiedTimestamp :: Lens' CreateUserProfileResponse (Maybe UTCTime)
createUserProfileResponse_lastModifiedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfileResponse' {Maybe POSIX
lastModifiedTimestamp :: Maybe POSIX
$sel:lastModifiedTimestamp:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe POSIX
lastModifiedTimestamp} -> Maybe POSIX
lastModifiedTimestamp) (\s :: CreateUserProfileResponse
s@CreateUserProfileResponse' {} Maybe POSIX
a -> CreateUserProfileResponse
s {$sel:lastModifiedTimestamp:CreateUserProfileResponse' :: Maybe POSIX
lastModifiedTimestamp = Maybe POSIX
a} :: CreateUserProfileResponse) 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.
createUserProfileResponse_sshPublicKey :: Lens.Lens' CreateUserProfileResponse (Prelude.Maybe Prelude.Text)
createUserProfileResponse_sshPublicKey :: Lens' CreateUserProfileResponse (Maybe Text)
createUserProfileResponse_sshPublicKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfileResponse' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: CreateUserProfileResponse
s@CreateUserProfileResponse' {} Maybe Text
a -> CreateUserProfileResponse
s {$sel:sshPublicKey:CreateUserProfileResponse' :: Maybe Text
sshPublicKey = Maybe Text
a} :: CreateUserProfileResponse)

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

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

instance Prelude.NFData CreateUserProfileResponse where
  rnf :: CreateUserProfileResponse -> ()
rnf CreateUserProfileResponse' {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:CreateUserProfileResponse' :: CreateUserProfileResponse -> Text
$sel:httpStatus:CreateUserProfileResponse' :: CreateUserProfileResponse -> Int
$sel:sshPublicKey:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe Text
$sel:lastModifiedTimestamp:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe POSIX
$sel:emailAddress:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe (Sensitive Text)
$sel:displayName:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe (Sensitive Text)
$sel:createdTimestamp:CreateUserProfileResponse' :: CreateUserProfileResponse -> 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