{-# 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.GroundStation.ListMissionProfiles
-- 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)
--
-- Returns a list of mission profiles.
--
-- This operation returns paginated results.
module Amazonka.GroundStation.ListMissionProfiles
  ( -- * Creating a Request
    ListMissionProfiles (..),
    newListMissionProfiles,

    -- * Request Lenses
    listMissionProfiles_nextToken,
    listMissionProfiles_maxResults,

    -- * Destructuring the Response
    ListMissionProfilesResponse (..),
    newListMissionProfilesResponse,

    -- * Response Lenses
    listMissionProfilesResponse_nextToken,
    listMissionProfilesResponse_missionProfileList,
    listMissionProfilesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GroundStation.Types
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:/ 'newListMissionProfiles' smart constructor.
data ListMissionProfiles = ListMissionProfiles'
  { -- | Next token returned in the request of a previous @ListMissionProfiles@
    -- call. Used to get the next page of results.
    ListMissionProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of mission profiles returned.
    ListMissionProfiles -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (ListMissionProfiles -> ListMissionProfiles -> Bool
(ListMissionProfiles -> ListMissionProfiles -> Bool)
-> (ListMissionProfiles -> ListMissionProfiles -> Bool)
-> Eq ListMissionProfiles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMissionProfiles -> ListMissionProfiles -> Bool
$c/= :: ListMissionProfiles -> ListMissionProfiles -> Bool
== :: ListMissionProfiles -> ListMissionProfiles -> Bool
$c== :: ListMissionProfiles -> ListMissionProfiles -> Bool
Prelude.Eq, ReadPrec [ListMissionProfiles]
ReadPrec ListMissionProfiles
Int -> ReadS ListMissionProfiles
ReadS [ListMissionProfiles]
(Int -> ReadS ListMissionProfiles)
-> ReadS [ListMissionProfiles]
-> ReadPrec ListMissionProfiles
-> ReadPrec [ListMissionProfiles]
-> Read ListMissionProfiles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMissionProfiles]
$creadListPrec :: ReadPrec [ListMissionProfiles]
readPrec :: ReadPrec ListMissionProfiles
$creadPrec :: ReadPrec ListMissionProfiles
readList :: ReadS [ListMissionProfiles]
$creadList :: ReadS [ListMissionProfiles]
readsPrec :: Int -> ReadS ListMissionProfiles
$creadsPrec :: Int -> ReadS ListMissionProfiles
Prelude.Read, Int -> ListMissionProfiles -> ShowS
[ListMissionProfiles] -> ShowS
ListMissionProfiles -> String
(Int -> ListMissionProfiles -> ShowS)
-> (ListMissionProfiles -> String)
-> ([ListMissionProfiles] -> ShowS)
-> Show ListMissionProfiles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMissionProfiles] -> ShowS
$cshowList :: [ListMissionProfiles] -> ShowS
show :: ListMissionProfiles -> String
$cshow :: ListMissionProfiles -> String
showsPrec :: Int -> ListMissionProfiles -> ShowS
$cshowsPrec :: Int -> ListMissionProfiles -> ShowS
Prelude.Show, (forall x. ListMissionProfiles -> Rep ListMissionProfiles x)
-> (forall x. Rep ListMissionProfiles x -> ListMissionProfiles)
-> Generic ListMissionProfiles
forall x. Rep ListMissionProfiles x -> ListMissionProfiles
forall x. ListMissionProfiles -> Rep ListMissionProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMissionProfiles x -> ListMissionProfiles
$cfrom :: forall x. ListMissionProfiles -> Rep ListMissionProfiles x
Prelude.Generic)

-- |
-- Create a value of 'ListMissionProfiles' 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', 'listMissionProfiles_nextToken' - Next token returned in the request of a previous @ListMissionProfiles@
-- call. Used to get the next page of results.
--
-- 'maxResults', 'listMissionProfiles_maxResults' - Maximum number of mission profiles returned.
newListMissionProfiles ::
  ListMissionProfiles
newListMissionProfiles :: ListMissionProfiles
newListMissionProfiles =
  ListMissionProfiles' :: Maybe Text -> Maybe Int -> ListMissionProfiles
