{-# 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.ListImages
-- 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 the list of images that you have access to.
module Amazonka.ImageBuilder.ListImages
  ( -- * Creating a Request
    ListImages (..),
    newListImages,

    -- * Request Lenses
    listImages_filters,
    listImages_owner,
    listImages_byName,
    listImages_nextToken,
    listImages_includeDeprecated,
    listImages_maxResults,

    -- * Destructuring the Response
    ListImagesResponse (..),
    newListImagesResponse,

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

-- |
-- Create a value of 'ListImages' 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', 'listImages_filters' - Use the following filters to streamline results:
--
-- -   @name@
--
-- -   @osVersion@
--
-- -   @platform@
--
-- -   @type@
--
-- -   @version@
--
-- 'owner', 'listImages_owner' - The owner defines which images you want to list. By default, this
-- request will only show images owned by your account. You can use this
-- field to specify if you want to view images owned by yourself, by
-- Amazon, or those images that have been shared with you by other
-- customers.
--
-- 'byName', 'listImages_byName' - Requests a list of images with a specific recipe name.
--
-- 'nextToken', 'listImages_nextToken' - A token to specify where to start paginating. This is the NextToken from
-- a previously truncated response.
--
-- 'includeDeprecated', 'listImages_includeDeprecated' - Includes deprecated images in the response list.
--
-- 'maxResults', 'listImages_maxResults' - The maximum items to return in a request.
newListImages ::
  ListImages
newListImages :: ListImages
newListImages =
  ListImages' :: Maybe (NonEmpty Filter)
-> Maybe Ownership
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Natural
-> ListImages
ListImages'
    { $sel:filters:ListImages' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ListImages' :: Maybe Ownership
owner = Maybe Ownership
forall a. Maybe a
Prelude.Nothing,
      $sel:byName:ListImages' :: Maybe Bool
byName = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListImages' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:includeDeprecated:ListImages' :: Maybe Bool
includeDeprecated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListImages' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Use the following filters to streamline results:
--
-- -   @name@
--
-- -   @osVersion@
--
-- -   @platform@
--
-- -   @type@
--
-- -   @version@
listImages_filters :: Lens.Lens' ListImages (Prelude.Maybe (Prelude.NonEmpty Filter))
listImages_filters :: (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListImages -> f ListImages
listImages_filters = (ListImages -> Maybe (NonEmpty Filter))
-> (ListImages -> Maybe (NonEmpty Filter) -> ListImages)
-> Lens
     ListImages
     ListImages
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImages' {Maybe (NonEmpty Filter)
filters :: Maybe (NonEmpty Filter)
$sel:filters:ListImages' :: ListImages -> Maybe (NonEmpty Filter)
filters} -> Maybe (NonEmpty Filter)
filters) (\s :: ListImages
s@ListImages' {} Maybe (NonEmpty Filter)
a -> ListImages
s {$sel:filters:ListImages' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
a} :: ListImages) ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
 -> ListImages -> f ListImages)
-> ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
    -> Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListImages
-> f ListImages
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 images you want to list. By default, this
-- request will only show images owned by your account. You can use this
-- field to specify if you want to view images owned by yourself, by
-- Amazon, or those images that have been shared with you by other
-- customers.
listImages_owner :: Lens.Lens' ListImages (Prelude.Maybe Ownership)
listImages_owner :: (Maybe Ownership -> f (Maybe Ownership))
-> ListImages -> f ListImages
listImages_owner = (ListImages -> Maybe Ownership)
-> (ListImages -> Maybe Ownership -> ListImages)
-> Lens ListImages ListImages (Maybe Ownership) (Maybe Ownership)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImages' {Maybe Ownership
owner :: Maybe Ownership
$sel:owner:ListImages' :: ListImages -> Maybe Ownership
owner} -> Maybe Ownership
owner) (\s :: ListImages
s@ListImages' {} Maybe Ownership
a -> ListImages
s {$sel:owner:ListImages' :: Maybe Ownership
owner = Maybe Ownership
a} :: ListImages)

-- | Requests a list of images with a specific recipe name.
listImages_byName :: Lens.Lens' ListImages (Prelude.Maybe Prelude.Bool)
listImages_byName :: (Maybe Bool -> f (Maybe Bool)) -> ListImages -> f ListImages
listImages_byName = (ListImages -> Maybe Bool)
-> (ListImages -> Maybe Bool -> ListImages)
-> Lens ListImages ListImages (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImages' {Maybe Bool
byName :: Maybe Bool
$sel:byName:ListImages' :: ListImages -> Maybe Bool
byName} -> Maybe Bool
byName) (\s :: ListImages
s@ListImages' {} Maybe Bool
a -> ListImages
s {$sel:byName:ListImages' :: Maybe Bool
byName = Maybe Bool
a} :: ListImages)

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

