{-# 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.Cloud9.UpdateEnvironmentMembership
-- 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)
--
-- Changes the settings of an existing environment member for an Cloud9
-- development environment.
module Amazonka.Cloud9.UpdateEnvironmentMembership
  ( -- * Creating a Request
    UpdateEnvironmentMembership (..),
    newUpdateEnvironmentMembership,

    -- * Request Lenses
    updateEnvironmentMembership_environmentId,
    updateEnvironmentMembership_userArn,
    updateEnvironmentMembership_permissions,

    -- * Destructuring the Response
    UpdateEnvironmentMembershipResponse (..),
    newUpdateEnvironmentMembershipResponse,

    -- * Response Lenses
    updateEnvironmentMembershipResponse_membership,
    updateEnvironmentMembershipResponse_httpStatus,
  )
where

import Amazonka.Cloud9.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:/ 'newUpdateEnvironmentMembership' smart constructor.
data UpdateEnvironmentMembership = UpdateEnvironmentMembership'
  { -- | The ID of the environment for the environment member whose settings you
    -- want to change.
    UpdateEnvironmentMembership -> Text
environmentId :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the environment member whose settings
    -- you want to change.
    UpdateEnvironmentMembership -> Text
userArn :: Prelude.Text,
    -- | The replacement type of environment member permissions you want to
    -- associate with this environment member. Available values include:
    --
    -- -   @read-only@: Has read-only access to the environment.
    --
    -- -   @read-write@: Has read-write access to the environment.
    UpdateEnvironmentMembership -> MemberPermissions
permissions :: MemberPermissions
  }
  deriving (UpdateEnvironmentMembership -> UpdateEnvironmentMembership -> Bool
(UpdateEnvironmentMembership
 -> UpdateEnvironmentMembership -> Bool)
-> (UpdateEnvironmentMembership
    -> UpdateEnvironmentMembership -> Bool)
-> Eq UpdateEnvironmentMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEnvironmentMembership -> UpdateEnvironmentMembership -> Bool
$c/= :: UpdateEnvironmentMembership -> UpdateEnvironmentMembership -> Bool
== :: UpdateEnvironmentMembership -> UpdateEnvironmentMembership -> Bool
$c== :: UpdateEnvironmentMembership -> UpdateEnvironmentMembership -> Bool
Prelude.Eq, ReadPrec [UpdateEnvironmentMembership]
ReadPrec UpdateEnvironmentMembership
Int -> ReadS UpdateEnvironmentMembership
ReadS [UpdateEnvironmentMembership]
(Int -> ReadS UpdateEnvironmentMembership)
-> ReadS [UpdateEnvironmentMembership]
-> ReadPrec UpdateEnvironmentMembership
-> ReadPrec [UpdateEnvironmentMembership]
-> Read UpdateEnvironmentMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEnvironmentMembership]
$creadListPrec :: ReadPrec [UpdateEnvironmentMembership]
readPrec :: ReadPrec UpdateEnvironmentMembership
$creadPrec :: ReadPrec UpdateEnvironmentMembership
readList :: ReadS [UpdateEnvironmentMembership]
$creadList :: ReadS [UpdateEnvironmentMembership]
readsPrec :: Int -> ReadS UpdateEnvironmentMembership
$creadsPrec :: Int -> ReadS UpdateEnvironmentMembership
Prelude.Read, Int -> UpdateEnvironmentMembership -> ShowS
[UpdateEnvironmentMembership] -> ShowS
UpdateEnvironmentMembership -> String
(Int -> UpdateEnvironmentMembership -> ShowS)
-> (UpdateEnvironmentMembership -> String)
-> ([UpdateEnvironmentMembership] -> ShowS)
-> Show UpdateEnvironmentMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEnvironmentMembership] -> ShowS
$cshowList :: [UpdateEnvironmentMembership] -> ShowS
show :: UpdateEnvironmentMembership -> String
$cshow :: UpdateEnvironmentMembership -> String
showsPrec :: Int -> UpdateEnvironmentMembership -> ShowS
$cshowsPrec :: Int -> UpdateEnvironmentMembership -> ShowS
Prelude.Show, (forall x.
 UpdateEnvironmentMembership -> Rep UpdateEnvironmentMembership x)
-> (forall x.
    Rep UpdateEnvironmentMembership x -> UpdateEnvironmentMembership)
