{-# 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.DataBrew.ListRecipes
-- 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 of the DataBrew recipes that are defined.
--
-- This operation returns paginated results.
module Amazonka.DataBrew.ListRecipes
  ( -- * Creating a Request
    ListRecipes (..),
    newListRecipes,

    -- * Request Lenses
    listRecipes_nextToken,
    listRecipes_recipeVersion,
    listRecipes_maxResults,

    -- * Destructuring the Response
    ListRecipesResponse (..),
    newListRecipesResponse,

    -- * Response Lenses
    listRecipesResponse_nextToken,
    listRecipesResponse_httpStatus,
    listRecipesResponse_recipes,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataBrew.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:/ 'newListRecipes' smart constructor.
data ListRecipes = ListRecipes'
  { -- | The token returned by a previous call to retrieve the next set of
    -- results.
    ListRecipes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Return only those recipes with a version identifier of @LATEST_WORKING@
    -- or @LATEST_PUBLISHED@. If @RecipeVersion@ is omitted, @ListRecipes@
    -- returns all of the @LATEST_PUBLISHED@ recipe versions.
    --
    -- Valid values: @LATEST_WORKING@ | @LATEST_PUBLISHED@
    ListRecipes -> Maybe Text
recipeVersion :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in this request.
    ListRecipes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListRecipes -> ListRecipes -> Bool
(ListRecipes -> ListRecipes -> Bool)
-> (ListRecipes -> ListRecipes -> Bool) -> Eq ListRecipes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecipes -> ListRecipes -> Bool
$c/= :: ListRecipes -> ListRecipes -> Bool
== :: ListRecipes -> ListRecipes -> Bool
$c== :: ListRecipes -> ListRecipes -> Bool
Prelude.Eq, ReadPrec [ListRecipes]
ReadPrec ListRecipes
Int -> ReadS ListRecipes
ReadS [ListRecipes]
(Int -> ReadS ListRecipes)
-> ReadS [ListRecipes]
-> ReadPrec ListRecipes
-> ReadPrec [ListRecipes]
-> Read ListRecipes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecipes]
$creadListPrec :: ReadPrec [ListRecipes]
readPrec :: ReadPrec ListRecipes
$creadPrec :: ReadPrec ListRecipes
readList :: ReadS [ListRecipes]
$creadList :: ReadS [ListRecipes]
readsPrec :: Int -> ReadS ListRecipes
$creadsPrec :: Int -> ReadS ListRecipes
Prelude.Read, Int -> ListRecipes -> ShowS
[ListRecipes] -> ShowS
ListRecipes -> String
(Int -> ListRecipes -> ShowS)
-> (ListRecipes -> String)
-> ([ListRecipes] -> ShowS)
-> Show ListRecipes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecipes] -> ShowS
$cshowList :: [ListRecipes] -> ShowS
show :: ListRecipes -> String
$cshow :: ListRecipes -> String
showsPrec :: Int -> ListRecipes -> ShowS
$cshowsPrec :: Int -> ListRecipes -> ShowS
Prelude.Show, (forall x. ListRecipes -> Rep ListRecipes x)
-> (forall x. Rep ListRecipes x -> ListRecipes)
-> Generic ListRecipes
forall x. Rep ListRecipes x -> ListRecipes
forall x. ListRecipes -> Rep ListRecipes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRecipes x -> ListRecipes
$cfrom :: forall x. ListRecipes -> Rep ListRecipes x
Prelude.Generic)

-- |
-- Create a value of 'ListRecipes' 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', 'listRecipes_nextToken' - The token returned by a previous call to retrieve the next set of
-- results.
--
-- 'recipeVersion', 'listRecipes_recipeVersion' - Return only those recipes with a version identifier of @LATEST_WORKING@
-- or @LATEST_PUBLISHED@. If @RecipeVersion@ is omitted, @ListRecipes@
-- returns all of the @LATEST_PUBLISHED@ recipe versions.
--
-- Valid values: @LATEST_WORKING@ | @LATEST_PUBLISHED@
--
-- 'maxResults', 'listRecipes_maxResults' - The maximum number of results to return in this request.
newListRecipes ::
  ListRecipes
newListRecipes :: ListRecipes
newListRecipes =
  ListRecipes' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListRecipes
ListRecipes'
    { $sel:nextToken:ListRecipes' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recipeVersion:ListRecipes' :: Maybe Text
recipeVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListRecipes' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The token returned by a previous call to retrieve the next set of
-- results.
listRecipes_nextToken :: Lens.Lens' ListRecipes (Prelude.Maybe Prelude.Text)
listRecipes_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListRecipes -> f ListRecipes
listRecipes_nextToken = (ListRecipes -> Maybe Text)
-> (ListRecipes -> Maybe Text -> ListRecipes)
-> Lens ListRecipes ListRecipes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecipes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecipes' :: ListRecipes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecipes
s@ListRecipes' {} Maybe Text
a -> ListRecipes
s {$sel:nextToken:ListRecipes' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecipes)

-- | Return only those recipes with a version identifier of @LATEST_WORKING@
-- or @LATEST_PUBLISHED@. If @RecipeVersion@ is omitted, @ListRecipes@
-- returns all of the @LATEST_PUBLISHED@ recipe versions.
--
-- Valid values: @LATEST_WORKING@ | @LATEST_PUBLISHED@
listRecipes_recipeVersion :: Lens.Lens' ListRecipes (Prelude.Maybe Prelude.Text)
listRecipes_recipeVersion :: (Maybe Text -> f (Maybe Text)) -> ListRecipes -> f ListRecipes
listRecipes_recipeVersion = (ListRecipes -> Maybe Text)
-> (ListRecipes -> Maybe Text -> ListRecipes)
-> Lens ListRecipes ListRecipes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecipes' {Maybe Text
recipeVersion :: Maybe Text
$sel:recipeVersion:ListRecipes' :: ListRecipes -> Maybe Text
recipeVersion} -> Maybe Text
recipeVersion) (\s :: ListRecipes
s@ListRecipes' {} Maybe Text
a -> ListRecipes
s {$sel:recipeVersion:ListRecipes' :: Maybe Text
recipeVersion = Maybe Text
a} :: ListRecipes)

-- | The maximum number of results to return in this request.
listRecipes_maxResults :: Lens.Lens' ListRecipes (Prelude.Maybe Prelude.Natural)
listRecipes_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListRecipes -> f ListRecipes
listRecipes_maxResults = (ListRecipes -> Maybe Natural)
-> (ListRecipes -> Maybe Natural -> ListRecipes)
-> Lens ListRecipes ListRecipes (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecipes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRecipes' :: ListRecipes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRecipes
s@ListRecipes' {} Maybe Natural
a -> ListRecipes
s {$sel:maxResults:ListRecipes' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRecipes)

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

instance Prelude.Hashable ListRecipes

instance Prelude.NFData ListRecipes

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

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

-- | /See:/ 'newListRecipesResponse' smart constructor.
data ListRecipesResponse = ListRecipesResponse'
  { -- | A token that you can use in a subsequent call to retrieve the next set
    -- of results.
    ListRecipesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListRecipesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of recipes that are defined.
    ListRecipesResponse -> [Recipe]
recipes :: [Recipe]
  }
  deriving (ListRecipesResponse -> ListRecipesResponse -> Bool
(ListRecipesResponse -> ListRecipesResponse -> Bool)
-> (ListRecipesResponse -> ListRecipesResponse -> Bool)
-> Eq ListRecipesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecipesResponse -> ListRecipesResponse -> Bool
$c/= :: ListRecipesResponse -> ListRecipesResponse -> Bool
== :: ListRecipesResponse -> ListRecipesResponse -> Bool
$c== :: ListRecipesResponse -> ListRecipesResponse -> Bool
Prelude.Eq, ReadPrec [ListRecipesResponse]
ReadPrec ListRecipesResponse
Int -> ReadS ListRecipesResponse
ReadS [ListRecipesResponse]
(Int -> ReadS ListRecipesResponse)
-> ReadS [ListRecipesResponse]
-> ReadPrec ListRecipesResponse
-> ReadPrec [ListRecipesResponse]
-> Read ListRecipesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecipesResponse]
$creadListPrec :: ReadPrec [ListRecipesResponse]
readPrec :: ReadPrec ListRecipesResponse
$creadPrec :: ReadPrec ListRecipesResponse
readList :: ReadS [ListRecipesResponse]
$creadList :: ReadS [ListRecipesResponse]
readsPrec :: Int -> ReadS ListRecipesResponse
$creadsPrec :: Int -> ReadS ListRecipesResponse
Prelude.Read, Int -> ListRecipesResponse -> ShowS
[ListRecipesResponse] -> ShowS
ListRecipesResponse -> String
(Int -> ListRecipesResponse -> ShowS)
-> (ListRecipesResponse -> String)
-> ([ListRecipesResponse] -> ShowS)
-> Show ListRecipesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecipesResponse] -> ShowS
$cshowList :: [ListRecipesResponse] -> ShowS
show :: ListRecipesResponse -> String
$cshow :: ListRecipesResponse -> String
showsPrec :: Int -> ListRecipesResponse -> ShowS
$cshowsPrec :: Int -> ListRecipesResponse -> ShowS
Prelude.Show, (forall x. ListRecipesResponse -> Rep ListRecipesResponse x)
-> (forall x. Rep ListRecipesResponse x -> ListRecipesResponse)
-> Generic ListRecipesResponse
forall x. Rep ListRecipesResponse x -> ListRecipesResponse
forall x. ListRecipesResponse -> Rep ListRecipesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRecipesResponse x -> ListRecipesResponse
$cfrom :: forall x. ListRecipesResponse -> Rep ListRecipesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRecipesResponse' 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', 'listRecipesResponse_nextToken' - A token that you can use in a subsequent call to retrieve the next set
-- of results.
--
-- 'httpStatus', 'listRecipesResponse_httpStatus' - The response's http status code.
--
-- 'recipes', 'listRecipesResponse_recipes' - A list of recipes that are defined.
newListRecipesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRecipesResponse
newListRecipesResponse :: Int -> ListRecipesResponse
newListRecipesResponse Int
pHttpStatus_ =
  ListRecipesResponse' :: Maybe Text -> Int -> [Recipe] -> ListRecipesResponse
ListRecipesResponse'
    { $sel:nextToken:ListRecipesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRecipesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:recipes:ListRecipesResponse' :: [Recipe]
recipes = [Recipe]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A token that you can use in a subsequent call to retrieve the next set
-- of results.
listRecipesResponse_nextToken :: Lens.Lens' ListRecipesResponse (Prelude.Maybe Prelude.Text)
listRecipesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRecipesResponse -> f ListRecipesResponse
listRecipesResponse_nextToken = (ListRecipesResponse -> Maybe Text)
-> (ListRecipesResponse -> Maybe Text -> ListRecipesResponse)
-> Lens' ListRecipesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecipesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecipesResponse' :: ListRecipesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecipesResponse
s@ListRecipesResponse' {} Maybe Text
a -> ListRecipesResponse
s {$sel:nextToken:ListRecipesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecipesResponse)

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

-- | A list of recipes that are defined.
listRecipesResponse_recipes :: Lens.Lens' ListRecipesResponse [Recipe]
listRecipesResponse_recipes :: ([Recipe] -> f [Recipe])
-> ListRecipesResponse -> f ListRecipesResponse
listRecipesResponse_recipes = (ListRecipesResponse -> [Recipe])
-> (ListRecipesResponse -> [Recipe] -> ListRecipesResponse)
-> Lens' ListRecipesResponse [Recipe]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecipesResponse' {[Recipe]
recipes :: [Recipe]
$sel:recipes:ListRecipesResponse' :: ListRecipesResponse -> [Recipe]
recipes} -> [Recipe]
recipes) (\s :: ListRecipesResponse
s@ListRecipesResponse' {} [Recipe]
a -> ListRecipesResponse
s {$sel:recipes:ListRecipesResponse' :: [Recipe]
recipes = [Recipe]
a} :: ListRecipesResponse) (([Recipe] -> f [Recipe])
 -> ListRecipesResponse -> f ListRecipesResponse)
-> (([Recipe] -> f [Recipe]) -> [Recipe] -> f [Recipe])
-> ([Recipe] -> f [Recipe])
-> ListRecipesResponse
-> f ListRecipesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Recipe] -> f [Recipe]) -> [Recipe] -> f [Recipe]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListRecipesResponse