{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ECR.Types.ImageDetail
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ECR.Types.ImageDetail where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECR.Types.ImageScanFindingsSummary
import Amazonka.ECR.Types.ImageScanStatus
import qualified Amazonka.Prelude as Prelude

-- | An object that describes an image returned by a DescribeImages
-- operation.
--
-- /See:/ 'newImageDetail' smart constructor.
data ImageDetail = ImageDetail'
  { -- | The artifact media type of the image.
    ImageDetail -> Maybe Text
artifactMediaType :: Prelude.Maybe Prelude.Text,
    -- | The @sha256@ digest of the image manifest.
    ImageDetail -> Maybe Text
imageDigest :: Prelude.Maybe Prelude.Text,
    -- | The media type of the image manifest.
    ImageDetail -> Maybe Text
imageManifestMediaType :: Prelude.Maybe Prelude.Text,
    -- | The date and time, expressed in standard JavaScript date format, at
    -- which the current image was pushed to the repository.
    ImageDetail -> Maybe POSIX
imagePushedAt :: Prelude.Maybe Data.POSIX,
    -- | A summary of the last completed image scan.
    ImageDetail -> Maybe ImageScanFindingsSummary
imageScanFindingsSummary :: Prelude.Maybe ImageScanFindingsSummary,
    -- | The current state of the scan.
    ImageDetail -> Maybe ImageScanStatus
imageScanStatus :: Prelude.Maybe ImageScanStatus,
    -- | The size, in bytes, of the image in the repository.
    --
    -- If the image is a manifest list, this will be the max size of all
    -- manifests in the list.
    --
    -- Beginning with Docker version 1.9, the Docker client compresses image
    -- layers before pushing them to a V2 Docker registry. The output of the
    -- @docker images@ command shows the uncompressed image size, so it may
    -- return a larger image size than the image sizes returned by
    -- DescribeImages.
    ImageDetail -> Maybe Integer
imageSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The list of tags associated with this image.
    ImageDetail -> Maybe [Text]
imageTags :: Prelude.Maybe [Prelude.Text],
    -- | The date and time, expressed in standard JavaScript date format, when
    -- Amazon ECR recorded the last image pull.
    --
    -- Amazon ECR refreshes the last image pull timestamp at least once every
    -- 24 hours. For example, if you pull an image once a day then the
    -- @lastRecordedPullTime@ timestamp will indicate the exact time that the
    -- image was last pulled. However, if you pull an image once an hour,
    -- because Amazon ECR refreshes the @lastRecordedPullTime@ timestamp at
    -- least once every 24 hours, the result may not be the exact time that the
    -- image was last pulled.
    ImageDetail -> Maybe POSIX
lastRecordedPullTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Web Services account ID associated with the registry to which
    -- this image belongs.
    ImageDetail -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository to which this image belongs.
    ImageDetail -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text
  }
  deriving (ImageDetail -> ImageDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageDetail -> ImageDetail -> Bool
$c/= :: ImageDetail -> ImageDetail -> Bool
== :: ImageDetail -> ImageDetail -> Bool
$c== :: ImageDetail -> ImageDetail -> Bool
Prelude.Eq, ReadPrec [ImageDetail]
ReadPrec ImageDetail
Int -> ReadS ImageDetail
ReadS [ImageDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImageDetail]
$creadListPrec :: ReadPrec [ImageDetail]
readPrec :: ReadPrec ImageDetail
$creadPrec :: ReadPrec ImageDetail
readList :: ReadS [ImageDetail]
$creadList :: ReadS [ImageDetail]
readsPrec :: Int -> ReadS ImageDetail
$creadsPrec :: Int -> ReadS ImageDetail
Prelude.Read, Int -> ImageDetail -> ShowS
[ImageDetail] -> ShowS
ImageDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImageDetail] -> ShowS
$cshowList :: [ImageDetail] -> ShowS
show :: ImageDetail -> String
$cshow :: ImageDetail -> String
showsPrec :: Int -> ImageDetail -> ShowS
$cshowsPrec :: Int -> ImageDetail -> ShowS
Prelude.Show, forall x. Rep ImageDetail x -> ImageDetail
forall x. ImageDetail -> Rep ImageDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImageDetail x -> ImageDetail
$cfrom :: forall x. ImageDetail -> Rep ImageDetail x
Prelude.Generic)

-- |
-- Create a value of 'ImageDetail' 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:
--
-- 'artifactMediaType', 'imageDetail_artifactMediaType' - The artifact media type of the image.
--
-- 'imageDigest', 'imageDetail_imageDigest' - The @sha256@ digest of the image manifest.
--
-- 'imageManifestMediaType', 'imageDetail_imageManifestMediaType' - The media type of the image manifest.
--
-- 'imagePushedAt', 'imageDetail_imagePushedAt' - The date and time, expressed in standard JavaScript date format, at
-- which the current image was pushed to the repository.
--
-- 'imageScanFindingsSummary', 'imageDetail_imageScanFindingsSummary' - A summary of the last completed image scan.
--
-- 'imageScanStatus', 'imageDetail_imageScanStatus' - The current state of the scan.
--
-- 'imageSizeInBytes', 'imageDetail_imageSizeInBytes' - The size, in bytes, of the image in the repository.
--
-- If the image is a manifest list, this will be the max size of all
-- manifests in the list.
--
-- Beginning with Docker version 1.9, the Docker client compresses image
-- layers before pushing them to a V2 Docker registry. The output of the
-- @docker images@ command shows the uncompressed image size, so it may
-- return a larger image size than the image sizes returned by
-- DescribeImages.
--
-- 'imageTags', 'imageDetail_imageTags' - The list of tags associated with this image.
--
-- 'lastRecordedPullTime', 'imageDetail_lastRecordedPullTime' - The date and time, expressed in standard JavaScript date format, when
-- Amazon ECR recorded the last image pull.
--
-- Amazon ECR refreshes the last image pull timestamp at least once every
-- 24 hours. For example, if you pull an image once a day then the
-- @lastRecordedPullTime@ timestamp will indicate the exact time that the
-- image was last pulled. However, if you pull an image once an hour,
-- because Amazon ECR refreshes the @lastRecordedPullTime@ timestamp at
-- least once every 24 hours, the result may not be the exact time that the
-- image was last pulled.
--
-- 'registryId', 'imageDetail_registryId' - The Amazon Web Services account ID associated with the registry to which
-- this image belongs.
--
-- 'repositoryName', 'imageDetail_repositoryName' - The name of the repository to which this image belongs.
newImageDetail ::
  ImageDetail
newImageDetail :: ImageDetail
newImageDetail =
  ImageDetail'
    { $sel:artifactMediaType:ImageDetail' :: Maybe Text
artifactMediaType = forall a. Maybe a
Prelude.Nothing,
      $sel:imageDigest:ImageDetail' :: Maybe Text
imageDigest = forall a. Maybe a
Prelude.Nothing,
      $sel:imageManifestMediaType:ImageDetail' :: Maybe Text
imageManifestMediaType = forall a. Maybe a
Prelude.Nothing,
      $sel:imagePushedAt:ImageDetail' :: Maybe POSIX
imagePushedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:imageScanFindingsSummary:ImageDetail' :: Maybe ImageScanFindingsSummary
imageScanFindingsSummary = forall a. Maybe a
Prelude.Nothing,
      $sel:imageScanStatus:ImageDetail' :: Maybe ImageScanStatus
imageScanStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:imageSizeInBytes:ImageDetail' :: Maybe Integer
imageSizeInBytes = forall a. Maybe a
Prelude.Nothing,
      $sel:imageTags:ImageDetail' :: Maybe [Text]
imageTags = forall a. Maybe a
Prelude.Nothing,
      $sel:lastRecordedPullTime:ImageDetail' :: Maybe POSIX
lastRecordedPullTime = forall a. Maybe a
Prelude.Nothing,
      $sel:registryId:ImageDetail' :: Maybe Text
registryId = forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:ImageDetail' :: Maybe Text
repositoryName = forall a. Maybe a
Prelude.Nothing
    }

-- | The artifact media type of the image.
imageDetail_artifactMediaType :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_artifactMediaType :: Lens' ImageDetail (Maybe Text)
imageDetail_artifactMediaType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe Text
artifactMediaType :: Maybe Text
$sel:artifactMediaType:ImageDetail' :: ImageDetail -> Maybe Text
artifactMediaType} -> Maybe Text
artifactMediaType) (\s :: ImageDetail
s@ImageDetail' {} Maybe Text
a -> ImageDetail
s {$sel:artifactMediaType:ImageDetail' :: Maybe Text
artifactMediaType = Maybe Text
a} :: ImageDetail)

-- | The @sha256@ digest of the image manifest.
imageDetail_imageDigest :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_imageDigest :: Lens' ImageDetail (Maybe Text)
imageDetail_imageDigest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe Text
imageDigest :: Maybe Text
$sel:imageDigest:ImageDetail' :: ImageDetail -> Maybe Text
imageDigest} -> Maybe Text
imageDigest) (\s :: ImageDetail
s@ImageDetail' {} Maybe Text
a -> ImageDetail
s {$sel:imageDigest:ImageDetail' :: Maybe Text
imageDigest = Maybe Text
a} :: ImageDetail)

-- | The media type of the image manifest.
imageDetail_imageManifestMediaType :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_imageManifestMediaType :: Lens' ImageDetail (Maybe Text)
imageDetail_imageManifestMediaType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe Text
imageManifestMediaType :: Maybe Text
$sel:imageManifestMediaType:ImageDetail' :: ImageDetail -> Maybe Text
imageManifestMediaType} -> Maybe Text
imageManifestMediaType) (\s :: ImageDetail
s@ImageDetail' {} Maybe Text
a -> ImageDetail
s {$sel:imageManifestMediaType:ImageDetail' :: Maybe Text
imageManifestMediaType = Maybe Text
a} :: ImageDetail)

-- | The date and time, expressed in standard JavaScript date format, at
-- which the current image was pushed to the repository.
imageDetail_imagePushedAt :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.UTCTime)
imageDetail_imagePushedAt :: Lens' ImageDetail (Maybe UTCTime)
imageDetail_imagePushedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe POSIX
imagePushedAt :: Maybe POSIX
$sel:imagePushedAt:ImageDetail' :: ImageDetail -> Maybe POSIX
imagePushedAt} -> Maybe POSIX
imagePushedAt) (\s :: ImageDetail
s@ImageDetail' {} Maybe POSIX
a -> ImageDetail
s {$sel:imagePushedAt:ImageDetail' :: Maybe POSIX
imagePushedAt = Maybe POSIX
a} :: ImageDetail) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A summary of the last completed image scan.
imageDetail_imageScanFindingsSummary :: Lens.Lens' ImageDetail (Prelude.Maybe ImageScanFindingsSummary)
imageDetail_imageScanFindingsSummary :: Lens' ImageDetail (Maybe ImageScanFindingsSummary)
imageDetail_imageScanFindingsSummary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe ImageScanFindingsSummary
imageScanFindingsSummary :: Maybe ImageScanFindingsSummary
$sel:imageScanFindingsSummary:ImageDetail' :: ImageDetail -> Maybe ImageScanFindingsSummary
imageScanFindingsSummary} -> Maybe ImageScanFindingsSummary
imageScanFindingsSummary) (\s :: ImageDetail
s@ImageDetail' {} Maybe ImageScanFindingsSummary
a -> ImageDetail
s {$sel:imageScanFindingsSummary:ImageDetail' :: Maybe ImageScanFindingsSummary
imageScanFindingsSummary = Maybe ImageScanFindingsSummary
a} :: ImageDetail)

-- | The current state of the scan.
imageDetail_imageScanStatus :: Lens.Lens' ImageDetail (Prelude.Maybe ImageScanStatus)
imageDetail_imageScanStatus :: Lens' ImageDetail (Maybe ImageScanStatus)
imageDetail_imageScanStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe ImageScanStatus
imageScanStatus :: Maybe ImageScanStatus
$sel:imageScanStatus:ImageDetail' :: ImageDetail -> Maybe ImageScanStatus
imageScanStatus} -> Maybe ImageScanStatus
imageScanStatus) (\s :: ImageDetail
s@ImageDetail' {} Maybe ImageScanStatus
a -> ImageDetail
s {$sel:imageScanStatus:ImageDetail' :: Maybe ImageScanStatus
imageScanStatus = Maybe ImageScanStatus
a} :: ImageDetail)

-- | The size, in bytes, of the image in the repository.
--
-- If the image is a manifest list, this will be the max size of all
-- manifests in the list.
--
-- Beginning with Docker version 1.9, the Docker client compresses image
-- layers before pushing them to a V2 Docker registry. The output of the
-- @docker images@ command shows the uncompressed image size, so it may
-- return a larger image size than the image sizes returned by
-- DescribeImages.
imageDetail_imageSizeInBytes :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Integer)
imageDetail_imageSizeInBytes :: Lens' ImageDetail (Maybe Integer)
imageDetail_imageSizeInBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe Integer
imageSizeInBytes :: Maybe Integer
$sel:imageSizeInBytes:ImageDetail' :: ImageDetail -> Maybe Integer
imageSizeInBytes} -> Maybe Integer
imageSizeInBytes) (\s :: ImageDetail
s@ImageDetail' {} Maybe Integer
a -> ImageDetail
s {$sel:imageSizeInBytes:ImageDetail' :: Maybe Integer
imageSizeInBytes = Maybe Integer
a} :: ImageDetail)

-- | The list of tags associated with this image.
imageDetail_imageTags :: Lens.Lens' ImageDetail (Prelude.Maybe [Prelude.Text])
imageDetail_imageTags :: Lens' ImageDetail (Maybe [Text])
imageDetail_imageTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe [Text]
imageTags :: Maybe [Text]
$sel:imageTags:ImageDetail' :: ImageDetail -> Maybe [Text]
imageTags} -> Maybe [Text]
imageTags) (\s :: ImageDetail
s@ImageDetail' {} Maybe [Text]
a -> ImageDetail
s {$sel:imageTags:ImageDetail' :: Maybe [Text]
imageTags = Maybe [Text]
a} :: ImageDetail) 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 date and time, expressed in standard JavaScript date format, when
-- Amazon ECR recorded the last image pull.
--
-- Amazon ECR refreshes the last image pull timestamp at least once every
-- 24 hours. For example, if you pull an image once a day then the
-- @lastRecordedPullTime@ timestamp will indicate the exact time that the
-- image was last pulled. However, if you pull an image once an hour,
-- because Amazon ECR refreshes the @lastRecordedPullTime@ timestamp at
-- least once every 24 hours, the result may not be the exact time that the
-- image was last pulled.
imageDetail_lastRecordedPullTime :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.UTCTime)
imageDetail_lastRecordedPullTime :: Lens' ImageDetail (Maybe UTCTime)
imageDetail_lastRecordedPullTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe POSIX
lastRecordedPullTime :: Maybe POSIX
$sel:lastRecordedPullTime:ImageDetail' :: ImageDetail -> Maybe POSIX
lastRecordedPullTime} -> Maybe POSIX
lastRecordedPullTime) (\s :: ImageDetail
s@ImageDetail' {} Maybe POSIX
a -> ImageDetail
s {$sel:lastRecordedPullTime:ImageDetail' :: Maybe POSIX
lastRecordedPullTime = Maybe POSIX
a} :: ImageDetail) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Amazon Web Services account ID associated with the registry to which
-- this image belongs.
imageDetail_registryId :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_registryId :: Lens' ImageDetail (Maybe Text)
imageDetail_registryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe Text
registryId :: Maybe Text
$sel:registryId:ImageDetail' :: ImageDetail -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: ImageDetail
s@ImageDetail' {} Maybe Text
a -> ImageDetail
s {$sel:registryId:ImageDetail' :: Maybe Text
registryId = Maybe Text
a} :: ImageDetail)

-- | The name of the repository to which this image belongs.
imageDetail_repositoryName :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_repositoryName :: Lens' ImageDetail (Maybe Text)
imageDetail_repositoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageDetail' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:ImageDetail' :: ImageDetail -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: ImageDetail
s@ImageDetail' {} Maybe Text
a -> ImageDetail
s {$sel:repositoryName:ImageDetail' :: Maybe Text
repositoryName = Maybe Text
a} :: ImageDetail)

instance Data.FromJSON ImageDetail where
  parseJSON :: Value -> Parser ImageDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ImageDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ImageScanFindingsSummary
-> Maybe ImageScanStatus
-> Maybe Integer
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ImageDetail
ImageDetail'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"artifactMediaType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imageDigest")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imageManifestMediaType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imagePushedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imageScanFindingsSummary")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imageScanStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imageSizeInBytes")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imageTags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lastRecordedPullTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"registryId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"repositoryName")
      )

instance Prelude.Hashable ImageDetail where
  hashWithSalt :: Int -> ImageDetail -> Int
hashWithSalt Int
_salt ImageDetail' {Maybe Integer
Maybe [Text]
Maybe Text
Maybe POSIX
Maybe ImageScanFindingsSummary
Maybe ImageScanStatus
repositoryName :: Maybe Text
registryId :: Maybe Text
lastRecordedPullTime :: Maybe POSIX
imageTags :: Maybe [Text]
imageSizeInBytes :: Maybe Integer
imageScanStatus :: Maybe ImageScanStatus
imageScanFindingsSummary :: Maybe ImageScanFindingsSummary
imagePushedAt :: Maybe POSIX
imageManifestMediaType :: Maybe Text
imageDigest :: Maybe Text
artifactMediaType :: Maybe Text
$sel:repositoryName:ImageDetail' :: ImageDetail -> Maybe Text
$sel:registryId:ImageDetail' :: ImageDetail -> Maybe Text
$sel:lastRecordedPullTime:ImageDetail' :: ImageDetail -> Maybe POSIX
$sel:imageTags:ImageDetail' :: ImageDetail -> Maybe [Text]
$sel:imageSizeInBytes:ImageDetail' :: ImageDetail -> Maybe Integer
$sel:imageScanStatus:ImageDetail' :: ImageDetail -> Maybe ImageScanStatus
$sel:imageScanFindingsSummary:ImageDetail' :: ImageDetail -> Maybe ImageScanFindingsSummary
$sel:imagePushedAt:ImageDetail' :: ImageDetail -> Maybe POSIX
$sel:imageManifestMediaType:ImageDetail' :: ImageDetail -> Maybe Text
$sel:imageDigest:ImageDetail' :: ImageDetail -> Maybe Text
$sel:artifactMediaType:ImageDetail' :: ImageDetail -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
artifactMediaType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageDigest
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageManifestMediaType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
imagePushedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageScanFindingsSummary
imageScanFindingsSummary
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageScanStatus
imageScanStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
imageSizeInBytes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
imageTags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastRecordedPullTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
registryId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
repositoryName

instance Prelude.NFData ImageDetail where
  rnf :: ImageDetail -> ()
rnf ImageDetail' {Maybe Integer
Maybe [Text]
Maybe Text
Maybe POSIX
Maybe ImageScanFindingsSummary
Maybe ImageScanStatus
repositoryName :: Maybe Text
registryId :: Maybe Text
lastRecordedPullTime :: Maybe POSIX
imageTags :: Maybe [Text]
imageSizeInBytes :: Maybe Integer
imageScanStatus :: Maybe ImageScanStatus
imageScanFindingsSummary :: Maybe ImageScanFindingsSummary
imagePushedAt :: Maybe POSIX
imageManifestMediaType :: Maybe Text
imageDigest :: Maybe Text
artifactMediaType :: Maybe Text
$sel:repositoryName:ImageDetail' :: ImageDetail -> Maybe Text
$sel:registryId:ImageDetail' :: ImageDetail -> Maybe Text
$sel:lastRecordedPullTime:ImageDetail' :: ImageDetail -> Maybe POSIX
$sel:imageTags:ImageDetail' :: ImageDetail -> Maybe [Text]
$sel:imageSizeInBytes:ImageDetail' :: ImageDetail -> Maybe Integer
$sel:imageScanStatus:ImageDetail' :: ImageDetail -> Maybe ImageScanStatus
$sel:imageScanFindingsSummary:ImageDetail' :: ImageDetail -> Maybe ImageScanFindingsSummary
$sel:imagePushedAt:ImageDetail' :: ImageDetail -> Maybe POSIX
$sel:imageManifestMediaType:ImageDetail' :: ImageDetail -> Maybe Text
$sel:imageDigest:ImageDetail' :: ImageDetail -> Maybe Text
$sel:artifactMediaType:ImageDetail' :: ImageDetail -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
artifactMediaType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageDigest
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageManifestMediaType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
imagePushedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageScanFindingsSummary
imageScanFindingsSummary
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageScanStatus
imageScanStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
imageSizeInBytes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
imageTags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastRecordedPullTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registryId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
repositoryName