{-# 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.UpdateTeamMember
-- 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)
--
-- Updates a team member\'s attributes in an AWS CodeStar project. For
-- example, you can change a team member\'s role in the project, or change
-- whether they have remote access to project resources.
module Amazonka.CodeStar.UpdateTeamMember
  ( -- * Creating a Request
    UpdateTeamMember (..),
    newUpdateTeamMember,

    -- * Request Lenses
    updateTeamMember_remoteAccessAllowed,
    updateTeamMember_projectRole,
    updateTeamMember_projectId,
    updateTeamMember_userArn,

    -- * Destructuring the Response
    UpdateTeamMemberResponse (..),
    newUpdateTeamMemberResponse,

    -- * Response Lenses
    updateTeamMemberResponse_userArn,
    updateTeamMemberResponse_remoteAccessAllowed,
    updateTeamMemberResponse_projectRole,
    updateTeamMemberResponse_httpStatus,
  )
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:/ 'newUpdateTeamMember' smart constructor.
data UpdateTeamMember = UpdateTeamMember'
  { -- | Whether a team member is allowed to remotely access project resources
    -- using the SSH public key associated with the user\'s profile. Even if
    -- this is set to True, the user must associate a public key with their
    -- profile before the user can access resources.
    UpdateTeamMember -> Maybe Bool
remoteAccessAllowed :: Prelude.Maybe Prelude.Bool,
    -- | The role assigned to the user in the project. Project roles have
    -- different levels of access. For more information, see
    -- <http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html Working with Teams>
    -- in the /AWS CodeStar User Guide/.
    UpdateTeamMember -> Maybe Text
projectRole :: Prelude.Maybe Prelude.Text,
    -- | The ID of the project.
    UpdateTeamMember -> Text
projectId :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the user for whom you want to change
    -- team membership attributes.
    UpdateTeamMember -> Text
userArn :: Prelude.Text
  }
  deriving (UpdateTeamMember -> UpdateTeamMember -> Bool
(UpdateTeamMember -> UpdateTeamMember -> Bool)
-> (UpdateTeamMember -> UpdateTeamMember -> Bool)
-> Eq UpdateTeamMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTeamMember -> UpdateTeamMember -> Bool
$c/= :: UpdateTeamMember -> UpdateTeamMember -> Bool
== :: UpdateTeamMember -> UpdateTeamMember -> Bool
$c== :: UpdateTeamMember -> UpdateTeamMember -> Bool
Prelude.Eq, ReadPrec [UpdateTeamMember]
ReadPrec UpdateTeamMember
Int -> ReadS UpdateTeamMember
ReadS [UpdateTeamMember]
(Int -> ReadS UpdateTeamMember)
-> ReadS [UpdateTeamMember]
-> ReadPrec UpdateTeamMember
-> ReadPrec [UpdateTeamMember]
-> Read UpdateTeamMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTeamMember]
$creadListPrec :: ReadPrec [UpdateTeamMember]
readPrec :: ReadPrec UpdateTeamMember
$creadPrec :: ReadPrec UpdateTeamMember
readList :: ReadS [UpdateTeamMember]
$creadList :: ReadS [UpdateTeamMember]
readsPrec :: Int -> ReadS UpdateTeamMember
$creadsPrec :: Int -> ReadS UpdateTeamMember
Prelude.Read, Int -> UpdateTeamMember -> ShowS
[UpdateTeamMember] -> ShowS
UpdateTeamMember -> String
(Int -> UpdateTeamMember -> ShowS)
-> (UpdateTeamMember -> String)
-> ([UpdateTeamMember] -> ShowS)
-> Show UpdateTeamMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTeamMember] -> ShowS
$cshowList :: [UpdateTeamMember] -> ShowS
show :: UpdateTeamMember -> String
$cshow :: UpdateTeamMember -> String
showsPrec :: Int -> UpdateTeamMember -> ShowS
$cshowsPrec :: Int -> UpdateTeamMember -> ShowS
Prelude.Show, (forall x. UpdateTeamMember -> Rep UpdateTeamMember x)
-> (forall x. Rep UpdateTeamMember x -> UpdateTeamMember)
-> Generic UpdateTeamMember
forall x. Rep UpdateTeamMember x -> UpdateTeamMember
forall x. UpdateTeamMember -> Rep UpdateTeamMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTeamMember x -> UpdateTeamMember
$cfrom :: forall x. UpdateTeamMember -> Rep UpdateTeamMember x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTeamMember' 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:
--
-- 'remoteAccessAllowed', 'updateTeamMember_remoteAccessAllowed' - Whether a team member is allowed to remotely access project resources
-- using the SSH public key associated with the user\'s profile. Even if
-- this is set to True, the user must associate a public key with their
-- profile before the user can access resources.
--
-- 'projectRole', 'updateTeamMember_projectRole' - The role assigned to the user in the project. Project roles have
-- different levels of access. For more information, see
-- <http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html Working with Teams>
-- in the /AWS CodeStar User Guide/.
--
-- 'projectId', 'updateTeamMember_projectId' - The ID of the project.
--
-- 'userArn', 'updateTeamMember_userArn' - The Amazon Resource Name (ARN) of the user for whom you want to change
-- team membership attributes.
newUpdateTeamMember ::
  -- | 'projectId'
  Prelude.Text ->
  -- | 'userArn'
  Prelude.Text ->
  UpdateTeamMember