-- | Includes deprecated images in the response list.
listImages_includeDeprecated :: Lens.Lens' ListImages (Prelude.Maybe Prelude.Bool)
listImages_includeDeprecated :: (Maybe Bool -> f (Maybe Bool)) -> ListImages -> f ListImages
listImages_includeDeprecated = (ListImages -> Maybe Bool)
-> (ListImages -> Maybe Bool -> ListImages)
-> Lens ListImages ListImages (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImages' {Maybe Bool
includeDeprecated :: Maybe Bool
$sel:includeDeprecated:ListImages' :: ListImages -> Maybe Bool
includeDeprecated} -> Maybe Bool
includeDeprecated) (\s :: ListImages
s@ListImages' {} Maybe Bool
a -> ListImages
s {$sel:includeDeprecated:ListImages' :: Maybe Bool
includeDeprecated = Maybe Bool
a} :: ListImages)

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

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

instance Prelude.NFData ListImages

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

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

-- | /See:/ 'newListImagesResponse' smart constructor.
data ListImagesResponse = ListImagesResponse'
  { -- | The request ID that uniquely identifies this request.
    ListImagesResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The list of image semantic versions.
    --
    -- The semantic version has four nodes:
    -- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
    -- first three, and can filter on all of them.
    --
    -- __Filtering:__ With semantic versioning, you have the flexibility to use
    -- wildcards (x) to specify the most recent versions or nodes when
    -- selecting the base image or components for your recipe. When you use a
    -- wildcard in any node, all nodes to the right of the first wildcard must
    -- also be wildcards.
    ListImagesResponse -> Maybe [ImageVersion]
imageVersionList :: Prelude.Maybe [ImageVersion],
    -- | 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.
    ListImagesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListImagesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListImagesResponse -> ListImagesResponse -> Bool
(ListImagesResponse -> ListImagesResponse -> Bool)
-> (ListImagesResponse -> ListImagesResponse -> Bool)
-> Eq ListImagesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListImagesResponse -> ListImagesResponse -> Bool
$c/= :: ListImagesResponse -> ListImagesResponse -> Bool
== :: ListImagesResponse -> ListImagesResponse -> Bool
$c== :: ListImagesResponse -> ListImagesResponse -> Bool
Prelude.Eq, ReadPrec [ListImagesResponse]
ReadPrec ListImagesResponse
Int -> ReadS ListImagesResponse
ReadS [ListImagesResponse]
(Int -> ReadS ListImagesResponse)
-> ReadS [ListImagesResponse]
-> ReadPrec ListImagesResponse
-> ReadPrec [ListImagesResponse]
-> Read ListImagesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListImagesResponse]
$creadListPrec :: ReadPrec [ListImagesResponse]
readPrec :: ReadPrec ListImagesResponse
$creadPrec :: ReadPrec ListImagesResponse
readList :: ReadS [ListImagesResponse]
$creadList :: ReadS [ListImagesResponse]
readsPrec :: Int -> ReadS ListImagesResponse
$creadsPrec :: Int -> ReadS ListImagesResponse
Prelude.Read, Int -> ListImagesResponse -> ShowS
[ListImagesResponse] -> ShowS
ListImagesResponse -> String
(Int -> ListImagesResponse -> ShowS)
-> (ListImagesResponse -> String)
-> ([ListImagesResponse] -> ShowS)
-> Show ListImagesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListImagesResponse] -> ShowS
$cshowList :: [ListImagesResponse] -> ShowS
show :: ListImagesResponse -> String
$cshow :: ListImagesResponse -> String
showsPrec :: Int -> ListImagesResponse -> ShowS
$cshowsPrec :: Int -> ListImagesResponse -> ShowS
Prelude.Show, (forall x. ListImagesResponse -> Rep ListImagesResponse x)
-> (forall x. Rep ListImagesResponse x -> ListImagesResponse)
-> Generic ListImagesResponse
forall x. Rep ListImagesResponse x -> ListImagesResponse
forall x. ListImagesResponse -> Rep ListImagesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListImagesResponse x -> ListImagesResponse
$cfrom :: forall x. ListImagesResponse -> Rep ListImagesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListImagesResponse' 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', 'listImagesResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'imageVersionList', 'listImagesResponse_imageVersionList' - The list of image semantic versions.
--
-- The semantic version has four nodes:
-- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
-- first three, and can filter on all of them.
--
-- __Filtering:__ With semantic versioning, you have the flexibility to use
-- wildcards (x) to specify the most recent versions or nodes when
-- selecting the base image or components for your recipe. When you use a
-- wildcard in any node, all nodes to the right of the first wildcard must
-- also be wildcards.
--
-- 'nextToken', 'listImagesResponse_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.
--
-- 'httpStatus', 'listImagesResponse_httpStatus' - The response's http status code.
newListImagesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListImagesResponse
newListImagesResponse :: Int -> ListImagesResponse
newListImagesResponse Int
pHttpStatus_ =
  ListImagesResponse' :: Maybe Text
-> Maybe [ImageVersion] -> Maybe Text -> Int -> ListImagesResponse
ListImagesResponse'
    { $sel:requestId:ListImagesResponse' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageVersionList:ListImagesResponse' :: Maybe [ImageVersion]
imageVersionList = Maybe [ImageVersion]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListImagesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListImagesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The list of image semantic versions.
--
-- The semantic version has four nodes:
-- \<major>.\<minor>.\<patch>\/\<build>. You can assign values for the
-- first three, and can filter on all of them.
--
-- __Filtering:__ With semantic versioning, you have the flexibility to use
-- wildcards (x) to specify the most recent versions or nodes when
-- selecting the base image or components for your recipe. When you use a
-- wildcard in any node, all nodes to the right of the first wildcard must
-- also be wildcards.
listImagesResponse_imageVersionList :: Lens.Lens' ListImagesResponse (Prelude.Maybe [ImageVersion])
listImagesResponse_imageVersionList :: (Maybe [ImageVersion] -> f (Maybe [ImageVersion]))
-> ListImagesResponse -> f ListImagesResponse
listImagesResponse_imageVersionList = (ListImagesResponse -> Maybe [ImageVersion])
-> (ListImagesResponse
    -> Maybe [ImageVersion] -> ListImagesResponse)
-> Lens
     ListImagesResponse
     ListImagesResponse
     (Maybe [ImageVersion])
     (Maybe [ImageVersion])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagesResponse' {Maybe [ImageVersion]
imageVersionList :: Maybe [ImageVersion]
$sel:imageVersionList:ListImagesResponse' :: ListImagesResponse -> Maybe [ImageVersion]
imageVersionList} -> Maybe [ImageVersion]
imageVersionList) (\s :: ListImagesResponse
s@ListImagesResponse' {} Maybe [ImageVersion]
a -> ListImagesResponse
s {$sel:imageVersionList:ListImagesResponse' :: Maybe [ImageVersion]
imageVersionList = Maybe [ImageVersion]
a} :: ListImagesResponse) ((Maybe [ImageVersion] -> f (Maybe [ImageVersion]))
 -> ListImagesResponse -> f ListImagesResponse)
-> ((Maybe [ImageVersion] -> f (Maybe [ImageVersion]))
    -> Maybe [ImageVersion] -> f (Maybe [ImageVersion]))
-> (Maybe [ImageVersion] -> f (Maybe [ImageVersion]))
-> ListImagesResponse
-> f ListImagesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ImageVersion] [ImageVersion] [ImageVersion] [ImageVersion]
-> Iso
     (Maybe [ImageVersion])
     (Maybe [ImageVersion])
     (Maybe [ImageVersion])
     (Maybe [ImageVersion])
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 [ImageVersion] [ImageVersion] [ImageVersion] [ImageVersion]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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.
listImagesResponse_nextToken :: Lens.Lens' ListImagesResponse (Prelude.Maybe Prelude.Text)
listImagesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListImagesResponse -> f ListImagesResponse
listImagesResponse_nextToken = (ListImagesResponse -> Maybe Text)
-> (ListImagesResponse -> Maybe Text -> ListImagesResponse)
-> Lens
     ListImagesResponse ListImagesResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListImagesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListImagesResponse' :: ListImagesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListImagesResponse
s@ListImagesResponse' {} Maybe Text
a -> ListImagesResponse
s {$sel:nextToken:ListImagesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListImagesResponse)

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

instance Prelude.NFData ListImagesResponse