{-# 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 #-}
module Amazonka.ECRPublic.Types.ReferencedImageDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReferencedImageDetail = ReferencedImageDetail'
{
ReferencedImageDetail -> Maybe Text
imageManifestMediaType :: Prelude.Maybe Prelude.Text,
ReferencedImageDetail -> Maybe Integer
imageSizeInBytes :: Prelude.Maybe Prelude.Integer,
ReferencedImageDetail -> Maybe Text
imageDigest :: Prelude.Maybe Prelude.Text,
ReferencedImageDetail -> Maybe Text
artifactMediaType :: Prelude.Maybe Prelude.Text,
ReferencedImageDetail -> Maybe POSIX
imagePushedAt :: Prelude.Maybe Core.POSIX
}
deriving (ReferencedImageDetail -> ReferencedImageDetail -> Bool
(ReferencedImageDetail -> ReferencedImageDetail -> Bool)
-> (ReferencedImageDetail -> ReferencedImageDetail -> Bool)
-> Eq ReferencedImageDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReferencedImageDetail -> ReferencedImageDetail -> Bool
$c/= :: ReferencedImageDetail -> ReferencedImageDetail -> Bool
== :: ReferencedImageDetail -> ReferencedImageDetail -> Bool
$c== :: ReferencedImageDetail -> ReferencedImageDetail -> Bool
Prelude.Eq, ReadPrec [ReferencedImageDetail]
ReadPrec ReferencedImageDetail
Int -> ReadS ReferencedImageDetail
ReadS [ReferencedImageDetail]
(Int -> ReadS ReferencedImageDetail)
-> ReadS [ReferencedImageDetail]
-> ReadPrec ReferencedImageDetail
-> ReadPrec [ReferencedImageDetail]
-> Read ReferencedImageDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReferencedImageDetail]
$creadListPrec :: ReadPrec [ReferencedImageDetail]
readPrec :: ReadPrec ReferencedImageDetail
$creadPrec :: ReadPrec ReferencedImageDetail
readList :: ReadS [ReferencedImageDetail]
$creadList :: ReadS [ReferencedImageDetail]
readsPrec :: Int -> ReadS ReferencedImageDetail
$creadsPrec :: Int -> ReadS ReferencedImageDetail
Prelude.Read, Int -> ReferencedImageDetail -> ShowS
[ReferencedImageDetail] -> ShowS
ReferencedImageDetail -> String
(Int -> ReferencedImageDetail -> ShowS)
-> (ReferencedImageDetail -> String)
-> ([ReferencedImageDetail] -> ShowS)
-> Show ReferencedImageDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReferencedImageDetail] -> ShowS
$cshowList :: [ReferencedImageDetail] -> ShowS
show :: ReferencedImageDetail -> String
$cshow :: ReferencedImageDetail -> String
showsPrec :: Int -> ReferencedImageDetail -> ShowS
$cshowsPrec :: Int -> ReferencedImageDetail -> ShowS
Prelude.Show, (forall x. ReferencedImageDetail -> Rep ReferencedImageDetail x)
-> (forall x. Rep ReferencedImageDetail x -> ReferencedImageDetail)
-> Generic ReferencedImageDetail
forall x. Rep ReferencedImageDetail x -> ReferencedImageDetail
forall x. ReferencedImageDetail -> Rep ReferencedImageDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReferencedImageDetail x -> ReferencedImageDetail
$cfrom :: forall x. ReferencedImageDetail -> Rep ReferencedImageDetail x
Prelude.Generic)
newReferencedImageDetail ::
ReferencedImageDetail
newReferencedImageDetail :: ReferencedImageDetail
newReferencedImageDetail =
ReferencedImageDetail' :: Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReferencedImageDetail
ReferencedImageDetail'
{ $sel:imageManifestMediaType:ReferencedImageDetail' :: Maybe Text
imageManifestMediaType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageSizeInBytes:ReferencedImageDetail' :: Maybe Integer
imageSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:imageDigest:ReferencedImageDetail' :: Maybe Text
imageDigest = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:artifactMediaType:ReferencedImageDetail' :: Maybe Text
artifactMediaType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imagePushedAt:ReferencedImageDetail' :: Maybe POSIX
imagePushedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
referencedImageDetail_imageManifestMediaType :: Lens.Lens' ReferencedImageDetail (Prelude.Maybe Prelude.Text)
referencedImageDetail_imageManifestMediaType :: (Maybe Text -> f (Maybe Text))
-> ReferencedImageDetail -> f ReferencedImageDetail
referencedImageDetail_imageManifestMediaType = (ReferencedImageDetail -> Maybe Text)
-> (ReferencedImageDetail -> Maybe Text -> ReferencedImageDetail)
-> Lens
ReferencedImageDetail
ReferencedImageDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReferencedImageDetail' {Maybe Text
imageManifestMediaType :: Maybe Text
$sel:imageManifestMediaType:ReferencedImageDetail' :: ReferencedImageDetail -> Maybe Text
imageManifestMediaType} -> Maybe Text
imageManifestMediaType) (\s :: ReferencedImageDetail
s@ReferencedImageDetail' {} Maybe Text
a -> ReferencedImageDetail
s {$sel:imageManifestMediaType:ReferencedImageDetail' :: Maybe Text
imageManifestMediaType = Maybe Text
a} :: ReferencedImageDetail)
referencedImageDetail_imageSizeInBytes :: Lens.Lens' ReferencedImageDetail (Prelude.Maybe Prelude.Integer)
referencedImageDetail_imageSizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> ReferencedImageDetail -> f ReferencedImageDetail
referencedImageDetail_imageSizeInBytes = (ReferencedImageDetail -> Maybe Integer)
-> (ReferencedImageDetail
-> Maybe Integer -> ReferencedImageDetail)
-> Lens
ReferencedImageDetail
ReferencedImageDetail
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReferencedImageDetail' {Maybe Integer
imageSizeInBytes :: Maybe Integer
$sel:imageSizeInBytes:ReferencedImageDetail' :: ReferencedImageDetail -> Maybe Integer
imageSizeInBytes} -> Maybe Integer
imageSizeInBytes) (\s :: ReferencedImageDetail
s@ReferencedImageDetail' {} Maybe Integer
a -> ReferencedImageDetail
s {$sel:imageSizeInBytes:ReferencedImageDetail' :: Maybe Integer
imageSizeInBytes = Maybe Integer
a} :: ReferencedImageDetail)
referencedImageDetail_imageDigest :: Lens.Lens' ReferencedImageDetail (Prelude.Maybe Prelude.Text)
referencedImageDetail_imageDigest :: (Maybe Text -> f (Maybe Text))
-> ReferencedImageDetail -> f ReferencedImageDetail
referencedImageDetail_imageDigest = (ReferencedImageDetail -> Maybe Text)
-> (ReferencedImageDetail -> Maybe Text -> ReferencedImageDetail)
-> Lens
ReferencedImageDetail
ReferencedImageDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReferencedImageDetail' {Maybe Text
imageDigest :: Maybe Text
$sel:imageDigest:ReferencedImageDetail' :: ReferencedImageDetail -> Maybe Text
imageDigest} -> Maybe Text
imageDigest) (\s :: ReferencedImageDetail
s@ReferencedImageDetail' {} Maybe Text
a -> ReferencedImageDetail
s {$sel:imageDigest:ReferencedImageDetail' :: Maybe Text
imageDigest = Maybe Text
a} :: ReferencedImageDetail)
referencedImageDetail_artifactMediaType :: Lens.Lens' ReferencedImageDetail (Prelude.Maybe Prelude.Text)
referencedImageDetail_artifactMediaType :: (Maybe Text -> f (Maybe Text))
-> ReferencedImageDetail -> f ReferencedImageDetail
referencedImageDetail_artifactMediaType = (ReferencedImageDetail -> Maybe Text)
-> (ReferencedImageDetail -> Maybe Text -> ReferencedImageDetail)
-> Lens
ReferencedImageDetail
ReferencedImageDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReferencedImageDetail' {Maybe Text
artifactMediaType :: Maybe Text
$sel:artifactMediaType:ReferencedImageDetail' :: ReferencedImageDetail -> Maybe Text
artifactMediaType} -> Maybe Text
artifactMediaType) (\s :: ReferencedImageDetail
s@ReferencedImageDetail' {} Maybe Text
a -> ReferencedImageDetail
s {$sel:artifactMediaType:ReferencedImageDetail' :: Maybe Text
artifactMediaType = Maybe Text
a} :: ReferencedImageDetail)
referencedImageDetail_imagePushedAt :: Lens.Lens' ReferencedImageDetail (Prelude.Maybe Prelude.UTCTime)
referencedImageDetail_imagePushedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReferencedImageDetail -> f ReferencedImageDetail
referencedImageDetail_imagePushedAt = (ReferencedImageDetail -> Maybe POSIX)
-> (ReferencedImageDetail -> Maybe POSIX -> ReferencedImageDetail)
-> Lens
ReferencedImageDetail
ReferencedImageDetail
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReferencedImageDetail' {Maybe POSIX
imagePushedAt :: Maybe POSIX
$sel:imagePushedAt:ReferencedImageDetail' :: ReferencedImageDetail -> Maybe POSIX
imagePushedAt} -> Maybe POSIX
imagePushedAt) (\s :: ReferencedImageDetail
s@ReferencedImageDetail' {} Maybe POSIX
a -> ReferencedImageDetail
s {$sel:imagePushedAt:ReferencedImageDetail' :: Maybe POSIX
imagePushedAt = Maybe POSIX
a} :: ReferencedImageDetail) ((Maybe POSIX -> f (Maybe POSIX))
-> ReferencedImageDetail -> f ReferencedImageDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReferencedImageDetail
-> f ReferencedImageDetail
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
instance Core.FromJSON ReferencedImageDetail where
parseJSON :: Value -> Parser ReferencedImageDetail
parseJSON =
String
-> (Object -> Parser ReferencedImageDetail)
-> Value
-> Parser ReferencedImageDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReferencedImageDetail"
( \Object
x ->
Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReferencedImageDetail
ReferencedImageDetail'
(Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReferencedImageDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReferencedImageDetail)
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
"imageManifestMediaType")
Parser
(Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ReferencedImageDetail)
-> Parser (Maybe Integer)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> ReferencedImageDetail)
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 Text -> Maybe POSIX -> ReferencedImageDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> ReferencedImageDetail)
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 Text -> Maybe POSIX -> ReferencedImageDetail)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> ReferencedImageDetail)
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 -> ReferencedImageDetail)
-> Parser (Maybe POSIX) -> Parser ReferencedImageDetail
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")
)
instance Prelude.Hashable ReferencedImageDetail
instance Prelude.NFData ReferencedImageDetail