newUpdateTeamMember :: Text -> Text -> UpdateTeamMember
newUpdateTeamMember Text
pProjectId_ Text
pUserArn_ =
  UpdateTeamMember' :: Maybe Bool -> Maybe Text -> Text -> Text -> UpdateTeamMember
UpdateTeamMember'
    { $sel:remoteAccessAllowed:UpdateTeamMember' :: Maybe Bool
remoteAccessAllowed =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:projectRole:UpdateTeamMember' :: Maybe Text
projectRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:projectId:UpdateTeamMember' :: Text
projectId = Text
pProjectId_,
      $sel:userArn:UpdateTeamMember' :: Text
userArn = Text
pUserArn_
    }

-- | Whether a team member is allowed to remotely access project resources
-- using the SSH public key associated with the user\'s profile. Even if
-- this is set to True, the user must associate a public key with their
-- profile before the user can access resources.
updateTeamMember_remoteAccessAllowed :: Lens.Lens' UpdateTeamMember (Prelude.Maybe Prelude.Bool)
updateTeamMember_remoteAccessAllowed :: (Maybe Bool -> f (Maybe Bool))
-> UpdateTeamMember -> f UpdateTeamMember
updateTeamMember_remoteAccessAllowed = (UpdateTeamMember -> Maybe Bool)
-> (UpdateTeamMember -> Maybe Bool -> UpdateTeamMember)
-> Lens UpdateTeamMember UpdateTeamMember (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTeamMember' {Maybe Bool
remoteAccessAllowed :: Maybe Bool
$sel:remoteAccessAllowed:UpdateTeamMember' :: UpdateTeamMember -> Maybe Bool
remoteAccessAllowed} -> Maybe Bool
remoteAccessAllowed) (\s :: UpdateTeamMember
s@UpdateTeamMember' {} Maybe Bool
a -> UpdateTeamMember
s {$sel:remoteAccessAllowed:UpdateTeamMember' :: Maybe Bool
remoteAccessAllowed = Maybe Bool
a} :: UpdateTeamMember)

-- | The role assigned to the user in the project. Project roles have
-- different levels of access. For more information, see
-- <http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html Working with Teams>
-- in the /AWS CodeStar User Guide/.
updateTeamMember_projectRole :: Lens.Lens' UpdateTeamMember (Prelude.Maybe Prelude.Text)
updateTeamMember_projectRole :: (Maybe Text -> f (Maybe Text))
-> UpdateTeamMember -> f UpdateTeamMember
updateTeamMember_projectRole = (UpdateTeamMember -> Maybe Text)
-> (UpdateTeamMember -> Maybe Text -> UpdateTeamMember)
-> Lens UpdateTeamMember UpdateTeamMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTeamMember' {Maybe Text
projectRole :: Maybe Text
$sel:projectRole:UpdateTeamMember' :: UpdateTeamMember -> Maybe Text
projectRole} -> Maybe Text
projectRole) (\s :: UpdateTeamMember
s@UpdateTeamMember' {} Maybe Text
a -> UpdateTeamMember
s {$sel:projectRole:UpdateTeamMember' :: Maybe Text
projectRole = Maybe Text
a} :: UpdateTeamMember)

