{-# 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.SSMIncidents.ListResponsePlans
-- 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 all response plans in your account.
--
-- This operation returns paginated results.
module Amazonka.SSMIncidents.ListResponsePlans
  ( -- * Creating a Request
    ListResponsePlans (..),
    newListResponsePlans,

    -- * Request Lenses
    listResponsePlans_nextToken,
    listResponsePlans_maxResults,

    -- * Destructuring the Response
    ListResponsePlansResponse (..),
    newListResponsePlansResponse,

    -- * Response Lenses
    listResponsePlansResponse_nextToken,
    listResponsePlansResponse_httpStatus,
    listResponsePlansResponse_responsePlanSummaries,
  )
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.SSMIncidents.Types

-- | /See:/ 'newListResponsePlans' smart constructor.
data ListResponsePlans = ListResponsePlans'
  { -- | The pagination token to continue to the next page of results.
    ListResponsePlans -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of response plans per page.
    ListResponsePlans -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListResponsePlans -> ListResponsePlans -> Bool
(ListResponsePlans -> ListResponsePlans -> Bool)
-> (ListResponsePlans -> ListResponsePlans -> Bool)
-> Eq ListResponsePlans
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResponsePlans -> ListResponsePlans -> Bool
$c/= :: ListResponsePlans -> ListResponsePlans -> Bool
== :: ListResponsePlans -> ListResponsePlans -> Bool
$c== :: ListResponsePlans -> ListResponsePlans -> Bool
Prelude.Eq, ReadPrec [ListResponsePlans]
ReadPrec ListResponsePlans
Int -> ReadS ListResponsePlans
ReadS [ListResponsePlans]
(Int -> ReadS ListResponsePlans)
-> ReadS [ListResponsePlans]
-> ReadPrec ListResponsePlans
-> ReadPrec [ListResponsePlans]
-> Read ListResponsePlans
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResponsePlans]
$creadListPrec :: ReadPrec [ListResponsePlans]
readPrec :: ReadPrec ListResponsePlans
$creadPrec :: ReadPrec ListResponsePlans
readList :: ReadS [ListResponsePlans]
$creadList :: ReadS [ListResponsePlans]
readsPrec :: Int -> ReadS ListResponsePlans
$creadsPrec :: Int -> ReadS ListResponsePlans
Prelude.Read, Int -> ListResponsePlans -> ShowS
[ListResponsePlans] -> ShowS
ListResponsePlans -> String
(Int -> ListResponsePlans -> ShowS)
-> (ListResponsePlans -> String)
-> ([ListResponsePlans] -> ShowS)
-> Show ListResponsePlans
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResponsePlans] -> ShowS
$cshowList :: [ListResponsePlans] -> ShowS
show :: ListResponsePlans -> String
$cshow :: ListResponsePlans -> String
showsPrec :: Int -> ListResponsePlans -> ShowS
$cshowsPrec :: Int -> ListResponsePlans -> ShowS
Prelude.Show, (forall x. ListResponsePlans -> Rep ListResponsePlans x)
-> (forall x. Rep ListResponsePlans x -> ListResponsePlans)
-> Generic ListResponsePlans
forall x. Rep ListResponsePlans x -> ListResponsePlans
forall x. ListResponsePlans -> Rep ListResponsePlans x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListResponsePlans x -> ListResponsePlans
$cfrom :: forall x. ListResponsePlans -> Rep ListResponsePlans x
Prelude.Generic)

-- |
-- Create a value of 'ListResponsePlans' 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', 'listResponsePlans_nextToken' - The pagination token to continue to the next page of results.
--
-- 'maxResults', 'listResponsePlans_maxResults' - The maximum number of response plans per page.
newListResponsePlans ::
  ListResponsePlans
newListResponsePlans :: ListResponsePlans
newListResponsePlans =
  ListResponsePlans' :: Maybe Text -> Maybe Natural -> ListResponsePlans
ListResponsePlans'
    { $sel:nextToken:ListResponsePlans' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListResponsePlans' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The maximum number of response plans per page.
listResponsePlans_maxResults :: Lens.Lens' ListResponsePlans (Prelude.Maybe Prelude.Natural)
listResponsePlans_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListResponsePlans -> f ListResponsePlans
listResponsePlans_maxResults = (ListResponsePlans -> Maybe Natural)
-> (ListResponsePlans -> Maybe Natural -> ListResponsePlans)
-> Lens
     ListResponsePlans ListResponsePlans (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResponsePlans' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListResponsePlans' :: ListResponsePlans -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListResponsePlans
s@ListResponsePlans' {} Maybe Natural
a -> ListResponsePlans
s {$sel:maxResults:ListResponsePlans' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListResponsePlans)

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

instance Prelude.Hashable ListResponsePlans

instance Prelude.NFData ListResponsePlans

instance Core.ToHeaders ListResponsePlans where
  toHeaders :: ListResponsePlans -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListResponsePlans -> 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.ToJSON ListResponsePlans where
  toJSON :: ListResponsePlans -> Value
toJSON ListResponsePlans' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListResponsePlans' :: ListResponsePlans -> Maybe Natural
$sel:nextToken:ListResponsePlans' :: ListResponsePlans -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nextToken" 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
nextToken,
            (Text
"maxResults" 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
maxResults
          ]
      )

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

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

-- | /See:/ 'newListResponsePlansResponse' smart constructor.
data ListResponsePlansResponse = ListResponsePlansResponse'
  { -- | The pagination token to continue to the next page of results.
    ListResponsePlansResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListResponsePlansResponse -> Int
httpStatus :: Prelude.Int,
    -- | Details of each response plan.
    ListResponsePlansResponse -> [ResponsePlanSummary]
responsePlanSummaries :: [ResponsePlanSummary]
  }
  deriving (ListResponsePlansResponse -> ListResponsePlansResponse -> Bool
(ListResponsePlansResponse -> ListResponsePlansResponse -> Bool)
-> (ListResponsePlansResponse -> ListResponsePlansResponse -> Bool)
-> Eq ListResponsePlansResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResponsePlansResponse -> ListResponsePlansResponse -> Bool
$c/= :: ListResponsePlansResponse -> ListResponsePlansResponse -> Bool
== :: ListResponsePlansResponse -> ListResponsePlansResponse -> Bool
$c== :: ListResponsePlansResponse -> ListResponsePlansResponse -> Bool
Prelude.Eq, ReadPrec [ListResponsePlansResponse]
ReadPrec ListResponsePlansResponse
Int -> ReadS ListResponsePlansResponse
ReadS [ListResponsePlansResponse]
(Int -> ReadS ListResponsePlansResponse)
-> ReadS [ListResponsePlansResponse]
-> ReadPrec ListResponsePlansResponse
-> ReadPrec [ListResponsePlansResponse]
-> Read ListResponsePlansResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResponsePlansResponse]
$creadListPrec :: ReadPrec [ListResponsePlansResponse]
readPrec :: ReadPrec ListResponsePlansResponse
$creadPrec :: ReadPrec ListResponsePlansResponse
readList :: ReadS [ListResponsePlansResponse]
$creadList :: ReadS [ListResponsePlansResponse]
readsPrec :: Int -> ReadS ListResponsePlansResponse
$creadsPrec :: Int -> ReadS ListResponsePlansResponse
Prelude.Read, Int -> ListResponsePlansResponse -> ShowS
[ListResponsePlansResponse] -> ShowS
ListResponsePlansResponse -> String
(Int -> ListResponsePlansResponse -> ShowS)
-> (ListResponsePlansResponse -> String)
-> ([ListResponsePlansResponse] -> ShowS)
-> Show ListResponsePlansResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResponsePlansResponse] -> ShowS
$cshowList :: [ListResponsePlansResponse] -> ShowS
show :: ListResponsePlansResponse -> String
$cshow :: ListResponsePlansResponse -> String
showsPrec :: Int -> ListResponsePlansResponse -> ShowS
$cshowsPrec :: Int -> ListResponsePlansResponse -> ShowS
Prelude.Show, (forall x.
 ListResponsePlansResponse -> Rep ListResponsePlansResponse x)
-> (forall x.
    Rep ListResponsePlansResponse x -> ListResponsePlansResponse)
-> Generic ListResponsePlansResponse
forall x.
Rep ListResponsePlansResponse x -> ListResponsePlansResponse
forall x.
ListResponsePlansResponse -> Rep ListResponsePlansResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResponsePlansResponse x -> ListResponsePlansResponse
$cfrom :: forall x.
ListResponsePlansResponse -> Rep ListResponsePlansResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListResponsePlansResponse' 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', 'listResponsePlansResponse_nextToken' - The pagination token to continue to the next page of results.
--
-- 'httpStatus', 'listResponsePlansResponse_httpStatus' - The response's http status code.
--
-- 'responsePlanSummaries', 'listResponsePlansResponse_responsePlanSummaries' - Details of each response plan.
newListResponsePlansResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListResponsePlansResponse
newListResponsePlansResponse :: Int -> ListResponsePlansResponse
newListResponsePlansResponse Int
pHttpStatus_ =
  ListResponsePlansResponse' :: Maybe Text
-> Int -> [ResponsePlanSummary] -> ListResponsePlansResponse
ListResponsePlansResponse'
    { $sel:nextToken:ListResponsePlansResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListResponsePlansResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:responsePlanSummaries:ListResponsePlansResponse' :: [ResponsePlanSummary]
responsePlanSummaries = [ResponsePlanSummary]
forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | Details of each response plan.
listResponsePlansResponse_responsePlanSummaries :: Lens.Lens' ListResponsePlansResponse [ResponsePlanSummary]
listResponsePlansResponse_responsePlanSummaries :: ([ResponsePlanSummary] -> f [ResponsePlanSummary])
-> ListResponsePlansResponse -> f ListResponsePlansResponse
listResponsePlansResponse_responsePlanSummaries = (ListResponsePlansResponse -> [ResponsePlanSummary])
-> (ListResponsePlansResponse
    -> [ResponsePlanSummary] -> ListResponsePlansResponse)
-> Lens' ListResponsePlansResponse [ResponsePlanSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResponsePlansResponse' {[ResponsePlanSummary]
responsePlanSummaries :: [ResponsePlanSummary]
$sel:responsePlanSummaries:ListResponsePlansResponse' :: ListResponsePlansResponse -> [ResponsePlanSummary]
responsePlanSummaries} -> [ResponsePlanSummary]
responsePlanSummaries) (\s :: ListResponsePlansResponse
s@ListResponsePlansResponse' {} [ResponsePlanSummary]
a -> ListResponsePlansResponse
s {$sel:responsePlanSummaries:ListResponsePlansResponse' :: [ResponsePlanSummary]
responsePlanSummaries = [ResponsePlanSummary]
a} :: ListResponsePlansResponse) (([ResponsePlanSummary] -> f [ResponsePlanSummary])
 -> ListResponsePlansResponse -> f ListResponsePlansResponse)
-> (([ResponsePlanSummary] -> f [ResponsePlanSummary])
    -> [ResponsePlanSummary] -> f [ResponsePlanSummary])
-> ([ResponsePlanSummary] -> f [ResponsePlanSummary])
-> ListResponsePlansResponse
-> f ListResponsePlansResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ResponsePlanSummary] -> f [ResponsePlanSummary])
-> [ResponsePlanSummary] -> f [ResponsePlanSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListResponsePlansResponse