{-# 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.Chime.ListRoomMemberships
-- 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)
--
-- Lists the membership details for the specified room in an Amazon Chime
-- Enterprise account, such as the members\' IDs, email addresses, and
-- names.
module Amazonka.Chime.ListRoomMemberships
  ( -- * Creating a Request
    ListRoomMemberships (..),
    newListRoomMemberships,

    -- * Request Lenses
    listRoomMemberships_nextToken,
    listRoomMemberships_maxResults,
    listRoomMemberships_accountId,
    listRoomMemberships_roomId,

    -- * Destructuring the Response
    ListRoomMembershipsResponse (..),
    newListRoomMembershipsResponse,

    -- * Response Lenses
    listRoomMembershipsResponse_nextToken,
    listRoomMembershipsResponse_roomMemberships,
    listRoomMembershipsResponse_httpStatus,
  )
where

import Amazonka.Chime.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:/ 'newListRoomMemberships' smart constructor.
data ListRoomMemberships = ListRoomMemberships'
  { -- | The token to use to retrieve the next page of results.
    ListRoomMemberships -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in a single call.
    ListRoomMemberships -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Chime account ID.
    ListRoomMemberships -> Text
accountId :: Prelude.Text,
    -- | The room ID.
    ListRoomMemberships -> Text
roomId :: Prelude.Text
  }
  deriving (ListRoomMemberships -> ListRoomMemberships -> Bool
(ListRoomMemberships -> ListRoomMemberships -> Bool)
-> (ListRoomMemberships -> ListRoomMemberships -> Bool)
-> Eq ListRoomMemberships
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRoomMemberships -> ListRoomMemberships -> Bool
$c/= :: ListRoomMemberships -> ListRoomMemberships -> Bool
== :: ListRoomMemberships -> ListRoomMemberships -> Bool
$c== :: ListRoomMemberships -> ListRoomMemberships -> Bool
Prelude.Eq, ReadPrec [ListRoomMemberships]
ReadPrec ListRoomMemberships
Int -> ReadS ListRoomMemberships
ReadS [ListRoomMemberships]
(Int -> ReadS ListRoomMemberships)
-> ReadS [ListRoomMemberships]
-> ReadPrec ListRoomMemberships
-> ReadPrec [ListRoomMemberships]
-> Read ListRoomMemberships
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRoomMemberships]
$creadListPrec :: ReadPrec [ListRoomMemberships]
readPrec :: ReadPrec ListRoomMemberships
$creadPrec :: ReadPrec ListRoomMemberships
readList :: ReadS [ListRoomMemberships]
$creadList :: ReadS [ListRoomMemberships]
readsPrec :: Int -> ReadS ListRoomMemberships
$creadsPrec :: Int -> ReadS ListRoomMemberships
Prelude.Read, Int -> ListRoomMemberships -> ShowS
[ListRoomMemberships] -> ShowS
ListRoomMemberships -> String
(Int -> ListRoomMemberships -> ShowS)
-> (ListRoomMemberships -> String)
-> ([ListRoomMemberships] -> ShowS)
-> Show ListRoomMemberships
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRoomMemberships] -> ShowS
$cshowList :: [ListRoomMemberships] -> ShowS
show :: ListRoomMemberships -> String
$cshow :: ListRoomMemberships -> String
showsPrec :: Int -> ListRoomMemberships -> ShowS
$cshowsPrec :: Int -> ListRoomMemberships -> ShowS
Prelude.Show, (forall x. ListRoomMemberships -> Rep ListRoomMemberships x)
-> (forall x. Rep ListRoomMemberships x -> ListRoomMemberships)
-> Generic ListRoomMemberships
forall x. Rep ListRoomMemberships x -> ListRoomMemberships
forall x. ListRoomMemberships -> Rep ListRoomMemberships x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRoomMemberships x -> ListRoomMemberships
$cfrom :: forall x. ListRoomMemberships -> Rep ListRoomMemberships x
Prelude.Generic)

-- |
-- Create a value of 'ListRoomMemberships' 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:
--
-- 'nextToken', 'listRoomMemberships_nextToken' - The token to use to retrieve the next page of results.
--
-- 'maxResults', 'listRoomMemberships_maxResults' - The maximum number of results to return in a single call.
--
-- 'accountId', 'listRoomMemberships_accountId' - The Amazon Chime account ID.
--
-- 'roomId', 'listRoomMemberships_roomId' - The room ID.
newListRoomMemberships ::
  -- | 'accountId'
  Prelude.Text ->
  -- | 'roomId'
  Prelude.Text ->
  ListRoomMemberships