-- | The ID of the project.
updateTeamMember_projectId :: Lens.Lens' UpdateTeamMember Prelude.Text
updateTeamMember_projectId :: (Text -> f Text) -> UpdateTeamMember -> f UpdateTeamMember
updateTeamMember_projectId = (UpdateTeamMember -> Text)
-> (UpdateTeamMember -> Text -> UpdateTeamMember)
-> Lens UpdateTeamMember UpdateTeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTeamMember' {Text
projectId :: Text
$sel:projectId:UpdateTeamMember' :: UpdateTeamMember -> Text
projectId} -> Text
projectId) (\s :: UpdateTeamMember
s@UpdateTeamMember' {} Text
a -> UpdateTeamMember
s {$sel:projectId:UpdateTeamMember' :: Text
projectId = Text
a} :: UpdateTeamMember)

-- | The Amazon Resource Name (ARN) of the user for whom you want to change
-- team membership attributes.
updateTeamMember_userArn :: Lens.Lens' UpdateTeamMember Prelude.Text
updateTeamMember_userArn :: (Text -> f Text) -> UpdateTeamMember -> f UpdateTeamMember
updateTeamMember_userArn = (UpdateTeamMember -> Text)
-> (UpdateTeamMember -> Text -> UpdateTeamMember)
-> Lens UpdateTeamMember UpdateTeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTeamMember' {Text
userArn :: Text
$sel:userArn:UpdateTeamMember' :: UpdateTeamMember -> Text
userArn} -> Text
userArn) (\s :: UpdateTeamMember
s@UpdateTeamMember' {} Text
a -> UpdateTeamMember
s {$sel:userArn:UpdateTeamMember' :: Text
userArn = Text
a} :: UpdateTeamMember)

instance Core.AWSRequest UpdateTeamMember where
  type
    AWSResponse UpdateTeamMember =
      UpdateTeamMemberResponse
  request :: UpdateTeamMember -> Request UpdateTeamMember
request = Service -> UpdateTeamMember -> Request UpdateTeamMember
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateTeamMember
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTeamMember)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateTeamMember))
-> Logger
-> Service
-> Proxy UpdateTeamMember
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTeamMember)))
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 Bool -> Maybe Text -> Int -> UpdateTeamMemberResponse
UpdateTeamMemberResponse'
            (Maybe Text
 -> Maybe Bool -> Maybe Text -> Int -> UpdateTeamMemberResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool -> Maybe Text -> Int -> UpdateTeamMemberResponse)
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
"userArn")
            Either
  String
  (Maybe Bool -> Maybe Text -> Int -> UpdateTeamMemberResponse)
-> Either String (Maybe Bool)
-> Either String (Maybe Text -> Int -> UpdateTeamMemberResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"remoteAccessAllowed")
            Either String (Maybe Text -> Int -> UpdateTeamMemberResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateTeamMemberResponse)
forall (f :: * -> *) a b. Applicative f => 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
"projectRole")
            Either String (Int -> UpdateTeamMemberResponse)
-> Either String Int -> Either String UpdateTeamMemberResponse
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))
      )

instance Prelude.Hashable UpdateTeamMember

instance Prelude.NFData UpdateTeamMember

instance Core.ToHeaders UpdateTeamMember where
  toHeaders :: UpdateTeamMember -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateTeamMember -> 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.UpdateTeamMember" ::
                          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 UpdateTeamMember where
  toJSON :: UpdateTeamMember -> Value
toJSON UpdateTeamMember' {Maybe Bool
Maybe Text
Text
userArn :: Text
projectId :: Text
projectRole :: Maybe Text
remoteAccessAllowed :: Maybe Bool
$sel:userArn:UpdateTeamMember' :: UpdateTeamMember -> Text
$sel:projectId:UpdateTeamMember' :: UpdateTeamMember -> Text
$sel:projectRole:UpdateTeamMember' :: UpdateTeamMember -> Maybe Text
$sel:remoteAccessAllowed:UpdateTeamMember' :: UpdateTeamMember -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"remoteAccessAllowed" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
remoteAccessAllowed,
            (Text
"projectRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
projectRole,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"projectId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
projectId),
            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 UpdateTeamMember where
  toPath :: UpdateTeamMember -> ByteString
toPath = ByteString -> UpdateTeamMember -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newUpdateTeamMemberResponse' smart constructor.
data UpdateTeamMemberResponse = UpdateTeamMemberResponse'
  { -- | The Amazon Resource Name (ARN) of the user whose team membership
    -- attributes were updated.
    UpdateTeamMemberResponse -> Maybe Text
userArn :: Prelude.Maybe Prelude.Text,
    -- | Whether a team member is allowed to remotely access project resources
    -- using the SSH public key associated with the user\'s profile.
    UpdateTeamMemberResponse -> Maybe Bool
remoteAccessAllowed :: Prelude.Maybe Prelude.Bool,
    -- | The project role granted to the user.
    UpdateTeamMemberResponse -> Maybe Text
projectRole :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateTeamMemberResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateTeamMemberResponse -> UpdateTeamMemberResponse -> Bool
(UpdateTeamMemberResponse -> UpdateTeamMemberResponse -> Bool)
-> (UpdateTeamMemberResponse -> UpdateTeamMemberResponse -> Bool)
-> Eq UpdateTeamMemberResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTeamMemberResponse -> UpdateTeamMemberResponse -> Bool
$c/= :: UpdateTeamMemberResponse -> UpdateTeamMemberResponse -> Bool
== :: UpdateTeamMemberResponse -> UpdateTeamMemberResponse -> Bool
$c== :: UpdateTeamMemberResponse -> UpdateTeamMemberResponse -> Bool
Prelude.Eq, ReadPrec [UpdateTeamMemberResponse]
ReadPrec UpdateTeamMemberResponse
Int -> ReadS UpdateTeamMemberResponse
ReadS [UpdateTeamMemberResponse]
(Int -> ReadS UpdateTeamMemberResponse)
-> ReadS [UpdateTeamMemberResponse]
-> ReadPrec UpdateTeamMemberResponse
-> ReadPrec [UpdateTeamMemberResponse]
-> Read UpdateTeamMemberResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTeamMemberResponse]
$creadListPrec :: ReadPrec [UpdateTeamMemberResponse]
readPrec :: ReadPrec UpdateTeamMemberResponse
$creadPrec :: ReadPrec UpdateTeamMemberResponse
readList :: ReadS [UpdateTeamMemberResponse]
$creadList :: ReadS [UpdateTeamMemberResponse]
readsPrec :: Int -> ReadS UpdateTeamMemberResponse
$creadsPrec :: Int -> ReadS UpdateTeamMemberResponse
Prelude.Read, Int -> UpdateTeamMemberResponse -> ShowS
[UpdateTeamMemberResponse] -> ShowS
UpdateTeamMemberResponse -> String
(Int -> UpdateTeamMemberResponse -> ShowS)
-> (UpdateTeamMemberResponse -> String)
-> ([UpdateTeamMemberResponse] -> ShowS)
-> Show UpdateTeamMemberResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTeamMemberResponse] -> ShowS
$cshowList :: [UpdateTeamMemberResponse] -> ShowS
show :: UpdateTeamMemberResponse -> String
$cshow :: UpdateTeamMemberResponse -> String
showsPrec :: Int -> UpdateTeamMemberResponse -> ShowS
$cshowsPrec :: Int -> UpdateTeamMemberResponse -> ShowS
Prelude.Show, (forall x.
 UpdateTeamMemberResponse -> Rep UpdateTeamMemberResponse x)
-> (forall x.
    Rep UpdateTeamMemberResponse x -> UpdateTeamMemberResponse)
-> Generic UpdateTeamMemberResponse
forall x.
Rep UpdateTeamMemberResponse x -> UpdateTeamMemberResponse
forall x.
UpdateTeamMemberResponse -> Rep UpdateTeamMemberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateTeamMemberResponse x -> UpdateTeamMemberResponse
$cfrom :: forall x.
UpdateTeamMemberResponse -> Rep UpdateTeamMemberResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTeamMemberResponse' 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', 'updateTeamMemberResponse_userArn' - The Amazon Resource Name (ARN) of the user whose team membership
-- attributes were updated.
--
-- 'remoteAccessAllowed', 'updateTeamMemberResponse_remoteAccessAllowed' - Whether a team member is allowed to remotely access project resources
-- using the SSH public key associated with the user\'s profile.
--
-- 'projectRole', 'updateTeamMemberResponse_projectRole' - The project role granted to the user.
--
-- 'httpStatus', 'updateTeamMemberResponse_httpStatus' - The response's http status code.
newUpdateTeamMemberResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateTeamMemberResponse
newUpdateTeamMemberResponse :: Int -> UpdateTeamMemberResponse
newUpdateTeamMemberResponse Int
pHttpStatus_ =
  UpdateTeamMemberResponse' :: Maybe Text