ListMissionProfiles'
    { $sel:nextToken:ListMissionProfiles' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMissionProfiles' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | Next token returned in the request of a previous @ListMissionProfiles@
-- call. Used to get the next page of results.
listMissionProfiles_nextToken :: Lens.Lens' ListMissionProfiles (Prelude.Maybe Prelude.Text)
listMissionProfiles_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMissionProfiles -> f ListMissionProfiles
listMissionProfiles_nextToken = (ListMissionProfiles -> Maybe Text)
-> (ListMissionProfiles -> Maybe Text -> ListMissionProfiles)
-> Lens
     ListMissionProfiles ListMissionProfiles (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMissionProfiles' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMissionProfiles' :: ListMissionProfiles -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMissionProfiles
s@ListMissionProfiles' {} Maybe Text
a -> ListMissionProfiles
s {$sel:nextToken:ListMissionProfiles' :: Maybe Text
nextToken = Maybe Text
a} :: ListMissionProfiles)

-- | Maximum number of mission profiles returned.
listMissionProfiles_maxResults :: Lens.Lens' ListMissionProfiles (Prelude.Maybe Prelude.Int)
listMissionProfiles_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListMissionProfiles -> f ListMissionProfiles
listMissionProfiles_maxResults = (ListMissionProfiles -> Maybe Int)
-> (ListMissionProfiles -> Maybe Int -> ListMissionProfiles)
-> Lens
     ListMissionProfiles ListMissionProfiles (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMissionProfiles' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListMissionProfiles' :: ListMissionProfiles -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListMissionProfiles
s@ListMissionProfiles' {} Maybe Int
a -> ListMissionProfiles
s {$sel:maxResults:ListMissionProfiles' :: Maybe Int
maxResults = Maybe Int
a} :: ListMissionProfiles)

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

instance Prelude.NFData ListMissionProfiles

instance Core.ToHeaders ListMissionProfiles where
  toHeaders :: ListMissionProfiles -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMissionProfiles -> 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 ListMissionProfiles where
  toPath :: ListMissionProfiles -> ByteString
toPath = ByteString -> ListMissionProfiles -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/missionprofile"

instance Core.ToQuery ListMissionProfiles where
  toQuery :: ListMissionProfiles -> QueryString
toQuery ListMissionProfiles' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:maxResults:ListMissionProfiles' :: ListMissionProfiles -> Maybe Int
$sel:nextToken:ListMissionProfiles' :: ListMissionProfiles -> 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 Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
      ]

-- |
--
-- /See:/ 'newListMissionProfilesResponse' smart constructor.
data ListMissionProfilesResponse = ListMissionProfilesResponse'
  { -- | Next token returned in the response of a previous @ListMissionProfiles@
    -- call. Used to get the next page of results.
    ListMissionProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | List of mission profiles.
    ListMissionProfilesResponse -> Maybe [MissionProfileListItem]
missionProfileList :: Prelude.Maybe [MissionProfileListItem],
    -- | The response's http status code.
    ListMissionProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMissionProfilesResponse -> ListMissionProfilesResponse -> Bool
(ListMissionProfilesResponse
 -> ListMissionProfilesResponse -> Bool)
-> (ListMissionProfilesResponse
    -> ListMissionProfilesResponse -> Bool)
-> Eq ListMissionProfilesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMissionProfilesResponse -> ListMissionProfilesResponse -> Bool
$c/= :: ListMissionProfilesResponse -> ListMissionProfilesResponse -> Bool
== :: ListMissionProfilesResponse -> ListMissionProfilesResponse -> Bool
$c== :: ListMissionProfilesResponse -> ListMissionProfilesResponse -> Bool
Prelude.Eq, ReadPrec [ListMissionProfilesResponse]
ReadPrec ListMissionProfilesResponse
Int -> ReadS ListMissionProfilesResponse
ReadS [ListMissionProfilesResponse]
(Int -> ReadS ListMissionProfilesResponse)
-> ReadS [ListMissionProfilesResponse]
-> ReadPrec ListMissionProfilesResponse
-> ReadPrec [ListMissionProfilesResponse]
-> Read ListMissionProfilesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMissionProfilesResponse]
$creadListPrec :: ReadPrec [ListMissionProfilesResponse]
readPrec :: ReadPrec ListMissionProfilesResponse
$creadPrec :: ReadPrec ListMissionProfilesResponse
readList :: ReadS [ListMissionProfilesResponse]
$creadList :: ReadS [ListMissionProfilesResponse]
readsPrec :: Int -> ReadS ListMissionProfilesResponse
$creadsPrec :: Int -> ReadS ListMissionProfilesResponse
Prelude.Read, Int -> ListMissionProfilesResponse -> ShowS
[ListMissionProfilesResponse] -> ShowS
ListMissionProfilesResponse -> String
(Int -> ListMissionProfilesResponse -> ShowS)
-> (ListMissionProfilesResponse -> String)
-> ([ListMissionProfilesResponse] -> ShowS)
-> Show ListMissionProfilesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMissionProfilesResponse] -> ShowS
$cshowList :: [ListMissionProfilesResponse] -> ShowS
show :: ListMissionProfilesResponse -> String
$cshow :: ListMissionProfilesResponse -> String
showsPrec :: Int -> ListMissionProfilesResponse -> ShowS
$cshowsPrec :: Int -> ListMissionProfilesResponse -> ShowS
Prelude.Show, (forall x.
 ListMissionProfilesResponse -> Rep ListMissionProfilesResponse x)
-> (forall x.
    Rep ListMissionProfilesResponse x -> ListMissionProfilesResponse)
-> Generic ListMissionProfilesResponse
forall x.
Rep ListMissionProfilesResponse x -> ListMissionProfilesResponse
forall x.
ListMissionProfilesResponse -> Rep ListMissionProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMissionProfilesResponse x -> ListMissionProfilesResponse
$cfrom :: forall x.
ListMissionProfilesResponse -> Rep ListMissionProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMissionProfilesResponse' 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', 'listMissionProfilesResponse_nextToken' - Next token returned in the response of a previous @ListMissionProfiles@
-- call. Used to get the next page of results.
--
-- 'missionProfileList', 'listMissionProfilesResponse_missionProfileList' - List of mission profiles.
--
-- 'httpStatus', 'listMissionProfilesResponse_httpStatus' - The response's http status code.
newListMissionProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMissionProfilesResponse
newListMissionProfilesResponse :: Int -> ListMissionProfilesResponse
newListMissionProfilesResponse Int
pHttpStatus_ =
  ListMissionProfilesResponse' :: Maybe Text
-> Maybe [MissionProfileListItem]
-> Int
-> ListMissionProfilesResponse
ListMissionProfilesResponse'
    { $sel:nextToken:ListMissionProfilesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:missionProfileList:ListMissionProfilesResponse' :: Maybe [MissionProfileListItem]
missionProfileList = Maybe [MissionProfileListItem]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMissionProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Next token returned in the response of a previous @ListMissionProfiles@
-- call. Used to get the next page of results.
listMissionProfilesResponse_nextToken :: Lens.Lens' ListMissionProfilesResponse (Prelude.Maybe Prelude.Text)
listMissionProfilesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMissionProfilesResponse -> f ListMissionProfilesResponse
listMissionProfilesResponse_nextToken = (ListMissionProfilesResponse -> Maybe Text)
-> (ListMissionProfilesResponse
    -> Maybe Text -> ListMissionProfilesResponse)
-> Lens' ListMissionProfilesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMissionProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMissionProfilesResponse' :: ListMissionProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMissionProfilesResponse
s@ListMissionProfilesResponse' {} Maybe Text
a -> ListMissionProfilesResponse
s {$sel:nextToken:ListMissionProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMissionProfilesResponse)

-- | List of mission profiles.
listMissionProfilesResponse_missionProfileList :: Lens.Lens' ListMissionProfilesResponse (Prelude.Maybe [MissionProfileListItem])
listMissionProfilesResponse_missionProfileList :: (Maybe [MissionProfileListItem]
 -> f (Maybe [MissionProfileListItem]))
-> ListMissionProfilesResponse -> f ListMissionProfilesResponse
listMissionProfilesResponse_missionProfileList = (ListMissionProfilesResponse -> Maybe [MissionProfileListItem])
-> (ListMissionProfilesResponse
    -> Maybe [MissionProfileListItem] -> ListMissionProfilesResponse)
-> Lens'
     ListMissionProfilesResponse (Maybe [MissionProfileListItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMissionProfilesResponse' {Maybe [MissionProfileListItem]
missionProfileList :: Maybe [MissionProfileListItem]
$sel:missionProfileList:ListMissionProfilesResponse' :: ListMissionProfilesResponse -> Maybe [MissionProfileListItem]
missionProfileList} -> Maybe [MissionProfileListItem]
missionProfileList) (\s :: ListMissionProfilesResponse
s@ListMissionProfilesResponse' {} Maybe [MissionProfileListItem]
a -> ListMissionProfilesResponse
s {$sel:missionProfileList:ListMissionProfilesResponse' :: Maybe [MissionProfileListItem]
missionProfileList = Maybe [MissionProfileListItem]
a} :: ListMissionProfilesResponse) ((Maybe [MissionProfileListItem]
  -> f (Maybe [MissionProfileListItem]))
 -> ListMissionProfilesResponse -> f ListMissionProfilesResponse)
-> ((Maybe [MissionProfileListItem]
     -> f (Maybe [MissionProfileListItem]))
    -> Maybe [MissionProfileListItem]
    -> f (Maybe [MissionProfileListItem]))
-> (Maybe [MissionProfileListItem]
    -> f (Maybe [MissionProfileListItem]))
-> ListMissionProfilesResponse
-> f ListMissionProfilesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MissionProfileListItem]
  [MissionProfileListItem]
  [MissionProfileListItem]
  [MissionProfileListItem]
-> Iso
     (Maybe [MissionProfileListItem])
     (Maybe [MissionProfileListItem])
     (Maybe [MissionProfileListItem])
     (Maybe [MissionProfileListItem])
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
  [MissionProfileListItem]
  [MissionProfileListItem]
  [MissionProfileListItem]
  [MissionProfileListItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListMissionProfilesResponse