{-# 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.ListLaunchProfiles
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List all the launch profiles a studio.
--
-- This operation returns paginated results.
module Amazonka.Nimble.ListLaunchProfiles
  ( -- * Creating a Request
    ListLaunchProfiles (..),
    newListLaunchProfiles,

    -- * Request Lenses
    listLaunchProfiles_maxResults,
    listLaunchProfiles_nextToken,
    listLaunchProfiles_principalId,
    listLaunchProfiles_states,
    listLaunchProfiles_studioId,

    -- * Destructuring the Response
    ListLaunchProfilesResponse (..),
    newListLaunchProfilesResponse,

    -- * Response Lenses
    listLaunchProfilesResponse_launchProfiles,
    listLaunchProfilesResponse_nextToken,
    listLaunchProfilesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListLaunchProfiles' smart constructor.
data ListLaunchProfiles = ListLaunchProfiles'
  { -- | The max number of results to return in the response.
    ListLaunchProfiles -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListLaunchProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The principal ID. This currently supports a IAM Identity Center UserId.
    ListLaunchProfiles -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text,
    -- | Filter this request to launch profiles in any of the given states.
    ListLaunchProfiles -> Maybe [LaunchProfileState]
states :: Prelude.Maybe [LaunchProfileState],
    -- | The studio ID.
    ListLaunchProfiles -> Text
studioId :: Prelude.Text
  }
  deriving (ListLaunchProfiles -> ListLaunchProfiles -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLaunchProfiles -> ListLaunchProfiles -> Bool
$c/= :: ListLaunchProfiles -> ListLaunchProfiles -> Bool
== :: ListLaunchProfiles -> ListLaunchProfiles -> Bool
$c== :: ListLaunchProfiles -> ListLaunchProfiles -> Bool
Prelude.Eq, ReadPrec [ListLaunchProfiles]
ReadPrec ListLaunchProfiles
Int -> ReadS ListLaunchProfiles
ReadS [ListLaunchProfiles]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLaunchProfiles]
$creadListPrec :: ReadPrec [ListLaunchProfiles]
readPrec :: ReadPrec ListLaunchProfiles
$creadPrec :: ReadPrec ListLaunchProfiles
readList :: ReadS [ListLaunchProfiles]
$creadList :: ReadS [ListLaunchProfiles]
readsPrec :: Int -> ReadS ListLaunchProfiles
$creadsPrec :: Int -> ReadS ListLaunchProfiles
Prelude.Read, Int -> ListLaunchProfiles -> ShowS
[ListLaunchProfiles] -> ShowS
ListLaunchProfiles -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLaunchProfiles] -> ShowS
$cshowList :: [ListLaunchProfiles] -> ShowS
show :: ListLaunchProfiles -> String
$cshow :: ListLaunchProfiles -> String
showsPrec :: Int -> ListLaunchProfiles -> ShowS
$cshowsPrec :: Int -> ListLaunchProfiles -> ShowS
Prelude.Show, forall x. Rep ListLaunchProfiles x -> ListLaunchProfiles
forall x. ListLaunchProfiles -> Rep ListLaunchProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLaunchProfiles x -> ListLaunchProfiles
$cfrom :: forall x. ListLaunchProfiles -> Rep ListLaunchProfiles x
Prelude.Generic)

-- |
-- Create a value of 'ListLaunchProfiles' 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:
--
-- 'maxResults', 'listLaunchProfiles_maxResults' - The max number of results to return in the response.
--
-- 'nextToken', 'listLaunchProfiles_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'principalId', 'listLaunchProfiles_principalId' - The principal ID. This currently supports a IAM Identity Center UserId.
--
-- 'states', 'listLaunchProfiles_states' - Filter this request to launch profiles in any of the given states.
--
-- 'studioId', 'listLaunchProfiles_studioId' - The studio ID.
newListLaunchProfiles ::
  -- | 'studioId'
  Prelude.Text ->
  ListLaunchProfiles
newListLaunchProfiles :: Text -> ListLaunchProfiles
newListLaunchProfiles Text
pStudioId_ =
  ListLaunchProfiles'
    { $sel:maxResults:ListLaunchProfiles' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLaunchProfiles' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:principalId:ListLaunchProfiles' :: Maybe Text
principalId = forall a. Maybe a
Prelude.Nothing,
      $sel:states:ListLaunchProfiles' :: Maybe [LaunchProfileState]
states = forall a. Maybe a
Prelude.Nothing,
      $sel:studioId:ListLaunchProfiles' :: Text
studioId = Text
pStudioId_
    }

-- | The max number of results to return in the response.
listLaunchProfiles_maxResults :: Lens.Lens' ListLaunchProfiles (Prelude.Maybe Prelude.Natural)
listLaunchProfiles_maxResults :: Lens' ListLaunchProfiles (Maybe Natural)
listLaunchProfiles_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfiles' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLaunchProfiles
s@ListLaunchProfiles' {} Maybe Natural
a -> ListLaunchProfiles
s {$sel:maxResults:ListLaunchProfiles' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLaunchProfiles)

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

-- | The principal ID. This currently supports a IAM Identity Center UserId.
listLaunchProfiles_principalId :: Lens.Lens' ListLaunchProfiles (Prelude.Maybe Prelude.Text)
listLaunchProfiles_principalId :: Lens' ListLaunchProfiles (Maybe Text)
listLaunchProfiles_principalId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfiles' {Maybe Text
principalId :: Maybe Text
$sel:principalId:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Text
principalId} -> Maybe Text
principalId) (\s :: ListLaunchProfiles
s@ListLaunchProfiles' {} Maybe Text
a -> ListLaunchProfiles
s {$sel:principalId:ListLaunchProfiles' :: Maybe Text
principalId = Maybe Text
a} :: ListLaunchProfiles)

-- | Filter this request to launch profiles in any of the given states.
listLaunchProfiles_states :: Lens.Lens' ListLaunchProfiles (Prelude.Maybe [LaunchProfileState])
listLaunchProfiles_states :: Lens' ListLaunchProfiles (Maybe [LaunchProfileState])
listLaunchProfiles_states = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfiles' {Maybe [LaunchProfileState]
states :: Maybe [LaunchProfileState]
$sel:states:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe [LaunchProfileState]
states} -> Maybe [LaunchProfileState]
states) (\s :: ListLaunchProfiles
s@ListLaunchProfiles' {} Maybe [LaunchProfileState]
a -> ListLaunchProfiles
s {$sel:states:ListLaunchProfiles' :: Maybe [LaunchProfileState]
states = Maybe [LaunchProfileState]
a} :: ListLaunchProfiles) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Core.AWSPager ListLaunchProfiles where
  page :: ListLaunchProfiles
-> AWSResponse ListLaunchProfiles -> Maybe ListLaunchProfiles
page ListLaunchProfiles
rq AWSResponse ListLaunchProfiles
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLaunchProfiles
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListLaunchProfilesResponse (Maybe Text)
listLaunchProfilesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLaunchProfiles
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListLaunchProfilesResponse (Maybe [LaunchProfile])
listLaunchProfilesResponse_launchProfiles
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListLaunchProfiles
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListLaunchProfiles (Maybe Text)
listLaunchProfiles_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListLaunchProfiles
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListLaunchProfilesResponse (Maybe Text)
listLaunchProfilesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListLaunchProfiles where
  type
    AWSResponse ListLaunchProfiles =
      ListLaunchProfilesResponse
  request :: (Service -> Service)
-> ListLaunchProfiles -> Request ListLaunchProfiles
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListLaunchProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListLaunchProfiles)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [LaunchProfile]
-> Maybe Text -> Int -> ListLaunchProfilesResponse
ListLaunchProfilesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"launchProfiles" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListLaunchProfiles where
  hashWithSalt :: Int -> ListLaunchProfiles -> Int
hashWithSalt Int
_salt ListLaunchProfiles' {Maybe Natural
Maybe [LaunchProfileState]
Maybe Text
Text
studioId :: Text
states :: Maybe [LaunchProfileState]
principalId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:studioId:ListLaunchProfiles' :: ListLaunchProfiles -> Text
$sel:states:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe [LaunchProfileState]
$sel:principalId:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Text
$sel:nextToken:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Text
$sel:maxResults:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
principalId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [LaunchProfileState]
states
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
studioId

instance Prelude.NFData ListLaunchProfiles where
  rnf :: ListLaunchProfiles -> ()
rnf ListLaunchProfiles' {Maybe Natural
Maybe [LaunchProfileState]
Maybe Text
Text
studioId :: Text
states :: Maybe [LaunchProfileState]
principalId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:studioId:ListLaunchProfiles' :: ListLaunchProfiles -> Text
$sel:states:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe [LaunchProfileState]
$sel:principalId:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Text
$sel:nextToken:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Text
$sel:maxResults:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
principalId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [LaunchProfileState]
states
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
studioId

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

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

instance Data.ToQuery ListLaunchProfiles where
  toQuery :: ListLaunchProfiles -> QueryString
toQuery ListLaunchProfiles' {Maybe Natural
Maybe [LaunchProfileState]
Maybe Text
Text
studioId :: Text
states :: Maybe [LaunchProfileState]
principalId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:studioId:ListLaunchProfiles' :: ListLaunchProfiles -> Text
$sel:states:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe [LaunchProfileState]
$sel:principalId:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Text
$sel:nextToken:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Text
$sel:maxResults:ListLaunchProfiles' :: ListLaunchProfiles -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"principalId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
principalId,
        ByteString
"states"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LaunchProfileState]
states)
      ]

-- | /See:/ 'newListLaunchProfilesResponse' smart constructor.
data ListLaunchProfilesResponse = ListLaunchProfilesResponse'
  { -- | A collection of launch profiles.
    ListLaunchProfilesResponse -> Maybe [LaunchProfile]
launchProfiles :: Prelude.Maybe [LaunchProfile],
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListLaunchProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListLaunchProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListLaunchProfilesResponse -> ListLaunchProfilesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLaunchProfilesResponse -> ListLaunchProfilesResponse -> Bool
$c/= :: ListLaunchProfilesResponse -> ListLaunchProfilesResponse -> Bool
== :: ListLaunchProfilesResponse -> ListLaunchProfilesResponse -> Bool
$c== :: ListLaunchProfilesResponse -> ListLaunchProfilesResponse -> Bool
Prelude.Eq, Int -> ListLaunchProfilesResponse -> ShowS
[ListLaunchProfilesResponse] -> ShowS
ListLaunchProfilesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLaunchProfilesResponse] -> ShowS
$cshowList :: [ListLaunchProfilesResponse] -> ShowS
show :: ListLaunchProfilesResponse -> String
$cshow :: ListLaunchProfilesResponse -> String
showsPrec :: Int -> ListLaunchProfilesResponse -> ShowS
$cshowsPrec :: Int -> ListLaunchProfilesResponse -> ShowS
Prelude.Show, forall x.
Rep ListLaunchProfilesResponse x -> ListLaunchProfilesResponse
forall x.
ListLaunchProfilesResponse -> Rep ListLaunchProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListLaunchProfilesResponse x -> ListLaunchProfilesResponse
$cfrom :: forall x.
ListLaunchProfilesResponse -> Rep ListLaunchProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListLaunchProfilesResponse' 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:
--
-- 'launchProfiles', 'listLaunchProfilesResponse_launchProfiles' - A collection of launch profiles.
--
-- 'nextToken', 'listLaunchProfilesResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'httpStatus', 'listLaunchProfilesResponse_httpStatus' - The response's http status code.
newListLaunchProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLaunchProfilesResponse
newListLaunchProfilesResponse :: Int -> ListLaunchProfilesResponse
newListLaunchProfilesResponse Int
pHttpStatus_ =
  ListLaunchProfilesResponse'
    { $sel:launchProfiles:ListLaunchProfilesResponse' :: Maybe [LaunchProfile]
launchProfiles =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLaunchProfilesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLaunchProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A collection of launch profiles.
listLaunchProfilesResponse_launchProfiles :: Lens.Lens' ListLaunchProfilesResponse (Prelude.Maybe [LaunchProfile])
listLaunchProfilesResponse_launchProfiles :: Lens' ListLaunchProfilesResponse (Maybe [LaunchProfile])
listLaunchProfilesResponse_launchProfiles = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfilesResponse' {Maybe [LaunchProfile]
launchProfiles :: Maybe [LaunchProfile]
$sel:launchProfiles:ListLaunchProfilesResponse' :: ListLaunchProfilesResponse -> Maybe [LaunchProfile]
launchProfiles} -> Maybe [LaunchProfile]
launchProfiles) (\s :: ListLaunchProfilesResponse
s@ListLaunchProfilesResponse' {} Maybe [LaunchProfile]
a -> ListLaunchProfilesResponse
s {$sel:launchProfiles:ListLaunchProfilesResponse' :: Maybe [LaunchProfile]
launchProfiles = Maybe [LaunchProfile]
a} :: ListLaunchProfilesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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.
listLaunchProfilesResponse_nextToken :: Lens.Lens' ListLaunchProfilesResponse (Prelude.Maybe Prelude.Text)
listLaunchProfilesResponse_nextToken :: Lens' ListLaunchProfilesResponse (Maybe Text)
listLaunchProfilesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLaunchProfilesResponse' :: ListLaunchProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLaunchProfilesResponse
s@ListLaunchProfilesResponse' {} Maybe Text
a -> ListLaunchProfilesResponse
s {$sel:nextToken:ListLaunchProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLaunchProfilesResponse)

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

instance Prelude.NFData ListLaunchProfilesResponse where
  rnf :: ListLaunchProfilesResponse -> ()
rnf ListLaunchProfilesResponse' {Int
Maybe [LaunchProfile]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
launchProfiles :: Maybe [LaunchProfile]
$sel:httpStatus:ListLaunchProfilesResponse' :: ListLaunchProfilesResponse -> Int
$sel:nextToken:ListLaunchProfilesResponse' :: ListLaunchProfilesResponse -> Maybe Text
$sel:launchProfiles:ListLaunchProfilesResponse' :: ListLaunchProfilesResponse -> Maybe [LaunchProfile]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [LaunchProfile]
launchProfiles
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus