{-# 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.QuickSight.CreateGroupMembership
-- 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 Amazon QuickSight user to an Amazon QuickSight group.
module Amazonka.QuickSight.CreateGroupMembership
  ( -- * Creating a Request
    CreateGroupMembership (..),
    newCreateGroupMembership,

    -- * Request Lenses
    createGroupMembership_memberName,
    createGroupMembership_groupName,
    createGroupMembership_awsAccountId,
    createGroupMembership_namespace,

    -- * Destructuring the Response
    CreateGroupMembershipResponse (..),
    newCreateGroupMembershipResponse,

    -- * Response Lenses
    createGroupMembershipResponse_requestId,
    createGroupMembershipResponse_groupMember,
    createGroupMembershipResponse_status,
  )
where

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

-- | /See:/ 'newCreateGroupMembership' smart constructor.
data CreateGroupMembership = CreateGroupMembership'
  { -- | The name of the user that you want to add to the group membership.
    CreateGroupMembership -> Text
memberName :: Prelude.Text,
    -- | The name of the group that you want to add the user to.
    CreateGroupMembership -> Text
groupName :: Prelude.Text,
    -- | The ID for the Amazon Web Services account that the group is in.
    -- Currently, you use the ID for the Amazon Web Services account that
    -- contains your Amazon QuickSight account.
    CreateGroupMembership -> Text
awsAccountId :: Prelude.Text,
    -- | The namespace. Currently, you should set this to @default@.
    CreateGroupMembership -> Text
namespace :: Prelude.Text
  }
  deriving (CreateGroupMembership -> CreateGroupMembership -> Bool
(CreateGroupMembership -> CreateGroupMembership -> Bool)
-> (CreateGroupMembership -> CreateGroupMembership -> Bool)
-> Eq CreateGroupMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGroupMembership -> CreateGroupMembership -> Bool
$c/= :: CreateGroupMembership -> CreateGroupMembership -> Bool
== :: CreateGroupMembership -> CreateGroupMembership -> Bool
$c== :: CreateGroupMembership -> CreateGroupMembership -> Bool
Prelude.Eq, ReadPrec [CreateGroupMembership]
ReadPrec CreateGroupMembership
Int -> ReadS CreateGroupMembership
ReadS [CreateGroupMembership]
(Int -> ReadS CreateGroupMembership)
-> ReadS [CreateGroupMembership]
-> ReadPrec CreateGroupMembership
-> ReadPrec [CreateGroupMembership]
-> Read CreateGroupMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGroupMembership]
$creadListPrec :: ReadPrec [CreateGroupMembership]
readPrec :: ReadPrec CreateGroupMembership
$creadPrec :: ReadPrec CreateGroupMembership
readList :: ReadS [CreateGroupMembership]
$creadList :: ReadS [CreateGroupMembership]
readsPrec :: Int -> ReadS CreateGroupMembership
$creadsPrec :: Int -> ReadS CreateGroupMembership
Prelude.Read, Int -> CreateGroupMembership -> ShowS
[CreateGroupMembership] -> ShowS
CreateGroupMembership -> String
(Int -> CreateGroupMembership -> ShowS)
-> (CreateGroupMembership -> String)
-> ([CreateGroupMembership] -> ShowS)
-> Show CreateGroupMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGroupMembership] -> ShowS
$cshowList :: [CreateGroupMembership] -> ShowS
show :: CreateGroupMembership -> String
$cshow :: CreateGroupMembership -> String
showsPrec :: Int -> CreateGroupMembership -> ShowS
$cshowsPrec :: Int -> CreateGroupMembership -> ShowS
Prelude.Show, (forall x. CreateGroupMembership -> Rep CreateGroupMembership x)
-> (forall x. Rep CreateGroupMembership x -> CreateGroupMembership)
-> Generic CreateGroupMembership
forall x. Rep CreateGroupMembership x -> CreateGroupMembership
forall x. CreateGroupMembership -> Rep CreateGroupMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGroupMembership x -> CreateGroupMembership
$cfrom :: forall x. CreateGroupMembership -> Rep CreateGroupMembership x
Prelude.Generic)

-- |
-- Create a value of 'CreateGroupMembership' 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:
--
-- 'memberName', 'createGroupMembership_memberName' - The name of the user that you want to add to the group membership.
--
-- 'groupName', 'createGroupMembership_groupName' - The name of the group that you want to add the user to.
--
-- 'awsAccountId', 'createGroupMembership_awsAccountId' - The ID for the Amazon Web Services account that the group is in.
-- Currently, you use the ID for the Amazon Web Services account that
-- contains your Amazon QuickSight account.
--
-- 'namespace', 'createGroupMembership_namespace' - The namespace. Currently, you should set this to @default@.
newCreateGroupMembership ::
  -- | 'memberName'
  Prelude.Text ->
  -- | 'groupName'
  Prelude.Text ->
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'namespace'
  Prelude.Text ->
  CreateGroupMembership
