{-# 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.AssociateTeamMember
-- 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)
--
-- Adds an IAM user to the team for an AWS CodeStar project.
module Amazonka.CodeStar.AssociateTeamMember
  ( -- * Creating a Request
    AssociateTeamMember (..),
    newAssociateTeamMember,

    -- * Request Lenses
    associateTeamMember_remoteAccessAllowed,
    associateTeamMember_clientRequestToken,
    associateTeamMember_projectId,
    associateTeamMember_userArn,
    associateTeamMember_projectRole,

    -- * Destructuring the Response
    AssociateTeamMemberResponse (..),
    newAssociateTeamMemberResponse,

    -- * Response Lenses
    associateTeamMemberResponse_clientRequestToken,
    associateTeamMemberResponse_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:/ 'newAssociateTeamMember' smart constructor.
data AssociateTeamMember = AssociateTeamMember'
  { -- | Whether the team member is allowed to use an SSH public\/private key
    -- pair to remotely access project resources, for example Amazon EC2
    -- instances.
    AssociateTeamMember -> Maybe Bool
remoteAccessAllowed :: Prelude.Maybe Prelude.Bool,
    -- | A user- or system-generated token that identifies the entity that
    -- requested the team member association to the project. This token can be
    -- used to repeat the request.
    AssociateTeamMember -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the project to which you will add the IAM user.
    AssociateTeamMember -> Text
projectId :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the IAM user you want to add to the
    -- AWS CodeStar project.
    AssociateTeamMember -> Text
userArn :: Prelude.Text,
    -- | The AWS CodeStar project role that will apply to this user. This role
    -- determines what actions a user can take in an AWS CodeStar project.
    AssociateTeamMember -> Text
projectRole :: Prelude.Text
  }
  deriving (AssociateTeamMember -> AssociateTeamMember -> Bool
(AssociateTeamMember -> AssociateTeamMember -> Bool)
-> (AssociateTeamMember -> AssociateTeamMember -> Bool)
-> Eq AssociateTeamMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateTeamMember -> AssociateTeamMember -> Bool
$c/= :: AssociateTeamMember -> AssociateTeamMember -> Bool
== :: AssociateTeamMember -> AssociateTeamMember -> Bool
$c== :: AssociateTeamMember -> AssociateTeamMember -> Bool
Prelude.Eq, ReadPrec [AssociateTeamMember]
ReadPrec AssociateTeamMember
Int -> ReadS AssociateTeamMember
ReadS [AssociateTeamMember]
(Int -> ReadS AssociateTeamMember)
-> ReadS [AssociateTeamMember]
-> ReadPrec AssociateTeamMember
-> ReadPrec [AssociateTeamMember]
-> Read AssociateTeamMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateTeamMember]
$creadListPrec :: ReadPrec [AssociateTeamMember]
readPrec :: ReadPrec AssociateTeamMember
$creadPrec :: ReadPrec AssociateTeamMember
readList :: ReadS [AssociateTeamMember]
$creadList :: ReadS [AssociateTeamMember]
readsPrec :: Int -> ReadS AssociateTeamMember
$creadsPrec :: Int -> ReadS AssociateTeamMember
Prelude.Read, Int -> AssociateTeamMember -> ShowS
[AssociateTeamMember] -> ShowS
AssociateTeamMember -> String
(Int -> AssociateTeamMember -> ShowS)
-> (AssociateTeamMember -> String)
-> ([AssociateTeamMember] -> ShowS)
-> Show AssociateTeamMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateTeamMember] -> ShowS
$cshowList :: [AssociateTeamMember] -> ShowS
show :: AssociateTeamMember -> String
$cshow :: AssociateTeamMember -> String
showsPrec :: Int -> AssociateTeamMember -> ShowS
$cshowsPrec :: Int -> AssociateTeamMember -> ShowS
Prelude.Show, (forall x. AssociateTeamMember -> Rep AssociateTeamMember x)
-> (forall x. Rep AssociateTeamMember x -> AssociateTeamMember)
-> Generic AssociateTeamMember
forall x. Rep AssociateTeamMember x -> AssociateTeamMember
forall x. AssociateTeamMember -> Rep AssociateTeamMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociateTeamMember x -> AssociateTeamMember
$cfrom :: forall x. AssociateTeamMember -> Rep AssociateTeamMember x
Prelude.Generic)

-- |
-- Create a value of 'AssociateTeamMember' 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', 'associateTeamMember_remoteAccessAllowed' - Whether the team member is allowed to use an SSH public\/private key
-- pair to remotely access project resources, for example Amazon EC2
-- instances.
--
-- 'clientRequestToken', 'associateTeamMember_clientRequestToken' - A user- or system-generated token that identifies the entity that
-- requested the team member association to the project. This token can be
-- used to repeat the request.
--
-- 'projectId', 'associateTeamMember_projectId' - The ID of the project to which you will add the IAM user.
--
-- 'userArn', 'associateTeamMember_userArn' - The Amazon Resource Name (ARN) for the IAM user you want to add to the
-- AWS CodeStar project.
--
-- 'projectRole', 'associateTeamMember_projectRole' - The AWS CodeStar project role that will apply to this user. This role
-- determines what actions a user can take in an AWS CodeStar project.
newAssociateTeamMember ::
  -- | 'projectId'
  Prelude.Text ->
  -- | 'userArn'
  Prelude.Text ->
  -- | 'projectRole'
  Prelude.Text ->
  AssociateTeamMember
newAssociateTeamMember :: Text -> Text -> Text -> AssociateTeamMember
newAssociateTeamMember
  Text
pProjectId_
  Text
pUserArn_
  Text
pProjectRole_ =
    AssociateTeamMember' :: Maybe Bool
-> Maybe Text -> Text -> Text -> Text -> AssociateTeamMember
AssociateTeamMember'
      { $sel:remoteAccessAllowed:AssociateTeamMember' :: Maybe Bool
remoteAccessAllowed =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:AssociateTeamMember' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:projectId:AssociateTeamMember' :: Text
projectId = Text
pProjectId_,
        $sel:userArn:AssociateTeamMember' :: Text
userArn = Text
pUserArn_,
        $sel:projectRole:AssociateTeamMember' :: Text
projectRole = Text
pProjectRole_
      }

-- | Whether the team member is allowed to use an SSH public\/private key
-- pair to remotely access project resources, for example Amazon EC2
-- instances.
associateTeamMember_remoteAccessAllowed :: Lens.Lens' AssociateTeamMember (Prelude.Maybe Prelude.Bool)
associateTeamMember_remoteAccessAllowed :: (Maybe Bool -> f (Maybe Bool))
-> AssociateTeamMember -> f AssociateTeamMember
associateTeamMember_remoteAccessAllowed = (AssociateTeamMember -> Maybe Bool)
-> (AssociateTeamMember -> Maybe Bool -> AssociateTeamMember)
-> Lens
     AssociateTeamMember AssociateTeamMember (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTeamMember' {Maybe Bool
remoteAccessAllowed :: Maybe Bool
$sel:remoteAccessAllowed:AssociateTeamMember' :: AssociateTeamMember -> Maybe Bool
remoteAccessAllowed} -> Maybe Bool
remoteAccessAllowed) (\s :: AssociateTeamMember
s@AssociateTeamMember' {} Maybe Bool
a -> AssociateTeamMember
s {$sel:remoteAccessAllowed:AssociateTeamMember' :: Maybe Bool
remoteAccessAllowed = Maybe Bool
a} :: AssociateTeamMember)

-- | A user- or system-generated token that identifies the entity that
-- requested the team member association to the project. This token can be
-- used to repeat the request.
associateTeamMember_clientRequestToken :: Lens.Lens' AssociateTeamMember (Prelude.Maybe Prelude.Text)
associateTeamMember_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> AssociateTeamMember -> f AssociateTeamMember
associateTeamMember_clientRequestToken = (AssociateTeamMember -> Maybe Text)
-> (AssociateTeamMember -> Maybe Text -> AssociateTeamMember)
-> Lens
     AssociateTeamMember AssociateTeamMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTeamMember' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:AssociateTeamMember' :: AssociateTeamMember -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: AssociateTeamMember
s@AssociateTeamMember' {} Maybe Text
a -> AssociateTeamMember
s {$sel:clientRequestToken:AssociateTeamMember' :: Maybe Text
clientRequestToken = Maybe Text
a} :: AssociateTeamMember)

-- | The ID of the project to which you will add the IAM user.
associateTeamMember_projectId :: Lens.Lens' AssociateTeamMember Prelude.Text
associateTeamMember_projectId :: (Text -> f Text) -> AssociateTeamMember -> f AssociateTeamMember
associateTeamMember_projectId = (AssociateTeamMember -> Text)
-> (AssociateTeamMember -> Text -> AssociateTeamMember)
-> Lens AssociateTeamMember AssociateTeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTeamMember' {Text
projectId :: Text
$sel:projectId:AssociateTeamMember' :: AssociateTeamMember -> Text
projectId} -> Text
projectId) (\s :: AssociateTeamMember
s@AssociateTeamMember' {} Text
a -> AssociateTeamMember
s {$sel:projectId:AssociateTeamMember' :: Text
projectId = Text
a} :: AssociateTeamMember)

-- | The Amazon Resource Name (ARN) for the IAM user you want to add to the
-- AWS CodeStar project.
associateTeamMember_userArn :: Lens.Lens' AssociateTeamMember Prelude.Text
associateTeamMember_userArn :: (Text -> f Text) -> AssociateTeamMember -> f AssociateTeamMember
associateTeamMember_userArn = (AssociateTeamMember -> Text)
-> (AssociateTeamMember -> Text -> AssociateTeamMember)
-> Lens AssociateTeamMember AssociateTeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTeamMember' {Text
userArn :: Text
$sel:userArn:AssociateTeamMember' :: AssociateTeamMember -> Text
userArn} -> Text
userArn) (\s :: AssociateTeamMember
s@AssociateTeamMember' {} Text
a -> AssociateTeamMember
s {$sel:userArn:AssociateTeamMember' :: Text
userArn = Text
a} :: AssociateTeamMember)

-- | The AWS CodeStar project role that will apply to this user. This role
-- determines what actions a user can take in an AWS CodeStar project.
associateTeamMember_projectRole :: Lens.Lens' AssociateTeamMember Prelude.Text
associateTeamMember_projectRole :: (Text -> f Text) -> AssociateTeamMember -> f AssociateTeamMember
associateTeamMember_projectRole = (AssociateTeamMember -> Text)
-> (AssociateTeamMember -> Text -> AssociateTeamMember)
-> Lens AssociateTeamMember AssociateTeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTeamMember' {Text
projectRole :: Text
$sel:projectRole:AssociateTeamMember' :: AssociateTeamMember -> Text
projectRole} -> Text
projectRole) (\s :: AssociateTeamMember
s@AssociateTeamMember' {} Text
a -> AssociateTeamMember
s {$sel:projectRole:AssociateTeamMember' :: Text
projectRole = Text
a} :: AssociateTeamMember)

instance Core.AWSRequest AssociateTeamMember where
  type
    AWSResponse AssociateTeamMember =
      AssociateTeamMemberResponse
  request :: AssociateTeamMember -> Request AssociateTeamMember
request = Service -> AssociateTeamMember -> Request AssociateTeamMember
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AssociateTeamMember
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateTeamMember)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse AssociateTeamMember))
-> Logger
-> Service
-> Proxy AssociateTeamMember
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateTeamMember)))
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 -> Int -> AssociateTeamMemberResponse
AssociateTeamMemberResponse'
            (Maybe Text -> Int -> AssociateTeamMemberResponse)
-> Either String (Maybe Text)
-> Either String (Int -> AssociateTeamMemberResponse)
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
"clientRequestToken")
            Either String (Int -> AssociateTeamMemberResponse)
-> Either String Int -> Either String AssociateTeamMemberResponse
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 AssociateTeamMember

instance Prelude.NFData AssociateTeamMember

instance Core.ToHeaders AssociateTeamMember where
  toHeaders :: AssociateTeamMember -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AssociateTeamMember -> 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.AssociateTeamMember" ::
                          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 AssociateTeamMember where
  toJSON :: AssociateTeamMember -> Value
toJSON AssociateTeamMember' {Maybe Bool
Maybe Text
Text
projectRole :: Text
userArn :: Text
projectId :: Text
clientRequestToken :: Maybe Text
remoteAccessAllowed :: Maybe Bool
$sel:projectRole:AssociateTeamMember' :: AssociateTeamMember -> Text
$sel:userArn:AssociateTeamMember' :: AssociateTeamMember -> Text
$sel:projectId:AssociateTeamMember' :: AssociateTeamMember -> Text
$sel:clientRequestToken:AssociateTeamMember' :: AssociateTeamMember -> Maybe Text
$sel:remoteAccessAllowed:AssociateTeamMember' :: AssociateTeamMember -> 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
"clientRequestToken" 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
clientRequestToken,
            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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"projectRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
projectRole)
          ]
      )

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

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

-- | /See:/ 'newAssociateTeamMemberResponse' smart constructor.
data AssociateTeamMemberResponse = AssociateTeamMemberResponse'
  { -- | The user- or system-generated token from the initial request that can be
    -- used to repeat the request.
    AssociateTeamMemberResponse -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    AssociateTeamMemberResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateTeamMemberResponse -> AssociateTeamMemberResponse -> Bool
(AssociateTeamMemberResponse
 -> AssociateTeamMemberResponse -> Bool)
-> (AssociateTeamMemberResponse
    -> AssociateTeamMemberResponse -> Bool)
-> Eq AssociateTeamMemberResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateTeamMemberResponse -> AssociateTeamMemberResponse -> Bool
$c/= :: AssociateTeamMemberResponse -> AssociateTeamMemberResponse -> Bool
== :: AssociateTeamMemberResponse -> AssociateTeamMemberResponse -> Bool
$c== :: AssociateTeamMemberResponse -> AssociateTeamMemberResponse -> Bool
Prelude.Eq, ReadPrec [AssociateTeamMemberResponse]
ReadPrec AssociateTeamMemberResponse
Int -> ReadS AssociateTeamMemberResponse
ReadS [AssociateTeamMemberResponse]
(Int -> ReadS AssociateTeamMemberResponse)
-> ReadS [AssociateTeamMemberResponse]
-> ReadPrec AssociateTeamMemberResponse
-> ReadPrec [AssociateTeamMemberResponse]
-> Read AssociateTeamMemberResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateTeamMemberResponse]
$creadListPrec :: ReadPrec [AssociateTeamMemberResponse]
readPrec :: ReadPrec AssociateTeamMemberResponse
$creadPrec :: ReadPrec AssociateTeamMemberResponse
readList :: ReadS [AssociateTeamMemberResponse]
$creadList :: ReadS [AssociateTeamMemberResponse]
readsPrec :: Int -> ReadS AssociateTeamMemberResponse
$creadsPrec :: Int -> ReadS AssociateTeamMemberResponse
Prelude.Read, Int -> AssociateTeamMemberResponse -> ShowS
[AssociateTeamMemberResponse] -> ShowS
AssociateTeamMemberResponse -> String
(Int -> AssociateTeamMemberResponse -> ShowS)
-> (AssociateTeamMemberResponse -> String)
-> ([AssociateTeamMemberResponse] -> ShowS)
-> Show AssociateTeamMemberResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateTeamMemberResponse] -> ShowS
$cshowList :: [AssociateTeamMemberResponse] -> ShowS
show :: AssociateTeamMemberResponse -> String
$cshow :: AssociateTeamMemberResponse -> String
showsPrec :: Int -> AssociateTeamMemberResponse -> ShowS
$cshowsPrec :: Int -> AssociateTeamMemberResponse -> ShowS
Prelude.Show, (forall x.
 AssociateTeamMemberResponse -> Rep AssociateTeamMemberResponse x)
-> (forall x.
    Rep AssociateTeamMemberResponse x -> AssociateTeamMemberResponse)
-> Generic AssociateTeamMemberResponse
forall x.
Rep AssociateTeamMemberResponse x -> AssociateTeamMemberResponse
forall x.
AssociateTeamMemberResponse -> Rep AssociateTeamMemberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateTeamMemberResponse x -> AssociateTeamMemberResponse
$cfrom :: forall x.
AssociateTeamMemberResponse -> Rep AssociateTeamMemberResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateTeamMemberResponse' 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:
--
-- 'clientRequestToken', 'associateTeamMemberResponse_clientRequestToken' - The user- or system-generated token from the initial request that can be
-- used to repeat the request.
--
-- 'httpStatus', 'associateTeamMemberResponse_httpStatus' - The response's http status code.
newAssociateTeamMemberResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateTeamMemberResponse
newAssociateTeamMemberResponse :: Int -> AssociateTeamMemberResponse
newAssociateTeamMemberResponse Int
pHttpStatus_ =
  AssociateTeamMemberResponse' :: Maybe Text -> Int -> AssociateTeamMemberResponse
AssociateTeamMemberResponse'
    { $sel:clientRequestToken:AssociateTeamMemberResponse' :: Maybe Text
clientRequestToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AssociateTeamMemberResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The user- or system-generated token from the initial request that can be
-- used to repeat the request.
associateTeamMemberResponse_clientRequestToken :: Lens.Lens' AssociateTeamMemberResponse (Prelude.Maybe Prelude.Text)
associateTeamMemberResponse_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> AssociateTeamMemberResponse -> f AssociateTeamMemberResponse
associateTeamMemberResponse_clientRequestToken = (AssociateTeamMemberResponse -> Maybe Text)
-> (AssociateTeamMemberResponse
    -> Maybe Text -> AssociateTeamMemberResponse)
-> Lens
     AssociateTeamMemberResponse
     AssociateTeamMemberResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTeamMemberResponse' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:AssociateTeamMemberResponse' :: AssociateTeamMemberResponse -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: AssociateTeamMemberResponse
s@AssociateTeamMemberResponse' {} Maybe Text
a -> AssociateTeamMemberResponse
s {$sel:clientRequestToken:AssociateTeamMemberResponse' :: Maybe Text
clientRequestToken = Maybe Text
a} :: AssociateTeamMemberResponse)

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

instance Prelude.NFData AssociateTeamMemberResponse