-> Maybe Bool -> Maybe Text -> Int -> UpdateTeamMemberResponse
UpdateTeamMemberResponse'
    { $sel:userArn:UpdateTeamMemberResponse' :: Maybe Text
userArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteAccessAllowed:UpdateTeamMemberResponse' :: Maybe Bool
remoteAccessAllowed = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:projectRole:UpdateTeamMemberResponse' :: Maybe Text
projectRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateTeamMemberResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the user whose team membership
-- attributes were updated.
updateTeamMemberResponse_userArn :: Lens.Lens' UpdateTeamMemberResponse (Prelude.Maybe Prelude.Text)
updateTeamMemberResponse_userArn :: (Maybe Text -> f (Maybe Text))
-> UpdateTeamMemberResponse -> f UpdateTeamMemberResponse
updateTeamMemberResponse_userArn = (UpdateTeamMemberResponse -> Maybe Text)
-> (UpdateTeamMemberResponse
    -> Maybe Text -> UpdateTeamMemberResponse)
-> Lens
     UpdateTeamMemberResponse
     UpdateTeamMemberResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTeamMemberResponse' {Maybe Text
userArn :: Maybe Text
$sel:userArn:UpdateTeamMemberResponse' :: UpdateTeamMemberResponse -> Maybe Text
userArn} -> Maybe Text
userArn) (\s :: UpdateTeamMemberResponse
s@UpdateTeamMemberResponse' {} Maybe Text
a -> UpdateTeamMemberResponse
s {$sel:userArn:UpdateTeamMemberResponse' :: Maybe Text
userArn = Maybe Text
a} :: UpdateTeamMemberResponse)

-- | Whether a team member is allowed to remotely access project resources
-- using the SSH public key associated with the user\'s profile.
updateTeamMemberResponse_remoteAccessAllowed :: Lens.Lens' UpdateTeamMemberResponse (Prelude.Maybe Prelude.Bool)
updateTeamMemberResponse_remoteAccessAllowed :: (Maybe Bool -> f (Maybe Bool))
-> UpdateTeamMemberResponse -> f UpdateTeamMemberResponse
updateTeamMemberResponse_remoteAccessAllowed = (UpdateTeamMemberResponse -> Maybe Bool)
-> (UpdateTeamMemberResponse
    -> Maybe Bool -> UpdateTeamMemberResponse)
-> Lens
     UpdateTeamMemberResponse
     UpdateTeamMemberResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTeamMemberResponse' {Maybe Bool
remoteAccessAllowed :: Maybe Bool
$sel:remoteAccessAllowed:UpdateTeamMemberResponse' :: UpdateTeamMemberResponse -> Maybe Bool
remoteAccessAllowed} -> Maybe Bool
remoteAccessAllowed) (\s :: UpdateTeamMemberResponse
s@UpdateTeamMemberResponse' {} Maybe Bool
a -> UpdateTeamMemberResponse
s {$sel:remoteAccessAllowed:UpdateTeamMemberResponse' :: Maybe Bool
remoteAccessAllowed = Maybe Bool
a} :: UpdateTeamMemberResponse)

-- | The project role granted to the user.
updateTeamMemberResponse_projectRole :: Lens.Lens' UpdateTeamMemberResponse (Prelude.Maybe Prelude.Text)
updateTeamMemberResponse_projectRole :: (Maybe Text -> f (Maybe Text))
-> UpdateTeamMemberResponse -> f UpdateTeamMemberResponse
updateTeamMemberResponse_projectRole = (UpdateTeamMemberResponse -> Maybe Text)
-> (UpdateTeamMemberResponse
    -> Maybe Text -> UpdateTeamMemberResponse)
-> Lens
     UpdateTeamMemberResponse
     UpdateTeamMemberResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTeamMemberResponse' {Maybe Text
projectRole :: Maybe Text
$sel:projectRole:UpdateTeamMemberResponse' :: UpdateTeamMemberResponse -> Maybe Text
projectRole} -> Maybe Text
projectRole) (\s :: UpdateTeamMemberResponse
s@UpdateTeamMemberResponse' {} Maybe Text
a -> UpdateTeamMemberResponse
s {$sel:projectRole:UpdateTeamMemberResponse' :: Maybe Text
projectRole = Maybe Text
a} :: UpdateTeamMemberResponse)

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

instance Prelude.NFData UpdateTeamMemberResponse