newListRoomMemberships :: Text -> Text -> ListRoomMemberships
newListRoomMemberships Text
pAccountId_ Text
pRoomId_ =
  ListRoomMemberships' :: Maybe Text -> Maybe Natural -> Text -> Text -> ListRoomMemberships
ListRoomMemberships'
    { $sel:nextToken:ListRoomMemberships' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListRoomMemberships' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:ListRoomMemberships' :: Text
accountId = Text
pAccountId_,
      $sel:roomId:ListRoomMemberships' :: Text
roomId = Text
pRoomId_
    }

-- | The token to use to retrieve the next page of results.
listRoomMemberships_nextToken :: Lens.Lens' ListRoomMemberships (Prelude.Maybe Prelude.Text)
listRoomMemberships_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRoomMemberships -> f ListRoomMemberships
listRoomMemberships_nextToken = (ListRoomMemberships -> Maybe Text)
-> (ListRoomMemberships -> Maybe Text -> ListRoomMemberships)
-> Lens
     ListRoomMemberships ListRoomMemberships (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoomMemberships' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRoomMemberships' :: ListRoomMemberships -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRoomMemberships
s@ListRoomMemberships' {} Maybe Text
a -> ListRoomMemberships
s {$sel:nextToken:ListRoomMemberships' :: Maybe Text
nextToken = Maybe Text
a} :: ListRoomMemberships)

-- | The maximum number of results to return in a single call.
listRoomMemberships_maxResults :: Lens.Lens' ListRoomMemberships (Prelude.Maybe Prelude.Natural)
listRoomMemberships_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListRoomMemberships -> f ListRoomMemberships
listRoomMemberships_maxResults = (ListRoomMemberships -> Maybe Natural)
-> (ListRoomMemberships -> Maybe Natural -> ListRoomMemberships)
-> Lens
     ListRoomMemberships
     ListRoomMemberships
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoomMemberships' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRoomMemberships' :: ListRoomMemberships -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRoomMemberships
s@ListRoomMemberships' {} Maybe Natural
a -> ListRoomMemberships
s {$sel:maxResults:ListRoomMemberships' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRoomMemberships)

-- | The Amazon Chime account ID.
listRoomMemberships_accountId :: Lens.Lens' ListRoomMemberships Prelude.Text
listRoomMemberships_accountId :: (Text -> f Text) -> ListRoomMemberships -> f ListRoomMemberships
listRoomMemberships_accountId = (ListRoomMemberships -> Text)
-> (ListRoomMemberships -> Text -> ListRoomMemberships)
-> Lens ListRoomMemberships ListRoomMemberships Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoomMemberships' {Text
accountId :: Text
$sel:accountId:ListRoomMemberships' :: ListRoomMemberships -> Text
accountId} -> Text
accountId) (\s :: ListRoomMemberships
s@ListRoomMemberships' {} Text
a -> ListRoomMemberships
s {$sel:accountId:ListRoomMemberships' :: Text
accountId = Text
a} :: ListRoomMemberships)

-- | The room ID.
listRoomMemberships_roomId :: Lens.Lens' ListRoomMemberships Prelude.Text
listRoomMemberships_roomId :: (Text -> f Text) -> ListRoomMemberships -> f ListRoomMemberships
listRoomMemberships_roomId = (ListRoomMemberships -> Text)
-> (ListRoomMemberships -> Text -> ListRoomMemberships)
-> Lens ListRoomMemberships ListRoomMemberships Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoomMemberships' {Text
roomId :: Text
$sel:roomId:ListRoomMemberships' :: ListRoomMemberships -> Text
roomId} -> Text
roomId) (\s :: ListRoomMemberships
s@ListRoomMemberships' {} Text
a -> ListRoomMemberships
s {$sel:roomId:ListRoomMemberships' :: Text
roomId = Text
a} :: ListRoomMemberships)

instance Core.AWSRequest ListRoomMemberships where
  type
    AWSResponse ListRoomMemberships =
      ListRoomMembershipsResponse
  request :: ListRoomMemberships -> Request ListRoomMemberships
request = Service -> ListRoomMemberships -> Request ListRoomMemberships
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListRoomMemberships
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRoomMemberships)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListRoomMemberships))
-> Logger
-> Service
-> Proxy ListRoomMemberships
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRoomMemberships)))
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 [RoomMembership] -> Int -> ListRoomMembershipsResponse
ListRoomMembershipsResponse'
            (Maybe Text
 -> Maybe [RoomMembership] -> Int -> ListRoomMembershipsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [RoomMembership] -> Int -> ListRoomMembershipsResponse)
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
"NextToken")
            Either
  String
  (Maybe [RoomMembership] -> Int -> ListRoomMembershipsResponse)
-> Either String (Maybe [RoomMembership])
-> Either String (Int -> ListRoomMembershipsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [RoomMembership]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RoomMemberships"
                            Either String (Maybe (Maybe [RoomMembership]))
-> Maybe [RoomMembership] -> Either String (Maybe [RoomMembership])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RoomMembership]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListRoomMembershipsResponse)
-> Either String Int -> Either String ListRoomMembershipsResponse
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 ListRoomMemberships

instance Prelude.NFData ListRoomMemberships

instance Core.ToHeaders ListRoomMemberships where
  toHeaders :: ListRoomMemberships -> ResponseHeaders
toHeaders = ResponseHeaders -> ListRoomMemberships -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ListRoomMemberships where
  toPath :: ListRoomMemberships -> ByteString
toPath ListRoomMemberships' {Maybe Natural
Maybe Text
Text
roomId :: Text
accountId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:roomId:ListRoomMemberships' :: ListRoomMemberships -> Text
$sel:accountId:ListRoomMemberships' :: ListRoomMemberships -> Text
$sel:maxResults:ListRoomMemberships' :: ListRoomMemberships -> Maybe Natural
$sel:nextToken:ListRoomMemberships' :: ListRoomMemberships -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
accountId,
        ByteString
"/rooms/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
roomId,
        ByteString
"/memberships"
      ]

instance Core.ToQuery ListRoomMemberships where
  toQuery :: ListRoomMemberships -> QueryString
toQuery ListRoomMemberships' {Maybe Natural
Maybe Text
Text
roomId :: Text
accountId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:roomId:ListRoomMemberships' :: ListRoomMemberships -> Text
$sel:accountId:ListRoomMemberships' :: ListRoomMemberships -> Text
$sel:maxResults:ListRoomMemberships' :: ListRoomMemberships -> Maybe Natural
$sel:nextToken:ListRoomMemberships' :: ListRoomMemberships -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"next-token" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"max-results" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListRoomMembershipsResponse' smart constructor.
data ListRoomMembershipsResponse = ListRoomMembershipsResponse'
  { -- | The token to use to retrieve the next page of results.
    ListRoomMembershipsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The room membership details.
    ListRoomMembershipsResponse -> Maybe [RoomMembership]
roomMemberships :: Prelude.Maybe [RoomMembership],
    -- | The response's http status code.
    ListRoomMembershipsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRoomMembershipsResponse -> ListRoomMembershipsResponse -> Bool
(ListRoomMembershipsResponse
 -> ListRoomMembershipsResponse -> Bool)
-> (ListRoomMembershipsResponse
    -> ListRoomMembershipsResponse -> Bool)
-> Eq ListRoomMembershipsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRoomMembershipsResponse -> ListRoomMembershipsResponse -> Bool
$c/= :: ListRoomMembershipsResponse -> ListRoomMembershipsResponse -> Bool
== :: ListRoomMembershipsResponse -> ListRoomMembershipsResponse -> Bool
$c== :: ListRoomMembershipsResponse -> ListRoomMembershipsResponse -> Bool
Prelude.Eq, Int -> ListRoomMembershipsResponse -> ShowS
[ListRoomMembershipsResponse] -> ShowS
ListRoomMembershipsResponse -> String
(Int -> ListRoomMembershipsResponse -> ShowS)
-> (ListRoomMembershipsResponse -> String)
-> ([ListRoomMembershipsResponse] -> ShowS)
-> Show ListRoomMembershipsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRoomMembershipsResponse] -> ShowS
$cshowList :: [ListRoomMembershipsResponse] -> ShowS
show :: ListRoomMembershipsResponse -> String
$cshow :: ListRoomMembershipsResponse -> String
showsPrec :: Int -> ListRoomMembershipsResponse -> ShowS
$cshowsPrec :: Int -> ListRoomMembershipsResponse -> ShowS
Prelude.Show, (forall x.
 ListRoomMembershipsResponse -> Rep ListRoomMembershipsResponse x)
-> (forall x.
    Rep ListRoomMembershipsResponse x -> ListRoomMembershipsResponse)
-> Generic ListRoomMembershipsResponse
forall x.
Rep ListRoomMembershipsResponse x -> ListRoomMembershipsResponse
forall x.
ListRoomMembershipsResponse -> Rep ListRoomMembershipsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRoomMembershipsResponse x -> ListRoomMembershipsResponse
$cfrom :: forall x.
ListRoomMembershipsResponse -> Rep ListRoomMembershipsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRoomMembershipsResponse' 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:
--
-- 'nextToken', 'listRoomMembershipsResponse_nextToken' - The token to use to retrieve the next page of results.
--
-- 'roomMemberships', 'listRoomMembershipsResponse_roomMemberships' - The room membership details.
--
-- 'httpStatus', 'listRoomMembershipsResponse_httpStatus' - The response's http status code.
newListRoomMembershipsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRoomMembershipsResponse
newListRoomMembershipsResponse :: Int -> ListRoomMembershipsResponse
newListRoomMembershipsResponse Int
pHttpStatus_ =
  ListRoomMembershipsResponse' :: Maybe Text
-> Maybe [RoomMembership] -> Int -> ListRoomMembershipsResponse
ListRoomMembershipsResponse'
    { $sel:nextToken:ListRoomMembershipsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roomMemberships:ListRoomMembershipsResponse' :: Maybe [RoomMembership]
roomMemberships = Maybe [RoomMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRoomMembershipsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to retrieve the next page of results.
listRoomMembershipsResponse_nextToken :: Lens.Lens' ListRoomMembershipsResponse (Prelude.Maybe Prelude.Text)
listRoomMembershipsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRoomMembershipsResponse -> f ListRoomMembershipsResponse
listRoomMembershipsResponse_nextToken = (ListRoomMembershipsResponse -> Maybe Text)
-> (ListRoomMembershipsResponse
    -> Maybe Text -> ListRoomMembershipsResponse)
-> Lens
     ListRoomMembershipsResponse
     ListRoomMembershipsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoomMembershipsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRoomMembershipsResponse' :: ListRoomMembershipsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRoomMembershipsResponse
s@ListRoomMembershipsResponse' {} Maybe Text
a -> ListRoomMembershipsResponse
s {$sel:nextToken:ListRoomMembershipsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRoomMembershipsResponse)

-- | The room membership details.
listRoomMembershipsResponse_roomMemberships :: Lens.Lens' ListRoomMembershipsResponse (Prelude.Maybe [RoomMembership])
listRoomMembershipsResponse_roomMemberships :: (Maybe [RoomMembership] -> f (Maybe [RoomMembership]))
-> ListRoomMembershipsResponse -> f ListRoomMembershipsResponse
listRoomMembershipsResponse_roomMemberships = (ListRoomMembershipsResponse -> Maybe [RoomMembership])
-> (ListRoomMembershipsResponse
    -> Maybe [RoomMembership] -> ListRoomMembershipsResponse)
-> Lens
     ListRoomMembershipsResponse
     ListRoomMembershipsResponse
     (Maybe [RoomMembership])
     (Maybe [RoomMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoomMembershipsResponse' {Maybe [RoomMembership]
roomMemberships :: Maybe [RoomMembership]
$sel:roomMemberships:ListRoomMembershipsResponse' :: ListRoomMembershipsResponse -> Maybe [RoomMembership]
roomMemberships} -> Maybe [RoomMembership]
roomMemberships) (\s :: ListRoomMembershipsResponse
s@ListRoomMembershipsResponse' {} Maybe [RoomMembership]
a -> ListRoomMembershipsResponse
s {$sel:roomMemberships:ListRoomMembershipsResponse' :: Maybe [RoomMembership]
roomMemberships = Maybe [RoomMembership]
a} :: ListRoomMembershipsResponse) ((Maybe [RoomMembership] -> f (Maybe [RoomMembership]))
 -> ListRoomMembershipsResponse -> f ListRoomMembershipsResponse)
-> ((Maybe [RoomMembership] -> f (Maybe [RoomMembership]))
    -> Maybe [RoomMembership] -> f (Maybe [RoomMembership]))
-> (Maybe [RoomMembership] -> f (Maybe [RoomMembership]))
-> ListRoomMembershipsResponse
-> f ListRoomMembershipsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RoomMembership] [RoomMembership] [RoomMembership] [RoomMembership]
-> Iso
     (Maybe [RoomMembership])
     (Maybe [RoomMembership])
     (Maybe [RoomMembership])
     (Maybe [RoomMembership])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [RoomMembership] [RoomMembership] [RoomMembership] [RoomMembership]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListRoomMembershipsResponse