{-# 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.EC2.DescribeImages
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified images (AMIs, AKIs, and ARIs) available to you
-- or all of the images available to you.
--
-- The images available to you include public images, private images that
-- you own, and private images owned by other Amazon Web Services accounts
-- for which you have explicit launch permissions.
--
-- Recently deregistered images appear in the returned results for a short
-- interval and then return empty results. After all instances that
-- reference a deregistered AMI are terminated, specifying the ID of the
-- image will eventually return an error indicating that the AMI ID cannot
-- be found.
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribeImages
  ( -- * Creating a Request
    DescribeImages (..),
    newDescribeImages,

    -- * Request Lenses
    describeImages_dryRun,
    describeImages_executableUsers,
    describeImages_filters,
    describeImages_imageIds,
    describeImages_includeDeprecated,
    describeImages_maxResults,
    describeImages_nextToken,
    describeImages_owners,

    -- * Destructuring the Response
    DescribeImagesResponse (..),
    newDescribeImagesResponse,

    -- * Response Lenses
    describeImagesResponse_images,
    describeImagesResponse_nextToken,
    describeImagesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeImages' smart constructor.
data DescribeImages = DescribeImages'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DescribeImages -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | Scopes the images by users with explicit launch permissions. Specify an
    -- Amazon Web Services account ID, @self@ (the sender of the request), or
    -- @all@ (public AMIs).
    --
    -- -   If you specify an Amazon Web Services account ID that is not your
    --     own, only AMIs shared with that specific Amazon Web Services account
    --     ID are returned. However, AMIs that are shared with the account’s
    --     organization or organizational unit (OU) are not returned.
    --
    -- -   If you specify @self@ or your own Amazon Web Services account ID,
    --     AMIs shared with your account are returned. In addition, AMIs that
    --     are shared with the organization or OU of which you are member are
    --     also returned.
    --
    -- -   If you specify @all@, all public AMIs are returned.
    DescribeImages -> Maybe [Text]
executableUsers :: Prelude.Maybe [Prelude.Text],
    -- | The filters.
    --
    -- -   @architecture@ - The image architecture (@i386@ | @x86_64@ |
    --     @arm64@).
    --
    -- -   @block-device-mapping.delete-on-termination@ - A Boolean value that
    --     indicates whether the Amazon EBS volume is deleted on instance
    --     termination.
    --
    -- -   @block-device-mapping.device-name@ - The device name specified in
    --     the block device mapping (for example, @\/dev\/sdh@ or @xvdh@).
    --
    -- -   @block-device-mapping.snapshot-id@ - The ID of the snapshot used for
    --     the Amazon EBS volume.
    --
    -- -   @block-device-mapping.volume-size@ - The volume size of the Amazon
    --     EBS volume, in GiB.
    --
    -- -   @block-device-mapping.volume-type@ - The volume type of the Amazon
    --     EBS volume (@io1@ | @io2@ | @gp2@ | @gp3@ | @sc1 @| @st1@ |
    --     @standard@).
    --
    -- -   @block-device-mapping.encrypted@ - A Boolean that indicates whether
    --     the Amazon EBS volume is encrypted.
    --
    -- -   @creation-date@ - The time when the image was created, in the ISO
    --     8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for
    --     example, @2021-09-29T11:04:43.305Z@. You can use a wildcard (@*@),
    --     for example, @2021-09-29T*@, which matches an entire day.
    --
    -- -   @description@ - The description of the image (provided during image
    --     creation).
    --
    -- -   @ena-support@ - A Boolean that indicates whether enhanced networking
    --     with ENA is enabled.
    --
    -- -   @hypervisor@ - The hypervisor type (@ovm@ | @xen@).
    --
    -- -   @image-id@ - The ID of the image.
    --
    -- -   @image-type@ - The image type (@machine@ | @kernel@ | @ramdisk@).
    --
    -- -   @is-public@ - A Boolean that indicates whether the image is public.
    --
    -- -   @kernel-id@ - The kernel ID.
    --
    -- -   @manifest-location@ - The location of the image manifest.
    --
    -- -   @name@ - The name of the AMI (provided during image creation).
    --
    -- -   @owner-alias@ - The owner alias (@amazon@ | @aws-marketplace@). The
    --     valid aliases are defined in an Amazon-maintained list. This is not
    --     the Amazon Web Services account alias that can be set using the IAM
    --     console. We recommend that you use the __Owner__ request parameter
    --     instead of this filter.
    --
    -- -   @owner-id@ - The Amazon Web Services account ID of the owner. We
    --     recommend that you use the __Owner__ request parameter instead of
    --     this filter.
    --
    -- -   @platform@ - The platform. The only supported value is @windows@.
    --
    -- -   @product-code@ - The product code.
    --
    -- -   @product-code.type@ - The type of the product code (@marketplace@).
    --
    -- -   @ramdisk-id@ - The RAM disk ID.
    --
    -- -   @root-device-name@ - The device name of the root device volume (for
    --     example, @\/dev\/sda1@).
    --
    -- -   @root-device-type@ - The type of the root device volume (@ebs@ |
    --     @instance-store@).
    --
    -- -   @state@ - The state of the image (@available@ | @pending@ |
    --     @failed@).
    --
    -- -   @state-reason-code@ - The reason code for the state change.
    --
    -- -   @state-reason-message@ - The message for the state change.
    --
    -- -   @sriov-net-support@ - A value of @simple@ indicates that enhanced
    --     networking with the Intel 82599 VF interface is enabled.
    --
    -- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
    --     resource. Use the tag key in the filter name and the tag value as
    --     the filter value. For example, to find all resources that have a tag
    --     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
    --     the filter name and @TeamA@ for the filter value.
    --
    -- -   @tag-key@ - The key of a tag assigned to the resource. Use this
    --     filter to find all resources assigned a tag with a specific key,
    --     regardless of the tag value.
    --
    -- -   @virtualization-type@ - The virtualization type (@paravirtual@ |
    --     @hvm@).
    DescribeImages -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The image IDs.
    --
    -- Default: Describes all images available to you.
    DescribeImages -> Maybe [Text]
imageIds :: Prelude.Maybe [Prelude.Text],
    -- | Specifies whether to include deprecated AMIs.
    --
    -- Default: No deprecated AMIs are included in the response.
    --
    -- If you are the AMI owner, all deprecated AMIs appear in the response
    -- regardless of what you specify for this parameter.
    DescribeImages -> Maybe Bool
includeDeprecated :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of results to return with a single call. To retrieve
    -- the remaining results, make another call with the returned @nextToken@
    -- value.
    DescribeImages -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The token for the next page of results.
    DescribeImages -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Scopes the results to images with the specified owners. You can specify
    -- a combination of Amazon Web Services account IDs, @self@, @amazon@, and
    -- @aws-marketplace@. If you omit this parameter, the results include all
    -- images for which you have launch permissions, regardless of ownership.
    DescribeImages -> Maybe [Text]
owners :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeImages -> DescribeImages -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImages -> DescribeImages -> Bool
$c/= :: DescribeImages -> DescribeImages -> Bool
== :: DescribeImages -> DescribeImages -> Bool
$c== :: DescribeImages -> DescribeImages -> Bool
Prelude.Eq, ReadPrec [DescribeImages]
ReadPrec DescribeImages
Int -> ReadS DescribeImages
ReadS [DescribeImages]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImages]
$creadListPrec :: ReadPrec [DescribeImages]
readPrec :: ReadPrec DescribeImages
$creadPrec :: ReadPrec DescribeImages
readList :: ReadS [DescribeImages]
$creadList :: ReadS [DescribeImages]
readsPrec :: Int -> ReadS DescribeImages
$creadsPrec :: Int -> ReadS DescribeImages
Prelude.Read, Int -> DescribeImages -> ShowS
[DescribeImages] -> ShowS
DescribeImages -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImages] -> ShowS
$cshowList :: [DescribeImages] -> ShowS
show :: DescribeImages -> String
$cshow :: DescribeImages -> String
showsPrec :: Int -> DescribeImages -> ShowS
$cshowsPrec :: Int -> DescribeImages -> ShowS
Prelude.Show, forall x. Rep DescribeImages x -> DescribeImages
forall x. DescribeImages -> Rep DescribeImages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImages x -> DescribeImages
$cfrom :: forall x. DescribeImages -> Rep DescribeImages x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImages' 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:
--
-- 'dryRun', 'describeImages_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'executableUsers', 'describeImages_executableUsers' - Scopes the images by users with explicit launch permissions. Specify an
-- Amazon Web Services account ID, @self@ (the sender of the request), or
-- @all@ (public AMIs).
--
-- -   If you specify an Amazon Web Services account ID that is not your
--     own, only AMIs shared with that specific Amazon Web Services account
--     ID are returned. However, AMIs that are shared with the account’s
--     organization or organizational unit (OU) are not returned.
--
-- -   If you specify @self@ or your own Amazon Web Services account ID,
--     AMIs shared with your account are returned. In addition, AMIs that
--     are shared with the organization or OU of which you are member are
--     also returned.
--
-- -   If you specify @all@, all public AMIs are returned.
--
-- 'filters', 'describeImages_filters' - The filters.
--
-- -   @architecture@ - The image architecture (@i386@ | @x86_64@ |
--     @arm64@).
--
-- -   @block-device-mapping.delete-on-termination@ - A Boolean value that
--     indicates whether the Amazon EBS volume is deleted on instance
--     termination.
--
-- -   @block-device-mapping.device-name@ - The device name specified in
--     the block device mapping (for example, @\/dev\/sdh@ or @xvdh@).
--
-- -   @block-device-mapping.snapshot-id@ - The ID of the snapshot used for
--     the Amazon EBS volume.
--
-- -   @block-device-mapping.volume-size@ - The volume size of the Amazon
--     EBS volume, in GiB.
--
-- -   @block-device-mapping.volume-type@ - The volume type of the Amazon
--     EBS volume (@io1@ | @io2@ | @gp2@ | @gp3@ | @sc1 @| @st1@ |
--     @standard@).
--
-- -   @block-device-mapping.encrypted@ - A Boolean that indicates whether
--     the Amazon EBS volume is encrypted.
--
-- -   @creation-date@ - The time when the image was created, in the ISO
--     8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for
--     example, @2021-09-29T11:04:43.305Z@. You can use a wildcard (@*@),
--     for example, @2021-09-29T*@, which matches an entire day.
--
-- -   @description@ - The description of the image (provided during image
--     creation).
--
-- -   @ena-support@ - A Boolean that indicates whether enhanced networking
--     with ENA is enabled.
--
-- -   @hypervisor@ - The hypervisor type (@ovm@ | @xen@).
--
-- -   @image-id@ - The ID of the image.
--
-- -   @image-type@ - The image type (@machine@ | @kernel@ | @ramdisk@).
--
-- -   @is-public@ - A Boolean that indicates whether the image is public.
--
-- -   @kernel-id@ - The kernel ID.
--
-- -   @manifest-location@ - The location of the image manifest.
--
-- -   @name@ - The name of the AMI (provided during image creation).
--
-- -   @owner-alias@ - The owner alias (@amazon@ | @aws-marketplace@). The
--     valid aliases are defined in an Amazon-maintained list. This is not
--     the Amazon Web Services account alias that can be set using the IAM
--     console. We recommend that you use the __Owner__ request parameter
--     instead of this filter.
--
-- -   @owner-id@ - The Amazon Web Services account ID of the owner. We
--     recommend that you use the __Owner__ request parameter instead of
--     this filter.
--
-- -   @platform@ - The platform. The only supported value is @windows@.
--
-- -   @product-code@ - The product code.
--
-- -   @product-code.type@ - The type of the product code (@marketplace@).
--
-- -   @ramdisk-id@ - The RAM disk ID.
--
-- -   @root-device-name@ - The device name of the root device volume (for
--     example, @\/dev\/sda1@).
--
-- -   @root-device-type@ - The type of the root device volume (@ebs@ |
--     @instance-store@).
--
-- -   @state@ - The state of the image (@available@ | @pending@ |
--     @failed@).
--
-- -   @state-reason-code@ - The reason code for the state change.
--
-- -   @state-reason-message@ - The message for the state change.
--
-- -   @sriov-net-support@ - A value of @simple@ indicates that enhanced
--     networking with the Intel 82599 VF interface is enabled.
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- -   @virtualization-type@ - The virtualization type (@paravirtual@ |
--     @hvm@).
--
-- 'imageIds', 'describeImages_imageIds' - The image IDs.
--
-- Default: Describes all images available to you.
--
-- 'includeDeprecated', 'describeImages_includeDeprecated' - Specifies whether to include deprecated AMIs.
--
-- Default: No deprecated AMIs are included in the response.
--
-- If you are the AMI owner, all deprecated AMIs appear in the response
-- regardless of what you specify for this parameter.
--
-- 'maxResults', 'describeImages_maxResults' - The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
--
-- 'nextToken', 'describeImages_nextToken' - The token for the next page of results.
--
-- 'owners', 'describeImages_owners' - Scopes the results to images with the specified owners. You can specify
-- a combination of Amazon Web Services account IDs, @self@, @amazon@, and
-- @aws-marketplace@. If you omit this parameter, the results include all
-- images for which you have launch permissions, regardless of ownership.
newDescribeImages ::
  DescribeImages
