{-# 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.CreateFolderMembership
-- 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 asset, such as a dashboard, analysis, or dataset into a folder.
module Amazonka.QuickSight.CreateFolderMembership
  ( -- * Creating a Request
    CreateFolderMembership (..),
    newCreateFolderMembership,

    -- * Request Lenses
    createFolderMembership_awsAccountId,
    createFolderMembership_folderId,
    createFolderMembership_memberId,
    createFolderMembership_memberType,

    -- * Destructuring the Response
    CreateFolderMembershipResponse (..),
    newCreateFolderMembershipResponse,

    -- * Response Lenses
    createFolderMembershipResponse_requestId,
    createFolderMembershipResponse_status,
    createFolderMembershipResponse_folderMember,
    createFolderMembershipResponse_httpStatus,
  )
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:/ 'newCreateFolderMembership' smart constructor.
data CreateFolderMembership = CreateFolderMembership'
  { -- | The AWS Account ID.
    CreateFolderMembership -> Text
awsAccountId :: Prelude.Text,
    -- | The folder ID.
    CreateFolderMembership -> Text
folderId :: Prelude.Text,
    -- | The ID of the asset (the dashboard, analysis, or dataset).
    CreateFolderMembership -> Text
memberId :: Prelude.Text,
    -- | The type of the member, including @DASHBOARD@, @ANALYSIS@, and
    -- @DATASET@.
    CreateFolderMembership -> MemberType
memberType :: MemberType
  }
  deriving (CreateFolderMembership -> CreateFolderMembership -> Bool
(CreateFolderMembership -> CreateFolderMembership -> Bool)
-> (CreateFolderMembership -> CreateFolderMembership -> Bool)
-> Eq CreateFolderMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFolderMembership -> CreateFolderMembership -> Bool
$c/= :: CreateFolderMembership -> CreateFolderMembership -> Bool
== :: CreateFolderMembership -> CreateFolderMembership -> Bool
$c== :: CreateFolderMembership -> CreateFolderMembership -> Bool
Prelude.Eq, ReadPrec [CreateFolderMembership]
ReadPrec CreateFolderMembership
Int -> ReadS CreateFolderMembership
ReadS [CreateFolderMembership]
(Int -> ReadS CreateFolderMembership)
-> ReadS [CreateFolderMembership]
-> ReadPrec CreateFolderMembership
-> ReadPrec [CreateFolderMembership]
-> Read CreateFolderMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFolderMembership]
$creadListPrec :: ReadPrec [CreateFolderMembership]
readPrec :: ReadPrec CreateFolderMembership
$creadPrec :: ReadPrec CreateFolderMembership
readList :: ReadS [CreateFolderMembership]
$creadList :: ReadS [CreateFolderMembership]
readsPrec :: Int -> ReadS CreateFolderMembership
$creadsPrec :: Int -> ReadS CreateFolderMembership
Prelude.Read, Int -> CreateFolderMembership -> ShowS
[CreateFolderMembership] -> ShowS
CreateFolderMembership -> String
(Int -> CreateFolderMembership -> ShowS)
-> (CreateFolderMembership -> String)
-> ([CreateFolderMembership] -> ShowS)
-> Show CreateFolderMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFolderMembership] -> ShowS
$cshowList :: [CreateFolderMembership] -> ShowS
show :: CreateFolderMembership -> String
$cshow :: CreateFolderMembership -> String
showsPrec :: Int -> CreateFolderMembership -> ShowS
$cshowsPrec :: Int -> CreateFolderMembership -> ShowS
Prelude.Show, (forall x. CreateFolderMembership -> Rep CreateFolderMembership x)
-> (forall x.
    Rep CreateFolderMembership x -> CreateFolderMembership)
-> Generic CreateFolderMembership
forall x. Rep CreateFolderMembership x -> CreateFolderMembership
forall x. CreateFolderMembership -> Rep CreateFolderMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFolderMembership x -> CreateFolderMembership
$cfrom :: forall x. CreateFolderMembership -> Rep CreateFolderMembership x
Prelude.Generic)

-- |
-- Create a value of 'CreateFolderMembership' 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:
--
-- 'awsAccountId', 'createFolderMembership_awsAccountId' - The AWS Account ID.
--
-- 'folderId', 'createFolderMembership_folderId' - The folder ID.
--
-- 'memberId', 'createFolderMembership_memberId' - The ID of the asset (the dashboard, analysis, or dataset).
--
-- 'memberType', 'createFolderMembership_memberType' - The type of the member, including @DASHBOARD@, @ANALYSIS@, and
-- @DATASET@.
newCreateFolderMembership ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'folderId'
  Prelude.Text ->
  -- | 'memberId'
  Prelude.Text ->
  -- | 'memberType'
  MemberType ->
  CreateFolderMembership
newCreateFolderMembership :: Text -> Text -> Text -> MemberType -> CreateFolderMembership
newCreateFolderMembership
  Text
pAwsAccountId_
  Text
pFolderId_
  Text
pMemberId_
  MemberType
pMemberType_ =
    CreateFolderMembership' :: Text -> Text -> Text -> MemberType -> CreateFolderMembership
CreateFolderMembership'
      { $sel:awsAccountId:CreateFolderMembership' :: Text
awsAccountId =
          Text
pAwsAccountId_,
        $sel:folderId:CreateFolderMembership' :: Text
folderId = Text
pFolderId_,
        $sel:memberId:CreateFolderMembership' :: Text
memberId = Text
pMemberId_,
        $sel:memberType:CreateFolderMembership' :: MemberType
memberType = MemberType
pMemberType_
      }

-- | The AWS Account ID.
createFolderMembership_awsAccountId :: Lens.Lens' CreateFolderMembership Prelude.Text
createFolderMembership_awsAccountId :: (Text -> f Text)
-> CreateFolderMembership -> f CreateFolderMembership
createFolderMembership_awsAccountId = (CreateFolderMembership -> Text)
-> (CreateFolderMembership -> Text -> CreateFolderMembership)
-> Lens CreateFolderMembership CreateFolderMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFolderMembership' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateFolderMembership' :: CreateFolderMembership -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateFolderMembership
s@CreateFolderMembership' {} Text
a -> CreateFolderMembership
s {$sel:awsAccountId:CreateFolderMembership' :: Text
awsAccountId = Text
a} :: CreateFolderMembership)

-- | The folder ID.
createFolderMembership_folderId :: Lens.Lens' CreateFolderMembership Prelude.Text
createFolderMembership_folderId :: (Text -> f Text)
-> CreateFolderMembership -> f CreateFolderMembership
createFolderMembership_folderId = (CreateFolderMembership -> Text)
-> (CreateFolderMembership -> Text -> CreateFolderMembership)
-> Lens CreateFolderMembership CreateFolderMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFolderMembership' {Text
folderId :: Text
$sel:folderId:CreateFolderMembership' :: CreateFolderMembership -> Text
folderId} -> Text
folderId) (\s :: CreateFolderMembership
s@CreateFolderMembership' {} Text
a -> CreateFolderMembership
s {$sel:folderId:CreateFolderMembership' :: Text
folderId = Text
a} :: CreateFolderMembership)

-- | The ID of the asset (the dashboard, analysis, or dataset).
createFolderMembership_memberId :: Lens.Lens' CreateFolderMembership Prelude.Text
createFolderMembership_memberId :: (Text -> f Text)
-> CreateFolderMembership -> f CreateFolderMembership
createFolderMembership_memberId = (CreateFolderMembership -> Text)
-> (CreateFolderMembership -> Text -> CreateFolderMembership)
-> Lens CreateFolderMembership CreateFolderMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFolderMembership' {Text
memberId :: Text
$sel:memberId:CreateFolderMembership' :: CreateFolderMembership -> Text
memberId} -> Text
memberId) (\s :: CreateFolderMembership
s@CreateFolderMembership' {} Text
a -> CreateFolderMembership
s {$sel:memberId:CreateFolderMembership' :: Text
memberId = Text
a} :: CreateFolderMembership)

-- | The type of the member, including @DASHBOARD@, @ANALYSIS@, and
-- @DATASET@.
createFolderMembership_memberType :: Lens.Lens' CreateFolderMembership MemberType
createFolderMembership_memberType :: (MemberType -> f MemberType)
-> CreateFolderMembership -> f CreateFolderMembership
createFolderMembership_memberType = (CreateFolderMembership -> MemberType)
-> (CreateFolderMembership -> MemberType -> CreateFolderMembership)
-> Lens
     CreateFolderMembership CreateFolderMembership MemberType MemberType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFolderMembership' {MemberType
memberType :: MemberType
$sel:memberType:CreateFolderMembership' :: CreateFolderMembership -> MemberType
memberType} -> MemberType
memberType) (\s :: CreateFolderMembership
s@CreateFolderMembership' {} MemberType
a -> CreateFolderMembership
s {$sel:memberType:CreateFolderMembership' :: MemberType
memberType = MemberType
a} :: CreateFolderMembership)

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

instance Prelude.NFData CreateFolderMembership

instance Core.ToHeaders CreateFolderMembership where
  toHeaders :: CreateFolderMembership -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateFolderMembership -> 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 CreateFolderMembership where
  toJSON :: CreateFolderMembership -> Value
toJSON = Value -> CreateFolderMembership -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

instance Core.ToPath CreateFolderMembership where
  toPath :: CreateFolderMembership -> ByteString
toPath CreateFolderMembership' {Text
MemberType
memberType :: MemberType
memberId :: Text
folderId :: Text
awsAccountId :: Text
$sel:memberType:CreateFolderMembership' :: CreateFolderMembership -> MemberType
$sel:memberId:CreateFolderMembership' :: CreateFolderMembership -> Text
$sel:folderId:CreateFolderMembership' :: CreateFolderMembership -> Text
$sel:awsAccountId:CreateFolderMembership' :: CreateFolderMembership -> 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
"/folders/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
folderId,
        ByteString
"/members/",
        MemberType -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS MemberType
memberType,
        ByteString
"/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
memberId
      ]

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

-- | /See:/ 'newCreateFolderMembershipResponse' smart constructor.
data CreateFolderMembershipResponse = CreateFolderMembershipResponse'
  { -- | The request ID.
    CreateFolderMembershipResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The status of the folder membership. If succeeded, the status is
    -- @SC_OK (200)@.
    CreateFolderMembershipResponse -> Maybe Int
status :: Prelude.Maybe Prelude.Int,
    -- | Information about the member in the folder.
    CreateFolderMembershipResponse -> Maybe FolderMember
folderMember :: Prelude.Maybe FolderMember,
    -- | The response's http status code.
    CreateFolderMembershipResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateFolderMembershipResponse
-> CreateFolderMembershipResponse -> Bool
(CreateFolderMembershipResponse
 -> CreateFolderMembershipResponse -> Bool)
-> (CreateFolderMembershipResponse
    -> CreateFolderMembershipResponse -> Bool)
-> Eq CreateFolderMembershipResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFolderMembershipResponse
-> CreateFolderMembershipResponse -> Bool
$c/= :: CreateFolderMembershipResponse
-> CreateFolderMembershipResponse -> Bool
== :: CreateFolderMembershipResponse
-> CreateFolderMembershipResponse -> Bool
$c== :: CreateFolderMembershipResponse
-> CreateFolderMembershipResponse -> Bool
Prelude.Eq, ReadPrec [CreateFolderMembershipResponse]
ReadPrec CreateFolderMembershipResponse
Int -> ReadS CreateFolderMembershipResponse
ReadS [CreateFolderMembershipResponse]
(Int -> ReadS CreateFolderMembershipResponse)
-> ReadS [CreateFolderMembershipResponse]
-> ReadPrec CreateFolderMembershipResponse
-> ReadPrec [CreateFolderMembershipResponse]
-> Read CreateFolderMembershipResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFolderMembershipResponse]
$creadListPrec :: ReadPrec [CreateFolderMembershipResponse]
readPrec :: ReadPrec CreateFolderMembershipResponse
$creadPrec :: ReadPrec CreateFolderMembershipResponse
readList :: ReadS [CreateFolderMembershipResponse]
$creadList :: ReadS [CreateFolderMembershipResponse]
readsPrec :: Int -> ReadS CreateFolderMembershipResponse
$creadsPrec :: Int -> ReadS CreateFolderMembershipResponse
Prelude.Read, Int -> CreateFolderMembershipResponse -> ShowS
[CreateFolderMembershipResponse] -> ShowS
CreateFolderMembershipResponse -> String
(Int -> CreateFolderMembershipResponse -> ShowS)
-> (CreateFolderMembershipResponse -> String)
-> ([CreateFolderMembershipResponse] -> ShowS)
-> Show CreateFolderMembershipResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFolderMembershipResponse] -> ShowS
$cshowList :: [CreateFolderMembershipResponse] -> ShowS
show :: CreateFolderMembershipResponse -> String
$cshow :: CreateFolderMembershipResponse -> String
showsPrec :: Int -> CreateFolderMembershipResponse -> ShowS
$cshowsPrec :: Int -> CreateFolderMembershipResponse -> ShowS
Prelude.Show, (forall x.
 CreateFolderMembershipResponse
 -> Rep CreateFolderMembershipResponse x)
-> (forall x.
    Rep CreateFolderMembershipResponse x
    -> CreateFolderMembershipResponse)
-> Generic CreateFolderMembershipResponse
forall x.
Rep CreateFolderMembershipResponse x
-> CreateFolderMembershipResponse
forall x.
CreateFolderMembershipResponse
-> Rep CreateFolderMembershipResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFolderMembershipResponse x
-> CreateFolderMembershipResponse
$cfrom :: forall x.
CreateFolderMembershipResponse
-> Rep CreateFolderMembershipResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateFolderMembershipResponse' 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', 'createFolderMembershipResponse_requestId' - The request ID.
--
-- 'status', 'createFolderMembershipResponse_status' - The status of the folder membership. If succeeded, the status is
-- @SC_OK (200)@.
--
-- 'folderMember', 'createFolderMembershipResponse_folderMember' - Information about the member in the folder.
--
-- 'httpStatus', 'createFolderMembershipResponse_httpStatus' - The response's http status code.
newCreateFolderMembershipResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateFolderMembershipResponse
newCreateFolderMembershipResponse :: Int -> CreateFolderMembershipResponse
newCreateFolderMembershipResponse Int
pHttpStatus_ =
  CreateFolderMembershipResponse' :: Maybe Text
-> Maybe Int
-> Maybe FolderMember
-> Int
-> CreateFolderMembershipResponse
CreateFolderMembershipResponse'
    { $sel:requestId:CreateFolderMembershipResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateFolderMembershipResponse' :: Maybe Int
status = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:folderMember:CreateFolderMembershipResponse' :: Maybe FolderMember
folderMember = Maybe FolderMember
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateFolderMembershipResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The request ID.
createFolderMembershipResponse_requestId :: Lens.Lens' CreateFolderMembershipResponse (Prelude.Maybe Prelude.Text)
createFolderMembershipResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> CreateFolderMembershipResponse
-> f CreateFolderMembershipResponse
createFolderMembershipResponse_requestId = (CreateFolderMembershipResponse -> Maybe Text)
-> (CreateFolderMembershipResponse
    -> Maybe Text -> CreateFolderMembershipResponse)
-> Lens
     CreateFolderMembershipResponse
     CreateFolderMembershipResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFolderMembershipResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateFolderMembershipResponse' :: CreateFolderMembershipResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateFolderMembershipResponse
s@CreateFolderMembershipResponse' {} Maybe Text
a -> CreateFolderMembershipResponse
s {$sel:requestId:CreateFolderMembershipResponse' :: Maybe Text
requestId = Maybe Text
a} :: CreateFolderMembershipResponse)

-- | The status of the folder membership. If succeeded, the status is
-- @SC_OK (200)@.
createFolderMembershipResponse_status :: Lens.Lens' CreateFolderMembershipResponse (Prelude.Maybe Prelude.Int)
createFolderMembershipResponse_status :: (Maybe Int -> f (Maybe Int))
-> CreateFolderMembershipResponse
-> f CreateFolderMembershipResponse
createFolderMembershipResponse_status = (CreateFolderMembershipResponse -> Maybe Int)
-> (CreateFolderMembershipResponse
    -> Maybe Int -> CreateFolderMembershipResponse)
-> Lens
     CreateFolderMembershipResponse
     CreateFolderMembershipResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFolderMembershipResponse' {Maybe Int
status :: Maybe Int
$sel:status:CreateFolderMembershipResponse' :: CreateFolderMembershipResponse -> Maybe Int
status} -> Maybe Int
status) (\s :: CreateFolderMembershipResponse
s@CreateFolderMembershipResponse' {} Maybe Int
a -> CreateFolderMembershipResponse
s {$sel:status:CreateFolderMembershipResponse' :: Maybe Int
status = Maybe Int
a} :: CreateFolderMembershipResponse)

-- | Information about the member in the folder.
createFolderMembershipResponse_folderMember :: Lens.Lens' CreateFolderMembershipResponse (Prelude.Maybe FolderMember)
createFolderMembershipResponse_folderMember :: (Maybe FolderMember -> f (Maybe FolderMember))
-> CreateFolderMembershipResponse
-> f CreateFolderMembershipResponse
createFolderMembershipResponse_folderMember = (CreateFolderMembershipResponse -> Maybe FolderMember)
-> (CreateFolderMembershipResponse
    -> Maybe FolderMember -> CreateFolderMembershipResponse)
-> Lens
     CreateFolderMembershipResponse
     CreateFolderMembershipResponse
     (Maybe FolderMember)
     (Maybe FolderMember)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFolderMembershipResponse' {Maybe FolderMember
folderMember :: Maybe FolderMember
$sel:folderMember:CreateFolderMembershipResponse' :: CreateFolderMembershipResponse -> Maybe FolderMember
folderMember} -> Maybe FolderMember
folderMember) (\s :: CreateFolderMembershipResponse
s@CreateFolderMembershipResponse' {} Maybe FolderMember
a -> CreateFolderMembershipResponse
s {$sel:folderMember:CreateFolderMembershipResponse' :: Maybe FolderMember
folderMember = Maybe FolderMember
a} :: CreateFolderMembershipResponse)

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

instance
  Prelude.NFData
    CreateFolderMembershipResponse