-> Generic UpdateEnvironmentMembership
forall x.
Rep UpdateEnvironmentMembership x -> UpdateEnvironmentMembership
forall x.
UpdateEnvironmentMembership -> Rep UpdateEnvironmentMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEnvironmentMembership x -> UpdateEnvironmentMembership
$cfrom :: forall x.
UpdateEnvironmentMembership -> Rep UpdateEnvironmentMembership x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEnvironmentMembership' 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:
--
-- 'environmentId', 'updateEnvironmentMembership_environmentId' - The ID of the environment for the environment member whose settings you
-- want to change.
--
-- 'userArn', 'updateEnvironmentMembership_userArn' - The Amazon Resource Name (ARN) of the environment member whose settings
-- you want to change.
--
-- 'permissions', 'updateEnvironmentMembership_permissions' - The replacement type of environment member permissions you want to
-- associate with this environment member. Available values include:
--
-- -   @read-only@: Has read-only access to the environment.
--
-- -   @read-write@: Has read-write access to the environment.
newUpdateEnvironmentMembership ::
  -- | 'environmentId'
  Prelude.Text ->
  -- | 'userArn'
  Prelude.Text ->
  -- | 'permissions'
  MemberPermissions ->
  UpdateEnvironmentMembership
newUpdateEnvironmentMembership :: Text -> Text -> MemberPermissions -> UpdateEnvironmentMembership
newUpdateEnvironmentMembership
  Text
pEnvironmentId_
  Text
pUserArn_
  MemberPermissions
pPermissions_ =
    UpdateEnvironmentMembership' :: Text -> Text -> MemberPermissions -> UpdateEnvironmentMembership
UpdateEnvironmentMembership'
      { $sel:environmentId:UpdateEnvironmentMembership' :: Text
environmentId =
          Text
pEnvironmentId_,
        $sel:userArn:UpdateEnvironmentMembership' :: Text
userArn = Text
pUserArn_,
        $sel:permissions:UpdateEnvironmentMembership' :: MemberPermissions
permissions = MemberPermissions
pPermissions_
      }

-- | The ID of the environment for the environment member whose settings you
-- want to change.
updateEnvironmentMembership_environmentId :: Lens.Lens' UpdateEnvironmentMembership Prelude.Text
updateEnvironmentMembership_environmentId :: (Text -> f Text)
-> UpdateEnvironmentMembership -> f UpdateEnvironmentMembership
updateEnvironmentMembership_environmentId = (UpdateEnvironmentMembership -> Text)
-> (UpdateEnvironmentMembership
    -> Text -> UpdateEnvironmentMembership)
-> Lens
     UpdateEnvironmentMembership UpdateEnvironmentMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironmentMembership' {Text
environmentId :: Text
$sel:environmentId:UpdateEnvironmentMembership' :: UpdateEnvironmentMembership -> Text
environmentId} -> Text
environmentId) (\s :: UpdateEnvironmentMembership
s@UpdateEnvironmentMembership' {} Text
a -> UpdateEnvironmentMembership
s {$sel:environmentId:UpdateEnvironmentMembership' :: Text
environmentId = Text
a} :: UpdateEnvironmentMembership)

-- | The Amazon Resource Name (ARN) of the environment member whose settings
-- you want to change.
updateEnvironmentMembership_userArn :: Lens.Lens' UpdateEnvironmentMembership Prelude.Text
updateEnvironmentMembership_userArn :: (Text -> f Text)
-> UpdateEnvironmentMembership -> f UpdateEnvironmentMembership
updateEnvironmentMembership_userArn = (UpdateEnvironmentMembership -> Text)
-> (UpdateEnvironmentMembership
    -> Text -> UpdateEnvironmentMembership)
-> Lens
     UpdateEnvironmentMembership UpdateEnvironmentMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironmentMembership' {Text
userArn :: Text
$sel:userArn:UpdateEnvironmentMembership' :: UpdateEnvironmentMembership -> Text
userArn} -> Text
userArn) (\s :: UpdateEnvironmentMembership
s@UpdateEnvironmentMembership' {} Text
a -> UpdateEnvironmentMembership
s {$sel:userArn:UpdateEnvironmentMembership' :: Text
userArn = Text
a} :: UpdateEnvironmentMembership)

-- | The replacement type of environment member permissions you want to
-- associate with this environment member. Available values include:
--
-- -   @read-only@: Has read-only access to the environment.
--
-- -   @read-write@: Has read-write access to the environment.
updateEnvironmentMembership_permissions :: Lens.Lens' UpdateEnvironmentMembership MemberPermissions
updateEnvironmentMembership_permissions :: (MemberPermissions -> f MemberPermissions)
-> UpdateEnvironmentMembership -> f UpdateEnvironmentMembership
updateEnvironmentMembership_permissions = (UpdateEnvironmentMembership -> MemberPermissions)
-> (UpdateEnvironmentMembership
    -> MemberPermissions -> UpdateEnvironmentMembership)
-> Lens
     UpdateEnvironmentMembership
     UpdateEnvironmentMembership
     MemberPermissions
     MemberPermissions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironmentMembership' {MemberPermissions
permissions :: MemberPermissions
$sel:permissions:UpdateEnvironmentMembership' :: UpdateEnvironmentMembership -> MemberPermissions
permissions} -> MemberPermissions
permissions) (\s :: UpdateEnvironmentMembership
s@UpdateEnvironmentMembership' {} MemberPermissions
a -> UpdateEnvironmentMembership
s {$sel:permissions:UpdateEnvironmentMembership' :: MemberPermissions
permissions = MemberPermissions
a} :: UpdateEnvironmentMembership)

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

instance Prelude.NFData UpdateEnvironmentMembership

instance Core.ToHeaders UpdateEnvironmentMembership where
  toHeaders :: UpdateEnvironmentMembership -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateEnvironmentMembership -> 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
"AWSCloud9WorkspaceManagementService.UpdateEnvironmentMembership" ::
                          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 UpdateEnvironmentMembership where
  toJSON :: UpdateEnvironmentMembership -> Value
toJSON UpdateEnvironmentMembership' {Text
MemberPermissions
permissions :: MemberPermissions
userArn :: Text
environmentId :: Text
$sel:permissions:UpdateEnvironmentMembership' :: UpdateEnvironmentMembership -> MemberPermissions
$sel:userArn:UpdateEnvironmentMembership' :: UpdateEnvironmentMembership -> Text
$sel:environmentId:UpdateEnvironmentMembership' :: UpdateEnvironmentMembership -> 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
"environmentId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
environmentId),
            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
"permissions" Text -> MemberPermissions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MemberPermissions
permissions)
          ]
      )

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

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

-- | /See:/ 'newUpdateEnvironmentMembershipResponse' smart constructor.
data UpdateEnvironmentMembershipResponse = UpdateEnvironmentMembershipResponse'
  { -- | Information about the environment member whose settings were changed.
    UpdateEnvironmentMembershipResponse -> Maybe EnvironmentMember
membership :: Prelude.Maybe EnvironmentMember,
    -- | The response's http status code.
    UpdateEnvironmentMembershipResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateEnvironmentMembershipResponse
-> UpdateEnvironmentMembershipResponse -> Bool
(UpdateEnvironmentMembershipResponse
 -> UpdateEnvironmentMembershipResponse -> Bool)
-> (UpdateEnvironmentMembershipResponse
    -> UpdateEnvironmentMembershipResponse -> Bool)
-> Eq UpdateEnvironmentMembershipResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEnvironmentMembershipResponse
-> UpdateEnvironmentMembershipResponse -> Bool
$c/= :: UpdateEnvironmentMembershipResponse
-> UpdateEnvironmentMembershipResponse -> Bool
== :: UpdateEnvironmentMembershipResponse
-> UpdateEnvironmentMembershipResponse -> Bool
$c== :: UpdateEnvironmentMembershipResponse
-> UpdateEnvironmentMembershipResponse -> Bool
Prelude.Eq, ReadPrec [UpdateEnvironmentMembershipResponse]
ReadPrec UpdateEnvironmentMembershipResponse
Int -> ReadS UpdateEnvironmentMembershipResponse
ReadS [UpdateEnvironmentMembershipResponse]
(Int -> ReadS UpdateEnvironmentMembershipResponse)
-> ReadS [UpdateEnvironmentMembershipResponse]
-> ReadPrec UpdateEnvironmentMembershipResponse
-> ReadPrec [UpdateEnvironmentMembershipResponse]
-> Read UpdateEnvironmentMembershipResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEnvironmentMembershipResponse]
$creadListPrec :: ReadPrec [UpdateEnvironmentMembershipResponse]
readPrec :: ReadPrec UpdateEnvironmentMembershipResponse
$creadPrec :: ReadPrec UpdateEnvironmentMembershipResponse
readList :: ReadS [UpdateEnvironmentMembershipResponse]
$creadList :: ReadS [UpdateEnvironmentMembershipResponse]
readsPrec :: Int -> ReadS UpdateEnvironmentMembershipResponse
$creadsPrec :: Int -> ReadS UpdateEnvironmentMembershipResponse
Prelude.Read, Int -> UpdateEnvironmentMembershipResponse -> ShowS
[UpdateEnvironmentMembershipResponse] -> ShowS
UpdateEnvironmentMembershipResponse -> String
(Int -> UpdateEnvironmentMembershipResponse -> ShowS)
-> (UpdateEnvironmentMembershipResponse -> String)
-> ([UpdateEnvironmentMembershipResponse] -> ShowS)
-> Show UpdateEnvironmentMembershipResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEnvironmentMembershipResponse] -> ShowS
$cshowList :: [UpdateEnvironmentMembershipResponse] -> ShowS
show :: UpdateEnvironmentMembershipResponse -> String
$cshow :: UpdateEnvironmentMembershipResponse -> String
showsPrec :: Int -> UpdateEnvironmentMembershipResponse -> ShowS
$cshowsPrec :: Int -> UpdateEnvironmentMembershipResponse -> ShowS
Prelude.Show, (forall x.
 UpdateEnvironmentMembershipResponse
 -> Rep UpdateEnvironmentMembershipResponse x)
-> (forall x.
    Rep UpdateEnvironmentMembershipResponse x
    -> UpdateEnvironmentMembershipResponse)
-> Generic UpdateEnvironmentMembershipResponse
forall x.
Rep UpdateEnvironmentMembershipResponse x
-> UpdateEnvironmentMembershipResponse
forall x.
UpdateEnvironmentMembershipResponse
-> Rep UpdateEnvironmentMembershipResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEnvironmentMembershipResponse x
-> UpdateEnvironmentMembershipResponse
$cfrom :: forall x.
UpdateEnvironmentMembershipResponse
-> Rep UpdateEnvironmentMembershipResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEnvironmentMembershipResponse' 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:
--
-- 'membership', 'updateEnvironmentMembershipResponse_membership' - Information about the environment member whose settings were changed.
--
-- 'httpStatus', 'updateEnvironmentMembershipResponse_httpStatus' - The response's http status code.
newUpdateEnvironmentMembershipResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateEnvironmentMembershipResponse
newUpdateEnvironmentMembershipResponse :: Int -> UpdateEnvironmentMembershipResponse
newUpdateEnvironmentMembershipResponse Int
pHttpStatus_ =
  UpdateEnvironmentMembershipResponse' :: Maybe EnvironmentMember
-> Int -> UpdateEnvironmentMembershipResponse
UpdateEnvironmentMembershipResponse'
    { $sel:membership:UpdateEnvironmentMembershipResponse' :: Maybe EnvironmentMember
membership =
        Maybe EnvironmentMember
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateEnvironmentMembershipResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the environment member whose settings were changed.
updateEnvironmentMembershipResponse_membership :: Lens.Lens' UpdateEnvironmentMembershipResponse (Prelude.Maybe EnvironmentMember)
updateEnvironmentMembershipResponse_membership :: (Maybe EnvironmentMember -> f (Maybe EnvironmentMember))
-> UpdateEnvironmentMembershipResponse
-> f UpdateEnvironmentMembershipResponse
updateEnvironmentMembershipResponse_membership = (UpdateEnvironmentMembershipResponse -> Maybe EnvironmentMember)
-> (UpdateEnvironmentMembershipResponse
    -> Maybe EnvironmentMember -> UpdateEnvironmentMembershipResponse)
-> Lens
     UpdateEnvironmentMembershipResponse
     UpdateEnvironmentMembershipResponse
     (Maybe EnvironmentMember)
     (Maybe EnvironmentMember)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEnvironmentMembershipResponse' {Maybe EnvironmentMember
membership :: Maybe EnvironmentMember
$sel:membership:UpdateEnvironmentMembershipResponse' :: UpdateEnvironmentMembershipResponse -> Maybe EnvironmentMember
membership} -> Maybe EnvironmentMember
membership) (\s :: UpdateEnvironmentMembershipResponse
s@UpdateEnvironmentMembershipResponse' {} Maybe EnvironmentMember
a -> UpdateEnvironmentMembershipResponse
s {$sel:membership:UpdateEnvironmentMembershipResponse' :: Maybe EnvironmentMember
membership = Maybe EnvironmentMember
a} :: UpdateEnvironmentMembershipResponse)

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

instance
  Prelude.NFData
    UpdateEnvironmentMembershipResponse