newDescribeImages :: DescribeImages
newDescribeImages =
  DescribeImages'
    { $sel:dryRun:DescribeImages' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:executableUsers:DescribeImages' :: Maybe [Text]
executableUsers = forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeImages' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:imageIds:DescribeImages' :: Maybe [Text]
imageIds = forall a. Maybe a
Prelude.Nothing,
      $sel:includeDeprecated:DescribeImages' :: Maybe Bool
includeDeprecated = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeImages' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeImages' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:owners:DescribeImages' :: Maybe [Text]
owners = forall a. Maybe a
Prelude.Nothing
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
describeImages_dryRun :: Lens.Lens' DescribeImages (Prelude.Maybe Prelude.Bool)
describeImages_dryRun :: Lens' DescribeImages (Maybe Bool)
describeImages_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeImages' :: DescribeImages -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeImages
s@DescribeImages' {} Maybe Bool
a -> DescribeImages
s {$sel:dryRun:DescribeImages' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeImages)

-- | Scopes the images by users with explicit launch permissions. Specify an
-- Amazon Web Services account ID, @self@ (the sender of the request), or
-- @all@ (public AMIs).
--
-- -   If you specify an Amazon Web Services account ID that is not your
--     own, only AMIs shared with that specific Amazon Web Services account
--     ID are returned. However, AMIs that are shared with the account’s
--     organization or organizational unit (OU) are not returned.
--
-- -   If you specify @self@ or your own Amazon Web Services account ID,
--     AMIs shared with your account are returned. In addition, AMIs that
--     are shared with the organization or OU of which you are member are
--     also returned.
--
-- -   If you specify @all@, all public AMIs are returned.
describeImages_executableUsers :: Lens.Lens' DescribeImages (Prelude.Maybe [Prelude.Text])
describeImages_executableUsers :: Lens' DescribeImages (Maybe [Text])
describeImages_executableUsers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe [Text]
executableUsers :: Maybe [Text]
$sel:executableUsers:DescribeImages' :: DescribeImages -> Maybe [Text]
executableUsers} -> Maybe [Text]
executableUsers) (\s :: DescribeImages
s@DescribeImages' {} Maybe [Text]
a -> DescribeImages
s {$sel:executableUsers:DescribeImages' :: Maybe [Text]
executableUsers = Maybe [Text]
a} :: DescribeImages) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The filters.
--
-- -   @architecture@ - The image architecture (@i386@ | @x86_64@ |
--     @arm64@).
--
-- -   @block-device-mapping.delete-on-termination@ - A Boolean value that
--     indicates whether the Amazon EBS volume is deleted on instance
--     termination.
--
-- -   @block-device-mapping.device-name@ - The device name specified in
--     the block device mapping (for example, @\/dev\/sdh@ or @xvdh@).
--
-- -   @block-device-mapping.snapshot-id@ - The ID of the snapshot used for
--     the Amazon EBS volume.
--
-- -   @block-device-mapping.volume-size@ - The volume size of the Amazon
--     EBS volume, in GiB.
--
-- -   @block-device-mapping.volume-type@ - The volume type of the Amazon
--     EBS volume (@io1@ | @io2@ | @gp2@ | @gp3@ | @sc1 @| @st1@ |
--     @standard@).
--
-- -   @block-device-mapping.encrypted@ - A Boolean that indicates whether
--     the Amazon EBS volume is encrypted.
--
-- -   @creation-date@ - The time when the image was created, in the ISO
--     8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for
--     example, @2021-09-29T11:04:43.305Z@. You can use a wildcard (@*@),
--     for example, @2021-09-29T*@, which matches an entire day.
--
-- -   @description@ - The description of the image (provided during image
--     creation).
--
-- -   @ena-support@ - A Boolean that indicates whether enhanced networking
--     with ENA is enabled.
--
-- -   @hypervisor@ - The hypervisor type (@ovm@ | @xen@).
--
-- -   @image-id@ - The ID of the image.
--
-- -   @image-type@ - The image type (@machine@ | @kernel@ | @ramdisk@).
--
-- -   @is-public@ - A Boolean that indicates whether the image is public.
--
-- -   @kernel-id@ - The kernel ID.
--
-- -   @manifest-location@ - The location of the image manifest.
--
-- -   @name@ - The name of the AMI (provided during image creation).
--
-- -   @owner-alias@ - The owner alias (@amazon@ | @aws-marketplace@). The
--     valid aliases are defined in an Amazon-maintained list. This is not
--     the Amazon Web Services account alias that can be set using the IAM
--     console. We recommend that you use the __Owner__ request parameter
--     instead of this filter.
--
-- -   @owner-id@ - The Amazon Web Services account ID of the owner. We
--     recommend that you use the __Owner__ request parameter instead of
--     this filter.
--
-- -   @platform@ - The platform. The only supported value is @windows@.
--
-- -   @product-code@ - The product code.
--
-- -   @product-code.type@ - The type of the product code (@marketplace@).
--
-- -   @ramdisk-id@ - The RAM disk ID.
--
-- -   @root-device-name@ - The device name of the root device volume (for
--     example, @\/dev\/sda1@).
--
-- -   @root-device-type@ - The type of the root device volume (@ebs@ |
--     @instance-store@).
--
-- -   @state@ - The state of the image (@available@ | @pending@ |
--     @failed@).
--
-- -   @state-reason-code@ - The reason code for the state change.
--
-- -   @state-reason-message@ - The message for the state change.
--
-- -   @sriov-net-support@ - A value of @simple@ indicates that enhanced
--     networking with the Intel 82599 VF interface is enabled.
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- -   @virtualization-type@ - The virtualization type (@paravirtual@ |
--     @hvm@).
describeImages_filters :: Lens.Lens' DescribeImages (Prelude.Maybe [Filter])
describeImages_filters :: Lens' DescribeImages (Maybe [Filter])
describeImages_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeImages' :: DescribeImages -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeImages
s@DescribeImages' {} Maybe [Filter]
a -> DescribeImages
s {$sel:filters:DescribeImages' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeImages) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The image IDs.
--
-- Default: Describes all images available to you.
describeImages_imageIds :: Lens.Lens' DescribeImages (Prelude.Maybe [Prelude.Text])
describeImages_imageIds :: Lens' DescribeImages (Maybe [Text])
describeImages_imageIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe [Text]
imageIds :: Maybe [Text]
$sel:imageIds:DescribeImages' :: DescribeImages -> Maybe [Text]
imageIds} -> Maybe [Text]
imageIds) (\s :: DescribeImages
s@DescribeImages' {} Maybe [Text]
a -> DescribeImages
s {$sel:imageIds:DescribeImages' :: Maybe [Text]
imageIds = Maybe [Text]
a} :: DescribeImages) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies whether to include deprecated AMIs.
--
-- Default: No deprecated AMIs are included in the response.
--
-- If you are the AMI owner, all deprecated AMIs appear in the response
-- regardless of what you specify for this parameter.
describeImages_includeDeprecated :: Lens.Lens' DescribeImages (Prelude.Maybe Prelude.Bool)
describeImages_includeDeprecated :: Lens' DescribeImages (Maybe Bool)
describeImages_includeDeprecated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe Bool
includeDeprecated :: Maybe Bool
$sel:includeDeprecated:DescribeImages' :: DescribeImages -> Maybe Bool
includeDeprecated} -> Maybe Bool
includeDeprecated) (\s :: DescribeImages
s@DescribeImages' {} Maybe Bool
a -> DescribeImages
s {$sel:includeDeprecated:DescribeImages' :: Maybe Bool
includeDeprecated = Maybe Bool
a} :: DescribeImages)

-- | The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
describeImages_maxResults :: Lens.Lens' DescribeImages (Prelude.Maybe Prelude.Int)
describeImages_maxResults :: Lens' DescribeImages (Maybe Int)
describeImages_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeImages' :: DescribeImages -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeImages
s@DescribeImages' {} Maybe Int
a -> DescribeImages
s {$sel:maxResults:DescribeImages' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeImages)

-- | The token for the next page of results.
describeImages_nextToken :: Lens.Lens' DescribeImages (Prelude.Maybe Prelude.Text)
describeImages_nextToken :: Lens' DescribeImages (Maybe Text)
describeImages_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImages' :: DescribeImages -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImages
s@DescribeImages' {} Maybe Text
a -> DescribeImages
s {$sel:nextToken:DescribeImages' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImages)

-- | Scopes the results to images with the specified owners. You can specify
-- a combination of Amazon Web Services account IDs, @self@, @amazon@, and
-- @aws-marketplace@. If you omit this parameter, the results include all
-- images for which you have launch permissions, regardless of ownership.
describeImages_owners :: Lens.Lens' DescribeImages (Prelude.Maybe [Prelude.Text])
describeImages_owners :: Lens' DescribeImages (Maybe [Text])
describeImages_owners = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImages' {Maybe [Text]
owners :: Maybe [Text]
$sel:owners:DescribeImages' :: DescribeImages -> Maybe [Text]
owners} -> Maybe [Text]
owners) (\s :: DescribeImages
s@DescribeImages' {} Maybe [Text]
a -> DescribeImages
s {$sel:owners:DescribeImages' :: Maybe [Text]
owners = Maybe [Text]
a} :: DescribeImages) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSPager DescribeImages where
  page :: DescribeImages
-> AWSResponse DescribeImages -> Maybe DescribeImages
page DescribeImages
rq AWSResponse DescribeImages
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeImages
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeImagesResponse (Maybe Text)
describeImagesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeImages
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeImagesResponse (Maybe [Image])
describeImagesResponse_images
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeImages
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeImages (Maybe Text)
describeImages_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeImages
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeImagesResponse (Maybe Text)
describeImagesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeImages where
  type
    AWSResponse DescribeImages =
      DescribeImagesResponse
  request :: (Service -> Service) -> DescribeImages -> Request DescribeImages
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeImages
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeImages)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Image] -> Maybe Text -> Int -> DescribeImagesResponse
DescribeImagesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"imagesSet"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeImages where
  hashWithSalt :: Int -> DescribeImages -> Int
hashWithSalt Int
_salt DescribeImages' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
owners :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Int
includeDeprecated :: Maybe Bool
imageIds :: Maybe [Text]
filters :: Maybe [Filter]
executableUsers :: Maybe [Text]
dryRun :: Maybe Bool
$sel:owners:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:nextToken:DescribeImages' :: DescribeImages -> Maybe Text
$sel:maxResults:DescribeImages' :: DescribeImages -> Maybe Int
$sel:includeDeprecated:DescribeImages' :: DescribeImages -> Maybe Bool
$sel:imageIds:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:filters:DescribeImages' :: DescribeImages -> Maybe [Filter]
$sel:executableUsers:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:dryRun:DescribeImages' :: DescribeImages -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
executableUsers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
imageIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeDeprecated
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
owners

instance Prelude.NFData DescribeImages where
  rnf :: DescribeImages -> ()
rnf DescribeImages' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
owners :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Int
includeDeprecated :: Maybe Bool
imageIds :: Maybe [Text]
filters :: Maybe [Filter]
executableUsers :: Maybe [Text]
dryRun :: Maybe Bool
$sel:owners:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:nextToken:DescribeImages' :: DescribeImages -> Maybe Text
$sel:maxResults:DescribeImages' :: DescribeImages -> Maybe Int
$sel:includeDeprecated:DescribeImages' :: DescribeImages -> Maybe Bool
$sel:imageIds:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:filters:DescribeImages' :: DescribeImages -> Maybe [Filter]
$sel:executableUsers:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:dryRun:DescribeImages' :: DescribeImages -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
executableUsers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
imageIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeDeprecated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
owners

instance Data.ToHeaders DescribeImages where
  toHeaders :: DescribeImages -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath DescribeImages where
  toPath :: DescribeImages -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DescribeImages where
  toQuery :: DescribeImages -> QueryString
toQuery DescribeImages' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
owners :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Int
includeDeprecated :: Maybe Bool
imageIds :: Maybe [Text]
filters :: Maybe [Filter]
executableUsers :: Maybe [Text]
dryRun :: Maybe Bool
$sel:owners:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:nextToken:DescribeImages' :: DescribeImages -> Maybe Text
$sel:maxResults:DescribeImages' :: DescribeImages -> Maybe Int
$sel:includeDeprecated:DescribeImages' :: DescribeImages -> Maybe Bool
$sel:imageIds:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:filters:DescribeImages' :: DescribeImages -> Maybe [Filter]
$sel:executableUsers:DescribeImages' :: DescribeImages -> Maybe [Text]
$sel:dryRun:DescribeImages' :: DescribeImages -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeImages" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"ExecutableBy"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
executableUsers
          ),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"ImageId" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
imageIds),
        ByteString
"IncludeDeprecated" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
includeDeprecated,
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Owner" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
owners)
      ]

-- | /See:/ 'newDescribeImagesResponse' smart constructor.
data DescribeImagesResponse = DescribeImagesResponse'
  { -- | Information about the images.
    DescribeImagesResponse -> Maybe [Image]
images :: Prelude.Maybe [Image],
    -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    DescribeImagesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeImagesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeImagesResponse -> DescribeImagesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
$c/= :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
== :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
$c== :: DescribeImagesResponse -> DescribeImagesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImagesResponse]
ReadPrec DescribeImagesResponse
Int -> ReadS DescribeImagesResponse
ReadS [DescribeImagesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImagesResponse]
$creadListPrec :: ReadPrec [DescribeImagesResponse]
readPrec :: ReadPrec DescribeImagesResponse
$creadPrec :: ReadPrec DescribeImagesResponse
readList :: ReadS [DescribeImagesResponse]
$creadList :: ReadS [DescribeImagesResponse]
readsPrec :: Int -> ReadS DescribeImagesResponse
$creadsPrec :: Int -> ReadS DescribeImagesResponse
Prelude.Read, Int -> DescribeImagesResponse -> ShowS
[DescribeImagesResponse] -> ShowS
DescribeImagesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImagesResponse] -> ShowS
$cshowList :: [DescribeImagesResponse] -> ShowS
show :: DescribeImagesResponse -> String
$cshow :: DescribeImagesResponse -> String
showsPrec :: Int -> DescribeImagesResponse -> ShowS
$cshowsPrec :: Int -> DescribeImagesResponse -> ShowS
Prelude.Show, forall x. Rep DescribeImagesResponse x -> DescribeImagesResponse
forall x. DescribeImagesResponse -> Rep DescribeImagesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImagesResponse x -> DescribeImagesResponse
$cfrom :: forall x. DescribeImagesResponse -> Rep DescribeImagesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImagesResponse' 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:
--
-- 'images', 'describeImagesResponse_images' - Information about the images.
--
-- 'nextToken', 'describeImagesResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'describeImagesResponse_httpStatus' - The response's http status code.
newDescribeImagesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeImagesResponse
newDescribeImagesResponse :: Int -> DescribeImagesResponse
newDescribeImagesResponse Int
pHttpStatus_ =
  DescribeImagesResponse'
    { $sel:images:DescribeImagesResponse' :: Maybe [Image]
images = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeImagesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeImagesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the images.
describeImagesResponse_images :: Lens.Lens' DescribeImagesResponse (Prelude.Maybe [Image])
describeImagesResponse_images :: Lens' DescribeImagesResponse (Maybe [Image])
describeImagesResponse_images = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagesResponse' {Maybe [Image]
images :: Maybe [Image]
$sel:images:DescribeImagesResponse' :: DescribeImagesResponse -> Maybe [Image]
images} -> Maybe [Image]
images) (\s :: DescribeImagesResponse
s@DescribeImagesResponse' {} Maybe [Image]
a -> DescribeImagesResponse
s {$sel:images:DescribeImagesResponse' :: Maybe [Image]
images = Maybe [Image]
a} :: DescribeImagesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
describeImagesResponse_nextToken :: Lens.Lens' DescribeImagesResponse (Prelude.Maybe Prelude.Text)
describeImagesResponse_nextToken :: Lens' DescribeImagesResponse (Maybe Text)
describeImagesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImagesResponse' :: DescribeImagesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImagesResponse
s@DescribeImagesResponse' {} Maybe Text
a -> DescribeImagesResponse
s {$sel:nextToken:DescribeImagesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImagesResponse)

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

instance Prelude.NFData DescribeImagesResponse where
  rnf :: DescribeImagesResponse -> ()
rnf DescribeImagesResponse' {Int
Maybe [Image]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
images :: Maybe [Image]
$sel:httpStatus:DescribeImagesResponse' :: DescribeImagesResponse -> Int
$sel:nextToken:DescribeImagesResponse' :: DescribeImagesResponse -> Maybe Text
$sel:images:DescribeImagesResponse' :: DescribeImagesResponse -> Maybe [Image]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Image]
images
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus