{-# 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.ListImageRecipes
-- 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 image recipes.
module Amazonka.ImageBuilder.ListImageRecipes
  ( -- * Creating a Request
    ListImageRecipes (..),
    newListImageRecipes,

    -- * Request Lenses
    listImageRecipes_filters,
    listImageRecipes_owner,
    listImageRecipes_nextToken,
    listImageRecipes_maxResults,

    -- * Destructuring the Response
    ListImageRecipesResponse (..),
    newListImageRecipesResponse,

    -- * Response Lenses
    listImageRecipesResponse_requestId,
    listImageRecipesResponse_nextToken,
    listImageRecipesResponse_imageRecipeSummaryList,
    listImageRecipesResponse_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:/ 'newListImageRecipes' smart constructor.
data ListImageRecipes = ListImageRecipes'
  { -- | Use the following filters to streamline results:
    --
    -- -   @name@
    --
    -- -   @parentImage@
    --
    -- -   @platform@
    ListImageRecipes -> Maybe (NonEmpty Filter)
filters :: Prelude.Maybe (Prelude.NonEmpty Filter),
    -- | The owner defines which image recipes you want to list. By default, this
    -- request will only show image recipes owned by your account. You can use
    -- this field to specify if you want to view image recipes owned by
    -- yourself, by Amazon, or those image recipes that have been shared with
    -- you by other customers.
    ListImageRecipes -> Maybe Ownership
owner :: Prelude.Maybe Ownership,
    -- | A token to specify where to start paginating. This is the NextToken from
    -- a previously truncated response.
    ListImageRecipes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum items to return in a request.
    ListImageRecipes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListImageRecipes -> ListImageRecipes -> Bool
(ListImageRecipes -> ListImageRecipes -> Bool)
-> (ListImageRecipes -> ListImageRecipes -> Bool)
-> Eq ListImageRecipes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListImageRecipes -> ListImageRecipes -> Bool
$c/= :: ListImageRecipes -> ListImageRecipes -> Bool
== :: ListImageRecipes -> ListImageRecipes -> Bool
$c== :: ListImageRecipes -> ListImageRecipes -> Bool
Prelude.Eq, ReadPrec [ListImageRecipes]
ReadPrec ListImageRecipes
Int -> ReadS ListImageRecipes
ReadS [ListImageRecipes]
(Int -> ReadS ListImageRecipes)
-> ReadS [ListImageRecipes]
-> ReadPrec ListImageRecipes
-> ReadPrec [ListImageRecipes]
-> Read ListImageRecipes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListImageRecipes]
$creadListPrec :: ReadPrec [ListImageRecipes]
readPrec :: ReadPrec ListImageRecipes
$creadPrec :: ReadPrec ListImageRecipes
readList :: ReadS [ListImageRecipes]
$creadList :: ReadS [ListImageRecipes]
readsPrec :: Int -> ReadS ListImageRecipes
$creadsPrec :: Int -> ReadS ListImageRecipes
Prelude.Read, Int -> ListImageRecipes -> ShowS
[ListImageRecipes] -> ShowS
ListImageRecipes -> String
(Int -> ListImageRecipes -> ShowS)
-> (ListImageRecipes -> String)
-> ([ListImageRecipes] -> ShowS)
-> Show ListImageRecipes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListImageRecipes] -> ShowS
$cshowList :: [ListImageRecipes] -> ShowS
show :: ListImageRecipes -> String
$cshow :: ListImageRecipes -> String
showsPrec :: Int -> ListImageRecipes -> ShowS
$cshowsPrec :: Int -> ListImageRecipes -> ShowS
Prelude.Show, (forall x. ListImageRecipes -> Rep ListImageRecipes x)
-> (forall x. Rep ListImageRecipes x -> ListImageRecipes)
-> Generic ListImageRecipes
forall x. Rep ListImageRecipes x -> ListImageRecipes
forall x. ListImageRecipes -> Rep ListImageRecipes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListImageRecipes x -> ListImageRecipes
$cfrom :: forall x. ListImageRecipes -> Rep ListImageRecipes x
Prelude.Generic)

-- |
-- Create a value of 'ListImageRecipes' 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', 'listImageRecipes_filters' - Use the following filters to streamline results:
--
-- -   @name@
--
-- -   @parentImage@
--
-- -   @platform@
--
-- 'owner', 'listImageRecipes_owner' - The owner defines which image recipes you want to list. By default, this
-- request will only show image recipes owned by your account. You can use
-- this field to specify if you want to view image recipes owned by
-- yourself, by Amazon, or those image recipes that have been shared with
-- you by other customers.
--
-- 'nextToken', 'listImageRecipes_nextToken' - A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
--
-- 'maxResults', 'listImageRecipes_maxResults' - The maximum items to return in a request.
newListImageRecipes ::
  ListImageRecipes
newListImageRecipes :: ListImageRecipes
newListImageRecipes =
  ListImageRecipes' :: Maybe (NonEmpty Filter)
-> Maybe Ownership
-> Maybe Text
-> Maybe Natural
-> ListImageRecipes
ListImageRecipes'
    { $sel:filters:ListImageRecipes' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ListImageRecipes' :: Maybe Ownership
owner = Maybe Ownership
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListImageRecipes' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListImageRecipes' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Use the following filters to streamline results:
--
-- -   @name@
--
-- -   @parentImage@
--
-- -   @platform@
listImageRecipes_filters :: Lens.Lens' ListImageRecipes (Prelude.Maybe (Prelude.NonEmpty Filter))
listImageRecipes_filters :: (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListImageRecipes -> f ListImageRecipes
listImageRecipes_filters = (ListImageRecipes -> Maybe (NonEmpty Filter))
-> (ListImageRecipes
    -> Maybe (NonEmpty Filter) -> ListImageRecipes)
-> Lens
     ListImageRecipes
     ListImageRecipes
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImageRecipes' {Maybe (NonEmpty Filter)
filters :: Maybe (NonEmpty Filter)
$sel:filters:ListImageRecipes' :: ListImageRecipes -> Maybe (NonEmpty Filter)
filters} -> Maybe (NonEmpty Filter)
filters) (\s :: ListImageRecipes
s@ListImageRecipes' {} Maybe (NonEmpty Filter)
a -> ListImageRecipes
s {$sel:filters:ListImageRecipes' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
a} :: ListImageRecipes) ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
 -> ListImageRecipes -> f ListImageRecipes)
-> ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
    -> Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListImageRecipes
-> f ListImageRecipes
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

-- | The owner defines which image recipes you want to list. By default, this
-- request will only show image recipes owned by your account. You can use
-- this field to specify if you want to view image recipes owned by
-- yourself, by Amazon, or those image recipes that have been shared with
-- you by other customers.
listImageRecipes_owner :: Lens.Lens' ListImageRecipes (Prelude.Maybe Ownership)
listImageRecipes_owner :: (Maybe Ownership -> f (Maybe Ownership))
-> ListImageRecipes -> f ListImageRecipes
listImageRecipes_owner = (ListImageRecipes -> Maybe Ownership)
-> (ListImageRecipes -> Maybe Ownership -> ListImageRecipes)
-> Lens
     ListImageRecipes
     ListImageRecipes
     (Maybe Ownership)
     (Maybe Ownership)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImageRecipes' {Maybe Ownership
owner :: Maybe Ownership
$sel:owner:ListImageRecipes' :: ListImageRecipes -> Maybe Ownership
owner} -> Maybe Ownership
owner) (\s :: ListImageRecipes
s@ListImageRecipes' {} Maybe Ownership
a -> ListImageRecipes
s {$sel:owner:ListImageRecipes' :: Maybe Ownership
owner = Maybe Ownership
a} :: ListImageRecipes)

-- | A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
listImageRecipes_nextToken :: Lens.Lens' ListImageRecipes (Prelude.Maybe Prelude.Text)
listImageRecipes_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListImageRecipes -> f ListImageRecipes
listImageRecipes_nextToken = (ListImageRecipes -> Maybe Text)
-> (ListImageRecipes -> Maybe Text -> ListImageRecipes)
-> Lens ListImageRecipes ListImageRecipes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImageRecipes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListImageRecipes' :: ListImageRecipes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListImageRecipes
s@ListImageRecipes' {} Maybe Text
a -> ListImageRecipes
s {$sel:nextToken:ListImageRecipes' :: Maybe Text
nextToken = Maybe Text
a} :: ListImageRecipes)

-- | The maximum items to return in a request.
listImageRecipes_maxResults :: Lens.Lens' ListImageRecipes (Prelude.Maybe Prelude.Natural)
listImageRecipes_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListImageRecipes -> f ListImageRecipes
listImageRecipes_maxResults = (ListImageRecipes -> Maybe Natural)
-> (ListImageRecipes -> Maybe Natural -> ListImageRecipes)
-> Lens
     ListImageRecipes ListImageRecipes (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImageRecipes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListImageRecipes' :: ListImageRecipes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListImageRecipes
s@ListImageRecipes' {} Maybe Natural
a -> ListImageRecipes
s {$sel:maxResults:ListImageRecipes' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListImageRecipes)

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

instance Prelude.NFData ListImageRecipes

instance Core.ToHeaders ListImageRecipes where
  toHeaders :: ListImageRecipes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListImageRecipes -> 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 ListImageRecipes where
  toJSON :: ListImageRecipes -> Value
toJSON ListImageRecipes' {Maybe Natural
Maybe (NonEmpty Filter)
Maybe Text
Maybe Ownership
maxResults :: Maybe Natural
nextToken :: Maybe Text
owner :: Maybe Ownership
filters :: Maybe (NonEmpty Filter)
$sel:maxResults:ListImageRecipes' :: ListImageRecipes -> Maybe Natural
$sel:nextToken:ListImageRecipes' :: ListImageRecipes -> Maybe Text
$sel:owner:ListImageRecipes' :: ListImageRecipes -> Maybe Ownership
$sel:filters:ListImageRecipes' :: ListImageRecipes -> 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 ListImageRecipes where
  toPath :: ListImageRecipes -> ByteString
toPath = ByteString -> ListImageRecipes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/ListImageRecipes"

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

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

-- |
-- Create a value of 'ListImageRecipesResponse' 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', 'listImageRecipesResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'nextToken', 'listImageRecipesResponse_nextToken' - The next token used for paginated responses. When this is not empty,
-- there are additional elements that the service has not included in this
-- request. Use this token with the next request to retrieve additional
-- objects.
--
-- 'imageRecipeSummaryList', 'listImageRecipesResponse_imageRecipeSummaryList' - The list of image pipelines.
--
-- 'httpStatus', 'listImageRecipesResponse_httpStatus' - The response's http status code.
newListImageRecipesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListImageRecipesResponse
newListImageRecipesResponse :: Int -> ListImageRecipesResponse
newListImageRecipesResponse Int
pHttpStatus_ =
  ListImageRecipesResponse' :: Maybe Text
-> Maybe Text
-> Maybe [ImageRecipeSummary]
-> Int
-> ListImageRecipesResponse
ListImageRecipesResponse'
    { $sel:requestId:ListImageRecipesResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListImageRecipesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageRecipeSummaryList:ListImageRecipesResponse' :: Maybe [ImageRecipeSummary]
imageRecipeSummaryList = Maybe [ImageRecipeSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListImageRecipesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | The list of image pipelines.
listImageRecipesResponse_imageRecipeSummaryList :: Lens.Lens' ListImageRecipesResponse (Prelude.Maybe [ImageRecipeSummary])
listImageRecipesResponse_imageRecipeSummaryList :: (Maybe [ImageRecipeSummary] -> f (Maybe [ImageRecipeSummary]))
-> ListImageRecipesResponse -> f ListImageRecipesResponse
listImageRecipesResponse_imageRecipeSummaryList = (ListImageRecipesResponse -> Maybe [ImageRecipeSummary])
-> (ListImageRecipesResponse
    -> Maybe [ImageRecipeSummary] -> ListImageRecipesResponse)
-> Lens
     ListImageRecipesResponse
     ListImageRecipesResponse
     (Maybe [ImageRecipeSummary])
     (Maybe [ImageRecipeSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImageRecipesResponse' {Maybe [ImageRecipeSummary]
imageRecipeSummaryList :: Maybe [ImageRecipeSummary]
$sel:imageRecipeSummaryList:ListImageRecipesResponse' :: ListImageRecipesResponse -> Maybe [ImageRecipeSummary]
imageRecipeSummaryList} -> Maybe [ImageRecipeSummary]
imageRecipeSummaryList) (\s :: ListImageRecipesResponse
s@ListImageRecipesResponse' {} Maybe [ImageRecipeSummary]
a -> ListImageRecipesResponse
s {$sel:imageRecipeSummaryList:ListImageRecipesResponse' :: Maybe [ImageRecipeSummary]
imageRecipeSummaryList = Maybe [ImageRecipeSummary]
a} :: ListImageRecipesResponse) ((Maybe [ImageRecipeSummary] -> f (Maybe [ImageRecipeSummary]))
 -> ListImageRecipesResponse -> f ListImageRecipesResponse)
-> ((Maybe [ImageRecipeSummary] -> f (Maybe [ImageRecipeSummary]))
    -> Maybe [ImageRecipeSummary] -> f (Maybe [ImageRecipeSummary]))
-> (Maybe [ImageRecipeSummary] -> f (Maybe [ImageRecipeSummary]))
-> ListImageRecipesResponse
-> f ListImageRecipesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ImageRecipeSummary]
  [ImageRecipeSummary]
  [ImageRecipeSummary]
  [ImageRecipeSummary]
-> Iso
     (Maybe [ImageRecipeSummary])
     (Maybe [ImageRecipeSummary])
     (Maybe [ImageRecipeSummary])
     (Maybe [ImageRecipeSummary])
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
  [ImageRecipeSummary]
  [ImageRecipeSummary]
  [ImageRecipeSummary]
  [ImageRecipeSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListImageRecipesResponse