{-# 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-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)
module Amazonka.ECR.Types.ImageDetail where

import qualified Amazonka.Core as Core
import Amazonka.ECR.Types.ImageScanFindingsSummary
import Amazonka.ECR.Types.ImageScanStatus
import qualified Amazonka.Lens as Lens
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 Amazon Web Services account ID associated with the registry to which
    -- this image belongs.
    ImageDetail -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The list of tags associated with this image.
    ImageDetail -> Maybe [Text]
imageTags :: Prelude.Maybe [Prelude.Text],
    -- | The current state of the scan.
    ImageDetail -> Maybe ImageScanStatus
imageScanStatus :: Prelude.Maybe ImageScanStatus,
    -- | The media type of the image manifest.
    ImageDetail -> Maybe Text
imageManifestMediaType :: Prelude.Maybe Prelude.Text,
    -- | 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 @sha256@ digest of the image manifest.
    ImageDetail -> Maybe Text
imageDigest :: Prelude.Maybe Prelude.Text,
    -- | A summary of the last completed image scan.
    ImageDetail -> Maybe ImageScanFindingsSummary
imageScanFindingsSummary :: Prelude.Maybe ImageScanFindingsSummary,
    -- | The artifact media type of the image.
    ImageDetail -> Maybe Text
artifactMediaType :: 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 Core.POSIX,
    -- | The name of the repository to which this image belongs.
    ImageDetail -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text
  }
  deriving (ImageDetail -> ImageDetail -> Bool
(ImageDetail -> ImageDetail -> Bool)
-> (ImageDetail -> ImageDetail -> Bool) -> Eq ImageDetail
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]
(Int -> ReadS ImageDetail)
-> ReadS [ImageDetail]
-> ReadPrec ImageDetail
-> ReadPrec [ImageDetail]
-> Read 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
(Int -> ImageDetail -> ShowS)
-> (ImageDetail -> String)
-> ([ImageDetail] -> ShowS)
-> Show ImageDetail
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. ImageDetail -> Rep ImageDetail x)
-> (forall x. Rep ImageDetail x -> ImageDetail)
-> Generic ImageDetail
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:
--
-- 'registryId', 'imageDetail_registryId' - The Amazon Web Services account ID associated with the registry to which
-- this image belongs.
--
-- 'imageTags', 'imageDetail_imageTags' - The list of tags associated with this image.
--
-- 'imageScanStatus', 'imageDetail_imageScanStatus' - The current state of the scan.
--
-- 'imageManifestMediaType', 'imageDetail_imageManifestMediaType' - The media type of the image manifest.
--
-- '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.
--
-- 'imageDigest', 'imageDetail_imageDigest' - The @sha256@ digest of the image manifest.
--
-- 'imageScanFindingsSummary', 'imageDetail_imageScanFindingsSummary' - A summary of the last completed image scan.
--
-- 'artifactMediaType', 'imageDetail_artifactMediaType' - The artifact media type of the image.
--
-- 'imagePushedAt', 'imageDetail_imagePushedAt' - The date and time, expressed in standard JavaScript date format, at
-- which the current image was pushed to the repository.
--
-- 'repositoryName', 'imageDetail_repositoryName' - The name of the repository to which this image belongs.
newImageDetail ::
  ImageDetail
newImageDetail :: ImageDetail
newImageDetail =
  ImageDetail' :: Maybe Text
-> Maybe [Text]
-> Maybe ImageScanStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe ImageScanFindingsSummary
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ImageDetail
ImageDetail'
    { $sel:registryId:ImageDetail' :: Maybe Text
registryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageTags:ImageDetail' :: Maybe [Text]
imageTags = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:imageScanStatus:ImageDetail' :: Maybe ImageScanStatus
imageScanStatus = Maybe ImageScanStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:imageManifestMediaType:ImageDetail' :: Maybe Text
imageManifestMediaType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageSizeInBytes:ImageDetail' :: Maybe Integer
imageSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:imageDigest:ImageDetail' :: Maybe Text
imageDigest = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageScanFindingsSummary:ImageDetail' :: Maybe ImageScanFindingsSummary
imageScanFindingsSummary = Maybe ImageScanFindingsSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactMediaType:ImageDetail' :: Maybe Text
artifactMediaType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imagePushedAt:ImageDetail' :: Maybe POSIX
imagePushedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:ImageDetail' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> ImageDetail -> f ImageDetail
imageDetail_registryId = (ImageDetail -> Maybe Text)
-> (ImageDetail -> Maybe Text -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe Text) (Maybe Text)
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 list of tags associated with this image.
imageDetail_imageTags :: Lens.Lens' ImageDetail (Prelude.Maybe [Prelude.Text])
imageDetail_imageTags :: (Maybe [Text] -> f (Maybe [Text])) -> ImageDetail -> f ImageDetail
imageDetail_imageTags = (ImageDetail -> Maybe [Text])
-> (ImageDetail -> Maybe [Text] -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> ImageDetail -> f ImageDetail)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ImageDetail
-> f ImageDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The current state of the scan.
imageDetail_imageScanStatus :: Lens.Lens' ImageDetail (Prelude.Maybe ImageScanStatus)
imageDetail_imageScanStatus :: (Maybe ImageScanStatus -> f (Maybe ImageScanStatus))
-> ImageDetail -> f ImageDetail
imageDetail_imageScanStatus = (ImageDetail -> Maybe ImageScanStatus)
-> (ImageDetail -> Maybe ImageScanStatus -> ImageDetail)
-> Lens
     ImageDetail
     ImageDetail
     (Maybe ImageScanStatus)
     (Maybe 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 media type of the image manifest.
imageDetail_imageManifestMediaType :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_imageManifestMediaType :: (Maybe Text -> f (Maybe Text)) -> ImageDetail -> f ImageDetail
imageDetail_imageManifestMediaType = (ImageDetail -> Maybe Text)
-> (ImageDetail -> Maybe Text -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe Text) (Maybe Text)
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 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 :: (Maybe Integer -> f (Maybe Integer))
-> ImageDetail -> f ImageDetail
imageDetail_imageSizeInBytes = (ImageDetail -> Maybe Integer)
-> (ImageDetail -> Maybe Integer -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe Integer) (Maybe Integer)
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 @sha256@ digest of the image manifest.
imageDetail_imageDigest :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_imageDigest :: (Maybe Text -> f (Maybe Text)) -> ImageDetail -> f ImageDetail
imageDetail_imageDigest = (ImageDetail -> Maybe Text)
-> (ImageDetail -> Maybe Text -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe Text) (Maybe Text)
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)

-- | A summary of the last completed image scan.
imageDetail_imageScanFindingsSummary :: Lens.Lens' ImageDetail (Prelude.Maybe ImageScanFindingsSummary)
imageDetail_imageScanFindingsSummary :: (Maybe ImageScanFindingsSummary
 -> f (Maybe ImageScanFindingsSummary))
-> ImageDetail -> f ImageDetail
imageDetail_imageScanFindingsSummary = (ImageDetail -> Maybe ImageScanFindingsSummary)
-> (ImageDetail -> Maybe ImageScanFindingsSummary -> ImageDetail)
-> Lens
     ImageDetail
     ImageDetail
     (Maybe ImageScanFindingsSummary)
     (Maybe 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 artifact media type of the image.
imageDetail_artifactMediaType :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_artifactMediaType :: (Maybe Text -> f (Maybe Text)) -> ImageDetail -> f ImageDetail
imageDetail_artifactMediaType = (ImageDetail -> Maybe Text)
-> (ImageDetail -> Maybe Text -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe Text) (Maybe Text)
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 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ImageDetail -> f ImageDetail
imageDetail_imagePushedAt = (ImageDetail -> Maybe POSIX)
-> (ImageDetail -> Maybe POSIX -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX)) -> ImageDetail -> f ImageDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ImageDetail
-> f ImageDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the repository to which this image belongs.
imageDetail_repositoryName :: Lens.Lens' ImageDetail (Prelude.Maybe Prelude.Text)
imageDetail_repositoryName :: (Maybe Text -> f (Maybe Text)) -> ImageDetail -> f ImageDetail
imageDetail_repositoryName = (ImageDetail -> Maybe Text)
-> (ImageDetail -> Maybe Text -> ImageDetail)
-> Lens ImageDetail ImageDetail (Maybe Text) (Maybe Text)
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 Core.FromJSON ImageDetail where
  parseJSON :: Value -> Parser ImageDetail
parseJSON =
    String
-> (Object -> Parser ImageDetail) -> Value -> Parser ImageDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ImageDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe [Text]
-> Maybe ImageScanStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe ImageScanFindingsSummary
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> ImageDetail
ImageDetail'
            (Maybe Text
 -> Maybe [Text]
 -> Maybe ImageScanStatus
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Text
 -> Maybe ImageScanFindingsSummary
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> ImageDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe ImageScanStatus
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ImageScanFindingsSummary
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ImageDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"registryId")
            Parser
  (Maybe [Text]
   -> Maybe ImageScanStatus
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ImageScanFindingsSummary
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ImageDetail)
-> Parser (Maybe [Text])
-> Parser
     (Maybe ImageScanStatus
      -> Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ImageScanFindingsSummary
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageTags" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe ImageScanStatus
   -> Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ImageScanFindingsSummary
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ImageDetail)
-> Parser (Maybe ImageScanStatus)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Text
      -> Maybe ImageScanFindingsSummary
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageScanStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageScanStatus")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Text
   -> Maybe ImageScanFindingsSummary
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ImageDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe ImageScanFindingsSummary
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageManifestMediaType")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe ImageScanFindingsSummary
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ImageDetail)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe ImageScanFindingsSummary
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageSizeInBytes")
            Parser
  (Maybe Text
   -> Maybe ImageScanFindingsSummary
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> ImageDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe ImageScanFindingsSummary
      -> Maybe Text -> Maybe POSIX -> Maybe Text -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageDigest")
            Parser
  (Maybe ImageScanFindingsSummary
   -> Maybe Text -> Maybe POSIX -> Maybe Text -> ImageDetail)
-> Parser (Maybe ImageScanFindingsSummary)
-> Parser (Maybe Text -> Maybe POSIX -> Maybe Text -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageScanFindingsSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imageScanFindingsSummary")
            Parser (Maybe Text -> Maybe POSIX -> Maybe Text -> ImageDetail)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"artifactMediaType")
            Parser (Maybe POSIX -> Maybe Text -> ImageDetail)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> ImageDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"imagePushedAt")
            Parser (Maybe Text -> ImageDetail)
-> Parser (Maybe Text) -> Parser ImageDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"repositoryName")
      )

instance Prelude.Hashable ImageDetail

instance Prelude.NFData ImageDetail