{-# 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.Nimble.ListLaunchProfileMembers
-- 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)
--
-- Get all users in a given launch profile membership.
--
-- This operation returns paginated results.
module Amazonka.Nimble.ListLaunchProfileMembers
  ( -- * Creating a Request
    ListLaunchProfileMembers (..),
    newListLaunchProfileMembers,

    -- * Request Lenses
    listLaunchProfileMembers_nextToken,
    listLaunchProfileMembers_maxResults,
    listLaunchProfileMembers_studioId,
    listLaunchProfileMembers_launchProfileId,

    -- * Destructuring the Response
    ListLaunchProfileMembersResponse (..),
    newListLaunchProfileMembersResponse,

    -- * Response Lenses
    listLaunchProfileMembersResponse_members,
    listLaunchProfileMembersResponse_nextToken,
    listLaunchProfileMembersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListLaunchProfileMembers' smart constructor.
data ListLaunchProfileMembers = ListLaunchProfileMembers'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListLaunchProfileMembers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request.
    ListLaunchProfileMembers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The studio ID.
    ListLaunchProfileMembers -> Text
studioId :: Prelude.Text,
    -- | The launch profile ID.
    ListLaunchProfileMembers -> Text
launchProfileId :: Prelude.Text
  }
  deriving (ListLaunchProfileMembers -> ListLaunchProfileMembers -> Bool
(ListLaunchProfileMembers -> ListLaunchProfileMembers -> Bool)
-> (ListLaunchProfileMembers -> ListLaunchProfileMembers -> Bool)
-> Eq ListLaunchProfileMembers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLaunchProfileMembers -> ListLaunchProfileMembers -> Bool
$c/= :: ListLaunchProfileMembers -> ListLaunchProfileMembers -> Bool
== :: ListLaunchProfileMembers -> ListLaunchProfileMembers -> Bool
$c== :: ListLaunchProfileMembers -> ListLaunchProfileMembers -> Bool
Prelude.Eq, ReadPrec [ListLaunchProfileMembers]
ReadPrec ListLaunchProfileMembers
Int -> ReadS ListLaunchProfileMembers
ReadS [ListLaunchProfileMembers]
(Int -> ReadS ListLaunchProfileMembers)
-> ReadS [ListLaunchProfileMembers]
-> ReadPrec ListLaunchProfileMembers
-> ReadPrec [ListLaunchProfileMembers]
-> Read ListLaunchProfileMembers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLaunchProfileMembers]
$creadListPrec :: ReadPrec [ListLaunchProfileMembers]
readPrec :: ReadPrec ListLaunchProfileMembers
$creadPrec :: ReadPrec ListLaunchProfileMembers
readList :: ReadS [ListLaunchProfileMembers]
$creadList :: ReadS [ListLaunchProfileMembers]
readsPrec :: Int -> ReadS ListLaunchProfileMembers
$creadsPrec :: Int -> ReadS ListLaunchProfileMembers
Prelude.Read, Int -> ListLaunchProfileMembers -> ShowS
[ListLaunchProfileMembers] -> ShowS
ListLaunchProfileMembers -> String
(Int -> ListLaunchProfileMembers -> ShowS)
-> (ListLaunchProfileMembers -> String)
-> ([ListLaunchProfileMembers] -> ShowS)
-> Show ListLaunchProfileMembers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLaunchProfileMembers] -> ShowS
$cshowList :: [ListLaunchProfileMembers] -> ShowS
show :: ListLaunchProfileMembers -> String
$cshow :: ListLaunchProfileMembers -> String
showsPrec :: Int -> ListLaunchProfileMembers -> ShowS
$cshowsPrec :: Int -> ListLaunchProfileMembers -> ShowS
Prelude.Show, (forall x.
 ListLaunchProfileMembers -> Rep ListLaunchProfileMembers x)
-> (forall x.
    Rep ListLaunchProfileMembers x -> ListLaunchProfileMembers)
-> Generic ListLaunchProfileMembers
forall x.
Rep ListLaunchProfileMembers x -> ListLaunchProfileMembers
forall x.
ListLaunchProfileMembers -> Rep ListLaunchProfileMembers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLaunchProfileMembers x -> ListLaunchProfileMembers
$cfrom :: forall x.
ListLaunchProfileMembers -> Rep ListLaunchProfileMembers x
Prelude.Generic)

-- |
-- Create a value of 'ListLaunchProfileMembers' 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', 'listLaunchProfileMembers_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'maxResults', 'listLaunchProfileMembers_maxResults' - The maximum number of results to be returned per request.
--
-- 'studioId', 'listLaunchProfileMembers_studioId' - The studio ID.
--
-- 'launchProfileId', 'listLaunchProfileMembers_launchProfileId' - The launch profile ID.
newListLaunchProfileMembers ::
  -- | 'studioId'
  Prelude.Text ->
  -- | 'launchProfileId'
  Prelude.Text ->
  ListLaunchProfileMembers
newListLaunchProfileMembers :: Text -> Text -> ListLaunchProfileMembers
newListLaunchProfileMembers
  Text
pStudioId_
  Text
pLaunchProfileId_ =
    ListLaunchProfileMembers' :: Maybe Text
-> Maybe Natural -> Text -> Text -> ListLaunchProfileMembers
ListLaunchProfileMembers'
      { $sel:nextToken:ListLaunchProfileMembers' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListLaunchProfileMembers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:studioId:ListLaunchProfileMembers' :: Text
studioId = Text
pStudioId_,
        $sel:launchProfileId:ListLaunchProfileMembers' :: Text
launchProfileId = Text
pLaunchProfileId_
      }

-- | The token for the next set of results, or null if there are no more
-- results.
listLaunchProfileMembers_nextToken :: Lens.Lens' ListLaunchProfileMembers (Prelude.Maybe Prelude.Text)
listLaunchProfileMembers_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLaunchProfileMembers -> f ListLaunchProfileMembers
listLaunchProfileMembers_nextToken = (ListLaunchProfileMembers -> Maybe Text)
-> (ListLaunchProfileMembers
    -> Maybe Text -> ListLaunchProfileMembers)
-> Lens
     ListLaunchProfileMembers
     ListLaunchProfileMembers
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfileMembers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLaunchProfileMembers
s@ListLaunchProfileMembers' {} Maybe Text
a -> ListLaunchProfileMembers
s {$sel:nextToken:ListLaunchProfileMembers' :: Maybe Text
nextToken = Maybe Text
a} :: ListLaunchProfileMembers)

-- | The maximum number of results to be returned per request.
listLaunchProfileMembers_maxResults :: Lens.Lens' ListLaunchProfileMembers (Prelude.Maybe Prelude.Natural)
listLaunchProfileMembers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListLaunchProfileMembers -> f ListLaunchProfileMembers
listLaunchProfileMembers_maxResults = (ListLaunchProfileMembers -> Maybe Natural)
-> (ListLaunchProfileMembers
    -> Maybe Natural -> ListLaunchProfileMembers)
-> Lens
     ListLaunchProfileMembers
     ListLaunchProfileMembers
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfileMembers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLaunchProfileMembers
s@ListLaunchProfileMembers' {} Maybe Natural
a -> ListLaunchProfileMembers
s {$sel:maxResults:ListLaunchProfileMembers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLaunchProfileMembers)

-- | The studio ID.
listLaunchProfileMembers_studioId :: Lens.Lens' ListLaunchProfileMembers Prelude.Text
listLaunchProfileMembers_studioId :: (Text -> f Text)
-> ListLaunchProfileMembers -> f ListLaunchProfileMembers
listLaunchProfileMembers_studioId = (ListLaunchProfileMembers -> Text)
-> (ListLaunchProfileMembers -> Text -> ListLaunchProfileMembers)
-> Lens ListLaunchProfileMembers ListLaunchProfileMembers Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfileMembers' {Text
studioId :: Text
$sel:studioId:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Text
studioId} -> Text
studioId) (\s :: ListLaunchProfileMembers
s@ListLaunchProfileMembers' {} Text
a -> ListLaunchProfileMembers
s {$sel:studioId:ListLaunchProfileMembers' :: Text
studioId = Text
a} :: ListLaunchProfileMembers)

-- | The launch profile ID.
listLaunchProfileMembers_launchProfileId :: Lens.Lens' ListLaunchProfileMembers Prelude.Text
listLaunchProfileMembers_launchProfileId :: (Text -> f Text)
-> ListLaunchProfileMembers -> f ListLaunchProfileMembers
listLaunchProfileMembers_launchProfileId = (ListLaunchProfileMembers -> Text)
-> (ListLaunchProfileMembers -> Text -> ListLaunchProfileMembers)
-> Lens ListLaunchProfileMembers ListLaunchProfileMembers Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfileMembers' {Text
launchProfileId :: Text
$sel:launchProfileId:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Text
launchProfileId} -> Text
launchProfileId) (\s :: ListLaunchProfileMembers
s@ListLaunchProfileMembers' {} Text
a -> ListLaunchProfileMembers
s {$sel:launchProfileId:ListLaunchProfileMembers' :: Text
launchProfileId = Text
a} :: ListLaunchProfileMembers)

instance Core.AWSPager ListLaunchProfileMembers where
  page :: ListLaunchProfileMembers
-> AWSResponse ListLaunchProfileMembers
-> Maybe ListLaunchProfileMembers
page ListLaunchProfileMembers
rq AWSResponse ListLaunchProfileMembers
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLaunchProfileMembers
ListLaunchProfileMembersResponse
rs
            ListLaunchProfileMembersResponse
-> Getting (First Text) ListLaunchProfileMembersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLaunchProfileMembersResponse
-> Const (First Text) ListLaunchProfileMembersResponse
Lens' ListLaunchProfileMembersResponse (Maybe Text)
listLaunchProfileMembersResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListLaunchProfileMembersResponse
 -> Const (First Text) ListLaunchProfileMembersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLaunchProfileMembersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListLaunchProfileMembers
forall a. Maybe a
Prelude.Nothing
    | Maybe [LaunchProfileMembership] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLaunchProfileMembers
ListLaunchProfileMembersResponse
rs
            ListLaunchProfileMembersResponse
-> Getting
     (First [LaunchProfileMembership])
     ListLaunchProfileMembersResponse
     [LaunchProfileMembership]
-> Maybe [LaunchProfileMembership]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [LaunchProfileMembership]
 -> Const
      (First [LaunchProfileMembership])
      (Maybe [LaunchProfileMembership]))
-> ListLaunchProfileMembersResponse
-> Const
     (First [LaunchProfileMembership]) ListLaunchProfileMembersResponse
Lens'
  ListLaunchProfileMembersResponse (Maybe [LaunchProfileMembership])
listLaunchProfileMembersResponse_members
              ((Maybe [LaunchProfileMembership]
  -> Const
       (First [LaunchProfileMembership])
       (Maybe [LaunchProfileMembership]))
 -> ListLaunchProfileMembersResponse
 -> Const
      (First [LaunchProfileMembership]) ListLaunchProfileMembersResponse)
-> (([LaunchProfileMembership]
     -> Const
          (First [LaunchProfileMembership]) [LaunchProfileMembership])
    -> Maybe [LaunchProfileMembership]
    -> Const
         (First [LaunchProfileMembership])
         (Maybe [LaunchProfileMembership]))
-> Getting
     (First [LaunchProfileMembership])
     ListLaunchProfileMembersResponse
     [LaunchProfileMembership]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([LaunchProfileMembership]
 -> Const
      (First [LaunchProfileMembership]) [LaunchProfileMembership])
-> Maybe [LaunchProfileMembership]
-> Const
     (First [LaunchProfileMembership]) (Maybe [LaunchProfileMembership])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListLaunchProfileMembers
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListLaunchProfileMembers -> Maybe ListLaunchProfileMembers
forall a. a -> Maybe a
Prelude.Just (ListLaunchProfileMembers -> Maybe ListLaunchProfileMembers)
-> ListLaunchProfileMembers -> Maybe ListLaunchProfileMembers
forall a b. (a -> b) -> a -> b
Prelude.$
        ListLaunchProfileMembers
rq
          ListLaunchProfileMembers
-> (ListLaunchProfileMembers -> ListLaunchProfileMembers)
-> ListLaunchProfileMembers
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListLaunchProfileMembers -> Identity ListLaunchProfileMembers
Lens
  ListLaunchProfileMembers
  ListLaunchProfileMembers
  (Maybe Text)
  (Maybe Text)
listLaunchProfileMembers_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListLaunchProfileMembers -> Identity ListLaunchProfileMembers)
-> Maybe Text
-> ListLaunchProfileMembers
-> ListLaunchProfileMembers
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListLaunchProfileMembers
ListLaunchProfileMembersResponse
rs
          ListLaunchProfileMembersResponse
-> Getting (First Text) ListLaunchProfileMembersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLaunchProfileMembersResponse
-> Const (First Text) ListLaunchProfileMembersResponse
Lens' ListLaunchProfileMembersResponse (Maybe Text)
listLaunchProfileMembersResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListLaunchProfileMembersResponse
 -> Const (First Text) ListLaunchProfileMembersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLaunchProfileMembersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData ListLaunchProfileMembers

instance Core.ToHeaders ListLaunchProfileMembers where
  toHeaders :: ListLaunchProfileMembers -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListLaunchProfileMembers -> 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.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath ListLaunchProfileMembers where
  toPath :: ListLaunchProfileMembers -> ByteString
toPath ListLaunchProfileMembers' {Maybe Natural
Maybe Text
Text
launchProfileId :: Text
studioId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:launchProfileId:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Text
$sel:studioId:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Text
$sel:maxResults:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Maybe Natural
$sel:nextToken:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-08-01/studios/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
studioId,
        ByteString
"/launch-profiles/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
launchProfileId,
        ByteString
"/membership"
      ]

instance Core.ToQuery ListLaunchProfileMembers where
  toQuery :: ListLaunchProfileMembers -> QueryString
toQuery ListLaunchProfileMembers' {Maybe Natural
Maybe Text
Text
launchProfileId :: Text
studioId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:launchProfileId:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Text
$sel:studioId:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Text
$sel:maxResults:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Maybe Natural
$sel:nextToken:ListLaunchProfileMembers' :: ListLaunchProfileMembers -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListLaunchProfileMembersResponse' smart constructor.
data ListLaunchProfileMembersResponse = ListLaunchProfileMembersResponse'
  { -- | A list of members.
    ListLaunchProfileMembersResponse -> Maybe [LaunchProfileMembership]
members :: Prelude.Maybe [LaunchProfileMembership],
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListLaunchProfileMembersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListLaunchProfileMembersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListLaunchProfileMembersResponse
-> ListLaunchProfileMembersResponse -> Bool
(ListLaunchProfileMembersResponse
 -> ListLaunchProfileMembersResponse -> Bool)
-> (ListLaunchProfileMembersResponse
    -> ListLaunchProfileMembersResponse -> Bool)
-> Eq ListLaunchProfileMembersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLaunchProfileMembersResponse
-> ListLaunchProfileMembersResponse -> Bool
$c/= :: ListLaunchProfileMembersResponse
-> ListLaunchProfileMembersResponse -> Bool
== :: ListLaunchProfileMembersResponse
-> ListLaunchProfileMembersResponse -> Bool
$c== :: ListLaunchProfileMembersResponse
-> ListLaunchProfileMembersResponse -> Bool
Prelude.Eq, ReadPrec [ListLaunchProfileMembersResponse]
ReadPrec ListLaunchProfileMembersResponse
Int -> ReadS ListLaunchProfileMembersResponse
ReadS [ListLaunchProfileMembersResponse]
(Int -> ReadS ListLaunchProfileMembersResponse)
-> ReadS [ListLaunchProfileMembersResponse]
-> ReadPrec ListLaunchProfileMembersResponse
-> ReadPrec [ListLaunchProfileMembersResponse]
-> Read ListLaunchProfileMembersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLaunchProfileMembersResponse]
$creadListPrec :: ReadPrec [ListLaunchProfileMembersResponse]
readPrec :: ReadPrec ListLaunchProfileMembersResponse
$creadPrec :: ReadPrec ListLaunchProfileMembersResponse
readList :: ReadS [ListLaunchProfileMembersResponse]
$creadList :: ReadS [ListLaunchProfileMembersResponse]
readsPrec :: Int -> ReadS ListLaunchProfileMembersResponse
$creadsPrec :: Int -> ReadS ListLaunchProfileMembersResponse
Prelude.Read, Int -> ListLaunchProfileMembersResponse -> ShowS
[ListLaunchProfileMembersResponse] -> ShowS
ListLaunchProfileMembersResponse -> String
(Int -> ListLaunchProfileMembersResponse -> ShowS)
-> (ListLaunchProfileMembersResponse -> String)
-> ([ListLaunchProfileMembersResponse] -> ShowS)
-> Show ListLaunchProfileMembersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLaunchProfileMembersResponse] -> ShowS
$cshowList :: [ListLaunchProfileMembersResponse] -> ShowS
show :: ListLaunchProfileMembersResponse -> String
$cshow :: ListLaunchProfileMembersResponse -> String
showsPrec :: Int -> ListLaunchProfileMembersResponse -> ShowS
$cshowsPrec :: Int -> ListLaunchProfileMembersResponse -> ShowS
Prelude.Show, (forall x.
 ListLaunchProfileMembersResponse
 -> Rep ListLaunchProfileMembersResponse x)
-> (forall x.
    Rep ListLaunchProfileMembersResponse x
    -> ListLaunchProfileMembersResponse)
-> Generic ListLaunchProfileMembersResponse
forall x.
Rep ListLaunchProfileMembersResponse x
-> ListLaunchProfileMembersResponse
forall x.
ListLaunchProfileMembersResponse
-> Rep ListLaunchProfileMembersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLaunchProfileMembersResponse x
-> ListLaunchProfileMembersResponse
$cfrom :: forall x.
ListLaunchProfileMembersResponse
-> Rep ListLaunchProfileMembersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListLaunchProfileMembersResponse' 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:
--
-- 'members', 'listLaunchProfileMembersResponse_members' - A list of members.
--
-- 'nextToken', 'listLaunchProfileMembersResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'httpStatus', 'listLaunchProfileMembersResponse_httpStatus' - The response's http status code.
newListLaunchProfileMembersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLaunchProfileMembersResponse
newListLaunchProfileMembersResponse :: Int -> ListLaunchProfileMembersResponse
newListLaunchProfileMembersResponse Int
pHttpStatus_ =
  ListLaunchProfileMembersResponse' :: Maybe [LaunchProfileMembership]
-> Maybe Text -> Int -> ListLaunchProfileMembersResponse
ListLaunchProfileMembersResponse'
    { $sel:members:ListLaunchProfileMembersResponse' :: Maybe [LaunchProfileMembership]
members =
        Maybe [LaunchProfileMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLaunchProfileMembersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLaunchProfileMembersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of members.
listLaunchProfileMembersResponse_members :: Lens.Lens' ListLaunchProfileMembersResponse (Prelude.Maybe [LaunchProfileMembership])
listLaunchProfileMembersResponse_members :: (Maybe [LaunchProfileMembership]
 -> f (Maybe [LaunchProfileMembership]))
-> ListLaunchProfileMembersResponse
-> f ListLaunchProfileMembersResponse
listLaunchProfileMembersResponse_members = (ListLaunchProfileMembersResponse
 -> Maybe [LaunchProfileMembership])
-> (ListLaunchProfileMembersResponse
    -> Maybe [LaunchProfileMembership]
    -> ListLaunchProfileMembersResponse)
-> Lens'
     ListLaunchProfileMembersResponse (Maybe [LaunchProfileMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfileMembersResponse' {Maybe [LaunchProfileMembership]
members :: Maybe [LaunchProfileMembership]
$sel:members:ListLaunchProfileMembersResponse' :: ListLaunchProfileMembersResponse -> Maybe [LaunchProfileMembership]
members} -> Maybe [LaunchProfileMembership]
members) (\s :: ListLaunchProfileMembersResponse
s@ListLaunchProfileMembersResponse' {} Maybe [LaunchProfileMembership]
a -> ListLaunchProfileMembersResponse
s {$sel:members:ListLaunchProfileMembersResponse' :: Maybe [LaunchProfileMembership]
members = Maybe [LaunchProfileMembership]
a} :: ListLaunchProfileMembersResponse) ((Maybe [LaunchProfileMembership]
  -> f (Maybe [LaunchProfileMembership]))
 -> ListLaunchProfileMembersResponse
 -> f ListLaunchProfileMembersResponse)
-> ((Maybe [LaunchProfileMembership]
     -> f (Maybe [LaunchProfileMembership]))
    -> Maybe [LaunchProfileMembership]
    -> f (Maybe [LaunchProfileMembership]))
-> (Maybe [LaunchProfileMembership]
    -> f (Maybe [LaunchProfileMembership]))
-> ListLaunchProfileMembersResponse
-> f ListLaunchProfileMembersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LaunchProfileMembership]
  [LaunchProfileMembership]
  [LaunchProfileMembership]
  [LaunchProfileMembership]
-> Iso
     (Maybe [LaunchProfileMembership])
     (Maybe [LaunchProfileMembership])
     (Maybe [LaunchProfileMembership])
     (Maybe [LaunchProfileMembership])
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
  [LaunchProfileMembership]
  [LaunchProfileMembership]
  [LaunchProfileMembership]
  [LaunchProfileMembership]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token for the next set of results, or null if there are no more
-- results.
listLaunchProfileMembersResponse_nextToken :: Lens.Lens' ListLaunchProfileMembersResponse (Prelude.Maybe Prelude.Text)
listLaunchProfileMembersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLaunchProfileMembersResponse
-> f ListLaunchProfileMembersResponse
listLaunchProfileMembersResponse_nextToken = (ListLaunchProfileMembersResponse -> Maybe Text)
-> (ListLaunchProfileMembersResponse
    -> Maybe Text -> ListLaunchProfileMembersResponse)
-> Lens' ListLaunchProfileMembersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfileMembersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLaunchProfileMembersResponse' :: ListLaunchProfileMembersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLaunchProfileMembersResponse
s@ListLaunchProfileMembersResponse' {} Maybe Text
a -> ListLaunchProfileMembersResponse
s {$sel:nextToken:ListLaunchProfileMembersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLaunchProfileMembersResponse)

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

instance
  Prelude.NFData
    ListLaunchProfileMembersResponse