{-# 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.ServiceCatalog.ListLaunchPaths
-- 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 paths to the specified product. A path is how the user has
-- access to a specified product, and is necessary when provisioning a
-- product. A path also determines the constraints put on the product.
--
-- This operation returns paginated results.
module Amazonka.ServiceCatalog.ListLaunchPaths
  ( -- * Creating a Request
    ListLaunchPaths (..),
    newListLaunchPaths,

    -- * Request Lenses
    listLaunchPaths_acceptLanguage,
    listLaunchPaths_pageToken,
    listLaunchPaths_pageSize,
    listLaunchPaths_productId,

    -- * Destructuring the Response
    ListLaunchPathsResponse (..),
    newListLaunchPathsResponse,

    -- * Response Lenses
    listLaunchPathsResponse_nextPageToken,
    listLaunchPathsResponse_launchPathSummaries,
    listLaunchPathsResponse_httpStatus,
  )
where

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
import Amazonka.ServiceCatalog.Types

-- | /See:/ 'newListLaunchPaths' smart constructor.
data ListLaunchPaths = ListLaunchPaths'
  { -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    ListLaunchPaths -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The page token for the next set of results. To retrieve the first set of
    -- results, use null.
    ListLaunchPaths -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return with this call.
    ListLaunchPaths -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The product identifier.
    ListLaunchPaths -> Text
productId :: Prelude.Text
  }
  deriving (ListLaunchPaths -> ListLaunchPaths -> Bool
(ListLaunchPaths -> ListLaunchPaths -> Bool)
-> (ListLaunchPaths -> ListLaunchPaths -> Bool)
-> Eq ListLaunchPaths
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLaunchPaths -> ListLaunchPaths -> Bool
$c/= :: ListLaunchPaths -> ListLaunchPaths -> Bool
== :: ListLaunchPaths -> ListLaunchPaths -> Bool
$c== :: ListLaunchPaths -> ListLaunchPaths -> Bool
Prelude.Eq, ReadPrec [ListLaunchPaths]
ReadPrec ListLaunchPaths
Int -> ReadS ListLaunchPaths
ReadS [ListLaunchPaths]
(Int -> ReadS ListLaunchPaths)
-> ReadS [ListLaunchPaths]
-> ReadPrec ListLaunchPaths
-> ReadPrec [ListLaunchPaths]
-> Read ListLaunchPaths
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLaunchPaths]
$creadListPrec :: ReadPrec [ListLaunchPaths]
readPrec :: ReadPrec ListLaunchPaths
$creadPrec :: ReadPrec ListLaunchPaths
readList :: ReadS [ListLaunchPaths]
$creadList :: ReadS [ListLaunchPaths]
readsPrec :: Int -> ReadS ListLaunchPaths
$creadsPrec :: Int -> ReadS ListLaunchPaths
Prelude.Read, Int -> ListLaunchPaths -> ShowS
[ListLaunchPaths] -> ShowS
ListLaunchPaths -> String
(Int -> ListLaunchPaths -> ShowS)
-> (ListLaunchPaths -> String)
-> ([ListLaunchPaths] -> ShowS)
-> Show ListLaunchPaths
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLaunchPaths] -> ShowS
$cshowList :: [ListLaunchPaths] -> ShowS
show :: ListLaunchPaths -> String
$cshow :: ListLaunchPaths -> String
showsPrec :: Int -> ListLaunchPaths -> ShowS
$cshowsPrec :: Int -> ListLaunchPaths -> ShowS
Prelude.Show, (forall x. ListLaunchPaths -> Rep ListLaunchPaths x)
-> (forall x. Rep ListLaunchPaths x -> ListLaunchPaths)
-> Generic ListLaunchPaths
forall x. Rep ListLaunchPaths x -> ListLaunchPaths
forall x. ListLaunchPaths -> Rep ListLaunchPaths x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLaunchPaths x -> ListLaunchPaths
$cfrom :: forall x. ListLaunchPaths -> Rep ListLaunchPaths x
Prelude.Generic)

-- |
-- Create a value of 'ListLaunchPaths' 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:
--
-- 'acceptLanguage', 'listLaunchPaths_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'pageToken', 'listLaunchPaths_pageToken' - The page token for the next set of results. To retrieve the first set of
-- results, use null.
--
-- 'pageSize', 'listLaunchPaths_pageSize' - The maximum number of items to return with this call.
--
-- 'productId', 'listLaunchPaths_productId' - The product identifier.
newListLaunchPaths ::
  -- | 'productId'
  Prelude.Text ->
  ListLaunchPaths
newListLaunchPaths :: Text -> ListLaunchPaths
newListLaunchPaths Text
pProductId_ =
  ListLaunchPaths' :: Maybe Text
-> Maybe Text -> Maybe Natural -> Text -> ListLaunchPaths
ListLaunchPaths'
    { $sel:acceptLanguage:ListLaunchPaths' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageToken:ListLaunchPaths' :: Maybe Text
pageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListLaunchPaths' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:productId:ListLaunchPaths' :: Text
productId = Text
pProductId_
    }

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
listLaunchPaths_acceptLanguage :: Lens.Lens' ListLaunchPaths (Prelude.Maybe Prelude.Text)
listLaunchPaths_acceptLanguage :: (Maybe Text -> f (Maybe Text))
-> ListLaunchPaths -> f ListLaunchPaths
listLaunchPaths_acceptLanguage = (ListLaunchPaths -> Maybe Text)
-> (ListLaunchPaths -> Maybe Text -> ListLaunchPaths)
-> Lens ListLaunchPaths ListLaunchPaths (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchPaths' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:ListLaunchPaths' :: ListLaunchPaths -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: ListLaunchPaths
s@ListLaunchPaths' {} Maybe Text
a -> ListLaunchPaths
s {$sel:acceptLanguage:ListLaunchPaths' :: Maybe Text
acceptLanguage = Maybe Text
a} :: ListLaunchPaths)

-- | The page token for the next set of results. To retrieve the first set of
-- results, use null.
listLaunchPaths_pageToken :: Lens.Lens' ListLaunchPaths (Prelude.Maybe Prelude.Text)
listLaunchPaths_pageToken :: (Maybe Text -> f (Maybe Text))
-> ListLaunchPaths -> f ListLaunchPaths
listLaunchPaths_pageToken = (ListLaunchPaths -> Maybe Text)
-> (ListLaunchPaths -> Maybe Text -> ListLaunchPaths)
-> Lens ListLaunchPaths ListLaunchPaths (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchPaths' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:ListLaunchPaths' :: ListLaunchPaths -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: ListLaunchPaths
s@ListLaunchPaths' {} Maybe Text
a -> ListLaunchPaths
s {$sel:pageToken:ListLaunchPaths' :: Maybe Text
pageToken = Maybe Text
a} :: ListLaunchPaths)

-- | The maximum number of items to return with this call.
listLaunchPaths_pageSize :: Lens.Lens' ListLaunchPaths (Prelude.Maybe Prelude.Natural)
listLaunchPaths_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListLaunchPaths -> f ListLaunchPaths
listLaunchPaths_pageSize = (ListLaunchPaths -> Maybe Natural)
-> (ListLaunchPaths -> Maybe Natural -> ListLaunchPaths)
-> Lens
     ListLaunchPaths ListLaunchPaths (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchPaths' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListLaunchPaths' :: ListLaunchPaths -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListLaunchPaths
s@ListLaunchPaths' {} Maybe Natural
a -> ListLaunchPaths
s {$sel:pageSize:ListLaunchPaths' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListLaunchPaths)

-- | The product identifier.
listLaunchPaths_productId :: Lens.Lens' ListLaunchPaths Prelude.Text
listLaunchPaths_productId :: (Text -> f Text) -> ListLaunchPaths -> f ListLaunchPaths
listLaunchPaths_productId = (ListLaunchPaths -> Text)
-> (ListLaunchPaths -> Text -> ListLaunchPaths)
-> Lens ListLaunchPaths ListLaunchPaths Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchPaths' {Text
productId :: Text
$sel:productId:ListLaunchPaths' :: ListLaunchPaths -> Text
productId} -> Text
productId) (\s :: ListLaunchPaths
s@ListLaunchPaths' {} Text
a -> ListLaunchPaths
s {$sel:productId:ListLaunchPaths' :: Text
productId = Text
a} :: ListLaunchPaths)

instance Core.AWSPager ListLaunchPaths where
  page :: ListLaunchPaths
-> AWSResponse ListLaunchPaths -> Maybe ListLaunchPaths
page ListLaunchPaths
rq AWSResponse ListLaunchPaths
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLaunchPaths
ListLaunchPathsResponse
rs
            ListLaunchPathsResponse
-> Getting (First Text) ListLaunchPathsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLaunchPathsResponse
-> Const (First Text) ListLaunchPathsResponse
Lens' ListLaunchPathsResponse (Maybe Text)
listLaunchPathsResponse_nextPageToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListLaunchPathsResponse
 -> Const (First Text) ListLaunchPathsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLaunchPathsResponse 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 ListLaunchPaths
forall a. Maybe a
Prelude.Nothing
    | Maybe [LaunchPathSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLaunchPaths
ListLaunchPathsResponse
rs
            ListLaunchPathsResponse
-> Getting
     (First [LaunchPathSummary])
     ListLaunchPathsResponse
     [LaunchPathSummary]
-> Maybe [LaunchPathSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [LaunchPathSummary]
 -> Const (First [LaunchPathSummary]) (Maybe [LaunchPathSummary]))
-> ListLaunchPathsResponse
-> Const (First [LaunchPathSummary]) ListLaunchPathsResponse
Lens' ListLaunchPathsResponse (Maybe [LaunchPathSummary])
listLaunchPathsResponse_launchPathSummaries
              ((Maybe [LaunchPathSummary]
  -> Const (First [LaunchPathSummary]) (Maybe [LaunchPathSummary]))
 -> ListLaunchPathsResponse
 -> Const (First [LaunchPathSummary]) ListLaunchPathsResponse)
-> (([LaunchPathSummary]
     -> Const (First [LaunchPathSummary]) [LaunchPathSummary])
    -> Maybe [LaunchPathSummary]
    -> Const (First [LaunchPathSummary]) (Maybe [LaunchPathSummary]))
-> Getting
     (First [LaunchPathSummary])
     ListLaunchPathsResponse
     [LaunchPathSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([LaunchPathSummary]
 -> Const (First [LaunchPathSummary]) [LaunchPathSummary])
-> Maybe [LaunchPathSummary]
-> Const (First [LaunchPathSummary]) (Maybe [LaunchPathSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListLaunchPaths
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListLaunchPaths -> Maybe ListLaunchPaths
forall a. a -> Maybe a
Prelude.Just (ListLaunchPaths -> Maybe ListLaunchPaths)
-> ListLaunchPaths -> Maybe ListLaunchPaths
forall a b. (a -> b) -> a -> b
Prelude.$
        ListLaunchPaths
rq
          ListLaunchPaths
-> (ListLaunchPaths -> ListLaunchPaths) -> ListLaunchPaths
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListLaunchPaths -> Identity ListLaunchPaths
Lens ListLaunchPaths ListLaunchPaths (Maybe Text) (Maybe Text)
listLaunchPaths_pageToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListLaunchPaths -> Identity ListLaunchPaths)
-> Maybe Text -> ListLaunchPaths -> ListLaunchPaths
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListLaunchPaths
ListLaunchPathsResponse
rs
          ListLaunchPathsResponse
-> Getting (First Text) ListLaunchPathsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLaunchPathsResponse
-> Const (First Text) ListLaunchPathsResponse
Lens' ListLaunchPathsResponse (Maybe Text)
listLaunchPathsResponse_nextPageToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListLaunchPathsResponse
 -> Const (First Text) ListLaunchPathsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLaunchPathsResponse 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 ListLaunchPaths where
  type
    AWSResponse ListLaunchPaths =
      ListLaunchPathsResponse
  request :: ListLaunchPaths -> Request ListLaunchPaths
request = Service -> ListLaunchPaths -> Request ListLaunchPaths
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListLaunchPaths
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLaunchPaths)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListLaunchPaths))
-> Logger
-> Service
-> Proxy ListLaunchPaths
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLaunchPaths)))
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 [LaunchPathSummary] -> Int -> ListLaunchPathsResponse
ListLaunchPathsResponse'
            (Maybe Text
 -> Maybe [LaunchPathSummary] -> Int -> ListLaunchPathsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [LaunchPathSummary] -> Int -> ListLaunchPathsResponse)
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
"NextPageToken")
            Either
  String
  (Maybe [LaunchPathSummary] -> Int -> ListLaunchPathsResponse)
-> Either String (Maybe [LaunchPathSummary])
-> Either String (Int -> ListLaunchPathsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [LaunchPathSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LaunchPathSummaries"
                            Either String (Maybe (Maybe [LaunchPathSummary]))
-> Maybe [LaunchPathSummary]
-> Either String (Maybe [LaunchPathSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [LaunchPathSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListLaunchPathsResponse)
-> Either String Int -> Either String ListLaunchPathsResponse
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 ListLaunchPaths

instance Prelude.NFData ListLaunchPaths

instance Core.ToHeaders ListLaunchPaths where
  toHeaders :: ListLaunchPaths -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListLaunchPaths -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWS242ServiceCatalogService.ListLaunchPaths" ::
                          Prelude.ByteString
                      ),
            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.ToJSON ListLaunchPaths where
  toJSON :: ListLaunchPaths -> Value
toJSON ListLaunchPaths' {Maybe Natural
Maybe Text
Text
productId :: Text
pageSize :: Maybe Natural
pageToken :: Maybe Text
acceptLanguage :: Maybe Text
$sel:productId:ListLaunchPaths' :: ListLaunchPaths -> Text
$sel:pageSize:ListLaunchPaths' :: ListLaunchPaths -> Maybe Natural
$sel:pageToken:ListLaunchPaths' :: ListLaunchPaths -> Maybe Text
$sel:acceptLanguage:ListLaunchPaths' :: ListLaunchPaths -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AcceptLanguage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
acceptLanguage,
            (Text
"PageToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pageToken,
            (Text
"PageSize" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pageSize,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ProductId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
productId)
          ]
      )

instance Core.ToPath ListLaunchPaths where
  toPath :: ListLaunchPaths -> ByteString
toPath = ByteString -> ListLaunchPaths -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListLaunchPathsResponse' smart constructor.
data ListLaunchPathsResponse = ListLaunchPathsResponse'
  { -- | The page token to use to retrieve the next set of results. If there are
    -- no additional results, this value is null.
    ListLaunchPathsResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the launch path.
    ListLaunchPathsResponse -> Maybe [LaunchPathSummary]
launchPathSummaries :: Prelude.Maybe [LaunchPathSummary],
    -- | The response's http status code.
    ListLaunchPathsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListLaunchPathsResponse -> ListLaunchPathsResponse -> Bool
(ListLaunchPathsResponse -> ListLaunchPathsResponse -> Bool)
-> (ListLaunchPathsResponse -> ListLaunchPathsResponse -> Bool)
-> Eq ListLaunchPathsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLaunchPathsResponse -> ListLaunchPathsResponse -> Bool
$c/= :: ListLaunchPathsResponse -> ListLaunchPathsResponse -> Bool
== :: ListLaunchPathsResponse -> ListLaunchPathsResponse -> Bool
$c== :: ListLaunchPathsResponse -> ListLaunchPathsResponse -> Bool
Prelude.Eq, ReadPrec [ListLaunchPathsResponse]
ReadPrec ListLaunchPathsResponse
Int -> ReadS ListLaunchPathsResponse
ReadS [ListLaunchPathsResponse]
(Int -> ReadS ListLaunchPathsResponse)
-> ReadS [ListLaunchPathsResponse]
-> ReadPrec ListLaunchPathsResponse
-> ReadPrec [ListLaunchPathsResponse]
-> Read ListLaunchPathsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLaunchPathsResponse]
$creadListPrec :: ReadPrec [ListLaunchPathsResponse]
readPrec :: ReadPrec ListLaunchPathsResponse
$creadPrec :: ReadPrec ListLaunchPathsResponse
readList :: ReadS [ListLaunchPathsResponse]
$creadList :: ReadS [ListLaunchPathsResponse]
readsPrec :: Int -> ReadS ListLaunchPathsResponse
$creadsPrec :: Int -> ReadS ListLaunchPathsResponse
Prelude.Read, Int -> ListLaunchPathsResponse -> ShowS
[ListLaunchPathsResponse] -> ShowS
ListLaunchPathsResponse -> String
(Int -> ListLaunchPathsResponse -> ShowS)
-> (ListLaunchPathsResponse -> String)
-> ([ListLaunchPathsResponse] -> ShowS)
-> Show ListLaunchPathsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLaunchPathsResponse] -> ShowS
$cshowList :: [ListLaunchPathsResponse] -> ShowS
show :: ListLaunchPathsResponse -> String
$cshow :: ListLaunchPathsResponse -> String
showsPrec :: Int -> ListLaunchPathsResponse -> ShowS
$cshowsPrec :: Int -> ListLaunchPathsResponse -> ShowS
Prelude.Show, (forall x.
 ListLaunchPathsResponse -> Rep ListLaunchPathsResponse x)
-> (forall x.
    Rep ListLaunchPathsResponse x -> ListLaunchPathsResponse)
-> Generic ListLaunchPathsResponse
forall x. Rep ListLaunchPathsResponse x -> ListLaunchPathsResponse
forall x. ListLaunchPathsResponse -> Rep ListLaunchPathsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLaunchPathsResponse x -> ListLaunchPathsResponse
$cfrom :: forall x. ListLaunchPathsResponse -> Rep ListLaunchPathsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListLaunchPathsResponse' 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:
--
-- 'nextPageToken', 'listLaunchPathsResponse_nextPageToken' - The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
--
-- 'launchPathSummaries', 'listLaunchPathsResponse_launchPathSummaries' - Information about the launch path.
--
-- 'httpStatus', 'listLaunchPathsResponse_httpStatus' - The response's http status code.
newListLaunchPathsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLaunchPathsResponse
newListLaunchPathsResponse :: Int -> ListLaunchPathsResponse
newListLaunchPathsResponse Int
pHttpStatus_ =
  ListLaunchPathsResponse' :: Maybe Text
-> Maybe [LaunchPathSummary] -> Int -> ListLaunchPathsResponse
ListLaunchPathsResponse'
    { $sel:nextPageToken:ListLaunchPathsResponse' :: Maybe Text
nextPageToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:launchPathSummaries:ListLaunchPathsResponse' :: Maybe [LaunchPathSummary]
launchPathSummaries = Maybe [LaunchPathSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLaunchPathsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The page token to use to retrieve the next set of results. If there are
-- no additional results, this value is null.
listLaunchPathsResponse_nextPageToken :: Lens.Lens' ListLaunchPathsResponse (Prelude.Maybe Prelude.Text)
listLaunchPathsResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> ListLaunchPathsResponse -> f ListLaunchPathsResponse
listLaunchPathsResponse_nextPageToken = (ListLaunchPathsResponse -> Maybe Text)
-> (ListLaunchPathsResponse
    -> Maybe Text -> ListLaunchPathsResponse)
-> Lens' ListLaunchPathsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchPathsResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:ListLaunchPathsResponse' :: ListLaunchPathsResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: ListLaunchPathsResponse
s@ListLaunchPathsResponse' {} Maybe Text
a -> ListLaunchPathsResponse
s {$sel:nextPageToken:ListLaunchPathsResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: ListLaunchPathsResponse)

-- | Information about the launch path.
listLaunchPathsResponse_launchPathSummaries :: Lens.Lens' ListLaunchPathsResponse (Prelude.Maybe [LaunchPathSummary])
listLaunchPathsResponse_launchPathSummaries :: (Maybe [LaunchPathSummary] -> f (Maybe [LaunchPathSummary]))
-> ListLaunchPathsResponse -> f ListLaunchPathsResponse
listLaunchPathsResponse_launchPathSummaries = (ListLaunchPathsResponse -> Maybe [LaunchPathSummary])
-> (ListLaunchPathsResponse
    -> Maybe [LaunchPathSummary] -> ListLaunchPathsResponse)
-> Lens' ListLaunchPathsResponse (Maybe [LaunchPathSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLaunchPathsResponse' {Maybe [LaunchPathSummary]
launchPathSummaries :: Maybe [LaunchPathSummary]
$sel:launchPathSummaries:ListLaunchPathsResponse' :: ListLaunchPathsResponse -> Maybe [LaunchPathSummary]
launchPathSummaries} -> Maybe [LaunchPathSummary]
launchPathSummaries) (\s :: ListLaunchPathsResponse
s@ListLaunchPathsResponse' {} Maybe [LaunchPathSummary]
a -> ListLaunchPathsResponse
s {$sel:launchPathSummaries:ListLaunchPathsResponse' :: Maybe [LaunchPathSummary]
launchPathSummaries = Maybe [LaunchPathSummary]
a} :: ListLaunchPathsResponse) ((Maybe [LaunchPathSummary] -> f (Maybe [LaunchPathSummary]))
 -> ListLaunchPathsResponse -> f ListLaunchPathsResponse)
-> ((Maybe [LaunchPathSummary] -> f (Maybe [LaunchPathSummary]))
    -> Maybe [LaunchPathSummary] -> f (Maybe [LaunchPathSummary]))
-> (Maybe [LaunchPathSummary] -> f (Maybe [LaunchPathSummary]))
-> ListLaunchPathsResponse
-> f ListLaunchPathsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LaunchPathSummary]
  [LaunchPathSummary]
  [LaunchPathSummary]
  [LaunchPathSummary]
-> Iso
     (Maybe [LaunchPathSummary])
     (Maybe [LaunchPathSummary])
     (Maybe [LaunchPathSummary])
     (Maybe [LaunchPathSummary])
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
  [LaunchPathSummary]
  [LaunchPathSummary]
  [LaunchPathSummary]
  [LaunchPathSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListLaunchPathsResponse