{-# 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.ImageBuilder.ListContainerRecipes
-- 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 container recipes.
module Amazonka.ImageBuilder.ListContainerRecipes
  ( -- * Creating a Request
    ListContainerRecipes (..),
    newListContainerRecipes,

    -- * Request Lenses
    listContainerRecipes_filters,
    listContainerRecipes_owner,
    listContainerRecipes_nextToken,
    listContainerRecipes_maxResults,

    -- * Destructuring the Response
    ListContainerRecipesResponse (..),
    newListContainerRecipesResponse,

    -- * Response Lenses
    listContainerRecipesResponse_requestId,
    listContainerRecipesResponse_containerRecipeSummaryList,
    listContainerRecipesResponse_nextToken,
    listContainerRecipesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.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:/ 'newListContainerRecipes' smart constructor.
data ListContainerRecipes = ListContainerRecipes'
  { -- | Use the following filters to streamline results:
    --
    -- -   @containerType@
    --
    -- -   @name@
    --
    -- -   @parentImage@
    --
    -- -   @platform@
    ListContainerRecipes -> Maybe (NonEmpty Filter)
filters :: Prelude.Maybe (Prelude.NonEmpty Filter),
    -- | Returns container recipes belonging to the specified owner, that have
    -- been shared with you. You can omit this field to return container
    -- recipes belonging to your account.
    ListContainerRecipes -> Maybe Ownership
owner :: Prelude.Maybe Ownership,
    -- | Provides a token for pagination, which determines where to begin the
    -- next set of results when the current set reaches the maximum for one
    -- request.
    ListContainerRecipes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in the list.
    ListContainerRecipes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListContainerRecipes -> ListContainerRecipes -> Bool
(ListContainerRecipes -> ListContainerRecipes -> Bool)
-> (ListContainerRecipes -> ListContainerRecipes -> Bool)
-> Eq ListContainerRecipes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListContainerRecipes -> ListContainerRecipes -> Bool
$c/= :: ListContainerRecipes -> ListContainerRecipes -> Bool
== :: ListContainerRecipes -> ListContainerRecipes -> Bool
$c== :: ListContainerRecipes -> ListContainerRecipes -> Bool
Prelude.Eq, ReadPrec [ListContainerRecipes]
ReadPrec ListContainerRecipes
Int -> ReadS ListContainerRecipes
ReadS [ListContainerRecipes]
(Int -> ReadS ListContainerRecipes)
-> ReadS [ListContainerRecipes]
-> ReadPrec ListContainerRecipes
-> ReadPrec [ListContainerRecipes]
-> Read ListContainerRecipes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListContainerRecipes]
$creadListPrec :: ReadPrec [ListContainerRecipes]
readPrec :: ReadPrec ListContainerRecipes
$creadPrec :: ReadPrec ListContainerRecipes
readList :: ReadS [ListContainerRecipes]
$creadList :: ReadS [ListContainerRecipes]
readsPrec :: Int -> ReadS ListContainerRecipes
$creadsPrec :: Int -> ReadS ListContainerRecipes
Prelude.Read, Int -> ListContainerRecipes -> ShowS
[ListContainerRecipes] -> ShowS
ListContainerRecipes -> String
(Int -> ListContainerRecipes -> ShowS)
-> (ListContainerRecipes -> String)
-> ([ListContainerRecipes] -> ShowS)
-> Show ListContainerRecipes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListContainerRecipes] -> ShowS
$cshowList :: [ListContainerRecipes] -> ShowS
show :: ListContainerRecipes -> String
$cshow :: ListContainerRecipes -> String
showsPrec :: Int -> ListContainerRecipes -> ShowS
$cshowsPrec :: Int -> ListContainerRecipes -> ShowS
Prelude.Show, (forall x. ListContainerRecipes -> Rep ListContainerRecipes x)
-> (forall x. Rep ListContainerRecipes x -> ListContainerRecipes)
-> Generic ListContainerRecipes
forall x. Rep ListContainerRecipes x -> ListContainerRecipes
forall x. ListContainerRecipes -> Rep ListContainerRecipes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListContainerRecipes x -> ListContainerRecipes
$cfrom :: forall x. ListContainerRecipes -> Rep ListContainerRecipes x
Prelude.Generic)

-- |
-- Create a value of 'ListContainerRecipes' 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:
--
-- 'filters', 'listContainerRecipes_filters' - Use the following filters to streamline results:
--
-- -   @containerType@
--
-- -   @name@
--
-- -   @parentImage@
--
-- -   @platform@
--
-- 'owner', 'listContainerRecipes_owner' - Returns container recipes belonging to the specified owner, that have
-- been shared with you. You can omit this field to return container
-- recipes belonging to your account.
--
-- 'nextToken', 'listContainerRecipes_nextToken' - Provides a token for pagination, which determines where to begin the
-- next set of results when the current set reaches the maximum for one
-- request.
--
-- 'maxResults', 'listContainerRecipes_maxResults' - The maximum number of results to return in the list.
newListContainerRecipes ::
  ListContainerRecipes
newListContainerRecipes :: ListContainerRecipes
newListContainerRecipes =
  ListContainerRecipes' :: Maybe (NonEmpty Filter)
-> Maybe Ownership
-> Maybe Text
-> Maybe Natural
-> ListContainerRecipes
ListContainerRecipes'
    { $sel:filters:ListContainerRecipes' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ListContainerRecipes' :: Maybe Ownership
owner = Maybe Ownership
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListContainerRecipes' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListContainerRecipes' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Use the following filters to streamline results:
--
-- -   @containerType@
--
-- -   @name@
--
-- -   @parentImage@
--
-- -   @platform@
listContainerRecipes_filters :: Lens.Lens' ListContainerRecipes (Prelude.Maybe (Prelude.NonEmpty Filter))
listContainerRecipes_filters :: (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListContainerRecipes -> f ListContainerRecipes
listContainerRecipes_filters = (ListContainerRecipes -> Maybe (NonEmpty Filter))
-> (ListContainerRecipes
    -> Maybe (NonEmpty Filter) -> ListContainerRecipes)
-> Lens
     ListContainerRecipes
     ListContainerRecipes
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContainerRecipes' {Maybe (NonEmpty Filter)
filters :: Maybe (NonEmpty Filter)
$sel:filters:ListContainerRecipes' :: ListContainerRecipes -> Maybe (NonEmpty Filter)
filters} -> Maybe (NonEmpty Filter)
filters) (\s :: ListContainerRecipes
s@ListContainerRecipes' {} Maybe (NonEmpty Filter)
a -> ListContainerRecipes
s {$sel:filters:ListContainerRecipes' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
a} :: ListContainerRecipes) ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
 -> ListContainerRecipes -> f ListContainerRecipes)
-> ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
    -> Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListContainerRecipes
-> f ListContainerRecipes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
-> Iso
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
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
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Returns container recipes belonging to the specified owner, that have
-- been shared with you. You can omit this field to return container
-- recipes belonging to your account.
listContainerRecipes_owner :: Lens.Lens' ListContainerRecipes (Prelude.Maybe Ownership)
listContainerRecipes_owner :: (Maybe Ownership -> f (Maybe Ownership))
-> ListContainerRecipes -> f ListContainerRecipes
listContainerRecipes_owner = (ListContainerRecipes -> Maybe Ownership)
-> (ListContainerRecipes
    -> Maybe Ownership -> ListContainerRecipes)
-> Lens
     ListContainerRecipes
     ListContainerRecipes
     (Maybe Ownership)
     (Maybe Ownership)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContainerRecipes' {Maybe Ownership
owner :: Maybe Ownership
$sel:owner:ListContainerRecipes' :: ListContainerRecipes -> Maybe Ownership
owner} -> Maybe Ownership
owner) (\s :: ListContainerRecipes
s@ListContainerRecipes' {} Maybe Ownership
a -> ListContainerRecipes
s {$sel:owner:ListContainerRecipes' :: Maybe Ownership
owner = Maybe Ownership
a} :: ListContainerRecipes)

-- | Provides a token for pagination, which determines where to begin the
-- next set of results when the current set reaches the maximum for one
-- request.
listContainerRecipes_nextToken :: Lens.Lens' ListContainerRecipes (Prelude.Maybe Prelude.Text)
listContainerRecipes_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListContainerRecipes -> f ListContainerRecipes
listContainerRecipes_nextToken = (ListContainerRecipes -> Maybe Text)
-> (ListContainerRecipes -> Maybe Text -> ListContainerRecipes)
-> Lens
     ListContainerRecipes ListContainerRecipes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContainerRecipes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListContainerRecipes' :: ListContainerRecipes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListContainerRecipes
s@ListContainerRecipes' {} Maybe Text
a -> ListContainerRecipes
s {$sel:nextToken:ListContainerRecipes' :: Maybe Text
nextToken = Maybe Text
a} :: ListContainerRecipes)

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

instance Core.AWSRequest ListContainerRecipes where
  type
    AWSResponse ListContainerRecipes =
      ListContainerRecipesResponse
  request :: ListContainerRecipes -> Request ListContainerRecipes
request = Service -> ListContainerRecipes -> Request ListContainerRecipes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListContainerRecipes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListContainerRecipes)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListContainerRecipes))
-> Logger
-> Service
-> Proxy ListContainerRecipes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListContainerRecipes)))
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 [ContainerRecipeSummary]
-> Maybe Text
-> Int
-> ListContainerRecipesResponse
ListContainerRecipesResponse'
            (Maybe Text
 -> Maybe [ContainerRecipeSummary]
 -> Maybe Text
 -> Int
 -> ListContainerRecipesResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ContainerRecipeSummary]
      -> Maybe Text -> Int -> ListContainerRecipesResponse)
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
"requestId")
            Either
  String
  (Maybe [ContainerRecipeSummary]
   -> Maybe Text -> Int -> ListContainerRecipesResponse)
-> Either String (Maybe [ContainerRecipeSummary])
-> Either
     String (Maybe Text -> Int -> ListContainerRecipesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ContainerRecipeSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"containerRecipeSummaryList"
                            Either String (Maybe (Maybe [ContainerRecipeSummary]))
-> Maybe [ContainerRecipeSummary]
-> Either String (Maybe [ContainerRecipeSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ContainerRecipeSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListContainerRecipesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListContainerRecipesResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListContainerRecipesResponse)
-> Either String Int -> Either String ListContainerRecipesResponse
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 ListContainerRecipes

instance Prelude.NFData ListContainerRecipes

instance Core.ToHeaders ListContainerRecipes where
  toHeaders :: ListContainerRecipes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListContainerRecipes -> 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 ListContainerRecipes where
  toJSON :: ListContainerRecipes -> Value
toJSON ListContainerRecipes' {Maybe Natural
Maybe (NonEmpty Filter)
Maybe Text
Maybe Ownership
maxResults :: Maybe Natural
nextToken :: Maybe Text
owner :: Maybe Ownership
filters :: Maybe (NonEmpty Filter)
$sel:maxResults:ListContainerRecipes' :: ListContainerRecipes -> Maybe Natural
$sel:nextToken:ListContainerRecipes' :: ListContainerRecipes -> Maybe Text
$sel:owner:ListContainerRecipes' :: ListContainerRecipes -> Maybe Ownership
$sel:filters:ListContainerRecipes' :: ListContainerRecipes -> Maybe (NonEmpty Filter)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"filters" Text -> NonEmpty Filter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Filter -> Pair) -> Maybe (NonEmpty Filter) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Filter)
filters,
            (Text
"owner" Text -> Ownership -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Ownership -> Pair) -> Maybe Ownership -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ownership
owner,
            (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 ListContainerRecipes where
  toPath :: ListContainerRecipes -> ByteString
toPath = ByteString -> ListContainerRecipes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/ListContainerRecipes"

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

-- | /See:/ 'newListContainerRecipesResponse' smart constructor.
data ListContainerRecipesResponse = ListContainerRecipesResponse'
  { -- | The request ID that uniquely identifies this request.
    ListContainerRecipesResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The list of container recipes returned for the request.
    ListContainerRecipesResponse -> Maybe [ContainerRecipeSummary]
containerRecipeSummaryList :: Prelude.Maybe [ContainerRecipeSummary],
    -- | The next token field is used for paginated responses. When this is not
    -- empty, there are additional container recipes that the service has not
    -- included in this response. Use this token with the next request to
    -- retrieve additional list items.
    ListContainerRecipesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListContainerRecipesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListContainerRecipesResponse
-> ListContainerRecipesResponse -> Bool
(ListContainerRecipesResponse
 -> ListContainerRecipesResponse -> Bool)
-> (ListContainerRecipesResponse
    -> ListContainerRecipesResponse -> Bool)
-> Eq ListContainerRecipesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListContainerRecipesResponse
-> ListContainerRecipesResponse -> Bool
$c/= :: ListContainerRecipesResponse
-> ListContainerRecipesResponse -> Bool
== :: ListContainerRecipesResponse
-> ListContainerRecipesResponse -> Bool
$c== :: ListContainerRecipesResponse
-> ListContainerRecipesResponse -> Bool
Prelude.Eq, ReadPrec [ListContainerRecipesResponse]
ReadPrec ListContainerRecipesResponse
Int -> ReadS ListContainerRecipesResponse
ReadS [ListContainerRecipesResponse]
(Int -> ReadS ListContainerRecipesResponse)
-> ReadS [ListContainerRecipesResponse]
-> ReadPrec ListContainerRecipesResponse
-> ReadPrec [ListContainerRecipesResponse]
-> Read ListContainerRecipesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListContainerRecipesResponse]
$creadListPrec :: ReadPrec [ListContainerRecipesResponse]
readPrec :: ReadPrec ListContainerRecipesResponse
$creadPrec :: ReadPrec ListContainerRecipesResponse
readList :: ReadS [ListContainerRecipesResponse]
$creadList :: ReadS [ListContainerRecipesResponse]
readsPrec :: Int -> ReadS ListContainerRecipesResponse
$creadsPrec :: Int -> ReadS ListContainerRecipesResponse
Prelude.Read, Int -> ListContainerRecipesResponse -> ShowS
[ListContainerRecipesResponse] -> ShowS
ListContainerRecipesResponse -> String
(Int -> ListContainerRecipesResponse -> ShowS)
-> (ListContainerRecipesResponse -> String)
-> ([ListContainerRecipesResponse] -> ShowS)
-> Show ListContainerRecipesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListContainerRecipesResponse] -> ShowS
$cshowList :: [ListContainerRecipesResponse] -> ShowS
show :: ListContainerRecipesResponse -> String
$cshow :: ListContainerRecipesResponse -> String
showsPrec :: Int -> ListContainerRecipesResponse -> ShowS
$cshowsPrec :: Int -> ListContainerRecipesResponse -> ShowS
Prelude.Show, (forall x.
 ListContainerRecipesResponse -> Rep ListContainerRecipesResponse x)
-> (forall x.
    Rep ListContainerRecipesResponse x -> ListContainerRecipesResponse)
-> Generic ListContainerRecipesResponse
forall x.
Rep ListContainerRecipesResponse x -> ListContainerRecipesResponse
forall x.
ListContainerRecipesResponse -> Rep ListContainerRecipesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListContainerRecipesResponse x -> ListContainerRecipesResponse
$cfrom :: forall x.
ListContainerRecipesResponse -> Rep ListContainerRecipesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListContainerRecipesResponse' 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:
--
-- 'requestId', 'listContainerRecipesResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'containerRecipeSummaryList', 'listContainerRecipesResponse_containerRecipeSummaryList' - The list of container recipes returned for the request.
--
-- 'nextToken', 'listContainerRecipesResponse_nextToken' - The next token field is used for paginated responses. When this is not
-- empty, there are additional container recipes that the service has not
-- included in this response. Use this token with the next request to
-- retrieve additional list items.
--
-- 'httpStatus', 'listContainerRecipesResponse_httpStatus' - The response's http status code.
newListContainerRecipesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListContainerRecipesResponse
newListContainerRecipesResponse :: Int -> ListContainerRecipesResponse
newListContainerRecipesResponse Int
pHttpStatus_ =
  ListContainerRecipesResponse' :: Maybe Text
-> Maybe [ContainerRecipeSummary]
-> Maybe Text
-> Int
-> ListContainerRecipesResponse
ListContainerRecipesResponse'
    { $sel:requestId:ListContainerRecipesResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:containerRecipeSummaryList:ListContainerRecipesResponse' :: Maybe [ContainerRecipeSummary]
containerRecipeSummaryList = Maybe [ContainerRecipeSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListContainerRecipesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListContainerRecipesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The request ID that uniquely identifies this request.
listContainerRecipesResponse_requestId :: Lens.Lens' ListContainerRecipesResponse (Prelude.Maybe Prelude.Text)
listContainerRecipesResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ListContainerRecipesResponse -> f ListContainerRecipesResponse
listContainerRecipesResponse_requestId = (ListContainerRecipesResponse -> Maybe Text)
-> (ListContainerRecipesResponse
    -> Maybe Text -> ListContainerRecipesResponse)
-> Lens
     ListContainerRecipesResponse
     ListContainerRecipesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContainerRecipesResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListContainerRecipesResponse' :: ListContainerRecipesResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListContainerRecipesResponse
s@ListContainerRecipesResponse' {} Maybe Text
a -> ListContainerRecipesResponse
s {$sel:requestId:ListContainerRecipesResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListContainerRecipesResponse)

-- | The list of container recipes returned for the request.
listContainerRecipesResponse_containerRecipeSummaryList :: Lens.Lens' ListContainerRecipesResponse (Prelude.Maybe [ContainerRecipeSummary])
listContainerRecipesResponse_containerRecipeSummaryList :: (Maybe [ContainerRecipeSummary]
 -> f (Maybe [ContainerRecipeSummary]))
-> ListContainerRecipesResponse -> f ListContainerRecipesResponse
listContainerRecipesResponse_containerRecipeSummaryList = (ListContainerRecipesResponse -> Maybe [ContainerRecipeSummary])
-> (ListContainerRecipesResponse
    -> Maybe [ContainerRecipeSummary] -> ListContainerRecipesResponse)
-> Lens
     ListContainerRecipesResponse
     ListContainerRecipesResponse
     (Maybe [ContainerRecipeSummary])
     (Maybe [ContainerRecipeSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContainerRecipesResponse' {Maybe [ContainerRecipeSummary]
containerRecipeSummaryList :: Maybe [ContainerRecipeSummary]
$sel:containerRecipeSummaryList:ListContainerRecipesResponse' :: ListContainerRecipesResponse -> Maybe [ContainerRecipeSummary]
containerRecipeSummaryList} -> Maybe [ContainerRecipeSummary]
containerRecipeSummaryList) (\s :: ListContainerRecipesResponse
s@ListContainerRecipesResponse' {} Maybe [ContainerRecipeSummary]
a -> ListContainerRecipesResponse
s {$sel:containerRecipeSummaryList:ListContainerRecipesResponse' :: Maybe [ContainerRecipeSummary]
containerRecipeSummaryList = Maybe [ContainerRecipeSummary]
a} :: ListContainerRecipesResponse) ((Maybe [ContainerRecipeSummary]
  -> f (Maybe [ContainerRecipeSummary]))
 -> ListContainerRecipesResponse -> f ListContainerRecipesResponse)
-> ((Maybe [ContainerRecipeSummary]
     -> f (Maybe [ContainerRecipeSummary]))
    -> Maybe [ContainerRecipeSummary]
    -> f (Maybe [ContainerRecipeSummary]))
-> (Maybe [ContainerRecipeSummary]
    -> f (Maybe [ContainerRecipeSummary]))
-> ListContainerRecipesResponse
-> f ListContainerRecipesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ContainerRecipeSummary]
  [ContainerRecipeSummary]
  [ContainerRecipeSummary]
  [ContainerRecipeSummary]
-> Iso
     (Maybe [ContainerRecipeSummary])
     (Maybe [ContainerRecipeSummary])
     (Maybe [ContainerRecipeSummary])
     (Maybe [ContainerRecipeSummary])
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
  [ContainerRecipeSummary]
  [ContainerRecipeSummary]
  [ContainerRecipeSummary]
  [ContainerRecipeSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The next token field is used for paginated responses. When this is not
-- empty, there are additional container recipes that the service has not
-- included in this response. Use this token with the next request to
-- retrieve additional list items.
listContainerRecipesResponse_nextToken :: Lens.Lens' ListContainerRecipesResponse (Prelude.Maybe Prelude.Text)
listContainerRecipesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListContainerRecipesResponse -> f ListContainerRecipesResponse
listContainerRecipesResponse_nextToken = (ListContainerRecipesResponse -> Maybe Text)
-> (ListContainerRecipesResponse
    -> Maybe Text -> ListContainerRecipesResponse)
-> Lens
     ListContainerRecipesResponse
     ListContainerRecipesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContainerRecipesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListContainerRecipesResponse' :: ListContainerRecipesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListContainerRecipesResponse
s@ListContainerRecipesResponse' {} Maybe Text
a -> ListContainerRecipesResponse
s {$sel:nextToken:ListContainerRecipesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListContainerRecipesResponse)

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

instance Prelude.NFData ListContainerRecipesResponse