newCreateGroupMembership :: Text -> Text -> Text -> Text -> CreateGroupMembership
newCreateGroupMembership
  Text
pMemberName_
  Text
pGroupName_
  Text
pAwsAccountId_
  Text
pNamespace_ =
    CreateGroupMembership' :: Text -> Text -> Text -> Text -> CreateGroupMembership
CreateGroupMembership'
      { $sel:memberName:CreateGroupMembership' :: Text
memberName = Text
pMemberName_,
        $sel:groupName:CreateGroupMembership' :: Text
groupName = Text
pGroupName_,
        $sel:awsAccountId:CreateGroupMembership' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:namespace:CreateGroupMembership' :: Text
namespace = Text
pNamespace_
      }

-- | The name of the user that you want to add to the group membership.
createGroupMembership_memberName :: Lens.Lens' CreateGroupMembership Prelude.Text
createGroupMembership_memberName :: (Text -> f Text)
-> CreateGroupMembership -> f CreateGroupMembership
createGroupMembership_memberName = (CreateGroupMembership -> Text)
-> (CreateGroupMembership -> Text -> CreateGroupMembership)
-> Lens CreateGroupMembership CreateGroupMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupMembership' {Text
memberName :: Text
$sel:memberName:CreateGroupMembership' :: CreateGroupMembership -> Text
memberName} -> Text
memberName) (\s :: CreateGroupMembership
s@CreateGroupMembership' {} Text
a -> CreateGroupMembership
s {$sel:memberName:CreateGroupMembership' :: Text
memberName = Text
a} :: CreateGroupMembership)

-- | The name of the group that you want to add the user to.
createGroupMembership_groupName :: Lens.Lens' CreateGroupMembership Prelude.Text
createGroupMembership_groupName :: (Text -> f Text)
-> CreateGroupMembership -> f CreateGroupMembership
createGroupMembership_groupName = (CreateGroupMembership -> Text)
-> (CreateGroupMembership -> Text -> CreateGroupMembership)
-> Lens CreateGroupMembership CreateGroupMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupMembership' {Text
groupName :: Text
$sel:groupName:CreateGroupMembership' :: CreateGroupMembership -> Text
groupName} -> Text
groupName) (\s :: CreateGroupMembership
s@CreateGroupMembership' {} Text
a -> CreateGroupMembership
s {$sel:groupName:CreateGroupMembership' :: Text
groupName = Text
a} :: CreateGroupMembership)

-- | The ID for the Amazon Web Services account that the group is in.
-- Currently, you use the ID for the Amazon Web Services account that
-- contains your Amazon QuickSight account.
createGroupMembership_awsAccountId :: Lens.Lens' CreateGroupMembership Prelude.Text
createGroupMembership_awsAccountId :: (Text -> f Text)
-> CreateGroupMembership -> f CreateGroupMembership
createGroupMembership_awsAccountId = (CreateGroupMembership -> Text)
-> (CreateGroupMembership -> Text -> CreateGroupMembership)
-> Lens CreateGroupMembership CreateGroupMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupMembership' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateGroupMembership' :: CreateGroupMembership -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateGroupMembership
s@CreateGroupMembership' {} Text
a -> CreateGroupMembership
s {$sel:awsAccountId:CreateGroupMembership' :: Text
awsAccountId = Text
a} :: CreateGroupMembership)

-- | The namespace. Currently, you should set this to @default@.
createGroupMembership_namespace :: Lens.Lens' CreateGroupMembership Prelude.Text
createGroupMembership_namespace :: (Text -> f Text)
-> CreateGroupMembership -> f CreateGroupMembership
createGroupMembership_namespace = (CreateGroupMembership -> Text)
-> (CreateGroupMembership -> Text -> CreateGroupMembership)
-> Lens CreateGroupMembership CreateGroupMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupMembership' {Text
namespace :: Text
$sel:namespace:CreateGroupMembership' :: CreateGroupMembership -> Text
namespace} -> Text
namespace) (\s :: CreateGroupMembership
s@CreateGroupMembership' {} Text
a -> CreateGroupMembership
s {$sel:namespace:CreateGroupMembership' :: Text
namespace = Text
a} :: CreateGroupMembership)

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

instance Prelude.NFData CreateGroupMembership

instance Core.ToHeaders CreateGroupMembership where
  toHeaders :: CreateGroupMembership -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateGroupMembership -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateGroupMembership where
  toJSON :: CreateGroupMembership -> Value
toJSON = Value -> CreateGroupMembership -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

instance Core.ToPath CreateGroupMembership where
  toPath :: CreateGroupMembership -> ByteString
toPath CreateGroupMembership' {Text
namespace :: Text
awsAccountId :: Text
groupName :: Text
memberName :: Text
$sel:namespace:CreateGroupMembership' :: CreateGroupMembership -> Text
$sel:awsAccountId:CreateGroupMembership' :: CreateGroupMembership -> Text
$sel:groupName:CreateGroupMembership' :: CreateGroupMembership -> Text
$sel:memberName:CreateGroupMembership' :: CreateGroupMembership -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
        ByteString
"/namespaces/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
namespace,
        ByteString
"/groups/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
groupName,
        ByteString
"/members/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
memberName
      ]

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

-- | /See:/ 'newCreateGroupMembershipResponse' smart constructor.
data CreateGroupMembershipResponse = CreateGroupMembershipResponse'
  { -- | The Amazon Web Services request ID for this operation.
    CreateGroupMembershipResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The group member.
    CreateGroupMembershipResponse -> Maybe GroupMember
groupMember :: Prelude.Maybe GroupMember,
    -- | The HTTP status of the request.
    CreateGroupMembershipResponse -> Int
status :: Prelude.Int
  }
  deriving (CreateGroupMembershipResponse
-> CreateGroupMembershipResponse -> Bool
(CreateGroupMembershipResponse
 -> CreateGroupMembershipResponse -> Bool)
-> (CreateGroupMembershipResponse
    -> CreateGroupMembershipResponse -> Bool)
-> Eq CreateGroupMembershipResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGroupMembershipResponse
-> CreateGroupMembershipResponse -> Bool
$c/= :: CreateGroupMembershipResponse
-> CreateGroupMembershipResponse -> Bool
== :: CreateGroupMembershipResponse
-> CreateGroupMembershipResponse -> Bool
$c== :: CreateGroupMembershipResponse
-> CreateGroupMembershipResponse -> Bool
Prelude.Eq, ReadPrec [CreateGroupMembershipResponse]
ReadPrec CreateGroupMembershipResponse
Int -> ReadS CreateGroupMembershipResponse
ReadS [CreateGroupMembershipResponse]
(Int -> ReadS CreateGroupMembershipResponse)
-> ReadS [CreateGroupMembershipResponse]
-> ReadPrec CreateGroupMembershipResponse
-> ReadPrec [CreateGroupMembershipResponse]
-> Read CreateGroupMembershipResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGroupMembershipResponse]
$creadListPrec :: ReadPrec [CreateGroupMembershipResponse]
readPrec :: ReadPrec CreateGroupMembershipResponse
$creadPrec :: ReadPrec CreateGroupMembershipResponse
readList :: ReadS [CreateGroupMembershipResponse]
$creadList :: ReadS [CreateGroupMembershipResponse]
readsPrec :: Int -> ReadS CreateGroupMembershipResponse
$creadsPrec :: Int -> ReadS CreateGroupMembershipResponse
Prelude.Read, Int -> CreateGroupMembershipResponse -> ShowS
[CreateGroupMembershipResponse] -> ShowS
CreateGroupMembershipResponse -> String
(Int -> CreateGroupMembershipResponse -> ShowS)
-> (CreateGroupMembershipResponse -> String)
-> ([CreateGroupMembershipResponse] -> ShowS)
-> Show CreateGroupMembershipResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGroupMembershipResponse] -> ShowS
$cshowList :: [CreateGroupMembershipResponse] -> ShowS
show :: CreateGroupMembershipResponse -> String
$cshow :: CreateGroupMembershipResponse -> String
showsPrec :: Int -> CreateGroupMembershipResponse -> ShowS
$cshowsPrec :: Int -> CreateGroupMembershipResponse -> ShowS
Prelude.Show, (forall x.
 CreateGroupMembershipResponse
 -> Rep CreateGroupMembershipResponse x)
-> (forall x.
    Rep CreateGroupMembershipResponse x
    -> CreateGroupMembershipResponse)
-> Generic CreateGroupMembershipResponse
forall x.
Rep CreateGroupMembershipResponse x
-> CreateGroupMembershipResponse
forall x.
CreateGroupMembershipResponse
-> Rep CreateGroupMembershipResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateGroupMembershipResponse x
-> CreateGroupMembershipResponse
$cfrom :: forall x.
CreateGroupMembershipResponse
-> Rep CreateGroupMembershipResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateGroupMembershipResponse' 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:
--
-- 'requestId', 'createGroupMembershipResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'groupMember', 'createGroupMembershipResponse_groupMember' - The group member.
--
-- 'status', 'createGroupMembershipResponse_status' - The HTTP status of the request.
newCreateGroupMembershipResponse ::
  -- | 'status'
  Prelude.Int ->
  CreateGroupMembershipResponse
newCreateGroupMembershipResponse :: Int -> CreateGroupMembershipResponse
newCreateGroupMembershipResponse Int
pStatus_ =
  CreateGroupMembershipResponse' :: Maybe Text
-> Maybe GroupMember -> Int -> CreateGroupMembershipResponse
CreateGroupMembershipResponse'
    { $sel:requestId:CreateGroupMembershipResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:groupMember:CreateGroupMembershipResponse' :: Maybe GroupMember
groupMember = Maybe GroupMember
forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateGroupMembershipResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Web Services request ID for this operation.
createGroupMembershipResponse_requestId :: Lens.Lens' CreateGroupMembershipResponse (Prelude.Maybe Prelude.Text)
createGroupMembershipResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> CreateGroupMembershipResponse -> f CreateGroupMembershipResponse
createGroupMembershipResponse_requestId = (CreateGroupMembershipResponse -> Maybe Text)
-> (CreateGroupMembershipResponse
    -> Maybe Text -> CreateGroupMembershipResponse)
-> Lens
     CreateGroupMembershipResponse
     CreateGroupMembershipResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupMembershipResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateGroupMembershipResponse' :: CreateGroupMembershipResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateGroupMembershipResponse
s@CreateGroupMembershipResponse' {} Maybe Text
a -> CreateGroupMembershipResponse
s {$sel:requestId:CreateGroupMembershipResponse' :: Maybe Text
requestId = Maybe Text
a} :: CreateGroupMembershipResponse)

-- | The group member.
createGroupMembershipResponse_groupMember :: Lens.Lens' CreateGroupMembershipResponse (Prelude.Maybe GroupMember)
createGroupMembershipResponse_groupMember :: (Maybe GroupMember -> f (Maybe GroupMember))
-> CreateGroupMembershipResponse -> f CreateGroupMembershipResponse
createGroupMembershipResponse_groupMember = (CreateGroupMembershipResponse -> Maybe GroupMember)
-> (CreateGroupMembershipResponse
    -> Maybe GroupMember -> CreateGroupMembershipResponse)
-> Lens
     CreateGroupMembershipResponse
     CreateGroupMembershipResponse
     (Maybe GroupMember)
     (Maybe GroupMember)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupMembershipResponse' {Maybe GroupMember
groupMember :: Maybe GroupMember
$sel:groupMember:CreateGroupMembershipResponse' :: CreateGroupMembershipResponse -> Maybe GroupMember
groupMember} -> Maybe GroupMember
groupMember) (\s :: CreateGroupMembershipResponse
s@CreateGroupMembershipResponse' {} Maybe GroupMember
a -> CreateGroupMembershipResponse
s {$sel:groupMember:CreateGroupMembershipResponse' :: Maybe GroupMember
groupMember = Maybe GroupMember
a} :: CreateGroupMembershipResponse)

-- | The HTTP status of the request.
createGroupMembershipResponse_status :: Lens.Lens' CreateGroupMembershipResponse Prelude.Int
createGroupMembershipResponse_status :: (Int -> f Int)
-> CreateGroupMembershipResponse -> f CreateGroupMembershipResponse
createGroupMembershipResponse_status = (CreateGroupMembershipResponse -> Int)
-> (CreateGroupMembershipResponse
    -> Int -> CreateGroupMembershipResponse)
-> Lens
     CreateGroupMembershipResponse CreateGroupMembershipResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupMembershipResponse' {Int
status :: Int
$sel:status:CreateGroupMembershipResponse' :: CreateGroupMembershipResponse -> Int
status} -> Int
status) (\s :: CreateGroupMembershipResponse
s@CreateGroupMembershipResponse' {} Int
a -> CreateGroupMembershipResponse
s {$sel:status:CreateGroupMembershipResponse' :: Int
status = Int
a} :: CreateGroupMembershipResponse)

instance Prelude.NFData CreateGroupMembershipResponse